Be prepared to a failure of setvbuf.
[gnulib.git] / ChangeLog
1 2007-04-23  Bruno Haible  <bruno@clisp.org>
2
3         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
4         Needed on HP-UX 11.
5
6 2007-04-16  Eric Blake  <ebb9@byu.net>
7
8         Make fflush rely on fpurge.
9         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
10         open coding all variants.
11         * modules/fflush (Depends-on): Add fpurge and unistd.
12         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
13         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
14
15         Fix --with-tests compilation on cygwin.
16         * modules/argmatch-tests (Makefile.am): List gnulib library first
17         in LDADD.
18         * modules/argp-tests (Makefile.am): Likewise.
19         * modules/array-list-tests (Makefile.am): Likewise.
20         * modules/array-oset-tests (Makefile.am): Likewise.
21         * modules/avltree-list-tests (Makefile.am): Likewise.
22         * modules/avltree-oset-tests (Makefile.am): Likewise.
23         * modules/avltreehash-list-tests (Makefile.am): Likewise.
24         * modules/carray-list-tests (Makefile.am): Likewise.
25         * modules/dirname-tests (Makefile.am): Likewise.
26         * modules/frexp-tests (Makefile.am): Likewise.
27         * modules/isnanl-tests (Makefile.am): Likewise.
28         * modules/linked-list-tests (Makefile.am): Likewise.
29         * modules/linkedhash-list-tests (Makefile.am): Likewise.
30         * modules/lock-tests (Makefile.am): Likewise.
31         * modules/rbtree-list-tests (Makefile.am): Likewise.
32         * modules/rbtree-oset-tests (Makefile.am): Likewise.
33         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
34         * modules/tls-tests (Makefile.am): Likewise.
35         * modules/tsearch-tests (Makefile.am): Likewise.
36         * modules/xvasprintf-tests (Makefile.am): Likewise.
37
38         Fix fpurge for cygwin.
39         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
40         value.
41         * modules/fpurge-tests (Depends-on): Clean up trash.
42
43 2007-04-16  Simon Josefsson  <simon@josefsson.org>
44
45         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
46
47         * m4/autobuild.m4: Re-indent.
48
49 2007-04-13  Bruno Haible  <bruno@clisp.org>
50
51         * modules/fpurge-tests: New file.
52         * tests/test-fpurge.c: New file.
53
54         * modules/fpurge: New file.
55         * lib/fpurge.h: New file.
56         * lib/fpurge.c: New file.
57         * m4/fpurge.m4: New file.
58
59 2007-04-13  Bruno Haible  <bruno@clisp.org>
60
61         * modules/fbufmode-tests: New file.
62         * tests/test-fbufmode.c: New file.
63
64         * modules/fbufmode: New file.
65         * lib/fbufmode.h: New file.
66         * lib/fbufmode.c: New file.
67         * m4/fbufmode.m4: New file.
68
69 2007-04-13  Bruno Haible  <bruno@clisp.org>
70
71         * modules/fwritable-tests: New file.
72         * tests/test-fwritable.c: New file.
73
74         * modules/fwritable: New file.
75         * lib/fwritable.h: New file.
76         * lib/fwritable.c: New file.
77         * m4/fwritable.m4: New file.
78
79 2007-04-13  Bruno Haible  <bruno@clisp.org>
80
81         * modules/freadable-tests: New file.
82         * tests/test-freadable.c: New file.
83
84         * modules/freadable: New file.
85         * lib/freadable.h: New file.
86         * lib/freadable.c: New file.
87         * m4/freadable.m4: New file.
88
89 2007-04-13  Bruno Haible  <bruno@clisp.org>
90
91         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
92         MOSTLYCLEANFILES.
93
94 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
95
96         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
97         gzip bootstrap.conf to avoid dragging in i18n machinery.
98         (gnulib_tool_option): Use it.
99
100 2007-04-13  Bruno Haible  <bruno@clisp.org>
101
102         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
103         %F directives.
104         * tests/test-vasprintf-posix.c (test_function): Likewise.
105         * tests/test-snprintf-posix.h (test_function): Likewise.
106         * tests/test-sprintf-posix.h (test_function): Likewise.
107         * tests/test-fprintf-posix.h (test_function): Likewise.
108         * tests/test-printf-posix.h (test_function): Likewise.
109         * tests/test-fprintf-posix.out: Likewise.
110
111 2007-04-13  Bruno Haible  <bruno@clisp.org>
112
113         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
114         * modules/tls-tests (configure.ac): Likewise.
115         Reported by Arto C. Nirkko <anirkko@insel.ch>.
116
117 2007-04-13  Bruno Haible  <bruno@clisp.org>
118
119         * lib/tls.c (glthread_tls_get): Fix return type.
120         Patch by Arto C. Nirkko <anirkko@insel.ch>.
121
122 2007-04-12  Eric Blake  <ebb9@byu.net>
123
124         * modules/gettime (Depends-on): Remove gettime.
125         Reported by Dmitry V. Levin.
126
127 2007-04-12  Bruno Haible  <bruno@clisp.org>
128
129         * modules/fflush (Include): Mention <stdio.h>.
130         * modules/strtoimax (Include): Mention <inttypes.h>.
131         * modules/strtoumax (Include): Likewise.
132
133 2007-04-12  Eric Blake  <ebb9@byu.net>
134
135         * .cvsignore: New file.
136         * .gitignore: Likewise.
137
138 2007-04-12  Bruno Haible  <bruno@clisp.org>
139
140         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
141         not before, since $(LDADD) often contains libgnu.a.
142         * modules/striconv-tests (test_striconv_LDADD): Likewise.
143         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
144         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
145         Needed on Cygwin.
146
147 2007-04-12  Eric Blake  <ebb9@byu.net>
148
149         Work around glibc's failure to flush stdin on fclose.
150         * lib/closein.c (close_stdin): Flush stdin before closing.
151
152         Work around glibc's failure to reset seekable stdin on exit.
153         * modules/closein: New module.
154         * lib/closein.c: New file.
155         * lib/closein.h: Likewise.
156         * m4/closein.m4: Likewise.
157         * MODULES.html.sh (File stream based Input/Output): Document it.
158
159 2007-04-12  Simon Josefsson  <simon@josefsson.org>
160
161         * gnulib-tool: Rename generated 'autobuild' script to
162         'do-autobuild' in --create-megatestdir output.
163
164         * doc/gnulib.texi (Build robot for gnulib): Fix.
165
166 2007-04-12  Simon Josefsson  <simon@josefsson.org>
167
168         * modules/sysexits (Depends-on): Add absolute-header.
169
170 2007-04-12  Eric Blake  <ebb9@byu.net>
171
172         No need to preserve errno on success.
173         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
174         Reported by Bruno Haible.
175
176 2007-04-12  Simon Josefsson  <simon@josefsson.org>
177
178         * MODULES.html.sh (Support for maintaining and releasing
179         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
180
181 2007-04-12  Simon Josefsson  <simon@josefsson.org>
182
183         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
184
185 2007-04-12  Simon Josefsson  <simon@josefsson.org>
186
187         * modules/autobuild: New module.
188
189         * m4/autobuild.m4: New file.
190
191 2007-04-11  Bruno Haible  <bruno@clisp.org>
192
193         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
194         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
195         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
196         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
197         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
198         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
199         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
200         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
201         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
202         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
203         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
204         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
205         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
206         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
207         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
208         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
209         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
210         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
211         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
212         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
213         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
214         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
215         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
216         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
217         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
218         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
219         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
220         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
221         Reported by Eric Blake.
222
223 2007-04-11  Bruno Haible  <bruno@clisp.org>
224
225         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
226
227 2007-04-10  Bruno Haible  <bruno@clisp.org>
228
229         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
230         for NaN and Infinity. Needed on FreeBSD 6.1.
231         * tests/test-vasnprintf-posix.c (test_function): Undo last change
232         regarding results for "%010a" of Infinity and NaN.
233         * tests/test-vasprintf-posix.c (test_function): Likewise.
234         * tests/test-snprintf-posix.h (test_function): Likewise.
235         * tests/test-sprintf-posix.h (test_function): Likewise.
236         * tests/test-fprintf-posix.h (test_function): Likewise.
237         * tests/test-printf-posix.h (test_function): Likewise.
238         * tests/test-fprintf-posix.out: Likewise.
239
240 2007-04-10  Bruno Haible  <bruno@clisp.org>
241
242         * modules/locale-tests: New file.
243         * tests/test-locale.c: New file.
244
245         * modules/locale: New file.
246         * lib/locale_.h: New file.
247         * m4/locale_h.m4: New file.
248
249 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
250             Bruno Haible  <bruno@clisp.org>
251
252         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
253         be determined, test for availability of the copysignf, copysign,
254         copysignl functions.
255         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
256         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
257         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
258
259 2007-04-09  Eric Blake  <ebb9@byu.net>
260
261         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
262         * modules/stdio (Makefile.am): Support fflush.
263         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
264         * modules/fflush: New file.
265         * lib/fflush.c: Likewise.
266         * m4/fflush.m4: Likewise.
267         * modules/fflush-tests: New test.
268         * tests/test-fflush.c: Likewise.
269         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
270
271 2007-04-06  Bruno Haible  <bruno@clisp.org>
272
273         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
274         (VASNPRINTF): Use signbit for faster determination whether to print a
275         minus sign.
276         * modules/vasnprintf (Files): Remove lib/float+.h.
277         * modules/fprintf-posix (Depends-on): Add signbit.
278         * modules/snprintf-posix (Depends-on): Likewise.
279         * modules/sprintf-posix (Depends-on): Likewise.
280         * modules/vasnprintf-posix (Depends-on): Likewise.
281         * modules/vasprintf-posix (Depends-on): Likewise.
282         * modules/vfprintf-posix (Depends-on): Likewise.
283         * modules/vsnprintf-posix (Depends-on): Likewise.
284         * modules/vsprintf-posix (Depends-on): Likewise.
285
286 2007-04-06  Bruno Haible  <bruno@clisp.org>
287
288         * tests/test-frexp.c (main): Test also the sign bit of zero results.
289         * tests/test-frexpl.c (main): Likewise.
290         * tests/test-ldexpl.c (main): Likewise.
291         * modules/frexp-tests (Depends-on): Add signbit.
292         * modules/frexpl-tests (Depdends-on): Likewise.
293         * modules/ldexpl-tests (Depdends-on): Likewise.
294
295 2007-04-06  Bruno Haible  <bruno@clisp.org>
296
297         * modules/signbit-tests: New file.
298         * tests/test-signbit.c: New file.
299
300         * modules/signbit: New file.
301         * lib/signbitf.c: New file.
302         * lib/signbitd.c: New file.
303         * lib/signbitl.c: New file.
304         * m4/signbit.m4: New file.
305         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
306         (signbit): New macro.
307         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
308         REPLACE_SIGNBIT.
309         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
310         REPLACE_FREXPL into math.h.
311
312 2007-04-06  Bruno Haible  <bruno@clisp.org>
313
314         * modules/isnanf-nolibm-tests: New file.
315         * tests/test-isnanf.c: New file.
316
317         * modules/isnanf-nolibm: New file.
318         * lib/isnanf.h: New file.
319         * lib/isnanf.c: New file.
320         * lib/isnan.c: Consider the USE_FLOAT macro.
321         * m4/isnanf.m4: New file.
322
323 2007-04-06  Bruno Haible  <bruno@clisp.org>
324
325         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
326         (Link): New section.
327
328         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
329
330 2007-04-06  Bruno Haible  <bruno@clisp.org>
331
332         Assume the 'long double' type.
333         * m4/longdouble.m4: Remove file.
334         * config/srclist.txt: Don't mention longdouble.m4.
335         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
336         * lib/float+.h: Likewise.
337         * lib/frexp.c: Likewise.
338         * lib/printf-args.h: Likewise.
339         * lib/printf-args.c: Likewise.
340         * lib/printf-frexp.c: Likewise.
341         * lib/printf-parse.c: Likewise.
342         * lib/vasnprintf.c: Likewise.
343         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
344         * m4/intl.m4: Likewise.
345         * m4/isnanl.m4: Likewise.
346         * m4/printf.m4: Likewise.
347         * m4/printf-frexpl.m4: Likewise.
348         * m4/vasnprintf.m4: Likewise.
349         * modules/allocsa (Files): Remove m4/longdouble.m4.
350         * modules/gettext (Files): Likewise.
351         * modules/relocatable-prog-wrapper (Files): Likewise.
352         * modules/vasnprintf (Files): Likewise.
353         * modules/isnanl (Files): Likewise.
354         (Include): Simplify.
355         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
356         (Include): Simplify.
357         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
358         (Include): Simplify.
359         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
360         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
361         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
362         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
363         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
364         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
365         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
366         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
367         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
368         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
369         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
370         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
371         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
372         * tests/test-isnanl.c: Likewise.
373         * tests/test-snprintf-posix.h: Likewise.
374         * tests/test-sprintf-posix.h: Likewise.
375         * tests/test-vasnprintf-posix.c: Likewise.
376         * tests/test-vasnprintf-posix2.c: Likewise.
377         * tests/test-vasprintf-posix.c: Likewise.
378
379 2007-04-06  Bruno Haible  <bruno@clisp.org>
380
381         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
382         * lib/math_.h [__DECC]: Include the overridden include file through
383         #include_next, outside the double-inclusion guard.
384         * lib/stdio_.h [__DECC]: Likewise.
385         * lib/stdlib_.h [__DECC]: Likewise.
386         * lib/string_.h [__DECC]: Likewise.
387         * lib/time_.h [__DECC]: Likewise.
388         * lib/wchar_.h [__DECC]: Likewise.
389         * lib/wctype_.h [__DECC]: Likewise.
390         * lib/inttypes_.h [__DECC]: Likewise.
391         Reported by Albert Chin <china@thewrittenword.com> in
392         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
393
394 2007-04-04  Eric Blake  <ebb9@byu.net>
395
396         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
397         1.5.x.
398
399 2007-04-04  Bruno Haible  <bruno@clisp.org>
400
401         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
402         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
403
404 2007-04-04  Bruno Haible  <bruno@clisp.org>
405
406         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
407         results for "%010a" of Infinity and NaN.
408         * tests/test-vasprintf-posix.c (test_function): Likewise.
409         * tests/test-snprintf-posix.h (test_function): Likewise.
410         * tests/test-sprintf-posix.h (test_function): Likewise.
411         * tests/test-fprintf-posix.h (test_function): Remove these tests.
412         * tests/test-printf-posix.h (test_function): Likewise.
413         * tests/test-fprintf-posix.out: Update.
414         Needed for FreeBSD 6.1.
415
416 2007-04-04  Bruno Haible  <bruno@clisp.org>
417
418         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
419         directly used by the gnulib modules nor by gnulib-tool.
420
421 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
422
423         * DEPENDENCIES: Give overall description of version dependency
424         desirability.  Use more-typical names for apps.
425         Add shell, coreutils, diffutils, grep, tar, gzip.
426
427 2007-04-04  Simon Josefsson  <simon@josefsson.org>
428
429         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
430
431 2007-04-04  Karl Berry  <karl@gnu.org>
432
433         * MODULES.html.sh (func_module): missing '.
434
435 2007-04-03  Bruno Haible  <bruno@clisp.org>
436
437         * modules/argmatch-tests (Makefile.am): New variable
438         test_argmatch_LDADD.
439         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
440         * modules/array-list-tests (Makefile.am): New variable
441         test_array_list_LDADD.
442         * modules/array-oset-tests (Makefile.am): New variable
443         test_array_oset_LDADD.
444         * modules/avltree-list-tests (Makefile.am): New variable
445         test_avltree_list_LDADD.
446         * modules/avltree-oset-tests (Makefile.am): New variable
447         test_avltree_oset_LDADD.
448         * modules/avltreehash-list-tests (Makefile.am): New variable
449         test_avltreehash_list_LDADD.
450         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
451         test_canonicalize_lgpl_LDADD.
452         * modules/carray-list-tests (Makefile.am): New variable
453         test_carray_list_LDADD.
454         * modules/dirname-tests (Makefile.am): New variable
455         test_dirname_LDADD.
456         * modules/linked-list-tests (Makefile.am): New variable
457         test_linked_list_LDADD.
458         * modules/linkedhash-list-tests (Makefile.am): New variable
459         test_linkedhash_list_LDADD.
460         * modules/rbtree-list-tests (Makefile.am): New variable
461         test_rbtree_list_LDADD.
462         * modules/rbtree-oset-tests (Makefile.am): New variable
463         test_rbtree_oset_LDADD.
464         * modules/rbtreehash-list-tests (Makefile.am): New variable
465         test_rbtreehash_list_LDADD.
466         * modules/xvasprintf-tests (Makefile.am): New variable
467         test_xvasprintf_LDADD.
468         Reported by Eric Blake.
469
470 2007-04-03  Eric Blake  <ebb9@byu.net>
471
472         * DEPENDENCIES: Weaken m4 requirements.
473
474 2007-04-03  Bruno Haible  <bruno@clisp.org>
475
476         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
477         * modules/isnanl-tests (configure.ac): Likewise.
478
479 2007-04-03  Ben Pfaff  <blp@gnu.org>
480
481         * modules/iconv_open: Add $(srcdir)/ to source directory
482         references in Makefile fragments that call gperf, to fix VPATH
483         builds.
484
485 2007-04-03  Bruno Haible  <bruno@clisp.org>
486
487         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
488         * lib/ldexpl.c: Undo last change.
489
490 2007-04-03  Bruno Haible  <bruno@clisp.org>
491
492         * modules/printf-frexpl (Depends-on): Undo last change.
493         (Files): Add m4/ldexpl.m4.
494
495 2007-04-03  Bruno Haible  <bruno@clisp.org>
496
497         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
498         * modules/isnanl (Link): New section.
499
500         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
501         * modules/frexp (Link): New section.
502
503         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
504         * modules/frexpl (Link): New section.
505
506         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
507         * modules/ldexpl (Link): New section.
508
509 2007-04-03  Bruno Haible  <bruno@clisp.org>
510
511         * modules/TEMPLATE-EXTENDED: New file.
512         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
513
514 2007-04-03  Bruno Haible  <bruno@clisp.org>
515
516         * DEPENDENCIES: New file.
517         Suggested by Simon Josefsson.
518
519 2007-04-03  Bruno Haible  <bruno@clisp.org>
520
521         * doc/gnulib.texi: Escape @.
522
523 2007-04-03  James Youngman  <jay@gnu.org>
524         and Paul Eggert  <eggert@cs.ucla.edu>
525
526         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
527         birthtime on all systems that have birthtime, not just those which
528         use st_birthtimensec rather than st_birthtim.  Putting zero in
529         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
530         that the birth time is not available for files on an NFS mount.
531
532 2007-04-03  Simon Josefsson  <simon@josefsson.org>
533
534         * modules/memxor: Move back from crypto/, suggested by Bruno.
535         * modules/crypto/hmac-sha1: Fix memxor dependency.
536
537         * modules/crypto/gc: Moved from ../.
538
539 2007-04-02  Eric Blake  <ebb9@byu.net>
540
541         * lib/ldexpl.c (includes): Avoid libm.
542
543         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
544
545 2007-04-02  Bruno Haible  <bruno@clisp.org>
546
547         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
548         on IRIX.
549
550 2007-04-02  Bruno Haible  <bruno@clisp.org>
551
552         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
553         x86 or x86_64 platforms running MacOS X.
554         Reported by Ryan Schmidt <@ryandesign.com>.
555
556 2007-04-02  Bruno Haible  <bruno@clisp.org>
557
558         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
559         i386.
560
561 2007-04-01  Simon Josefsson  <simon@josefsson.org>
562
563         * modules/crypto/arcfour: Moved from ../.
564         * modules/crypto/arcfour-tests: Moved from ../.
565         * modules/crypto/arctwo: Moved from ../.
566         * modules/crypto/arctwo-tests: Moved from ../.
567         * modules/crypto/des: Moved from ../.
568         * modules/crypto/des-tests: Moved from ../.
569         * modules/crypto/gc-arcfour: Moved from ../.
570         * modules/crypto/gc-arcfour-tests: Moved from ../.
571         * modules/crypto/gc-arctwo: Moved from ../.
572         * modules/crypto/gc-arctwo-tests: Moved from ../.
573         * modules/crypto/gc-des: Moved from ../.
574         * modules/crypto/gc-des-tests: Moved from ../.
575         * modules/crypto/gc-hmac-md5: Moved from ../.
576         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
577         * modules/crypto/gc-hmac-sha1: Moved from ../.
578         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
579         * modules/crypto/gc-md2: Moved from ../.
580         * modules/crypto/gc-md2-tests: Moved from ../.
581         * modules/crypto/gc-md4: Moved from ../.
582         * modules/crypto/gc-md4-tests: Moved from ../.
583         * modules/crypto/gc-md5: Moved from ../.
584         * modules/crypto/gc-md5-tests: Moved from ../.
585         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
586         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
587         * modules/crypto/gc-random: Moved from ../.
588         * modules/crypto/gc-rijndael: Moved from ../.
589         * modules/crypto/gc-rijndael-tests: Moved from ../.
590         * modules/crypto/gc-sha1: Moved from ../.
591         * modules/crypto/gc-sha1-tests: Moved from ../.
592         * modules/crypto/gc-tests: Moved from ../.
593         * modules/crypto/hmac-md5: Moved from ../.
594         * modules/crypto/hmac-md5-tests: Moved from ../.
595         * modules/crypto/hmac-sha1: Moved from ../.
596         * modules/crypto/hmac-sha1-tests: Moved from ../.
597         * modules/crypto/md2: Moved from ../.
598         * modules/crypto/md2-tests: Moved from ../.
599         * modules/crypto/md4: Moved from ../.
600         * modules/crypto/md4-tests: Moved from ../.
601         * modules/crypto/md5: Moved from ../.
602         * modules/crypto/md5-tests: Moved from ../.
603         * modules/crypto/memxor: Moved from ../.
604         * modules/crypto/rijndael: Moved from ../.
605         * modules/crypto/rijndael-tests: Moved from ../.
606         * modules/crypto/sha1: Moved from ../.
607
608 2007-03-30  James Youngman  <jay@gnu.org>
609
610         * tests/test-stat-time.c (prepare_test): use chmod() rather than
611         rename() to change the ctime of a file (because ctime is unaffected
612         by rename on jfs2 on AIX 5.1).
613         (main): Start by doing cleanup, in case a previous run failed leaving
614         test files behind.
615
616 2007-03-31  Bruno Haible  <bruno@clisp.org>
617
618         Support old proprietary implementations of iconv.
619         * modules/iconv_open: New file.
620         * lib/iconv_.h: New file.
621         * m4/iconv_h.m4: New file.
622         * lib/iconv_open.c: New file.
623         * lib/iconv_open-aix.gperf: New file.
624         * lib/iconv_open-hpux.gperf: New file.
625         * lib/iconv_open-irix.gperf: New file.
626         * lib/iconv_open-osf.gperf: New file.
627         * m4/iconv_open.m4: New file.
628         * modules/linebreak (Depends-on): Add iconv_open.
629         * modules/striconv (Depends-on): Likewise.
630         * modules/striconveh (Depends-on): Likewise.
631         * modules/unicodeio (Depends-on): Likewise.
632         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
633         (iconv_t)(-1).
634         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
635         conversion if cd is (iconv_t)(-1).
636         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
637         is not possible.
638
639 2007-03-31  Bruno Haible  <bruno@clisp.org>
640
641         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
642         work on Solaris either. Protect also second use of "autodetect_jp".
643
644 2007-03-31  Bruno Haible  <bruno@clisp.org>
645
646         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
647         the function is not present.
648
649 2007-03-31  Bruno Haible  <bruno@clisp.org>
650
651         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
652         the function is not present.
653
654 2007-03-31  Bruno Haible  <bruno@clisp.org>
655
656         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
657         a bug in HP-UX iconv_open().
658
659 2007-03-31  Bruno Haible  <bruno@clisp.org>
660
661         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
662         (Mathematics <math.h>): New section, add fpieee.
663         (Input/output <stdio.h>): Add fseterr.
664         (Mathematics <math.h>): New section, add printf-frexp.
665         (Container data structures): Add sublist.
666         (Core language properties): Add fpucw, inline.
667         (Functions for greatest-width integer types <inttypes.h>): Add
668         imaxabs, imaxdiv, inttypes.
669         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
670         isnanl-nolibm, ldexp.
671         (Mathematics <math.h>): New section, add printf-frexpl.
672         (Support for systems lacking POSIX:2001): Add fprintf-posix,
673         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
674         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
675         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
676         (Unicode string functions): Add unistr/u*-mbtoucr.
677         (Java): Add javacomp-script, javaexec-script.
678         (C#): Add csharpcomp-script, csharpexec-script.
679         (Support for building libraries and executables): Add havelib,
680         relocatable-*.
681         (Support for maintaining and releasing projects): Renamed from
682         'Support for maintaining and release projects'. Add announce-gen.
683
684 2007-03-31  Bruno Haible  <bruno@clisp.org>
685
686         * README: Talk primarily about git.
687         (git and CVS): Renamed from CVS.
688         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
689         gnulib is available through git.
690         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
691
692 2007-03-30  Bruno Haible  <bruno@clisp.org>
693
694         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
695         * lib/poll_.h: Likewise.
696         * lib/stat_.h: Likewise.
697         * lib/sys_time_.h: Likewise.
698         * lib/sysexit_.h: Likewise.
699         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
700         * lib/stdbool_.h: Likewise.
701         * lib/byteswap_.h: Add double-inclusion guard.
702
703 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
704
705         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
706
707 2007-03-30  Karl Berry  <karl@gnu.org>
708
709         * config/srclist-update: double space after USA in the license
710         substitution, since that's how it's usually (?) written.
711
712 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
713
714         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
715         reported by Bruno Haible.
716
717 2007-03-29  Bruno Haible  <bruno@clisp.org>
718
719         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
720         a bug in AIX iconv().
721
722 2007-03-29  Bruno Haible  <bruno@clisp.org>
723
724         * modules/ldexpl-tests: New file.
725         * tests/test-ldexpl.c: New file.
726
727 2007-03-29  Bruno Haible  <bruno@clisp.org>
728
729         * lib/ldexpl.c: Include fpucw.h.
730         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
731         multiplication.
732         * modules/ldexpl (Depends-on): Add fpucw.
733
734 2007-03-29  Bruno Haible  <bruno@clisp.org>
735
736         * modules/ldexpl: New file.
737         * m4/ldexpl.m4: New file.
738         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
739         set.
740         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
741         REPLACE_LDEXPL.
742         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
743         REPLACE_LDEXPL.
744         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
745         gl_FUNC_LDEXPL_WORKS.
746         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
747         * modules/mathl (Files): Remove lib/ldexpl.c.
748         (Depends-on): Add ldexpl.
749
750 2007-03-29  Bruno Haible  <bruno@clisp.org>
751
752         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
753
754 2007-03-29  Bruno Haible  <bruno@clisp.org>
755
756         * tests/test-striconveh.c (main): Don't assume that a direct conversion
757         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
758         and possibly also HP-UX.
759         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
760         work on AIX, IRIX, HP-UX, OSF/1.
761         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
762         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
763         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
764         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
765         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
766         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
767
768 2007-03-29  Bruno Haible  <bruno@clisp.org>
769
770         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
771
772 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
773
774         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
775         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
776
777 2007-03-29  Eric Blake  <ebb9@byu.net>
778
779         * lib/acl-internal.h: Remove redundant include.
780         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
781         Cygwin when a file is locked.
782
783 2007-03-29  Bruno Haible  <bruno@clisp.org>
784
785         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
786         file.
787         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
788
789 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
790
791         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
792         try to remove a parent directory if the child couldn't be removed
793         (except for the first rmdir, which could fail because the child
794         doesn't exist).  Problem reported by Jeff Blaine in
795         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
796
797 2007-03-28  Bruno Haible  <bruno@clisp.org>
798
799         * lib/striconveh.c (utf8conv_carefully): New function.
800         (mem_cd_iconveh_internal): Invoke it.
801
802 2007-03-28  Bruno Haible  <bruno@clisp.org>
803
804         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
805         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
806         input.
807         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
808         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
809         unistr/u8-uctomb.
810
811 2007-03-28  Bruno Haible  <bruno@clisp.org>
812
813         * modules/unistr/u8-mbtoucr: New file.
814         * lib/unistr/u8-mbtoucr.c: New file.
815         * modules/unistr/u16-mbtoucr: New file.
816         * lib/unistr/u16-mbtoucr.c: New file.
817         * modules/unistr/u16-mbtoucr: New file.
818         * lib/unistr/u16-mbtoucr.c: New file.
819         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
820
821 2007-03-27  Simon Josefsson  <simon@josefsson.org>
822             Bruno Haible  <bruno@clisp.org>
823
824         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
825         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
826         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
827
828         * m4/stdio_h.m4: Add stubs for vasprintf too.
829
830         * modules/stdio: Support vasprintf in sed command.
831
832         * modules/vasprintf: Depend on stdio for prototypes.  Remove
833         vasprintf.h.  Add stdio module indicator.
834
835         * lib/stdio_.h: Declare asprintf and vasprintf, based on
836         vasprintf.h.
837
838         * lib/vasprintf.h: File removed.
839
840         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
841         * lib/vasprintf.c: Ditto.
842         * lib/xvasprintf.c: Ditto.
843         * tests/test-vasprintf-posix.c: Ditto.
844         * tests/test-vasprintf.c: Ditto.
845
846 2007-03-27  Bruno Haible  <bruno@clisp.org>
847
848         Make vasnprintf multithread-safe.
849         * lib/vasnprintf.c (decimal_point_char): New function.
850         (VASNPRINTF): Use it.
851         Suggested by Simon Josefsson.
852
853 2007-03-27  Eric Blake  <ebb9@byu.net>
854
855         Support sub-second birthtime on cygwin.
856         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
857         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
858         (get_stat_birthtime): Also work with st_birthtim.
859
860 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
861
862         * lib/stat-time.h (USE_BIRTHTIME): Remove.
863         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
864         (get_stat_birthtime_ns): Do not try to use "spare" fields.
865         (get_stat_birthtime_ns): Simplify compile-time tests.
866         (get_stat_birthtime): Change the API to look like
867         get_stat_mtime etc., except return a negative tv_nsec on error.
868         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
869         Don't check for "spare" fields.
870         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
871         or for struct stat.st_birthtime, as these tests aren't used.
872         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
873
874 2007-03-27  Bruno Haible  <bruno@clisp.org>
875
876         * lib/stat-time.h: Include <sys/stat.h>.
877
878 2007-03-27  James Youngman  <jay@gnu.org>
879
880         * lib/stat-time.h (get_stat_birthtime): New function for
881           retrieving st_birthtime as provided by UFS2 (hence *BSD).
882         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
883           and its variants.
884         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
885         * modules/stat-time-test: New file.
886         * tests/test-stat-time.c: New test, devised by Bruno Haible.
887
888 2007-03-26  Bruno Haible  <bruno@clisp.org>
889
890         Better support of signalling NaNs.
891         * lib/atanl.c: Include isnanl.h.
892         (atanl): Perform test for NaN at the beginning of the function and
893         through a call to isnanl.
894         * lib/cosl.c: Include isnanl.h.
895         (cosl): Perform test for NaN at the beginning of the function and
896         through a call to isnanl.
897         * lib/ldexpl.c: Include isnanl.h.
898         (ldexpl): Perform test for NaN through a call to isnanl.
899         * lib/logl.c: Include isnanl.h.
900         (logl): Perform test for NaN at the beginning of the function and
901         through a call to isnanl.
902         * lib/sinl.c: Include isnanl.h.
903         (sinl): Perform test for NaN at the beginning of the function and
904         through a call to isnanl.
905         * lib/sqrtl.c: Include isnanl.h.
906         (sqrtl): Perform test for NaN at the beginning of the function and
907         through a call to isnanl.
908         * lib/tanl.c: Include isnanl.h.
909         (tanl): Perform test for NaN at the beginning of the function and
910         through a call to isnanl.
911         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
912         * modules/mathl (Depends-on): Add isnanl.
913
914 2007-03-26  Eric Blake  <ebb9@byu.net>
915
916         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
917         regression in logic sense of previous patch.
918
919 2007-03-26  Bruno Haible  <bruno@clisp.org>
920
921         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
922         unportable shell command "if ! ...".
923         Reported by Ralf Wildenhues.
924
925 2007-03-25  Bruno Haible  <bruno@clisp.org>
926
927         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
928         <sysexits.h> file, and only add EX_CONFIG.
929         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
930         absolute file name and whether it is sufficient. Substitute also
931         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
932         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
933         ABSOLUTE_SYSEXITS_H into sysexits.h.
934
935 2007-03-25  Bruno Haible  <bruno@clisp.org>
936
937         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
938         hints is NULL.
939
940 2007-03-25  Bruno Haible  <bruno@clisp.org>
941
942         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
943         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
944
945 2007-03-25  Bruno Haible  <bruno@clisp.org>
946
947         * lib/vasnprintf.c: Include langinfo.h.
948         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
949         multithread-safe.
950         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
951         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
952         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
953         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
954         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
955         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
956         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
957         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
958         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
959         Reported by Simon Josefsson.
960
961 2007-03-25  Bruno Haible  <bruno@clisp.org>
962
963         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
964         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
965         * modules/vasnprintf (Depends-on): Add stdint.
966
967 2007-03-25  Bruno Haible  <bruno@clisp.org>
968
969         * modules/fpieee: New file.
970         * m4/fpieee.m4: New file.
971         * modules/isnan-nolibm (Depends-on): Add fpieee.
972         * modules/isnanl-nolibm (Depends-on): Add fpieee.
973         * modules/isnanl (Depends-on): Add fpieee.
974
975 2007-03-25  Bruno Haible  <bruno@clisp.org>
976
977         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
978
979 2007-03-25  Bruno Haible  <bruno@clisp.org>
980
981         Avoid test failures on IRIX 6.5.
982         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
983         (main): Use it.
984         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
985         macros.
986         (main): Use them.
987
988 2007-03-25  Bruno Haible  <bruno@clisp.org>
989
990         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
991         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
992         exists but doesn't work.
993         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
994         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
995         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
996         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
997
998 2007-03-25  Bruno Haible  <bruno@clisp.org>
999
1000         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
1001         returns inf. Needed on IRIX 6.5.
1002
1003 2007-03-25  Bruno Haible  <bruno@clisp.org>
1004
1005         * tests/test-frexpl.c: Include isnanl-nolibm.h.
1006         (main): Use isnanl instead of x != x idiom.
1007         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
1008
1009         * tests/test-frexp.c: Include isnan.h.
1010         (main): Use isnan instead of x != x idiom.
1011         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
1012
1013 2007-03-25  Bruno Haible  <bruno@clisp.org>
1014
1015         * tests/test-frexp.c (NaN): New function/macro.
1016         (main): Use it instead of 0.0 / 0.0.
1017         * tests/test-isnan.c (NaN): New function/macro.
1018         (main): Use it instead of 0.0 / 0.0.
1019         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
1020         (test_function): Use it instead of 0.0 / 0.0.
1021         * tests/test-vasprintf-posix.c (NaN): New function/macro.
1022         (test_function): Use it instead of 0.0 / 0.0.
1023         * tests/test-snprintf-posix.h (NaN): New function/macro.
1024         (test_function): Use it instead of 0.0 / 0.0.
1025         * tests/test-sprintf-posix.h (NaN): New function/macro.
1026         (test_function): Use it instead of 0.0 / 0.0.
1027         * tests/test-fprintf-posix.h (NaN): New function/macro.
1028         (test_function): Use it instead of 0.0 / 0.0.
1029         * tests/test-printf-posix.h (NaN): New function/macro.
1030         (test_function): Use it instead of 0.0 / 0.0.
1031
1032         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
1033
1034 2007-03-25  Bruno Haible  <bruno@clisp.org>
1035
1036         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
1037
1038 2007-03-25  Bruno Haible  <bruno@clisp.org>
1039
1040         * lib/regexec.c (merge_state_with_log): Make static.
1041
1042 2007-03-25  Bruno Haible  <bruno@clisp.org>
1043
1044         * lib/trigl.c (kernel_rem_pio2): Make static.
1045
1046 2007-03-25  Bruno Haible  <bruno@clisp.org>
1047
1048         * lib/sincosl.c (sincosl_table): Make static.
1049
1050 2007-03-25  Bruno Haible  <bruno@clisp.org>
1051
1052         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
1053         if the compiler does not support C99.
1054
1055 2007-03-25  Bruno Haible  <bruno@clisp.org>
1056
1057         * modules/time (Makefile.am): Ensure all rule action lines start with a
1058         tab.
1059
1060 2007-03-24  Bruno Haible  <bruno@clisp.org>
1061
1062         * modules/tsearch-tests: New file.
1063         * tests/test-tsearch.sh: New file.
1064         * tests/test-tsearch.c: New file, mostly copied from glibc.
1065
1066         * modules/search-tests: New file.
1067         * tests/test-search.c: New file.
1068
1069         * modules/search: New file.
1070         * lib/search_.h: New file, incorporating lib/tsearch.h.
1071         * m4/search_h.m4: New file.
1072         * lib/tsearch.h: Remove file.
1073         * lib/tsearch.c: Include search.h instead of tsearch.h.
1074         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
1075         HAVE_TSEARCH.
1076         * modules/tsearch (Files): Remove lib/tsearch.h.
1077         (Depends-on): Add search.
1078         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
1079         (Include): Change tsearch.h into search.h.
1080
1081 2007-03-24  Bruno Haible  <bruno@clisp.org>
1082
1083         * modules/fpucw: New file.
1084         * lib/fpucw.h: New file.
1085         * lib/frexp.c: Include fpucw.h.
1086         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
1087         (FUNC): Use them.
1088         * lib/printf-frexp.c: Include fpucw.h.
1089         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
1090         (FUNC): Use them.
1091         * lib/vasnprintf.c: Include fpucw.h.
1092         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
1093         'long double' calculations.
1094         * tests/test-frexpl.c: Include fpucw.h.
1095         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
1096         * tests/test-printf-frexpl.c: Include fpucw.h.
1097         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
1098         * modules/frexpl (Depends-on): Add fpucw.
1099         * modules/printf-frexpl (Depends-on): Likewise.
1100         * modules/fprintf-posix (Depends-on): Likewise.
1101         * modules/snprintf-posix (Depends-on): Likewise.
1102         * modules/sprintf-posix (Depends-on): Likewise.
1103         * modules/vasnprintf-posix (Depends-on): Likewise.
1104         * modules/vasprintf-posix (Depends-on): Likewise.
1105         * modules/vfprintf-posix (Depends-on): Likewise.
1106         * modules/vsnprintf-posix (Depends-on): Likewise.
1107         * modules/vsprintf-posix (Depends-on): Likewise.
1108         * modules/frexpl-tests (Depends-on): Likewise.
1109         * modules/printf-frexpl-tests (Depends-on): Likewise.
1110
1111 2007-03-24  Bruno Haible  <bruno@clisp.org>
1112
1113         * lib/float+.h: New file.
1114         * lib/isnan.c: Include float+.h.
1115         (SIZE): New macro.
1116         (FUNC): Compare only SIZE bytes of the value.
1117         * lib/vasnprintf.c: Include float+.h.
1118         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
1119         SIZEOF_LDBL or SIZEOF_DBL bytes.
1120         * modules/isnan-nolibm (Files): Add lib/float+.h.
1121         * modules/isnanl-nolibm (Files): Add lib/float+.h.
1122         * modules/isnanl (Files): Add lib/float+.h.
1123         * modules/vasnprintf (Files): Add lib/float+.h.
1124
1125 2007-03-24  Bruno Haible  <bruno@clisp.org>
1126
1127         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
1128         include isnanl-nolibm.h.
1129
1130 2007-03-24  Bruno Haible  <bruno@clisp.org>
1131
1132         * tests/test-read-file.c (main): Don't produce spurious output for
1133         expected situations. Make the test fail if it encountered unexpected
1134         results.
1135
1136 2007-03-24  Bruno Haible  <bruno@clisp.org>
1137
1138         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
1139         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
1140
1141 2007-03-24  Bruno Haible  <bruno@clisp.org>
1142
1143         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
1144
1145 2007-03-24  Bruno Haible  <bruno@clisp.org>
1146
1147         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
1148         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
1149
1150         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
1151         * modules/utf8-ucs4: Turn into a symbolic link to module
1152         unistr/u8-mbtouc.
1153
1154         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
1155         utf8-ucs4-unsafe.
1156         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
1157         unistr/u8-mbtouc-unsafe.
1158
1159         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
1160         * modules/utf16-ucs4: Turn into a symbolic link to module
1161         unistr/u16-mbtouc.
1162
1163         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
1164         utf16-ucs4-unsafe.
1165         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
1166         unistr/u16-mbtouc-unsafe.
1167
1168         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
1169         * modules/ucs4-utf8: Turn into a symbolic link to module
1170         unistr/u8-ubtomb.
1171
1172         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
1173         * modules/ucs4-utf16: Turn into a symbolic link to module
1174         unistr/u16-ubtomb.
1175
1176 2007-03-24  Bruno Haible  <bruno@clisp.org>
1177
1178         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
1179         Enable the function only if HAVE_INLINE.
1180         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
1181         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
1182         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
1183         Enable the function only if HAVE_INLINE.
1184         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
1185         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
1186         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
1187         Enable the function only if HAVE_INLINE.
1188         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
1189         Enable the function only if HAVE_INLINE.
1190         * modules/utf8-ucs4: Update.
1191         * modules/utf8-ucs4-unsafe: Update.
1192         * modules/utf16-ucs4: Update.
1193         * modules/utf16-ucs4-unsafe: Update.
1194         * modules/ucs4-utf8: Update.
1195         * modules/ucs4-utf16: Update.
1196
1197 2007-03-24  Bruno Haible  <bruno@clisp.org>
1198
1199         * lib/utf8-ucs4.h: Remove file.
1200         * lib/utf8-ucs4-unsafe.h: Remove file.
1201         * lib/utf16-ucs4.h: Remove file.
1202         * lib/utf16-ucs4-unsafe.h: Remove file.
1203         * lib/ucs4-utf8.h: Remove file.
1204         * lib/ucs4-utf16.h: Remove file.
1205         * lib/unistr.h: Include their previous contents.
1206         * m4/utf-ucs4.m4: Remove file.
1207         * m4/ucs4-utf.m4: Remove file.
1208         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
1209         (Depends-on): Add unistr/base.
1210         (configure.ac): Remove gl_UTF_UCS4.
1211         (Makefile.am): Update.
1212         (Include): Change to unistr.h.
1213         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
1214         (Depends-on): Add unistr/base.
1215         (configure.ac): Remove gl_UTF_UCS4.
1216         (Makefile.am): Update.
1217         (Include): Change to unistr.h.
1218         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
1219         (Depends-on): Add unistr/base.
1220         (configure.ac): Remove gl_UTF_UCS4.
1221         (Makefile.am): Update.
1222         (Include): Change to unistr.h.
1223         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
1224         (Depends-on): Add unistr/base.
1225         (configure.ac): Remove gl_UTF_UCS4.
1226         (Makefile.am): Update.
1227         (Include): Change to unistr.h.
1228         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
1229         (Depends-on): Add unistr/base.
1230         (configure.ac): Remove gl_UCS4_UTF.
1231         (Makefile.am): Update.
1232         (Include): Change to unistr.h.
1233         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
1234         (Depends-on): Add unistr/base.
1235         (configure.ac): Remove gl_UCS4_UTF.
1236         (Makefile.am): Update.
1237         (Include): Change to unistr.h.
1238         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
1239         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
1240         utf8-ucs4-unsafe.h.
1241         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
1242         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
1243         utf16-ucs4-unsafe.h.
1244         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
1245         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
1246         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
1247         * lib/unistr/u8-strchr.c: Likewise.
1248         * lib/unistr/u8-strrchr.c: Likewise.
1249         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
1250         * lib/unistr/u16-strchr.c: Likewise.
1251         * lib/unistr/u16-strrchr.c: Likewise.
1252         * lib/striconveh.c: Update.
1253         * lib/linebreak.c: Update.
1254
1255 2007-03-24  Bruno Haible  <bruno@clisp.org>
1256
1257         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
1258         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
1259
1260 2007-03-22  Bruno Haible  <bruno@clisp.org>
1261
1262         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
1263
1264 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
1265
1266         * MODULES.html.sh (File system functions): New module write-any-file.
1267         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
1268         * m4/write-any-file.m4: New files.
1269
1270 2007-03-23  Eric Blake  <ebb9@byu.net>
1271
1272         * gnulib-tool: Rearrange space-tab sequences, since some editors
1273         like to eat them.
1274
1275 2007-03-23  Eric Blake  <ebb9@byu.net>
1276
1277         * lib/version-etc.c (version_etc_va): Update license wording to
1278         be more concise.  Recommended by Richard Stallman.
1279
1280 2007-03-22  Bruno Haible  <bruno@clisp.org>
1281
1282         * lib/poll.c (MSG_PEEK): New fallback definition.
1283
1284 2007-03-22  Bruno Haible  <bruno@clisp.org>
1285
1286         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
1287         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
1288         (main): Update.
1289         Fixes a compilation error on BeOS.
1290
1291 2007-03-22  Bruno Haible  <bruno@clisp.org>
1292
1293         * modules/frexpl-tests: New file.
1294         * tests/test-frexpl.c: New file.
1295
1296         * modules/frexpl: New file.
1297         * m4/frexpl.m4: New file.
1298         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
1299         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
1300         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
1301         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
1302         (Depends-on): Add frexpl. Remove isnanl-nolibm.
1303         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
1304
1305 2007-03-22  Bruno Haible  <bruno@clisp.org>
1306
1307         * lib/frexpl.c: Share code with lib/frexp.c.
1308         * modules/mathl (Files): Add lib/frexp.c.
1309         (Depends-on): Add isnanl-nolibm.
1310
1311 2007-03-22  Bruno Haible  <bruno@clisp.org>
1312
1313         * modules/printf-frexp (Files): Add m4/frexp.m4.
1314         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
1315         only if the found frexp function actually works.
1316
1317 2007-03-22  Bruno Haible  <bruno@clisp.org>
1318
1319         * lib/frexp.c: Remove older implementation that uses divisions.
1320
1321 2007-03-21  Bruno Haible  <bruno@clisp.org>
1322
1323         * modules/frexp-tests: New file.
1324         * tests/test-frexp.c: New file.
1325
1326         * modules/frexp: New file.
1327         * lib/frexp.c: New file.
1328         * m4/frexp.m4: New file.
1329         * lib/math_.h (frexp): New declaration.
1330         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
1331         REPLACE_FREXP.
1332         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
1333
1334 2007-03-21  Bruno Haible  <bruno@clisp.org>
1335
1336         * modules/isnanl-tests: New file.
1337         * tests/test-isnanl.c: New file.
1338
1339         * modules/isnanl: New file.
1340         * lib/isnanl.h: New file.
1341         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
1342         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
1343         gl_FUNC_ISNANL_WORKS.
1344         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
1345         New macros.
1346
1347 2007-03-21  Bruno Haible  <bruno@clisp.org>
1348
1349         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
1350         lib/isnanl.h.
1351         (Include): Update.
1352         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
1353         * lib/vasnprintf.c: Update.
1354         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
1355         tests/test-isnanl.h, remove tests/test-isnanl.c.
1356         (Makefile.am): Update.
1357         * tests/test-isnanl-nolibm.c: New file.
1358         * tests/test-isnanl.h: New file.
1359         * tests/test-isnanl.c: Remove file.
1360
1361 2007-03-21  Jim Meyering  <jim@meyering.net>
1362
1363         When trying to open ".", treat ESTALE like EACCES.
1364         * lib/savewd.c (savewd_save): Resort to forking not just upon
1365         failure with EACCES, but also when errno is ESTALE.
1366
1367 2007-03-20  Bruno Haible  <bruno@clisp.org>
1368
1369         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
1370         Needed on AIX 5.1. Reported by Matthew Woehlke.
1371
1372 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
1373
1374         Suggestions by Bruno Haible:
1375         * lib/acl-internal.h: Include "gettext.h" rather than rolling
1376         our own.
1377         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
1378         * modules/acl (Depends-on): Add gettext.
1379
1380 2007-03-19  Bruno Haible  <bruno@clisp.org>
1381
1382         * modules/iconvme: Remove file.
1383         * lib/iconvme.h: Remove file.
1384         * lib/iconvme.c: Remove file.
1385         * m4/iconvme.m4: Remove file.
1386
1387 2007-03-19  Bruno Haible  <bruno@clisp.org>
1388
1389         * doc/relocatable-maint.texi: Break long shell script line.
1390         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
1391
1392 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
1393
1394         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
1395         handle file_has_acl.
1396         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
1397         * lib/acl.c: Move header inclusions and related macro defns into
1398         lib/acl-internal.h.
1399         (S_ISLNK): Remove defn, since that's now done for us.
1400         (file_has_acl): Move to lib/file-has-acl.c.
1401         Call acl_trivial if available.  This is the crucial part of the fix.
1402         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
1403         shared within the library.  Rewrite a bit, partly to make it compatible
1404         with the GNU coding style.
1405         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
1406         Remove unnecessary double-quotes.
1407         Don't test for acl_to_text; the build will catch that.
1408         Replace acl_entries if it doesn't exist and it is needed.
1409         Check for -lsec and acl_trivial (as used on Solaris 10).
1410         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
1411         lib/file-has-acl.c.
1412         (Depends-on): Add sys_stat, for S_ISLNK.
1413
1414 2007-03-19  Ben Pfaff  <blp@gnu.org>
1415
1416         * doc/gnulib.texi: Fix typos.
1417         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
1418
1419 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
1420
1421         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
1422         If size is zero here, buf must be zero.
1423
1424 2007-03-19  Simon Josefsson  <simon@josefsson.org>
1425
1426         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
1427         <bruno@clisp.org>.
1428
1429 2007-03-18  Bruno Haible  <bruno@clisp.org>
1430
1431         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
1432         Suggested by Eric Blake.
1433
1434 2007-03-18  Ben Pfaff  <blp@gnu.org>
1435
1436         * doc/relocatable.texi: Recommend using as prefix a directory
1437         that does not exist and will never be created.  Based on
1438         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
1439         and others.
1440
1441 2007-03-17  Bruno Haible  <bruno@clisp.org>
1442
1443         * lib/fchownat.c: Include lchown.h.
1444
1445 2007-03-17  Bruno Haible  <bruno@clisp.org>
1446
1447         Fix endless loop when the given allocated size was > INT_MAX.
1448         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
1449         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
1450         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
1451         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
1452         * lib/sprintf.c (sprintf): Likewise.
1453
1454 2007-03-17  Bruno Haible  <bruno@clisp.org>
1455
1456         * tests/test-argp-2.sh (func_compare): Output a context diff.
1457
1458 2007-03-17  Bruno Haible  <bruno@clisp.org>
1459
1460         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
1461         locale's decimal-point character.
1462
1463 2007-03-17  Bruno Haible  <bruno@clisp.org>
1464
1465         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
1466         before comparing it. Needed because on some platforms (e.g. x86) a
1467         'long double' occupies less bytes than sizeof (long double).
1468
1469 2007-03-17  Bruno Haible  <bruno@clisp.org>
1470
1471         * tests/test-crc.c (main): Make printf statements 64-bit clean.
1472         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
1473         * tests/test-getaddrinfo.c (simple): Likewise.
1474         * tests/test-read-file.c (main): Likewise.
1475
1476 2007-03-17  Bruno Haible  <bruno@clisp.org>
1477
1478         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
1479
1480 2007-03-17  Bruno Haible  <bruno@clisp.org>
1481
1482         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
1483         unused variable.
1484
1485 2007-03-17  Bruno Haible  <bruno@clisp.org>
1486
1487         * tests/test-c-strcasecmp.c: Include c-strcase.h.
1488         * tests/test-c-strncasecmp.c: Likewise.
1489
1490 2007-03-17  Bruno Haible  <bruno@clisp.org>
1491
1492         * modules/stdlib (Depends-on): Add unistd.
1493         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
1494         Needed for MacOS X 10.3.
1495
1496 2007-03-17  Bruno Haible  <bruno@clisp.org>
1497
1498         * lib/unistr/u-strdup.h: Include <stdlib.h>.
1499
1500 2007-03-17  Bruno Haible  <bruno@clisp.org>
1501
1502         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
1503
1504 2007-03-17  Bruno Haible  <bruno@clisp.org>
1505
1506         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
1507         to reflect files copied from gnulib (with or without modifications).
1508         Suggested by Jim Meyering.
1509
1510 2007-03-17  Eric Blake  <ebb9@byu.net>
1511
1512         * NEWS: Document stdlib change from 2007-02-18.
1513
1514 2007-03-17  Jim Meyering  <jim@meyering.net>
1515
1516         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
1517         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
1518         someone uses a name containing shell meta-characters.
1519         Reported by Alfred M. Szmidt.
1520
1521         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
1522
1523 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
1524
1525         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
1526         and copy gettext configuration files only if configure.ac contains
1527         a use of AM_GNU_GETTEXT_VERSION.
1528
1529 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
1530
1531         * build-aux/bootstrap (gnulib_name): New variable.
1532         (gnulib_tool_options): Use it.
1533
1534 2007-03-13  Simon Josefsson  <simon@josefsson.org>
1535
1536         * tests/test-des.c: Use new namespace.
1537
1538 2007-03-15  Bruno Haible  <bruno@clisp.org>
1539
1540         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
1541         Reported by James Youngman <jay@gnu.org>.
1542
1543 2007-03-15  Bruno Haible  <bruno@clisp.org>
1544
1545         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
1546         declared prototype. Needed with cc on OSF/1 5.1.
1547
1548 2007-03-15  Bruno Haible  <bruno@clisp.org>
1549
1550         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
1551         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
1552         (struct gl_list_implementation): Add dispose_fn argument to the
1553         'create_empty', 'create' methods.
1554         (struct gl_list_impl_base): Add field 'dispose_fn'.
1555         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
1556         argument.
1557         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
1558         dispose_fn argument.
1559         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
1560         dispose_fn on the dropped values.
1561         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
1562         dispose_fn argument.
1563         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
1564         dropped values.
1565         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
1566         (gl_tree_remove_node): Call dispose_fn on the dropped value.
1567         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
1568         (gl_tree_remove_node): Call dispose_fn on the dropped value.
1569         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
1570         argument.
1571         (gl_tree_list_free): Call dispose_fn on the dropped values.
1572         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
1573         the dropped values.
1574         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
1575         Add dispose_fn argument.
1576         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
1577         Call dispose_fn on the dropped values.
1578         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
1579         Add dispose_fn argument.
1580         (gl_sublist_create): Initialize the 'dispose_fn' field.
1581         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
1582         * tests/test-array_list.c (main): Update.
1583         * tests/test-carray_list.c (main): Update.
1584         * tests/test-avltree_list.c (main): Update.
1585         * tests/test-rbtree_list.c (main): Update.
1586         * tests/test-avltreehash_list.c (main): Update.
1587         * tests/test-rbtreehash_list.c (main): Update.
1588         * tests/test-linked_list.c (main): Update.
1589         * tests/test-linkedhash_list.c (main): Update.
1590         * tests/test-array_oset.c (main): Update.
1591
1592 2007-03-15  Bruno Haible  <bruno@clisp.org>
1593
1594         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
1595         (gl_oset_create_empty): Add dispose_fn argument.
1596         (struct gl_oset_implementation): Add dispose_fn argument to
1597         'create_empty' method.
1598         (struct gl_oset_impl_base): Add dispose_fn field.
1599         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
1600         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
1601         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
1602         values.
1603         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
1604         (gl_tree_oset_free): Call dispose_fn on the dropped values.
1605         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
1606         dropped value.
1607         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
1608         dropped value.
1609         * tests/test-array_oset.c (main): Update.
1610         * tests/test-avltree_oset.c (main): Update.
1611         * tests/test-rbtree_oset.c (main): Update.
1612         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
1613
1614 2007-03-13  Bruno Haible  <bruno@clisp.org>
1615
1616         * tests/test-stdbool.c (i): Update after last patch.
1617
1618 2007-03-12  Bruno Haible  <bruno@clisp.org>
1619
1620         * lib/quotearg.c: Include <wctype.h> early, before the definition of
1621         the iswprint macro. Needed on Solaris 2.5.1.
1622
1623 2007-03-12  Bruno Haible  <bruno@clisp.org>
1624
1625         * tests/test-printf-frexp.c (main): Declare x as volatile.
1626
1627 2007-03-12  Simon Josefsson  <simon@josefsson.org>
1628
1629         * doc/gnulib.texi (Build robot for gnulib): New section.
1630
1631 2007-03-12  Jim Meyering  <jim@meyering.net>
1632
1633         * build-aux/bootstrap: New file.
1634         * build-aux/bootstrap.conf: New file, from coreutils.
1635
1636 2007-03-11  Bruno Haible  <bruno@clisp.org>
1637
1638         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
1639
1640 2007-03-12  Simon Josefsson  <simon@josefsson.org>
1641
1642         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
1643         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
1644         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
1645
1646 2007-03-11  Bruno Haible  <bruno@clisp.org>
1647
1648         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
1649         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
1650
1651 2007-03-11  Bruno Haible  <bruno@clisp.org>
1652
1653         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
1654         formula. Needed for SunPRO C 5.0.
1655
1656 2007-03-11  Bruno Haible  <bruno@clisp.org>
1657
1658         * modules/long-options (Depends-on): Add getopt.
1659
1660 2007-03-11  Bruno Haible  <bruno@clisp.org>
1661
1662         * modules/modechange (Depends-on): Add stdbool.
1663
1664 2007-03-11  Bruno Haible  <bruno@clisp.org>
1665
1666         * modules/i-ring (Depends-on): Add stdbool.
1667
1668 2007-03-11  Bruno Haible  <bruno@clisp.org>
1669
1670         * modules/gc-des (Depends-on): Add stdbool.
1671
1672 2007-03-11  Bruno Haible  <bruno@clisp.org>
1673
1674         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
1675
1676 2007-03-11  Bruno Haible  <bruno@clisp.org>
1677
1678         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
1679
1680 2007-03-11  Bruno Haible  <bruno@clisp.org>
1681
1682         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
1683
1684 2007-03-11  Bruno Haible  <bruno@clisp.org>
1685
1686         * lib/vasnprintf.c (sprintf): Undefine.
1687
1688 2007-03-11  Bruno Haible  <bruno@clisp.org>
1689
1690         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
1691         initializers in SunPRO C and Compaq C compilers.
1692
1693 2007-03-11  Bruno Haible  <bruno@clisp.org>
1694
1695         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
1696         decrementing code ANSI C compliant.
1697
1698 2007-03-11  Bruno Haible  <bruno@clisp.org>
1699
1700         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
1701         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
1702
1703 2007-03-11  Bruno Haible  <bruno@clisp.org>
1704
1705         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
1706         <stdbool.h> substitute doesn't pass.
1707
1708 2007-03-11  Bruno Haible  <bruno@clisp.org>
1709
1710         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
1711
1712 2007-03-11  Bruno Haible  <bruno@clisp.org>
1713
1714         * gnulib-tool (func_create_megatestdir): Create also an autobuild
1715         script, for submission to autobuild.josefsson.org.
1716
1717 2007-03-10  Bruno Haible  <bruno@clisp.org>
1718
1719         * modules/canonicalize-lgpl-tests: New file.
1720         * tests/test-canonicalize-lgpl.sh: New file.
1721         * tests/test-canonicalize-lgpl.c: New file.
1722
1723         * modules/c-strcase-tests: New file.
1724         * tests/test-c-strcase.sh: New file.
1725         * tests/test-c-strcasecmp.c: New file.
1726         * tests/test-c-strncasecmp.c: New file.
1727
1728         * modules/atexit-tests: New file.
1729         * tests/test-atexit.sh: New file.
1730         * tests/test-atexit.c: New file.
1731
1732 2007-03-10  Bruno Haible  <bruno@clisp.org>
1733
1734         * tests/test-binary-io.sh: Use temporary filenames that are not so
1735         likely to clash with those of other tests (in a parallel make).
1736         * tests/test-binary-io.c: Likewise.
1737
1738 2007-03-10  Bruno Haible  <bruno@clisp.org>
1739
1740         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
1741         fallback; use #error instead.
1742         Suggested by Simon Josefsson.
1743
1744 2007-03-10  Bruno Haible  <bruno@clisp.org>
1745
1746         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
1747         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
1748         first and the last.
1749
1750 2007-03-10  Bruno Haible  <bruno@clisp.org>
1751
1752         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
1753
1754 2007-03-10  Bruno Haible  <bruno@clisp.org>
1755
1756         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
1757         "make distcheck".
1758         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
1759         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
1760         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
1761
1762 2007-03-10  Bruno Haible  <bruno@clisp.org>
1763
1764         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
1765         variable.
1766         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
1767         variable.
1768
1769 2007-03-09  Eric Blake  <ebb9@byu.net>
1770         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
1771
1772         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
1773         types are not being provided by gnulib.
1774         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
1775         types are supported.
1776
1777 2007-03-10  Bruno Haible  <bruno@clisp.org>
1778
1779         * lib/stdio_.h (__attribute__): New macro.
1780         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
1781         vsprintf): Specify __attribute__ __format__ for GCC.
1782         Suggested by Eric Blake.
1783
1784 2007-03-09  Bruno Haible  <bruno@clisp.org>
1785
1786         * modules/printf-posix-tests: New file.
1787         * tests/test-printf-posix.sh: New file.
1788         * tests/test-printf-posix.c: New file.
1789
1790         * modules/printf-posix: New file.
1791         * lib/printf.c: New file.
1792         * m4/printf-posix-rpl.m4: New file.
1793         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
1794         REPLACE_PRINTF.
1795         * lib/stdio_.h (printf): New declaration.
1796         (format, __format__, ____printf____, ____scanf____, ____strftime____,
1797         ____strfmon____): New macros.
1798         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
1799         REPLACE_PRINTF.
1800
1801 2007-03-09  Bruno Haible  <bruno@clisp.org>
1802
1803         * tests/test-vasnprintf-posix2.sh: New file.
1804         * tests/test-vasnprintf-posix2.c: New file.
1805         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
1806         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
1807         (Makefile.am): Activate test-vasnprintf-posix2.sh.
1808
1809         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
1810         a locale dependent decimal point, rather than always '.'.
1811
1812 2007-03-09  Eric Blake  <ebb9@byu.net>
1813
1814         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
1815         spite of platforms like Tandem/NSK that define it to -1.
1816
1817 2007-03-08  Bruno Haible  <bruno@clisp.org>
1818
1819         * modules/vprintf-posix-tests: New file.
1820         * tests/test-vprintf-posix.sh: New file.
1821         * tests/test-vprintf-posix.c: New file.
1822         * tests/test-printf-posix.h: New file.
1823
1824         * modules/vprintf-posix: New file.
1825         * lib/vprintf.c: New file.
1826         * m4/vprintf-posix.m4: New file.
1827         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
1828         REPLACE_VPRINTF.
1829         * lib/stdio_.h (vprintf): New declaration.
1830         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
1831         REPLACE_VPRINTF.
1832
1833 2007-03-08  Bruno Haible  <bruno@clisp.org>
1834
1835         * modules/fprintf-posix-tests: New file.
1836         * tests/test-fprintf-posix.sh: New file.
1837         * tests/test-fprintf-posix.c: New file.
1838
1839         * modules/fprintf-posix: New file.
1840         * lib/fprintf.c: New file.
1841         * m4/fprintf-posix.m4: New file.
1842         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
1843         REPLACE_FPRINTF.
1844         * lib/stdio_.h (fprintf): New declaration.
1845         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
1846         REPLACE_FPRINTF.
1847
1848 2007-03-08  Bruno Haible  <bruno@clisp.org>
1849
1850         * modules/vfprintf-posix-tests: New file.
1851         * tests/test-vfprintf-posix.sh: New file.
1852         * tests/test-vfprintf-posix.c: New file.
1853         * tests/test-fprintf-posix.h: New file.
1854         * tests/test-fprintf-posix.out: New file.
1855
1856         * modules/vfprintf-posix: New file.
1857         * lib/vfprintf.c: New file.
1858         * m4/vfprintf-posix.m4: New file.
1859         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
1860         REPLACE_VFPRINTF.
1861         * lib/stdio_.h (vfprintf): New declaration.
1862         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
1863         REPLACE_VFPRINTF.
1864
1865 2007-03-08  Bruno Haible  <bruno@clisp.org>
1866
1867         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
1868
1869 2007-03-08  Bruno Haible  <bruno@clisp.org>
1870
1871         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
1872         instead of 'expr' invocations.
1873         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1874         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1875         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1876         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1877         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1878         Suggested by Paul Eggert.
1879
1880 2007-03-08  Bruno Haible  <bruno@clisp.org>
1881
1882         * modules/fseterr-tests: New file.
1883         * tests/test-fseterr.c: New file.
1884
1885         * modules/fseterr: New file.
1886         * lib/fseterr.h: New file.
1887         * lib/fseterr.c: New file.
1888
1889 2007-03-08  Bruno Haible  <bruno@clisp.org>
1890
1891         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
1892         * lib/getopt_.h: Likewise.
1893         * lib/mbswidth.h: Likewise.
1894         * lib/setenv.h: Likewise.
1895         * lib/vasnprintf.h: Likewise.
1896         * lib/vasprintf.h: Likewise.
1897         * lib/verror.h: Likewise.
1898         * lib/xsetenv.h: Likewise.
1899         * lib/xvasprintf.h: Likewise.
1900
1901 2007-03-08  Jim Meyering  <jim@meyering.net>
1902
1903         * users.txt: Add parted.
1904
1905         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
1906
1907 2007-03-07  Bruno Haible  <bruno@clisp.org>
1908
1909         * m4/printf.m4: Make the shell script snippets copy&pastable.
1910
1911 2007-03-02  Bruno Haible  <bruno@clisp.org>
1912
1913         * lib/netinet_in_.h: New file.
1914         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
1915         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
1916         * modules/netinet_in (Files): Add lib/netinet_in_.h.
1917         (Depends-on): Add absolute-header.
1918         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
1919         into netinet/in.h.
1920
1921 2007-03-03  Bruno Haible  <bruno@clisp.org>
1922
1923         * lib/sys_select_.h: New file.
1924         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
1925         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
1926         * modules/sys_select (Files): Add lib/sys_select_.h.
1927         (Depends-on): Add absolute-header.
1928         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
1929         into sys/select.h.
1930
1931 2007-03-02  Bruno Haible  <bruno@clisp.org>
1932
1933         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
1934         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
1935         values.
1936         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
1937         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
1938         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
1939         * modules/sys_socket (Depends-on): Add absolute-header.
1940         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
1941         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
1942         (Include): Remove requirement of inclusion of <sys/types.h>.
1943
1944 2007-03-02  Bruno Haible  <bruno@clisp.org>
1945
1946         * lib/byteswap_.h (bswap_32): Fix formula.
1947
1948 2007-03-06  Bruno Haible  <bruno@clisp.org>
1949
1950         * modules/sprintf-posix-tests: New file.
1951         * tests/test-sprintf-posix.c: New file.
1952
1953         * modules/sprintf-posix: New file.
1954         * lib/sprintf.c: New file.
1955         * m4/sprintf-posix.m4: New file.
1956         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
1957         REPLACE_SPRINTF.
1958         * lib/stdio_.h (sprintf): New declaration.
1959         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
1960         REPLACE_SPRINTF.
1961
1962 2007-03-06  Bruno Haible  <bruno@clisp.org>
1963
1964         * modules/vsprintf-posix-tests: New file.
1965         * tests/test-vsprintf-posix.c: New file.
1966         * tests/test-sprintf-posix.h: New file.
1967
1968         * modules/vsprintf-posix: New file.
1969         * lib/vsprintf.c: New file.
1970         * m4/vsprintf-posix.m4: New file.
1971         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
1972         REPLACE_VSPRINTF.
1973         * lib/stdio_.h (vsprintf): New declaration.
1974         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
1975         REPLACE_VSPRINTF.
1976
1977 2007-03-06  Bruno Haible  <bruno@clisp.org>
1978
1979         * modules/vsnprintf (Depend-on): Remove minmax.
1980
1981 2007-03-06  Bruno Haible  <bruno@clisp.org>
1982
1983         * modules/snprintf-posix-tests: New file.
1984         * tests/test-snprintf-posix.c: New file.
1985
1986         * modules/snprintf-posix: New file.
1987         * m4/snprintf-posix.m4: New file.
1988         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
1989         gl_FUNC_SNPRINTF.
1990         (gl_FUNC_SNPRINTF): Invoke it.
1991         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
1992         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
1993         is set.
1994         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
1995
1996 2007-03-06  Bruno Haible  <bruno@clisp.org>
1997
1998         * modules/vsnprintf-posix-tests: New file.
1999         * tests/test-vsnprintf-posix.c: New file.
2000         * tests/test-snprintf-posix.h: New file.
2001
2002         * modules/vsnprintf-posix: New file.
2003         * m4/vsnprintf-posix.m4: New file.
2004         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
2005         gl_FUNC_VSNPRINTF.
2006         (gl_FUNC_VSNPRINTF): Invoke it.
2007         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
2008         * lib/stdio_.h (vsnprintf): Define as a replacement if
2009         REPLACE_VSNPRINTF is set.
2010         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
2011
2012 2007-03-06  Bruno Haible  <bruno@clisp.org>
2013
2014         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
2015         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
2016
2017 2007-03-06  Bruno Haible  <bruno@clisp.org>
2018
2019         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
2020         (asinl): Declare also if HAVE_DECL_ASINL is set.
2021         (atanl): Declare also if HAVE_DECL_ATANL is set.
2022         (ceill): Declare also if HAVE_DECL_CEILL is set.
2023         (cosl): Declare also if HAVE_DECL_COSL is set.
2024         (expl): Declare also if HAVE_DECL_EXPL is set.
2025         (floorl): Declare also if HAVE_DECL_FLOORL is set.
2026         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
2027         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
2028         (logl): Declare also if HAVE_DECL_LOGL is set.
2029         (sinl): Declare also if HAVE_DECL_SINL is set.
2030         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
2031         (tanl): Declare also if HAVE_DECL_TANL is set.
2032         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
2033         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
2034         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
2035         declaration of frexpl, ldexpl.
2036         * modules/printf-frexpl (Depends-on): Add math.
2037         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
2038
2039 2007-03-05  Bruno Haible  <bruno@clisp.org>
2040
2041         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
2042         frexpl and ldexpl are declared.
2043         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
2044
2045 2007-03-05  Bruno Haible  <bruno@clisp.org>
2046
2047         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
2048         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
2049
2050 2007-03-05  Bruno Haible  <bruno@clisp.org>
2051
2052         * lib/stdio_.h: Include <stddef.h>.
2053
2054 2007-03-05  Bruno Haible  <bruno@clisp.org>
2055
2056         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
2057
2058 2007-03-05  Bruno Haible  <bruno@clisp.org>
2059
2060         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
2061         NetBSD 4, from Ralf Wildenhues.
2062
2063 2007-03-04  Bruno Haible  <bruno@clisp.org>
2064
2065         * lib/vasprintf.h: Update #if logic for the case when the functions
2066         exist but are overridden.
2067
2068 2007-03-04  Bruno Haible  <bruno@clisp.org>
2069
2070         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
2071         implementations: glibc-2.4 and MacOS X 10.3.
2072         * tests/test-vasnprintf-posix.c (test_function): Test also the case
2073         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
2074         * tests/test-vasprintf-posix.c (test_function): Likewise.
2075
2076 2007-03-04  Bruno Haible  <bruno@clisp.org>
2077
2078         * modules/vasprintf-posix-tests: New file.
2079         * tests/test-vasprintf-posix.c: New file.
2080
2081         * modules/vasprintf-posix: New file.
2082         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
2083         defined.
2084         * m4/vasprintf-posix.m4: New file.
2085         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
2086         gl_FUNC_VASPRINTF.
2087         (gl_FUNC_VASPRINTF): Invoke it.
2088         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
2089         here.
2090         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
2091
2092 2007-03-04  Bruno Haible  <bruno@clisp.org>
2093
2094         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
2095         REPLACE_GETTIMEOFDAY.
2096         * modules/sys_time (Makefile.am): Likewise.
2097         * m4/sys_time_h.m4: Likewise.
2098         * m4/gettimeofday.m4: Likewise.
2099
2100 2007-03-04  Bruno Haible  <bruno@clisp.org>
2101
2102         * modules/vasnprintf-posix-tests: New file.
2103         * tests/test-vasnprintf-posix.c: New file.
2104
2105         * modules/vasnprintf-posix: New file.
2106         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
2107         printf-frexpl.h.
2108         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
2109         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
2110         REPLACE_VASNPRINTF is defined.
2111         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
2112         gl_FUNC_VASNPRINTF.
2113         (gl_FUNC_VASNPRINTF): Invoke it.
2114         * m4/vasnprintf-posix.m4: New file.
2115         * m4/printf.m4: New file.
2116
2117 2007-03-04  Bruno Haible  <bruno@clisp.org>
2118
2119         Compile progreloc.c only if --enable-relocatable is specified.
2120         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
2121         if --enable-relocatable was specified.
2122         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
2123         lib_SOURCES.
2124
2125 2007-03-04  Jim Meyering  <jim@meyering.net>
2126
2127         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
2128         Use it consistently, rather than enumerating errno constants.
2129
2130 2007-03-04  Bruno Haible  <bruno@clisp.org>
2131
2132         * modules/xvasprintf-tests: New file.
2133         * tests/test-xvasprintf.c: New file.
2134
2135         * modules/vasprintf-tests: New file.
2136         * tests/test-vasprintf.c: New file.
2137
2138         * modules/vasnprintf-tests: New file.
2139         * tests/test-vasnprintf.c: New file.
2140
2141         * modules/vsnprintf-tests: New file.
2142         * tests/test-vsnprintf.c: New file.
2143
2144         * modules/snprintf-tests: New file.
2145         * tests/test-snprintf.c: New file.
2146
2147 2007-03-04  Bruno Haible  <bruno@clisp.org>
2148
2149         Compile relocatable.c only if --enable-relocatable is specified.
2150         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
2151         gl_RELOCATABLE_LIBRARY.
2152         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
2153         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
2154         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
2155         gl_RELOCATABLE_LIBRARY.
2156         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
2157         (Makefile.am): Remove lib_SOURCES.
2158         * modules/relocatable-lib-lgpl (configure.ac): Invoke
2159         gl_RELOCATABLE_LIBRARY.
2160         (Makefile.am): Remove lib_SOURCES.
2161         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
2162         always.
2163         * modules/relocatable-prog-wrapper (configure.ac): Invoke
2164         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
2165
2166 2007-03-04  Bruno Haible  <bruno@clisp.org>
2167
2168         * modules/argmatch-tests: New file.
2169         * tests/test-argmatch.c: New file.
2170
2171         * tests/test-allocsa.c (main): Halve the number of loop runs.
2172
2173         * modules/alloca-opt-tests: New file.
2174         * tests/test-alloca-opt.c: New file.
2175
2176 2007-03-04  Jim Meyering  <jim@meyering.net>
2177
2178         Work around difference between Linux ACLs and Solaris 10 ZFS.
2179         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
2180         for EINVAL.
2181
2182 2007-03-03  Bruno Haible  <bruno@clisp.org>
2183
2184         * modules/relocatable-prog (Depends-on): Add back progreloc's
2185         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
2186
2187 2007-03-03  Bruno Haible  <bruno@clisp.org>
2188
2189         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
2190         * modules/relocatable-lib: New file.
2191
2192 2007-03-03  Bruno Haible  <bruno@clisp.org>
2193
2194         * modules/relocatable-prog: Renamed from modules/relocatable.
2195         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
2196
2197 2007-03-03  Bruno Haible  <bruno@clisp.org>
2198
2199         * modules/relocatable-script (Files): Add doc/relocatable.texi,
2200         m4/relocatable-lib.m4.
2201         (Depends-on): Remove 'relocatable'.
2202         (configure.ac): Add gl_RELOCATABLE_NOP.
2203
2204 2007-03-03  Bruno Haible  <bruno@clisp.org>
2205
2206         * modules/relocatable-prog-wrapper: New file.
2207         * modules/relocatable (Depends-on): Add it. Remove all other
2208         dependencies except progname.
2209         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
2210
2211         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
2212         (gl_FUNC_STRERROR): Nop.
2213         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
2214
2215         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
2216         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
2217
2218         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
2219         (gl_FUNC_READLINK): Update.
2220
2221         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
2222
2223 2007-03-03  Bruno Haible  <bruno@clisp.org>
2224
2225         * lib/xreadlink.c: Include <unistd.h> unconditionally.
2226         * modules/xreadlink (Depends-on): Add unistd.
2227         * modules/xreadlink-with-size (Depends-on): Likewise.
2228
2229 2007-03-03  Bruno Haible  <bruno@clisp.org>
2230
2231         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
2232         extracted from gt_FUNC_SETENV.
2233         (gt_FUNC_SETENV): Remove macro.
2234         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
2235         remove gt_FUNC_SETENV.
2236
2237 2007-03-03  Bruno Haible  <bruno@clisp.org>
2238
2239         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
2240         ENABLE_RELOCATABLE here.
2241         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
2242
2243 2007-03-03  Bruno Haible  <bruno@clisp.org>
2244
2245         * modules/rbtreehash-list-tests (Depends-on): Add progname.
2246         * tests/test-rbtreehash_list.c: Include progname.h.
2247         (main): Call set_program_name.
2248
2249         * modules/rbtree-oset-tests (Depends-on): Add progname.
2250         * tests/test-rbtree_oset.c: Include progname.h.
2251         (main): Call set_program_name.
2252
2253         * modules/rbtree-list-tests (Depends-on): Add progname.
2254         * tests/test-rbtree_list.c: Include progname.h.
2255         (main): Call set_program_name.
2256
2257         * modules/linked-list-tests (Depends-on): Add progname.
2258         * tests/test-linked_list.c: Include progname.h.
2259         (main): Call set_program_name.
2260
2261 2007-03-03  Bruno Haible  <bruno@clisp.org>
2262
2263         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
2264         All uses of __restrict changed to _Restrict_.
2265         * lib/glob_.h (__restrict): Remove macro.
2266
2267 2007-03-02  Bruno Haible  <bruno@clisp.org>
2268
2269         * modules/gettext (configure.ac): Require gettext infrastructure
2270         from version 0.16.1.
2271
2272 2007-03-02  Bruno Haible  <bruno@clisp.org>
2273
2274         * modules/linkedhash-list-tests (Depends-on): Add progname.
2275         * tests/test-linkedhash_list.c: Include progname.h.
2276         (main): Call set_program_name.
2277
2278         * modules/carray-list-tests (Depends-on): Add progname.
2279         * tests/test-carray_list.c: Include progname.h.
2280         (main): Call set_program_name.
2281
2282         * modules/avltreehash-list-tests (Depends-on): Add progname.
2283         * tests/test-avltreehash_list.c: Include progname.h.
2284         (main): Call set_program_name.
2285
2286         * modules/avltree-oset-tests (Depends-on): Add progname.
2287         * tests/test-avltree_oset.c: Include progname.h.
2288         (main): Call set_program_name.
2289
2290         * modules/avltree-list-tests (Depends-on): Add progname.
2291         * tests/test-avltree_list.c: Include progname.h.
2292         (main): Call set_program_name.
2293
2294         * modules/array-oset-tests (Depends-on): Add progname.
2295         * tests/test-array_oset.c: Include progname.h.
2296         (main): Call set_program_name.
2297
2298         * modules/array-list-tests (Depends-on): Add progname.
2299         * tests/test-array_list.c: Include progname.h.
2300         (main): Call set_program_name.
2301
2302         * modules/argp-tests (Depends-on): Add progname.
2303         * tests/test-argp.c: Include argp.h first. Include progname.h.
2304         (main): Call set_program_name.
2305
2306 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
2307
2308         * doc/gnulib-tool.texi (Initial import): Reword description of
2309         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
2310         limited effect even if defined after the first system include.
2311
2312 2007-03-01  Bruno Haible  <bruno@clisp.org>
2313
2314         * build-aux/config.libpath: Update to libtool-1.5.22.
2315         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
2316
2317 2007-03-01  Bruno Haible  <bruno@clisp.org>
2318
2319         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
2320         foo_CFLAGS.
2321         Reported by Ralf Wildenhues.
2322
2323 2007-03-01  Bruno Haible  <bruno@clisp.org>
2324
2325         * build-aux/install-reloc: Remove object files left over by some
2326         compilers.
2327         Reported by Ralf Wildenhues.
2328
2329 2007-03-01  Bruno Haible  <bruno@clisp.org>
2330
2331         * build-aux/install-reloc: Break long lines.
2332
2333 2007-03-01  Bruno Haible  <bruno@clisp.org>
2334
2335         * doc/relocatable.texi: Document that it may not work on OpenBSD.
2336         Reported by Ralf Wildenhues.
2337
2338 2007-03-01  Bruno Haible  <bruno@clisp.org>
2339
2340         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
2341         include ordering constraints.
2342
2343 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
2344
2345         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
2346         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
2347         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
2348         as another example.
2349         * lib/time_.h: Fix misspelling.
2350         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
2351         Require gl_HEADER_TIME_H_DEFAULTS.
2352         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
2353         * m4/time_r.m4 (gl_TIME_R): Likewise.
2354         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
2355
2356 2007-03-01  Bruno Haible  <bruno@clisp.org>
2357
2358         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
2359         * m4/utimens.m4 (gl_UTIMENS): Likewise.
2360
2361 2007-03-01  Jim Meyering  <jim@meyering.net>
2362
2363         * modules/xreadlink (Maintainer): Add my name.
2364         * modules/xreadlink-with-size (Depends-on): Alphabetize.
2365
2366 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
2367             Bruno Haible  <bruno@clisp.org>
2368
2369         * build-aux/install-reloc: Compile also c-ctype.c.
2370         * build-aux/relocatable.sh.in: New file.
2371         * doc/relocatable.texi: New file.
2372         * doc/relocatable-maint.texi: New file.
2373         * doc/gnulib.texi: Include relocatable-maint.texi.
2374         * lib/progreloc.c: Include unistd.h unconditionally.
2375         * lib/relocwrapper.c: Include unistd.h unconditionally.
2376         Include c-ctype.h.
2377         (add_dotbin): Use c_tolower.
2378         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
2379         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
2380         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
2381         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
2382         to m4/relocatable-lib.m4.
2383         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
2384         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
2385         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
2386         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
2387         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
2388         * modules/relocatable: New file.
2389         * modules/relocatable-lib: New file.
2390         * modules/relocatable-script: New file.
2391
2392 2007-02-28  Bruno Haible  <bruno@clisp.org>
2393
2394         Import --enable-relocatable infrastructure.
2395         * build-aux/config.libpath: New file, from GNU gettext.
2396         * build-aux/install-reloc: New file, from GNU gettext.
2397         * build-aux/reloc-ldflags: New file, from GNU gettext.
2398         * lib/relocatable.h: New file, from GNU gettext.
2399         * lib/relocatable.c: New file, from GNU gettext.
2400         * lib/relocwrapper.c: New file, from GNU gettext.
2401         * m4/relocatable.m4: New file, from GNU gettext.
2402
2403 2007-02-28  Bruno Haible  <bruno@clisp.org>
2404
2405         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
2406
2407         * modules/xreadlink: New file, from GNU gettext with modifications.
2408         * lib/xreadlink.c: New file, from GNU gettext.
2409         * lib/xreadlink.h: Add comments.
2410         (xreadlink): New declaration.
2411
2412         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
2413         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
2414         lib/xreadlink-with-size.c.
2415         (configure.ac): Remove gl_XREADLINK invocation.
2416         (Makefile.am): Augment lib_SOURCES.
2417         * m4/xreadlink.m4: Remove file.
2418         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
2419         (xreadlink_with_size): Renamed from xreadink.
2420         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
2421         * modules/canonicalize (Depends-on): Replace xreadlink with
2422         xreadlink-with-size.
2423         * lib/canonicalize.c (canonicalize_filename_mode): Update.
2424
2425 2007-02-25  Jim Meyering  <jim@meyering.net>
2426
2427         * build-aux/announce-gen: When complaining about excess arguments,
2428         list them.
2429
2430 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
2431
2432         * README: Document signed integer overflow situation more
2433         accurately.
2434
2435 2007-02-25  Bruno Haible  <bruno@clisp.org>
2436
2437         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
2438         'a' or 'A' conversion.
2439
2440 2007-02-25  Bruno Haible  <bruno@clisp.org>
2441
2442         * modules/filename: Renamed from modules/pathname.
2443         (Files): Replace lib/pathname.h with lib/filename.h. Replace
2444         lib/concatpath.c with lib/concat-filename.c.
2445         (Makefile.am): Update.
2446         (Include): Replace pathname.h with filename.h.
2447         * lib/filename.h: Renamed from lib/pathname.h.
2448         (concatenated_filename): Renamed from concatenated_pathname.
2449         * lib/concat-filename.c: Renamed from lib/concatpath.c.
2450         (concatenated_filename): Renamed from concatenated_pathname.
2451         * lib/findprog.c: Include filename.h instead of pathname.h.
2452         (find_in_path): Update.
2453         * lib/javacomp.c: Include filename.h instead of pathname.h.
2454         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
2455         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
2456         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
2457         is_oldgcj_14_13_usable, is_javac_usable): Update.
2458         * lib/javaexec.c: Include filename.h instead of pathname.h.
2459         (execute_java_class): Update.
2460         * modules/findprog: Update.
2461         * modules/javacomp: Update.
2462         * modules/javaexec: Update.
2463         * MODULES.html.sh (File system functions): Add 'filename', remove
2464         'pathname'.
2465
2466 2007-02-25  Bruno Haible  <bruno@clisp.org>
2467
2468         * modules/printf-frexpl-tests: New file.
2469         * tests/test-printf-frexpl.c: New file.
2470
2471         * modules/printf-frexpl: New file.
2472         * lib/printf-frexpl.h: New file.
2473         * lib/printf-frexpl.c: New file.
2474         * m4/printf-frexpl.m4: New file.
2475
2476 2007-02-25  Bruno Haible  <bruno@clisp.org>
2477
2478         * modules/printf-frexp-tests: New file.
2479         * tests/test-printf-frexp.c: New file.
2480
2481         * modules/printf-frexp: New file.
2482         * lib/printf-frexp.h: New file.
2483         * lib/printf-frexp.c: New file.
2484         * m4/printf-frexp.m4: New file.
2485
2486 2007-02-25  Bruno Haible  <bruno@clisp.org>
2487
2488         Assume automake >= 1.10 for the tests.
2489         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
2490         * modules/arctwo-tests: Likewise.
2491         * modules/argp-tests: Likewise.
2492         * modules/avltree-list-tests: Likewise.
2493         * modules/avltree-oset-tests: Likewise.
2494         * modules/avltreehash-list-tests: Likewise.
2495         * modules/carray-list-tests: Likewise.
2496         * modules/crc-tests: Likewise.
2497         * modules/des-tests: Likewise.
2498         * modules/gc-arcfour-tests: Likewise.
2499         * modules/gc-arctwo-tests: Likewise.
2500         * modules/gc-des-tests: Likewise.
2501         * modules/gc-hmac-md5-tests: Likewise.
2502         * modules/gc-hmac-sha1-tests: Likewise.
2503         * modules/gc-md2-tests: Likewise.
2504         * modules/gc-md4-tests: Likewise.
2505         * modules/gc-md5-tests: Likewise.
2506         * modules/gc-pbkdf2-sha1-tests: Likewise.
2507         * modules/gc-rijndael-tests: Likewise.
2508         * modules/gc-sha1-tests: Likewise.
2509         * modules/gc-tests: Likewise.
2510         * modules/getaddrinfo-tests: Likewise.
2511         * modules/hmac-md5-tests: Likewise.
2512         * modules/hmac-sha1-tests: Likewise.
2513         * modules/linked-list-tests: Likewise.
2514         * modules/linkedhash-list-tests: Likewise.
2515         * modules/lock-tests: Likewise.
2516         * modules/md2-tests: Likewise.
2517         * modules/md4-tests: Likewise.
2518         * modules/md5-tests: Likewise.
2519         * modules/rbtree-list-tests: Likewise.
2520         * modules/rbtree-oset-tests: Likewise.
2521         * modules/rbtreehash-list-tests: Likewise.
2522         * modules/read-file-tests: Likewise.
2523         * modules/rijndael-tests: Likewise.
2524         * modules/stdint-tests: Likewise.
2525         * modules/tls-tests: Likewise.
2526
2527 2007-02-24  Bruno Haible  <bruno@clisp.org>
2528
2529         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
2530         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
2531         function; instead check whether isnan with a double argument links.
2532         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
2533         function; instead check whether isnan with a 'long double' argument
2534         links.
2535         Reported by Eric Blake <ebb9@byu.net>.
2536
2537 2007-02-24  Bruno Haible  <bruno@clisp.org>
2538
2539         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
2540         defined.
2541         * lib/isnanl.c: Remove all code. Just include isnan.c.
2542         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
2543
2544 2007-02-25  Jim Meyering  <jim@meyering.net>
2545
2546         Avoid conflicting types for 'unsetenv' on FreeBSD.
2547         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
2548         conflicting with FreeBSD's (5.0 and 6.1) function declaration
2549         in stdlib.h.
2550
2551 2007-02-24  Bruno Haible  <bruno@clisp.org>
2552
2553         * modules/isnanl-nolibm-tests: New file.
2554         * tests/test-isnanl.c: New file.
2555
2556         * modules/isnanl-nolibm: New file.
2557         * lib/isnanl.h: New file.
2558         * lib/isnanl.c: New file.
2559         * m4/isnanl.m4: New file.
2560
2561 2007-02-24  Bruno Haible  <bruno@clisp.org>
2562
2563         * modules/isnan-nolibm-tests: New file.
2564         * tests/test-isnan.c: New file.
2565
2566         * modules/isnan-nolibm: New file.
2567         * lib/isnan.h: New file.
2568         * lib/isnan.c: New file.
2569         * m4/isnan.m4: New file.
2570
2571 2007-02-24  Bruno Haible  <bruno@clisp.org>
2572
2573         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
2574         assume that an exponent fits in 20 bits.
2575
2576 2007-02-24  Jim Meyering  <jim@meyering.net>
2577
2578         * m4/regex.m4: Update the description of the configure-time option,
2579         --without-included-regex, to state accurately what the defaults are,
2580         and perhaps to give people an idea why using this option is risky.
2581
2582 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
2583
2584         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
2585         loops on small arguments.  This attempts to avoid the problem
2586         Bruno Haible reported for AIX 4.3.2 in
2587         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
2588
2589 2007-02-23  Bruno Haible  <bruno@clisp.org>
2590
2591         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
2592         Needed for help2man.
2593
2594 2007-02-23  Karl Berry  <karl@gnu.org>
2595
2596         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
2597         exists, foo.h should be cvs-ignored, not committed.
2598
2599 2007-02-23  Eric Blake  <ebb9@byu.net>
2600
2601         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
2602         * lib/stat-time.h (includes): Likewise.
2603         * lib/utimecmp.c (includes): Likewise.
2604         * lib/utimens.h (includes): Likewise.
2605         * lib/getdate.y (includes): Also include "timespec.h" for use
2606         internal to the module.
2607         * modules/utimens (Depends-on): Revert yesterday's patch.
2608         * modules/nanosleep (Depends-on): Add missing dependency.
2609
2610 2007-02-22  Bruno Haible  <bruno@clisp.org>
2611
2612         * lib/glob.c: Don't include getlogin_r.h.
2613
2614 2007-02-22  Jim Meyering  <jim@meyering.net>
2615
2616         * modules/utimens (Depends-on): Add timespec, required for
2617         utimens.h's inclusion of timespec.h.
2618
2619 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
2620
2621         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
2622         long unreadable paths in GNU/Linux.  Problem reported by Andreas
2623         Schwab in
2624         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
2625         I'll try to think of a better way to fix the Solaris problem.
2626
2627         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
2628         like glibc; on Solaris 10, it fails with errno == EINVAL.
2629         POSIX says the behavior is unspecified if the first argument is NULL,
2630         so play it safe and never pass NULL to the system getcwd.
2631
2632 2007-02-21  Jim Meyering  <jim@meyering.net>
2633
2634         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
2635         of gettimeofday.  It would conflict with the one now always
2636         provided via sys_time_.h.  Reported by Matthew Woehlke, as
2637         an IRIX 6.5 build failure.
2638
2639 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
2640
2641         Minor fixups to port to Solaris 10 with Sun C 5.8.
2642         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
2643         * modules/getcwd (Depends-on): Add dirfd.
2644         * lib/putenv.c (putenv): #undef it.
2645         (rpl_putenv): New decl.
2646         (malloc, free): Include <stdlib.h> rather than prototyping separately.
2647
2648 2007-02-20  Bruno Haible  <bruno@clisp.org>
2649
2650         * modules/stdio-tests: New file.
2651         * tests/test-stdio.c: New file.
2652
2653         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
2654         (Depends-on): Add stdio.
2655         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
2656         (Include): Use <stdio.h> instead of vsnprintf.h.
2657         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
2658         HAVE_DECL_VSNPRINTF.
2659         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
2660
2661         * modules/snprintf (Files): Remove lib/snprintf.h.
2662         (Depends-on): Add stdio.
2663         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
2664         (Include): Use <stdio.h> instead of snprintf.h.
2665         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
2666         HAVE_DECL_SNPRINTF.
2667         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
2668         * lib/getaddrinfo.c: Likewise.
2669
2670         * modules/stdio: New file.
2671         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
2672         * lib/snprintf.h: Remove file.
2673         * lib/vsnprintf.h: Remove file.
2674         * lib/.cppi-disable: Remove snprintf.h.
2675         * m4/stdio_h.m4: New file.
2676         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
2677
2678 2007-02-20  Jim Meyering  <jim@meyering.net>
2679
2680         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
2681         used by e.g., mingw.  From Bruno Haible.
2682
2683 2007-02-19  Bruno Haible  <bruno@clisp.org>
2684
2685         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
2686         warnings.
2687         Reported by Ben Pfaff <blp@cs.stanford.edu>.
2688
2689 2007-02-19  Bruno Haible  <bruno@clisp.org>
2690
2691         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
2692         from mingw users.
2693
2694 2007-02-19  Bruno Haible  <bruno@clisp.org>
2695
2696         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
2697         warnings.
2698         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
2699
2700 2007-02-19  Jim Meyering  <jim@meyering.net>
2701
2702         Don't use FD after a successful "fdopendir (fd)".
2703         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
2704         Reset it by calling dirfd on the just-obtained DIR*.
2705
2706         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
2707         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
2708
2709 2007-02-18  Bruno Haible  <bruno@clisp.org>
2710
2711         * lib/readlink.c: Include <unistd.h>.
2712         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
2713         HAVE_READLINK.
2714         * modules/readlink (Depends-on): Add unistd.
2715         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2716         (Include): Add <unistd.h>.
2717
2718         * lib/getlogin_r.h: Remove file.
2719         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
2720         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
2721         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
2722         HAVE_DECL_GETLOGIN_R.
2723         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
2724         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2725         (Include): Use <unistd.h> instead of getlogin_r.h.
2726
2727         * lib/getcwd.h: Remove file.
2728         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
2729         * lib/xgetcwd.c: Likewise.
2730         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
2731         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
2732         * modules/getcwd (Files): Remove lib/getcwd.h.
2733         (Depends-on): Add unistd.
2734         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2735         (Include): Use <unistd.h> instad of getcwd.h.
2736
2737         * lib/ftruncate.c: Include <unistd.h> first.
2738         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
2739         Set HAVE_FTRUNCATE.
2740         * modules/ftruncate (Depends-on): Add unistd.
2741         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2742
2743         * lib/fchdir.c: Include <unistd.h> first.
2744         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
2745         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
2746         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
2747         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2748         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
2749
2750         * lib/dup2.c: Include <unistd.h> first.
2751         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
2752         HAVE_DUP2.
2753         * modules/dup2 (Depends-on): Add unistd.
2754         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2755
2756         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
2757         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
2758         REPLACE_CHOWN. Don't define chown as a macro here.
2759         * modules/chown (Depends-on): Add unistd.
2760         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2761
2762         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
2763         Add definition for GL_LINK_WARNING.
2764         (chown, dup2): New declarations.
2765         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
2766         link warning.
2767         (ftruncate): New declaration.
2768         (getcwd): New declaration, taken from old getcwd.h.
2769         (getlogin_r): New declaration, taken from old getlogin_r.h.
2770         (readlink): New declaration.
2771         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
2772         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
2773         (gl_PREREQ_UNISTD): Remove macro.
2774         (gl_UNISTD_MODULE_INDICATOR): New macro.
2775         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
2776         many new variables. Don't set UNISTD_H.
2777         * modules/unistd (Description): Change.
2778         (Depends-on): Add link-warning.
2779         (configure.ac): Update.
2780         (Makefile.am): Create unistd.h always. Substitute many new variables
2781         into it.
2782
2783 2007-02-18  Bruno Haible  <bruno@clisp.org>
2784
2785         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
2786         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
2787         HAVE_GETSUBOPT.
2788         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
2789         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
2790         * lib/getsubopt.h: Remove file.
2791         * modules/getsubopt (Files): Remove lib/getsubopt.h.
2792         (Depends-on): Add stdlib.
2793         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
2794         (Includes): Use <stdlib.h> instead of getsubopt.h.
2795         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
2796         Set HAVE_GETSUBOPT.
2797         * lib/getsubopt.c: Don't include getsubopt.h.
2798
2799 2007-02-18  Bruno Haible  <bruno@clisp.org>
2800
2801         * modules/fchdir (Depends-on): Add dup2.
2802
2803 2007-02-18  Bruno Haible  <bruno@clisp.org>
2804
2805         * lib/stdlib_.h: Handle glibc's special invocation convention
2806         specially.
2807
2808 2007-02-18  Bruno Haible  <bruno@clisp.org>
2809
2810         * modules/stdlib-tests: New file.
2811         * tests/test-stdlib.c: New file.
2812
2813         * modules/mkstemp (Files): Remove lib/mkstemp.h.
2814         (Depends-on): Add stdlib.
2815         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
2816         (Includes): Use <stdlib.h> instead of mkstemp.h.
2817         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
2818         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
2819         * lib/mkstemp.c: Don't include mkstemp.h.
2820         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
2821         * lib/stdlib--.h: Don't include mkstemp.h.
2822
2823         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
2824         (Depends-on): Add stdlib.
2825         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
2826         (Includes): Use <stdlib.h> instead of mkdtemp.h.
2827         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
2828         HAVE_MKDTEMP.
2829         * lib/mkdtemp.c: Don't include mkdtemp.h.
2830         * lib/clean-temp.c: Don't include mkdtemp.h.
2831
2832         * modules/exit (Files): Remove lib/exit.h.
2833         (Depends-on): Add stdlib.
2834         (Makefile.am): Remove lib_SOURCES.
2835         (Include): Use <stdlib.h> instead of exit.h.
2836         * lib/argmatch.c: Don't include exit.h.
2837         * lib/execute.c: Likewise.
2838         * lib/pagealign_alloc.c: Likewise.
2839         * lib/pipe.c: Likewise.
2840         * lib/wait-process.c: Likewise.
2841         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
2842         * lib/exitfail.c: Likewise.
2843         * lib/savewd.c: Likewise.
2844         * lib/xsetenv.c: Likewise.
2845
2846         * modules/stdlib: New file.
2847         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
2848         and extra comments about mkstemp().
2849         * lib/exit.h: Remove file.
2850         * lib/mkdtemp.h: Remove file.
2851         * lib/mkstemp.h: Remove file.
2852         * m4/stdlib_h.m4: New file.
2853         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
2854
2855 2007-02-18  Bruno Haible  <bruno@clisp.org>
2856
2857         * modules/math-tests: New file.
2858         * tests/test-math.c: New file.
2859
2860         * modules/math: New file.
2861         * modules/mathl (Files): Remove lib/mathl.h.
2862         (Depends-on): Add math.
2863         (Makefile.am): Don't mention mathl.h.
2864         (Include): Use <math.h> instead of mathl.h.
2865         * lib/math_.h: New file.
2866         * lib/mathl.h: Remove file.
2867         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
2868         mathl.h.
2869         * lib/asinl.c: Likewise.
2870         * lib/atanl.c: Likewise.
2871         * lib/ceill.c: Likewise.
2872         * lib/cosl.c: Likewise.
2873         * lib/expl.c: Likewise.
2874         * lib/floorl.c: Likewise.
2875         * lib/frexpl.c: Likewise.
2876         * lib/ldexpl.c: Likewise.
2877         * lib/logl.c: Likewise.
2878         * lib/sincosl.c: Likewise.
2879         * lib/sinl.c: Likewise.
2880         * lib/sqrtl.c: Likewise.
2881         * lib/tanl.c: Likewise.
2882         * lib/trigl.c: Likewise.
2883         * m4/math_h.m4: New file.
2884         * MODULES.html.sh (Mathematics): Add math.
2885
2886 2007-02-17  Bruno Haible  <bruno@clisp.org>
2887
2888         * modules/wctype-tests: New file.
2889         * tests/test-wctype.c: New file.
2890
2891         * modules/wchar-tests: New file.
2892         * tests/test-wchar.c: New file.
2893
2894         * modules/unistd-tests: New file.
2895         * tests/test-unistd.c: New file.
2896
2897         * modules/time-tests: New file.
2898         * tests/test-time.c: New file.
2899
2900         * modules/sysexits-tests: New file.
2901         * tests/test-sysexits.c: New file.
2902
2903         * modules/sys_time-tests: New file.
2904         * tests/test-sys_time.c: New file.
2905
2906         * modules/sys_stat-tests: New file.
2907         * tests/test-sys_stat.c: New file.
2908
2909         * modules/sys_socket-tests: New file.
2910         * tests/test-sys_socket.c: New file.
2911
2912         * modules/sys_select-tests: New file.
2913         * tests/test-sys_select.c: New file.
2914
2915         * modules/string-tests: New file.
2916         * tests/test-string.c: New file.
2917
2918         * modules/stdbool-tests: New file.
2919         * tests/test-stdbool.c: New file.
2920
2921         * modules/netinet_in-tests: New file.
2922         * tests/test-netinet_in.c: New file.
2923
2924         * modules/inttypes-tests: New file.
2925         * tests/test-inttypes.c: New file.
2926
2927         * modules/fcntl-tests: New file.
2928         * tests/test-fcntl.c: New file.
2929
2930         * modules/byteswap-tests: New file.
2931         * tests/test-byteswap.c: New file.
2932
2933         * modules/arpa_inet-tests: New file.
2934         * tests/test-arpa_inet.c: New file.
2935
2936 2007-02-17  Bruno Haible  <bruno@clisp.org>
2937
2938         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
2939         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
2940         if the corresponding module is not enabled. Emit link warnings if
2941         the function is used nevertheless.
2942         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
2943         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
2944         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
2945         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
2946         * modules/inttypes (Depends-on): Add link-warning.
2947         (Makefile.am): Copy the contents of build-aux/link-warning.h into
2948         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
2949         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
2950         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
2951         * modules/imaxdiv (configure.ac): Likewise.
2952         * modules/strtoimax (configure.ac): Likewise.
2953         * modules/strtoumax (configure.ac): Likewise.
2954
2955 2007-02-17  Bruno Haible  <bruno@clisp.org>
2956
2957         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
2958         gl_STRING_MODULE_INDICATOR_DEFAULTS.
2959         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
2960         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
2961
2962 2007-02-17  Bruno Haible  <bruno@clisp.org>
2963
2964         * modules/link-warning: New file.
2965         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
2966         * lib/string_.h (GL_LINK_WARNING): Remove definition.
2967         * modules/string (Depends-on): Add link-warning.
2968         (Makefile.am): Copy the contents of build-aux/link-warning.h into
2969         string.h.
2970         * MODULES.html.sh (Support for building libraries and executables): Add
2971         link-warning.
2972
2973 2007-02-17  Bruno Haible  <bruno@clisp.org>
2974
2975         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
2976         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
2977         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
2978         long lines.
2979
2980 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
2981             Bruno Haible  <bruno@clisp.org>
2982
2983         * modules/tmpfile: New file.
2984         * lib/tmpfile.c: New file.
2985         * m4/tmpfile.m4: New file.
2986         * MODULES.html.sh (func_all_modules): New section "Input/output".
2987
2988 2007-02-15  Bruno Haible  <bruno@clisp.org>
2989
2990         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
2991         (supports_delete_on_close): New function.
2992         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
2993
2994 2007-02-14  Bruno Haible  <bruno@clisp.org>
2995
2996         * modules/mbspcasecmp-tests: New file.
2997         * tests/test-mbspcasecmp.sh: New file.
2998         * tests/test-mbspcasecmp.c: New file.
2999
3000         New module mbspcasecmp.
3001         * modules/mbspcasecmp: New file.
3002         * lib/mbspcasecmp.c: New file.
3003         * lib/string_.h (strncasecmp): Change warning message.
3004         (mbspcasecmp): New declaration.
3005         * m4/mbspcasecmp.m4: New file.
3006         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3007         GNULIB_MBSPCASECMP.
3008         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
3009         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
3010
3011 2007-02-14  Bruno Haible  <bruno@clisp.org>
3012
3013         * modules/mbsncasecmp-tests: New file.
3014         * tests/test-mbsncasecmp.sh: New file.
3015         * tests/test-mbsncasecmp.c: New file.
3016
3017         New module mbsncasecmp.
3018         * modules/mbsncasecmp: New file.
3019         * lib/mbsncasecmp.c: New file.
3020         * lib/string_.h (mbsncasecmp): New declaration.
3021         * m4/mbsncasecmp.m4: New file.
3022         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3023         GNULIB_MBSNCASECMP.
3024         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
3025         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
3026
3027 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
3028
3029         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
3030         Verify that it doesn't overlap with our flags.
3031         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
3032         do not have the desired effect in multibyte locales; instead, use
3033         mbscasecmp.
3034         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
3035         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
3036         we don't require GNU fnmatch ourselves (if our users require it, they
3037         should do so explicitly).
3038
3039         Fix regex code so it doesn't rely on strcasecmp.
3040         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
3041         Otherwise, include gnulib's langinfo.h.
3042         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
3043         undesirable behavior in non-C locales.  Instead, rely on localecharset.
3044         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
3045         * modules/regex (FILES): Remove m4/codeset.m4.
3046         (Depends-on): Add localcharset.  Remove strcase.
3047
3048 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3049
3050         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
3051         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
3052
3053 2007-02-13  Bruno Haible  <bruno@clisp.org>
3054
3055         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
3056         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
3057
3058 2007-02-12  Bruno Haible  <bruno@clisp.org>
3059
3060         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
3061         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
3062         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
3063         time warning rather than a link error.
3064
3065 2007-02-12  Bruno Haible  <bruno@clisp.org>
3066
3067         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
3068         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
3069         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
3070
3071 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
3072
3073         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
3074         args, not 2.
3075
3076 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
3077
3078         New module 'time', so that apps can include <time.h> as per
3079         POSIX and GNU instead of separate include files like time_r.h
3080         and timegm.h.  This implementation tries out a simpler approach
3081         for replacing decls in standard include files (as compared to
3082         the string module), somewhat as an experiment.
3083
3084         * config/srclist.txt: Comment out mktime.c for now.
3085         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
3086         since it doesn't apply any more.  Use generic wording instead.
3087         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
3088         'time'.
3089         * lib/time_.h, m4/time_h.m4, modules/time: New files.
3090         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
3091         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
3092         Don't include <sys/types.h>; no longer needed since we assume C89.
3093         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
3094         * lib/strftime.c: Likewise.
3095         * lib/time_r.c: Likewise.
3096         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
3097         * lib/nanosleep.c: Include <time.h> first, to check interface.
3098         * lib/strptime.c: Likewise.
3099         * lib/time_r.c: Likewise.
3100         * lib/timegm.c: Likewise.
3101         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
3102         needed.
3103         * lib/timegm.c: Don't include timegm.h; no longer needed.
3104         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
3105         time.h now handles any problems in that area.
3106         (struct timespec, nanosleep): Remove; time.h now arranges for these.
3107         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
3108         that time.h defines struct timespec.
3109         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
3110         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
3111         handles that.
3112         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
3113         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
3114         needed.  Set REPLACE_LOCALTIME.
3115         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
3116         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
3117         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
3118         nanosleep; time_h.m4 now does that.  Don't require
3119         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
3120         module handles this now.
3121         * modules/getdate (Depends-on): Remove timespec.  Add time.
3122         * modules/nanosleep (Depends-on): Likewise.
3123         * modules/stat-time (Depends-on): Likewise.
3124         * modules/nanosleep (Include): Include time.h, not timespec.h.
3125         * modules/strptime (Files): Remove lib/strptime.h.
3126         (Depends-on): Add extensions, time.
3127         (Include): Include time.h, not strptime.h.
3128         * modules/time_r (Files): Remove lib/time_r.h.
3129         (Depends-on): Add time.
3130         (Include): Include time.h, not time_r.h.
3131         * modules/timegm: Likewise.
3132         * modules/timespec (Description): Now does timespec-related decls
3133         of our own, instead of struct timespec itself.
3134         (Depends-on): Add time; remove extensions.
3135         (Maintainer): Add self.
3136         * modules/utimecmp (Depends-on): Add time; remove timespec.
3137         * modules/utimens (Depends-on): Likewise.
3138         * modules/xnanosleep (Depends-on): Likewise.
3139
3140 2007-02-11  Bruno Haible  <bruno@clisp.org>
3141
3142         * lib/c-strstr.c: Include allocsa.h.
3143         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
3144         * lib/c-strcasestr.c: Include allocsa.h.
3145         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
3146         * lib/strcasestr.c: Include allocsa.h.
3147         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
3148         * lib/mbsstr.c: Include allocsa.h.
3149         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
3150         allocsa/freesa instead of malloc/free.
3151         * lib/mbscasestr.c: Include allocsa.h.
3152         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
3153         allocsa/freesa instead of malloc/free.
3154         * modules/c-strstr (Depends-on): Add allocsa.
3155         * modules/c-strcasestr (Depends-on): Likewise.
3156         * modules/strcasestr (Depends-on): Likewise.
3157         * modules/mbsstr (Depends-on): Likewise.
3158         * modules/mbscasestr (Depends-on): Likewise.
3159
3160 2007-02-11  Bruno Haible  <bruno@clisp.org>
3161
3162         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
3163
3164         * modules/mbsspn-tests: New file.
3165         * tests/test-mbsspn.sh: New file.
3166         * tests/test-mbsspn.c: New file.
3167
3168 2007-02-11  Bruno Haible  <bruno@clisp.org>
3169
3170         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
3171
3172         * modules/mbspbrk-tests: New file.
3173         * tests/test-mbspbrk.sh: New file.
3174         * tests/test-mbspbrk.c: New file.
3175
3176 2007-02-11  Bruno Haible  <bruno@clisp.org>
3177
3178         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
3179         unneeded cast.
3180
3181         * modules/mbscspn-tests: New file.
3182         * tests/test-mbscspn.sh: New file.
3183         * tests/test-mbscspn.c: New file.
3184
3185 2007-02-11  Bruno Haible  <bruno@clisp.org>
3186
3187         * modules/mbscasecmp-tests: New file.
3188         * tests/test-mbscasecmp.sh: New file.
3189         * tests/test-mbscasecmp.c: New file.
3190
3191 2007-02-11  Bruno Haible  <bruno@clisp.org>
3192
3193         Ensure O(n) worst-case complexity of mbscasestr.
3194         * lib/mbscasestr.c: Include stdbool.h.
3195         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
3196         functions.
3197         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
3198         the bookkeeping indicates that it's worth it.
3199         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
3200
3201         * modules/mbscasestr-tests: New file.
3202         * tests/test-mbscasestr1.c: New file.
3203         * tests/test-mbscasestr2.sh: New file.
3204         * tests/test-mbscasestr2.c: New file.
3205         * tests/test-mbscasestr3.sh: New file.
3206         * tests/test-mbscasestr3.c: New file.
3207         * tests/test-mbscasestr4.sh: New file.
3208         * tests/test-mbscasestr4.c: New file.
3209         * m4/locale-tr.m4: New file.
3210
3211 2007-02-11  Bruno Haible  <bruno@clisp.org>
3212
3213         Ensure O(n) worst-case complexity of mbsstr.
3214         * lib/mbsstr.c: Include stdbool.h.
3215         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
3216         functions.
3217         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
3218         bookkeeping indicates that it's worth it.
3219         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
3220
3221         * modules/mbsstr-tests: New file.
3222         * tests/test-mbsstr1.c: New file.
3223         * tests/test-mbsstr2.sh: New file.
3224         * tests/test-mbsstr2.c: New file.
3225         * tests/test-mbsstr3.sh: New file.
3226         * tests/test-mbsstr3.c: New file.
3227         * m4/locale-fr.m4: New file.
3228
3229 2007-02-11  Bruno Haible  <bruno@clisp.org>
3230
3231         * lib/mbsrchr.c (mbsrchr): Fix bug.
3232
3233         * modules/mbsrchr-tests: New file.
3234         * tests/test-mbsrchr.sh: New file.
3235         * tests/test-mbsrchr.c: New file.
3236
3237 2007-02-11  Bruno Haible  <bruno@clisp.org>
3238
3239         * lib/mbschr.c (mbschr): Fix bug.
3240
3241         * modules/mbschr-tests: New file.
3242         * tests/test-mbschr.sh: New file.
3243         * tests/test-mbschr.c: New file.
3244         * m4/locale-zh.m4: New file.
3245
3246 2007-02-11  Bruno Haible  <bruno@clisp.org>
3247
3248         Support for copying multibyte string iterators.
3249         * lib/mbiter.h: Include <string.h>.
3250         (mbiter_multi_copy): New function.
3251         (mbi_copy): New macro.
3252         * lib/mbuiter.h: Include <string.h>.
3253         (mbuiter_multi_copy): New function.
3254         (mbui_copy): New macro.
3255
3256 2007-02-11  Bruno Haible  <bruno@clisp.org>
3257
3258         New module mbslen.
3259         * modules/mbslen: New file.
3260         * lib/mbslen.c: New file.
3261         * lib/string_.h (mbslen): New declaration.
3262         * m4/mbslen.m4: New file.
3263         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3264         GNULIB_MBSLEN.
3265         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
3266         * MODULES.html.sh (Internationalization functions): Add mbslen.
3267
3268 2007-02-11  Bruno Haible  <bruno@clisp.org>
3269
3270         Ensure O(n) worst-case complexity of strcasestr substitute.
3271         * lib/strcasestr.c: Include stdbool.h.
3272         (knuth_morris_pratt): New function.
3273         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
3274         bookkeeping indicates that it's worth it.
3275         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
3276
3277         * modules/strcasestr-tests: New file.
3278         * tests/test-strcasestr.c: New file.
3279
3280 2007-02-11  Bruno Haible  <bruno@clisp.org>
3281
3282         Ensure O(n) worst-case complexity of c_strcasestr.
3283         * lib/c-strcasestr.c: Include stdbool.h, string.h.
3284         (knuth_morris_pratt): New function.
3285         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
3286         the bookkeeping indicates that it's worth it.
3287         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
3288
3289         * modules/c-strcasestr-tests: New file.
3290         * tests/test-c-strcasestr.c: New file.
3291
3292 2007-02-11  Bruno Haible  <bruno@clisp.org>
3293
3294         Ensure O(n) worst-case complexity of c_strstr.
3295         * lib/c-strstr.c: Include stdbool.h, string.h.
3296         (knuth_morris_pratt): New function.
3297         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
3298         bookkeeping indicates that it's worth it.
3299         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
3300
3301         * lib/c-strstr.c: Complete rewrite for maintainability.
3302
3303         * modules/c-strstr-tests: New file.
3304         * tests/test-c-strstr.c: New file.
3305
3306 2007-02-11  Bruno Haible  <bruno@clisp.org>
3307
3308         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
3309         5.2.1 and earlier, whereby \055 was treated just like the range
3310         delimiter '-'.
3311         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
3312
3313 2007-02-08  Bruno Haible  <bruno@clisp.org>
3314
3315         * modules/regex (Depends-on): Add stdbool.
3316         Reported by Dalibor Topic <robilad@kaffe.org>.
3317
3318 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
3319
3320         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
3321         Prefer returning from main to exiting from it.
3322         Remove unnecessary parens after sizeof.
3323
3324 2007-02-05  Bruno Haible  <bruno@clisp.org>
3325
3326         New module mbssep.
3327         * modules/mbssep: New file.
3328         * lib/mbssep.c: New file.
3329         * lib/string_.h (strsep): Add a conditional link warning.
3330         (mbssep): New declaration.
3331         * m4/mbssep.m4: New file.
3332         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3333         GNULIB_MBSSEP.
3334         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
3335         * MODULES.html.sh (Internationalization functions): Add mbssep.
3336
3337 2007-02-05  Bruno Haible  <bruno@clisp.org>
3338
3339         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
3340         Optimize search in case of 1 delimiter.
3341
3342 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
3343
3344         * lib/acl.h: Include sys/types.h before sys/acl.h.
3345
3346 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
3347
3348         Merge upstream fix for glibc bugzilla #3957:
3349
3350         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
3351
3352         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
3353         bit for RE_HAT_LISTS_NOT_NEWLINE.
3354         (build_charclass_op): Remove bogus comment.
3355
3356 2007-02-05  Simon Josefsson  <simon@josefsson.org>
3357
3358         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
3359
3360 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
3361
3362         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
3363         * lib/memmem.c [!defined _LIBC]: Include config.h.
3364
3365 2007-02-04  Bruno Haible  <bruno@clisp.org>
3366
3367         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
3368         warning message.
3369
3370 2007-02-04  Bruno Haible  <bruno@clisp.org>
3371
3372         New module mbstok_r.
3373         * modules/mbstok_r: New file.
3374         * lib/mbstok_r.c: New file.
3375         * lib/string_.h (strtok_r): Change argument names to match the
3376         comments. Add a conditional link warning.
3377         (mbstok_r): New declaration.
3378         * m4/mbstok_r.m4: New file.
3379         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3380         GNULIB_MBSTOK_R.
3381         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
3382         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
3383
3384 2007-02-04  Bruno Haible  <bruno@clisp.org>
3385
3386         New module mbsspn.
3387         * modules/mbsspn: New file.
3388         * lib/mbsspn.c: New file.
3389         * lib/string_.h (strspn): Add a conditional link warning.
3390         (mbsspn): New declaration.
3391         * m4/mbsspn.m4: New file.
3392         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3393         GNULIB_MBSSPN.
3394         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
3395         * MODULES.html.sh (Internationalization functions): Add mbsspn.
3396
3397 2007-02-04  Bruno Haible  <bruno@clisp.org>
3398
3399         New module mbspbrk.
3400         * modules/mbspbrk: New file.
3401         * lib/mbspbrk.c: New file.
3402         * lib/string_.h (strpbrk): Add a conditional link warning.
3403         (mbspbrk): New declaration.
3404         * m4/mbspbrk.m4: New file.
3405         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3406         GNULIB_MBSPBRK.
3407         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
3408         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
3409
3410 2007-02-04  Bruno Haible  <bruno@clisp.org>
3411
3412         New module mbscspn.
3413         * modules/mbscspn: New file.
3414         * lib/mbscspn.c: New file.
3415         * lib/string_.h (strcspn): Add a conditional link warning.
3416         (mbscspn): New declaration.
3417         * m4/mbscspn.m4: New file.
3418         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3419         GNULIB_MBSCSPN.
3420         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
3421         * MODULES.html.sh (Internationalization functions): Add mbscspn.
3422
3423 2007-02-04  Bruno Haible  <bruno@clisp.org>
3424
3425         New module mbscasestr, reduced goal of strcasestr.
3426         * modules/mbscasestr: New file.
3427         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
3428         (mbscasestr): Renamed from strcasestr.
3429         * lib/strcasestr.c: Don't include mbuiter.h.
3430         (strcasestr): Remove support for multibyte locales.
3431         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
3432         Change the conditional link warning.
3433         (mbscasestr): New declaration.
3434         * m4/mbscasestr.m4: New file.
3435         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
3436         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
3437         REPLACE_STRCASESTR.
3438         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
3439         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
3440         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
3441         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
3442         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
3443         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
3444         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
3445         (Depends-on): Remove mbuiter.
3446         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
3447
3448 2007-02-04  Bruno Haible  <bruno@clisp.org>
3449
3450         Simplify handling of strncasecmp.
3451         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
3452         the conditional link warning.
3453         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
3454         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
3455         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
3456         * modules/strcase (configure.ac): Don't invoke
3457         gl_STRING_MODULE_INDICATOR.
3458         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
3459
3460 2007-02-04  Bruno Haible  <bruno@clisp.org>
3461
3462         New module mbscasecmp, reduced goal of strcasecmp.
3463         * modules/mbscasecmp: New file.
3464         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
3465         (mbscasecmp): Renamed from strcasecmp.
3466         * lib/strcasecmp.c: Don't include mbuiter.h.
3467         (strcasecmp): Remove support for multibyte locales.
3468         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
3469         Change the conditional link warning.
3470         (mbscasecmp): New declaration.
3471         * m4/mbscasecmp.m4: New file.
3472         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
3473         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
3474         REPLACE_STRCASECMP.
3475         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
3476         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3477         GNULIB_MBSCASECMP.
3478         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
3479         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
3480         * modules/strcase (Files): Remove m4/mbrtowc.m4.
3481         (Depends-on): Remove mbuiter.
3482         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
3483
3484 2007-02-04  Bruno Haible  <bruno@clisp.org>
3485
3486         New module mbsstr. Remove module strstr.
3487         * modules/mbsstr: New file.
3488         * modules/strstr: Remove file.
3489         * lib/mbsstr.c: Renamed from lib/strstr.c.
3490         (mbsstr): Renamed from strstr.
3491         * lib/string_.h (strstr): Remove declaration. Change the conditional
3492         link warning.
3493         (mbsstr): New declaration.
3494         * m4/mbsstr.m4: New file.
3495         * m4/strstr.m4: Remove file.
3496         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
3497         REPLACE_STRSTR.
3498         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
3499         Don't initialize GNULIB_STRSTR.
3500         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
3501         substitute GNULIB_STRSTR and REPLACE_STRSTR.
3502         * MODULES.html.sh (Internationalization functions): Add mbsstr.
3503         (Support for systems lacking ANSI C 89): Remove strstr.
3504
3505 2007-02-04  Bruno Haible  <bruno@clisp.org>
3506
3507         New module mbsrchr.
3508         * modules/mbsrchr: New file.
3509         * lib/mbsrchr.c: New file.
3510         * lib/string_.h (strrchr): Add a conditional link warning.
3511         (mbsrchr): New declaration.
3512         * m4/mbsrchr.m4: New file.
3513         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3514         GNULIB_MBSRCHR.
3515         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
3516         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
3517
3518 2007-02-04  Bruno Haible  <bruno@clisp.org>
3519
3520         New module mbschr.
3521         * modules/mbschr: New file.
3522         * lib/mbschr.c: New file.
3523         * lib/string_.h (strchr): Add a conditional link warning.
3524         (mbschr): New declaration.
3525         * m4/mbschr.m4: New file.
3526         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3527         GNULIB_MBSCHR.
3528         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
3529         * MODULES.html.sh (Internationalization functions): Add mbschr.
3530
3531 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
3532
3533         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
3534
3535         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
3536
3537 2007-02-04  Bruno Haible  <bruno@clisp.org>
3538
3539         New module description section 'configure.ac-early'.
3540         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
3541         (func_get_autoconf_early_snippet): New function.
3542         (func_import, func_create_testdir): Use it. Remove special cases for
3543         modules 'extensions' and 'lock'.
3544         * modules/extensions (configure.ac-early): Require
3545         gl_USE_SYSTEM_EXTENSIONS.
3546         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
3547
3548 2007-02-04  Bruno Haible  <bruno@clisp.org>
3549
3550         Make use of gcj-4.3's -fsource and -ftarget option.
3551         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
3552         and if so try the options -fsource and -ftarget.
3553         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
3554         source_version, ftarget_option, target_version arguments.
3555         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
3556         (is_envjavac_oldgcj_14_14_usable): Renamed from
3557         is_envjavac_gcj_14_14_usable.
3558         (is_envjavac_oldgcj_14_13_usable): Renamed from
3559         is_envjavac_gcj_14_13_usable.
3560         (is_gcj_present): Update.
3561         (is_gcj_43, is_gcj43_usable): New functions.
3562         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
3563         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
3564         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
3565         try the options -fsource and -ftarget.
3566
3567 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
3568
3569         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
3570         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
3571         larger value.
3572
3573 2007-02-03  Jim Meyering  <jim@meyering.net>
3574
3575         Give tools a better chance to allocate space for very large buffers.
3576         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
3577
3578         Make pwd and readlink work also when run with an unreadable parent dir
3579         on systems with openat support.
3580         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
3581         provided getcwd function, even when we have openat support.
3582         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
3583
3584 2007-02-02  Bruno Haible  <bruno@clisp.org>
3585
3586         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
3587         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
3588         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
3589         portability problems if one of these functions is only used on specific
3590         platforms.
3591         Reported by Paul Eggert.
3592
3593 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
3594
3595         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
3596         is causing more trouble than it's curing.
3597         * lib/regex_internal.h (__mempcpy): Remove.
3598         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
3599         (and make the code a tad smaller to boot).
3600         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
3601
3602 2007-02-02  Jim Meyering  <jim@meyering.net>
3603
3604         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
3605         section, not in the Makefile.am: one.
3606
3607 2007-02-02  Eric Blake  <ebb9@byu.net>
3608
3609         * lib/strchrnul.c: Always include config.h first.
3610
3611         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
3612         gnulib strstr is not necessary here.
3613
3614 2007-02-02  Simon Josefsson  <simon@josefsson.org>
3615
3616         * m4/socklen.m4: Fix typo.
3617
3618 2007-02-02  Eric Blake  <ebb9@byu.net>
3619
3620         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
3621         * modules/netinet_in (Makefile.am): Likewise.
3622
3623 2007-02-01  Bruno Haible  <bruno@clisp.org>
3624
3625         * lib/string_.h (GL_LINK_WARNING): New macro.
3626         (strcasecmp, strstr, strcasestr): If provided by the system,
3627         conditionally define as a macro that leads to a warning instead of to
3628         an error.
3629         (strncasecmp): Conditionally define as a macro that leads to a warning.
3630
3631 2007-02-01  Karl Berry  <karl@gnu.org>
3632
3633         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
3634
3635 2007-02-01  Bruno Haible  <bruno@clisp.org>
3636
3637         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
3638         renamings.
3639
3640 2007-02-01  Eric Blake  <ebb9@byu.net>
3641
3642         * modules/regex (Depends-on): Revert dependence on mempcpy.
3643         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
3644         module's definition of mempcpy.
3645         Reported by Paul Eggert.
3646
3647 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
3648
3649         * lib/string_.h: If the gnulib module XYZ is not present, undefine
3650         the symbol XYZ before redefining it.  This fixes a problem with
3651         programs that don't use XYZ, when compiled on systems that define
3652         XYZ to something else.
3653
3654 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
3655
3656         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
3657         occurs when "mkdir -m foo" creates a setgid directory that is (1)
3658         writeable to group or other and (2) is intended to have a special
3659         mode bit that is set or cleared.  In such a case, the directory
3660         should be neither group- nor other-writeable until the special
3661         mode bits are right.
3662
3663 2007-01-31  Eric Blake  <ebb9@byu.net>
3664
3665         * modules/mountlist (Depends-on): Add strstr.
3666
3667         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
3668         bug.
3669         * modules/string (Makefile.am): Remove redundant replacement.
3670         * modules/regex (Depends-on): Add mempcpy.
3671
3672 2007-01-31  Bruno Haible  <bruno@clisp.org>
3673
3674         New module description field 'Link'.
3675         * gnulib-tool (func_usage): Document --extract-link-directive.
3676         (sed_extract_prog): Recognize 'Link' directive.
3677         (func_get_link_directive): New function.
3678         (func_import): Show summary of link directives.
3679         Handle --extract-link-directive option.
3680         * modules/acl (Link): New section.
3681         * modules/clock-time (Link): New section.
3682         * modules/euidaccess (Link): New section.
3683         * modules/gettext (Link): New section.
3684         * modules/iconv (Link): New section.
3685         * modules/lock (Link): New section.
3686         * modules/nanosleep (Link): New section.
3687         * modules/readline (Link): New section.
3688
3689 2007-01-27  Bruno Haible  <bruno@clisp.org>
3690
3691         Enforce the use of gnulib modules for unportable <string.h> functions.
3692         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
3693         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
3694         (gl_HEADER_STRING_H_BODY): Require it.
3695         * lib/string_.h: If the gnulib module XYZ is not present, redefine
3696         the symbol XYZ to one that gives a link error.
3697         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
3698         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
3699         * modules/mempcpy (configure.ac): Likewise.
3700         * modules/memrchr (configure.ac): Likewise.
3701         * modules/stpcpy (configure.ac): Likewise.
3702         * modules/stpncpy (configure.ac): Likewise.
3703         * modules/strcase (configure.ac): Likewise.
3704         * modules/strcasestr (configure.ac): Likewise.
3705         * modules/strchrnul (configure.ac): Likewise.
3706         * modules/strdup (configure.ac): Likewise.
3707         * modules/strndup (configure.ac): Likewise.
3708         * modules/strnlen (configure.ac): Likewise.
3709         * modules/strpbrk (configure.ac): Likewise.
3710         * modules/strsep (configure.ac): Likewise.
3711         * modules/strstr (configure.ac): Likewise.
3712         * modules/strtok_r (configure.ac): Likewise.
3713
3714 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
3715
3716         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
3717
3718 2007-01-30  Jim Meyering  <jim@meyering.net>
3719
3720         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
3721
3722 2007-01-29  Bruno Haible  <bruno@clisp.org>
3723
3724         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
3725         * lib/execute.c: Likewise.
3726         * lib/pipe.c: Likewise.
3727         * lib/printf-args.h: Likewise.
3728         * lib/printf-args.c: Likewise.
3729         * lib/printf-parse.c: Likewise.
3730         * lib/vasnprintf.c: Likewise.
3731
3732 2007-01-29  Eric Blake  <ebb9@byu.net>
3733
3734         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
3735         declaration.
3736
3737 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
3738
3739         * lib/strptime.h (strptime): Use 'restrict' for args where
3740         POSIX requires this.
3741         * lib/strptime.c (strptime): Likewise.
3742         Change license notice from LGPL to GPL, since gnulib-tool will
3743         change this as needed.
3744         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
3745         defined.
3746         Include "strptime.h" first, to check interface.
3747         Do not #undef _LIBC and _NL_CURRENT.
3748         Do not include <stdlib.h>; no longer needed.
3749         Include "time_r.h" and declare ptime_locale_status
3750         only if _LIBC is not defined.
3751         (__P): Remove unused macro.
3752         (match_string): Bring back glibc version, but use it only if _LIBC
3753         is defined.
3754         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
3755         Remove unnecessary assertion and abort() call.
3756         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
3757         * m4/strptime.m4: Fix serial number comment.
3758         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
3759         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
3760         (Depends-on): Add time_r.
3761
3762 2007-01-29  Bruno Haible  <bruno@clisp.org>
3763
3764         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
3765         strptime.
3766         * modules/strptime (Depends-on): Add stdbool.
3767         * lib/strptime.h: Include <time.h> always. Add comments.
3768
3769 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
3770
3771         * modules/strptime: New file.
3772         * lib/strptime.h: New file.
3773         * lib/strptime.c: New file.
3774         * m4/strptime.m4: New file.
3775
3776 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
3777
3778         * MODULES.html.sh: New module mpsort.
3779         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
3780
3781         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
3782         a circularity problem with HP-UX ia64 reported by Bob Proulx in
3783         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
3784         All uses changed.
3785         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
3786         All uses changed.
3787         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
3788         to _Restrict_.
3789         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
3790         the parameter matches the prototype.
3791
3792 2007-01-28  Jim Meyering  <jim@meyering.net>
3793
3794         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
3795         sys/time.h here, reverting that part of the previous patch:
3796         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
3797
3798 2007-01-28  Bruno Haible  <bruno@clisp.org>
3799
3800         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
3801         value of $(SYS_TIME_H).
3802         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
3803         remove it conditionally, too. [added by Jim Meyering]
3804         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
3805         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
3806         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
3807         GETTIMEOFDAY_REPLACEMENT to 1.
3808
3809 2007-01-28  Bruno Haible  <bruno@clisp.org>
3810
3811         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
3812         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
3813         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
3814         Set UNISTD_H instead of UNISTD_H2.
3815         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
3816
3817 2007-01-28  Bruno Haible  <bruno@clisp.org>
3818
3819         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
3820         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
3821
3822 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3823
3824         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
3825         (func_create_testdir): Ensure C locale for `grep' and `tr'
3826         character ranges.
3827         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
3828         ACLOCAL_AMFLAGS parsing state machine.
3829
3830 2007-01-27  Bruno Haible  <bruno@clisp.org>
3831
3832         * modules/unistr/base: Update.
3833
3834 2007-01-27  Bruno Haible  <bruno@clisp.org>
3835
3836         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
3837         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
3838         * modules/unistr/u32-mbtouc-unsafe: Renamed from
3839         modules/unistr/u32-mbtouc.
3840         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
3841         * lib/unistr.h: Update.
3842         * lib/linebreak.c: Update.
3843         * modules/unistr/u32-mbtouc: Renamed from
3844         modules/unistr/u32-mbtouc-safe.
3845         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
3846         * lib/unistr.h: Update.
3847         * lib/unistr/u32-to-u8.c: Update.
3848         * lib/unistr/u32-to-u16.c: Update.
3849
3850 2007-01-27  Bruno Haible  <bruno@clisp.org>
3851
3852         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
3853         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
3854         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
3855         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
3856         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
3857         * modules/unistr/u16-mbtouc-unsafe: Renamed from
3858         modules/unistr/u16-mbtouc.
3859         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
3860         * lib/unistr.h: Update.
3861         * lib/linebreak.c: Update.
3862         * modules/linebreak: Update.
3863         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
3864         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
3865         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
3866         * modules/unistr/u16-mbtouc: Renamed from
3867         modules/unistr/u16-mbtouc-safe.
3868         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
3869         * lib/unistr.h: Update.
3870         * lib/unistr/u16-to-u8.c: Update.
3871         * modules/unistr/u16-to-u8: Update.
3872         * lib/unistr/u16-to-u32.c: Update.
3873         * modules/unistr/u16-to-u32: Update.
3874
3875 2007-01-27  Bruno Haible  <bruno@clisp.org>
3876
3877         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
3878         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
3879         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
3880         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
3881         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
3882         * modules/unistr/u8-mbtouc-unsafe: Renamed from
3883         modules/unistr/u8-mbtouc.
3884         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
3885         * lib/unistr.h: Update.
3886         * lib/striconveh.c: Update.
3887         * modules/striconveh: Update.
3888         * lib/linebreak.c: Update.
3889         * modules/linebreak: Update.
3890         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
3891         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
3892         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
3893         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
3894         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
3895         * lib/unistr.h: Update.
3896         * lib/striconveh.c: Update.
3897         * modules/striconveh: Update.
3898         * lib/unistr/u8-to-u16.c: Update.
3899         * modules/unistr/u8-to-u16: Update.
3900         * lib/unistr/u8-to-u32.c: Update.
3901         * modules/unistr/u8-to-u32: Update.
3902
3903 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3904
3905         Sync from Libtool.
3906         * lib/argz.c: Do not include strings.h nor memory.h, include
3907         string.h unconditionally.  Patch by Simon Josefsson.
3908
3909 2007-01-27  Bruno Haible  <bruno@clisp.org>
3910
3911         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
3912         from gl_HEADER_STRING_H_BODY.
3913         (gl_HEADER_STRING_H_BODY): Require it.
3914         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
3915         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
3916         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
3917         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
3918         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
3919         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
3920         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
3921         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
3922         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
3923         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
3924         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
3925         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
3926         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
3927         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
3928         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
3929
3930 2007-01-27  Bruno Haible  <bruno@clisp.org>
3931
3932         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
3933         check_PROGRAMS into noinst_PROGRAMS.
3934         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
3935         check_PROGRAMS in this case.
3936         (func_import): Set for_test to false.
3937         (func_create_testdir): Set for_test to true.
3938
3939 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3940             Bruno Haible  <bruno@clisp.org>
3941
3942         * modules/strcasestr (Files): Remove lib/strcasestr.h.
3943         (Depends-on): Add string.
3944         (Includes): Use <string.h> instead of strcasestr.h.
3945         * modules/string (Makefile.am): Also substitute the value of
3946         REPLACE_STRCASESTR.
3947         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
3948         assume strcasestr is declared in <string.h> not <strings.h>. Also
3949         set REPLACE_STRCASESTR.
3950         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
3951         REPLACE_STRCASESTR.
3952         * lib/strcasestr.h: Remove file.
3953         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
3954         * lib/string_.h (strcasestr): New declaration.
3955
3956 2007-01-27  Bruno Haible  <bruno@clisp.org>
3957
3958         * lib/string_.h: Use 'extern'.
3959
3960 2007-01-27  Jim Meyering  <jim@meyering.net>
3961
3962         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
3963         of set-but-not-used local, "q".
3964
3965         * lib/mempcpy.c: Include <config.h> before <string.h>.
3966         This fixes a compilation error on HP-UX, due to the system's
3967         "restrict"-using mempcpy prototype.
3968
3969 2007-01-26  Bruno Haible  <bruno@clisp.org>
3970
3971         Small optimization.
3972         * lib/javacomp.c: Include c-strstr.h.
3973          (is_envjavac_gcj): Use c_strstr instead of strstr.
3974         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
3975
3976 2007-01-26  Bruno Haible  <bruno@clisp.org>
3977
3978         * MODULES.html.sh (Unicode string functions): Add the new modules.
3979
3980         * modules/uniconv/u32-strconv-to-locale: New file.
3981         * lib/uniconv/u32-strconv-to-locale.c: New file.
3982
3983         * modules/uniconv/u16-strconv-to-locale: New file.
3984         * lib/uniconv/u16-strconv-to-locale.c: New file.
3985
3986         * modules/uniconv/u8-strconv-to-locale: New file.
3987         * lib/uniconv/u8-strconv-to-locale.c: New file.
3988
3989         * modules/uniconv/u32-strconv-from-locale: New file.
3990         * lib/uniconv/u32-strconv-from-locale.c: New file.
3991
3992         * modules/uniconv/u16-strconv-from-locale: New file.
3993         * lib/uniconv/u16-strconv-from-locale.c: New file.
3994
3995         * modules/uniconv/u8-strconv-from-locale: New file.
3996         * lib/uniconv/u8-strconv-from-locale.c: New file.
3997
3998         * modules/uniconv/u32-strconv-to-enc: New file.
3999         * lib/uniconv/u32-strconv-to-enc.c: New file.
4000         * modules/uniconv/u32-strconv-to-enc-tests: New file.
4001         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
4002
4003         * modules/uniconv/u16-strconv-to-enc: New file.
4004         * lib/uniconv/u16-strconv-to-enc.c: New file.
4005         * lib/uniconv/u-strconv-to-enc.h: New file.
4006         * modules/uniconv/u16-strconv-to-enc-tests: New file.
4007         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
4008
4009         * modules/uniconv/u8-strconv-to-enc: New file.
4010         * lib/uniconv/u8-strconv-to-enc.c: New file.
4011         * modules/uniconv/u8-strconv-to-enc-tests: New file.
4012         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
4013
4014         * modules/uniconv/u32-strconv-from-enc: New file.
4015         * lib/uniconv/u32-strconv-from-enc.c: New file.
4016         * modules/uniconv/u32-strconv-from-enc-tests: New file.
4017         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
4018
4019         * modules/uniconv/u16-strconv-from-enc: New file.
4020         * lib/uniconv/u16-strconv-from-enc.c: New file.
4021         * modules/uniconv/u16-strconv-from-enc-tests: New file.
4022         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
4023
4024         * modules/uniconv/u8-strconv-from-enc: New file.
4025         * lib/uniconv/u8-strconv-from-enc.c: New file.
4026         * lib/uniconv/u-strconv-from-enc.h: New file.
4027         * modules/uniconv/u8-strconv-from-enc-tests: New file.
4028         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
4029
4030         * modules/uniconv/u32-conv-from-enc: New file.
4031         * lib/uniconv/u32-conv-from-enc.c: New file.
4032         * modules/uniconv/u32-conv-from-enc-tests: New file.
4033         * tests/uniconv/test-u32-conv-from-enc.c: New file.
4034
4035         * modules/uniconv/u16-conv-from-enc: New file.
4036         * lib/uniconv/u16-conv-from-enc.c: New file.
4037         * lib/uniconv/u-conv-from-enc.h: New file.
4038         * modules/uniconv/u16-conv-from-enc-tests: New file.
4039         * tests/uniconv/test-u16-conv-from-enc.c: New file.
4040
4041         * modules/uniconv/u8-conv-from-enc: New file.
4042         * lib/uniconv/u8-conv-from-enc.c: New file.
4043         * modules/uniconv/u8-conv-from-enc-tests: New file.
4044         * tests/uniconv/test-u8-conv-from-enc.c: New file.
4045
4046         * modules/uniconv/base: New file.
4047         * lib/uniconv.h: New file.
4048
4049 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
4050
4051         * doc/gnulib-tool.texi (Initial import): Update to match current
4052         behavior with strdup module.
4053         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
4054         * lib/memmem.h: Remove; all uses removed.  This is now done
4055         by <string.h>.
4056         * lib/mempcpy.h: Likewise.
4057         * lib/memrchr.h: Likewise.
4058         * lib/stpcpy.h: Likewise.
4059         * lib/stpncpy.h: Likewise.
4060         * lib/strcase.h: Likewise.
4061         * lib/strchrnul.h: Likewise.
4062         * lib/strdup.h: Likewise.
4063         * lib/strndup.h: Likewise.
4064         * lib/strnlen.h: Likewise.
4065         * lib/strpbrk.h: Likewise.
4066         * lib/strsep.h: Likewise.
4067         * lib/strstr.h: Likewise.
4068         * lib/strtok_r.h: Likewise.
4069         * lib/string_.h: New file.
4070         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
4071         Rely on <string.h> instead.
4072         * lib/canon-host.c: Likewise.
4073         * lib/chdir-long.c: Likewise.
4074         * lib/concatpath.c: Likewise.
4075         * lib/exclude.c: Likewise.
4076         * lib/fchdir.c: Likewise.
4077         * lib/getaddrinfo.c: Likewise.
4078         * lib/getcwd.c: Likewise.
4079         * lib/getsubopt.c: Likewise.
4080         * lib/glob.c: Likewise.
4081         * lib/hard-locale.c: Likewise.
4082         * lib/iconvme.c: Likewise.
4083         * lib/javacomp.c: Likewise.
4084         * lib/mempcpy.c: Likewise.
4085         * lib/memrchr.c: Likewise.
4086         * lib/regex_internal.h: Likewise.
4087         * lib/stpncpy.c: Likewise.
4088         * lib/strcasecmp.c: Likewise.
4089         * lib/strchrnul.c: Likewise.
4090         * lib/strdup.c: Likewise.
4091         * lib/striconv.c: Likewise.
4092         * lib/striconveh.c: Likewise.
4093         * lib/striconveha.c: Likewise.
4094         * lib/strncasecmp.c: Likewise.
4095         * lib/strndup.c: Likewise.
4096         * lib/strnlen.c: Likewise.
4097         * lib/strsep.c: Likewise.
4098         * lib/strstr.c: Likewise.
4099         * lib/strtok_r.c: Likewise.
4100         * lib/userspec.c: Likewise.
4101         * lib/w32spawn.h: Likewise.
4102         * lib/xstrndup.c: Likewise.
4103         * lib/mountlist.c (strstr): Remove decl.
4104         * m4/string_h.m4: New file.
4105         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
4106         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
4107         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
4108         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
4109         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
4110         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
4111         Set REPLACE_STRCASECMP if necessary.
4112         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
4113         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
4114         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
4115         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
4116         HAVE_DECL_STRDUP if necessary.
4117         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
4118         since gl_FUNC_STRNDUP does that now.
4119         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
4120         Check for decl here...
4121         (gl_PREREQ_STRNLEN): ... not here.
4122         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
4123         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
4124         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
4125         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
4126         necessary.
4127         * modules/string: New file.
4128         * modules/memmem (Files): Remove special-purpose include file.
4129         (Depends-on): Add string.
4130         (Include): Include <string.h>, not the removed file.
4131         * modules/mempcpy: Likewise.
4132         * modules/memrchr: Likewise.
4133         * modules/stpcpy: Likewise.
4134         * modules/stpncpy: Likewise.
4135         * modules/strcase: Likewise.
4136         * modules/strchrnul: Likewise.
4137         * modules/strdup: Likewise.
4138         * modules/strndup: Likewise.
4139         * modules/strnlen: Likewise.
4140         * modules/strpbrk: Likewise.
4141         * modules/strsep: Likewise.
4142         * modules/strstr: Likewise.
4143         * modules/strtok_r: Likewise.
4144         * tests/test-dirname.c: Don't include "strdup.h", since
4145         <string.h> now suffices.
4146         * tests/test-memmem.c: Don't include "memmem.h", since
4147         <string.h> now suffices.
4148
4149 2007-01-25  Bruno Haible  <bruno@clisp.org>
4150
4151         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
4152         *resultp is 0.
4153
4154         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
4155         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
4156         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
4157         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
4158
4159         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
4160         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
4161         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
4162         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
4163         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
4164         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
4165
4166 2007-01-24  Bruno Haible  <bruno@clisp.org>
4167
4168         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
4169         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
4170         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
4171         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
4172         gl_FUNC_FTS_CORE.
4173         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
4174         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
4175         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
4176         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
4177         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
4178         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
4179         gl_FUNC_FCHOWNAT.
4180         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
4181         gl_FUNC_STRFTIME.
4182         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
4183         Reported by Ralf Wildenhues.
4184
4185 2007-01-24  Bruno Haible  <bruno@clisp.org>
4186
4187         Drop AC_REQUIRE calls that are redundant with the module dependencies.
4188         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
4189         gl_GETADDRINFO.
4190         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
4191         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
4192         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
4193
4194 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
4195
4196         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
4197         Don't use 'exit'; just return from 'main'.
4198         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
4199
4200         * lib/fnmatch_.h: Readjust white space and comments to match
4201         glibc, to avoid spurious diffs.
4202
4203 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
4204
4205         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
4206         2004-12-01 change by Jakub Jelinek, since this code won't compile
4207         if !LIBC.  Problem reported by Bob Proulx.
4208
4209 2007-01-23  Bruno Haible  <bruno@clisp.org>
4210
4211         * lib/striconveh.c: Include c-strcaseeq.h.
4212         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
4213         * modules/striconveh (Depends-on): Add c-strcaseeq.
4214
4215 2007-01-23  Bruno Haible  <bruno@clisp.org>
4216
4217         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
4218
4219         * modules/c-strcaseeq: New file.
4220         * lib/c-strcaseeq.h: New file.
4221
4222         * modules/streq: New file.
4223         * lib/streq.h: New file.
4224
4225 2007-01-23  Bruno Haible  <bruno@clisp.org>
4226
4227         * modules/striconveha-tests: New file.
4228         * tests/test-striconveha.c: New file.
4229
4230         * lib/striconveha.h: Include <stdbool.h>.
4231         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
4232         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
4233         (mem_iconveha_notranslit): Renamed from mem_iconveha.
4234         (mem_iconveha): New function.
4235         (str_iconveha_notranslit): Renamed from str_iconveha.
4236         (str_iconveha): New function.
4237         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
4238         c-strcase.
4239
4240 2007-01-23  Bruno Haible  <bruno@clisp.org>
4241
4242         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
4243         encodings without forgiving before trying any encoding with handler.
4244         (str_iconveha): Try all encodings without forgiving before trying any
4245         encoding with handler.
4246
4247 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
4248
4249         Import the following changes from libc.
4250
4251         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
4252
4253         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
4254
4255         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
4256
4257         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
4258         normal_bracket label.
4259
4260         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
4261
4262         [BZ #361]
4263         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
4264         to normal_bracket after fetching the next character.
4265
4266 2007-01-22  Bruno Haible  <bruno@clisp.org>
4267
4268         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
4269         argument.
4270         * lib/striconveh.c (iconv_carefully_1): New function.
4271         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
4272         argument.
4273         (str_cd_iconveh): Update.
4274         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
4275         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
4276         * tests/test-striconveh.c (MAGIC): New macro.
4277         (new_offsets): New function.
4278         (main): Test call with and without offsets.
4279
4280 2007-01-22  Bruno Haible  <bruno@clisp.org>
4281
4282         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
4283         * modules/sys_select (Makefile.am): Likewise.
4284         * modules/sys_socket (Makefile.am): Likewise.
4285         * modules/sys_time (Makefile.am): Likewise.
4286
4287 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
4288
4289         * modules/gettimeofday (License): Change from GPL to LGPL, since
4290         gettimeofday is a library function.
4291
4292 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4293
4294         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
4295
4296 2007-01-21  Bruno Haible  <bruno@clisp.org>
4297
4298         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
4299
4300 2007-01-21  Bruno Haible  <bruno@clisp.org>
4301
4302         * modules/striconveha: New file.
4303         * lib/striconveha.h: New file.
4304         * lib/striconveha.c: New file.
4305         * MODULES.html.sh (Internationalization functions): Add striconveha.
4306         * lib/striconv.c (str_iconv): Optimize the case of an empty input
4307         string.
4308         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
4309
4310 2007-01-21  Bruno Haible  <bruno@clisp.org>
4311
4312         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
4313         * lib/striconveh.c (str_iconveh): Likewise.
4314
4315 2007-01-21  Bruno Haible  <bruno@clisp.org>
4316
4317         * lib/striconveh.h (mem_iconveh): New declaration.
4318         * lib/striconveh.c (mem_iconveh): New function.
4319         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
4320
4321 2007-01-21  Bruno Haible  <bruno@clisp.org>
4322
4323         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
4324
4325         * lib/striconveh.h (mem_cd_iconveh): Change specification.
4326         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
4327         original result buffer.
4328         (str_cd_iconveh): Update.
4329         * tests/test-striconveh.c (main): Update.
4330
4331         * lib/striconv.h (mem_cd_iconv): Change specification.
4332         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
4333         result buffer.
4334         (str_cd_iconv): Update.
4335         * tests/test-striconv.c (main): Update.
4336
4337 2007-01-21  Bruno Haible  <bruno@clisp.org>
4338
4339         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
4340
4341 2007-01-20  Jim Meyering  <jim@meyering.net>
4342
4343         * lib/userspec.c (parse_with_separator): If a user or group string
4344         starts with "+", skip the corresponding name-to-ID look-up, since
4345         such a look-up must fail: user and group names may not include "+".
4346
4347 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
4348
4349         * lib/poll.c: Include sys/time.h and time.h unconditionally,
4350         since we now assume the sys_time module.
4351         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
4352         check for sys/time.h; no longer needed.
4353         * modules/poll (Depends-on): Depend on sys_time.
4354
4355 2007-01-18  Bruno Haible  <bruno@clisp.org>
4356
4357         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
4358         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
4359
4360         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
4361         gettimeofday.
4362
4363         * tests/test-gettimeofday.c: Include <time.h>.
4364         (dummy): Remove variable.
4365
4366         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
4367         gl_HEADER_SYS_TIME_H.
4368         (gl_HEADER_SYS_TIME_H): New macro.
4369
4370         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
4371         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4372         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
4373         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
4374         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4375         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
4376         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
4377         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4378         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
4379         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
4380         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4381
4382         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
4383         last change; it caused a compilation error when cross-compiling to
4384         Cygwin.
4385
4386 2007-01-18  Jim Meyering  <jim@meyering.net>
4387
4388         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
4389         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
4390         than the race-prone "test -d sys || mkdir sys".
4391         (configure.ac): Use AC_PROG_MKDIR_P.
4392         * modules/sys_select: Likewise.
4393         * modules/sys_socket: Likewise.
4394         * modules/sys_time: Likewise.
4395
4396 2007-01-18  Eric Blake  <ebb9@byu.net>
4397
4398         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
4399         replace gettimeofday.
4400         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
4401         name, to avoid infinite recursion.
4402
4403 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
4404
4405         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
4406         module sys_time.
4407         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
4408         assume timespec.h defines struct timeval.
4409         * lib/settime.c: Likewise.
4410         * lib/utimens.c: Likewise.
4411         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
4412         since we now assume the gettimeofday module.
4413         * lib/tempname.c (__gen_tempname): Likewise.
4414         * lib/gettimeofday.h: Remove.
4415         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
4416         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
4417         Include <time.h>, for 'time()'.
4418         (localtime_buffer_addr): Also use this workaround if
4419         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
4420         to simplify the uses.  All uses changed.
4421         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
4422         that #undef is inside {}, and 'const' follows type name consistently.
4423         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
4424         (gettimeofday): Do not use the maximum possible value for
4425         tv->tv_usec, since that might break usages other than ls.c.
4426         Instead, we'll leave ls.c alone.  This undoes today's patch
4427         by Bruno.  Add a compile-time warning for 1s-clock resolution;
4428         we've never observed the problem but might as well keep the
4429         canary.
4430         * lib/nanosleep.c: Include timespec.h first, for interface check.
4431         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
4432         now assume the sys_time module.
4433         * lib/tempname.c: Likewise.
4434         * lib/timespec.h: Likewise.
4435         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
4436         needed.
4437         * lib/strftime.c: Likewise.
4438         * lib/timespec.h: Likewise.
4439         * lib/posixtm.c: Include posixtm.h first, for interface check.
4440         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
4441         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
4442         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
4443         * lib/sys_time_.h: New file.
4444         * lib/timespec.h (struct timespec): Use long int, not long.
4445         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
4446         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
4447         Remove obsolescent call to AC_HEADER_TIME.
4448         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
4449         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
4450         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
4451         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
4452         Likewise.
4453         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
4454         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
4455         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
4456         into the sys_time module.  Check for gettimeofday just once.
4457         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
4458         for gettimeofday signature to just check the signature.  Merely
4459         compile it, since linking doesn't test signature.  Improve test for
4460         whether gettimeofday.o is actually needed.
4461         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
4462         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
4463         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
4464         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4465         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
4466         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
4467         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
4468         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
4469         than worrying about sys/time.h.
4470         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
4471         Don't bother worrying about TIME_WITH_SYS_TIME.
4472         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
4473         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
4474         * m4/sys_time_h.m4: New file.
4475         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
4476         Don't include sys/time.h.  Return from main rather than exiting.
4477         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
4478         all uses changed.
4479         * modules/gethrxtime (Depends-on): Add sys_time.
4480         * modules/gettime (Depends-on): Likewise.
4481         * modules/gettimeofday (Depends-on): Likewise.
4482         * modules/nanosleep (Depends-on): Likewise.
4483         * modules/settime (Depends-on): Likewise.
4484         * modules/tempname (Depends-on): Likewise.
4485         * modules/utimens (Depends-on): Likewise.
4486         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
4487         (Include:) Change back to <sys/time.h>.
4488         (Maintainer:) Add self.
4489         * modules/sys_time: New file.
4490         * modules/tempname (Depends-on): Add gettimeofday.
4491         * tests/test-gettimeofday.c: Include <sys/time.h>
4492         rather than gettimeofday.h.
4493
4494 2007-01-17  Bruno Haible  <bruno@clisp.org>
4495
4496         * gnulib-tool (func_get_license): Revert last patch. Instead, let
4497         the license default to GPL.
4498         (func_create_testdir): Don't complain if a module is LGPL and its
4499         tests module depends on GPLed modules.
4500
4501 2007-01-17  Bruno Haible  <bruno@clisp.org>
4502
4503         * lib/gettimeofday.c (gettimeofday): Add code for the case
4504         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
4505         maximum possible value for tv->tv_usec, rather than the minimum one.
4506
4507 2005-10-08  Martin Lambers  <marlam@marlam.de>
4508 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
4509 2007-01-16  Bruno Haible  <bruno@clisp.org>
4510
4511         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
4512         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
4513         gl_FUNC_GETTIMEOFDAY.
4514         (Include): Add gettimeofday.h.
4515         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
4516         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
4517         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
4518         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
4519         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
4520         * lib/gettimeofday.h: New file.
4521         * lib/gettimeofday.c: Include <sys/timeb.h>.
4522         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
4523         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4524         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
4525         fall back on time().
4526
4527         * tests/test-gettimeofday.c: New file.
4528         * modules/gettimeofday-tests: New file.
4529
4530 2007-01-16  Eric Blake  <ebb9@byu.net>
4531
4532         * modules/fnmatch (Depends-on): Depend on wchar.
4533         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
4534         * m4/fnmatch.m4: Likewise.
4535         * modules/mbchar (Makefile.am): Assume <wchar.h>.
4536         * m4/mbchar.m4: Likewise.
4537         * modules/mbswidth (Depends-on): Depend on wchar.
4538         * lib/mbswidth.c: Assume <wchar.h>.
4539         * m4/mbswidth.m4: Likewise.
4540         * modules/quotearg (Depends-on): Depend on wchar.
4541         * lib/quotearg.c: Assume <wchar.h>.
4542         * m4/quotearg.m4: Likewise.
4543         * modules/regex (Depends-on): Depend on wchar.
4544         * lib/regex_internal.h: Assume <wchar.h>.
4545         * m4/regex.m4: Likewise.
4546         * modules/stdint (Depends-on): Depend on wchar.
4547         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
4548         * m4/stdint.m4: Likewise.
4549         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
4550         * modules/strftime (Depends-on): Depend on wchar.
4551         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
4552         * modules/strtol (Depends-on): Depend on wchar.
4553         * lib/strtol.c: Assume <wchar.h>.
4554         * modules/wcwidth (Depends-on): Depend on wchar.
4555         * lib/wcwidth.h: Assume <wchar.h>.
4556         * m4/wcwidth.m4: Likewise.
4557
4558 2007-01-16  Bruno Haible  <bruno@clisp.org>
4559
4560         * modules/csharpexec-script: New, created from...
4561         * modules/csharpexec: ... this.
4562
4563 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
4564
4565         * modules/javaexec-script: New, created from...
4566         * modules/javaexec: ... this.
4567
4568 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4569
4570         * modules/poll (Dependencies): Add sys_select.
4571
4572 2007-01-15  Jim Meyering  <jim@meyering.net>
4573
4574         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
4575         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
4576         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
4577         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
4578
4579 2007-01-15  Bruno Haible  <bruno@clisp.org>
4580
4581         * modules/striconveh: New file.
4582         * lib/striconveh.h: New file.
4583         * lib/striconveh.c: New file.
4584         * MODULES.html.sh (Internationalization functions): Add striconveh.
4585
4586         * modules/striconveh-tests: New file.
4587         * tests/test-striconveh.c: New file.
4588
4589 2007-01-15  Bruno Haible  <bruno@clisp.org>
4590
4591         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
4592         not from GNU libiconv or GNU libc.
4593
4594 2007-01-15  Bruno Haible  <bruno@clisp.org>
4595
4596         * doc/gnulib-intro.texi (Copyright): Explain the different license
4597         terms for module descriptions, autoconf macros, tests, documentation.
4598
4599 2007-01-14  Bruno Haible  <bruno@clisp.org>
4600
4601         * modules/striconv-tests: New file.
4602         * tests/test-striconv.c: New file.
4603
4604 2007-01-14  Bruno Haible  <bruno@clisp.org>
4605
4606         * modules/iconv-tests: New file.
4607         * tests/test-iconv.c: New file.
4608
4609 2007-01-14  Bruno Haible  <bruno@clisp.org>
4610
4611         * gnulib-tool (func_get_license): For test modules, use the license of
4612         the main module.
4613
4614 2007-01-14  Bruno Haible  <bruno@clisp.org>
4615
4616         * modules/iconv (Include): Clarify that <iconv.h> can only be included
4617         if iconv is found to exist.
4618
4619 2007-01-14  Bruno Haible  <bruno@clisp.org>
4620
4621         * modules/c-ctype-tests: New file.
4622         * tests/test-c-ctype.c: New file.
4623
4624 2007-01-14  Bruno Haible  <bruno@clisp.org>
4625
4626         * modules/binary-io-tests: New file.
4627         * tests/test-binary-io.sh: New file.
4628         * tests/test-binary-io.c: New file.
4629
4630 2007-01-14  Bruno Haible  <bruno@clisp.org>
4631
4632         * modules/array-oset-tests: New file.
4633         * tests/test-array_oset.c: New file.
4634
4635 2007-01-14  Bruno Haible  <bruno@clisp.org>
4636
4637         * modules/array-list-tests: New file.
4638         * tests/test-array_list.c: New file.
4639
4640 2007-01-14  Bruno Haible  <bruno@clisp.org>
4641
4642         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
4643         and make.
4644         Reported by Simon Josefsson in
4645         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
4646
4647 2007-01-14  Bruno Haible  <bruno@clisp.org>
4648
4649         * modules/allocsa-tests: New file.
4650         * tests/test-allocsa.c: New file.
4651
4652 2007-01-14  Bruno Haible  <bruno@clisp.org>
4653
4654         * modules/fchdir (Depends-on): Add absolute-header.
4655         * modules/unistd (Depends-on): Likewise.
4656
4657 2006-12-30  Bruno Haible  <bruno@clisp.org>
4658
4659         * modules/fchdir: New file.
4660         * modules/unistd (Files): Add lib/unistd_.h.
4661         (Makefile.am): Generate unistd.h from unistd_.h.
4662         * lib/fchdir.c: New file.
4663         * lib/dirent_.h: New file.
4664         * lib/unistd_.h: New file.
4665         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
4666         * m4/fchdir.m4: New file.
4667         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
4668         (gl_HEADER_UNISTD): Invoke it.
4669         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
4670         function.
4671         * lib/backupfile.c (opendir, closedir): Undefine.
4672         * lib/chown.c (open, close): Undefine.
4673         * lib/clean-temp.c (open, close): Undefine.
4674         * lib/copy-file.c (open, close): Undefine.
4675         * lib/execute.c (open, close): Undefine.
4676         * lib/fsusage.c (open, close): Undefine.
4677         * lib/gc-gnulib.c (open, close): Undefine.
4678         * lib/getcwd.c (opendir, closedir): Undefine.
4679         * lib/glob.c (opendir, closedir): Undefine.
4680         * lib/javacomp.c (open, close): Undefine.
4681         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
4682         * lib/openat-proc.c (open, close): Undefine.
4683         * lib/pagealign_alloc.c (open, close): Undefine.
4684         * lib/pipe.c (open, close): Undefine.
4685         * lib/progreloc.c (open, close): Undefine.
4686         * lib/savedir.c (opendir, closedir): Undefine.
4687         * lib/utime.c (open, close): Undefine.
4688         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
4689
4690 2007-01-10  Bruno Haible  <bruno@clisp.org>
4691
4692         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
4693
4694 2007-01-12  Eric Blake  <ebb9@byu.net>
4695
4696         Provide a robust <wchar.h>.  Further simplifications are now
4697         possible in other modules, but not included here.
4698         * modules/wchar: New module.
4699         * m4/wchar.m4: New file.
4700         * lib/wchar_.h: Likewise.
4701         * modules/mbchar (Depends-on): Depend on wchar, as the first use
4702         of the new module.
4703         * MODULES.html.sh (Extended multibyte and wide character utilities):
4704         New section.
4705
4706 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
4707
4708         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
4709         to a reasonable default for memory allocation.
4710         (xreadlink): Don't allocate a huge buffer, to work around a buggy
4711         file system that reports garbage st_size values for symlinks.
4712         Problem reported by Liyang Hu.
4713
4714 2007-01-11  Simon Josefsson  <simon@josefsson.org>
4715
4716         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
4717         Emacs .#* auto-save files).
4718
4719 2007-01-11  Bruno Haible  <bruno@clisp.org>
4720
4721         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
4722         directory.
4723
4724 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
4725
4726         Use @...@ consistently in lib/wctype_.h.
4727         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
4728         on it being set to 1 or 0.
4729         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
4730         go back to AC_SUBSTing it.
4731         * modules/wctype (Makefile.am): Undo previous change.
4732
4733 2007-01-10  Eric Blake  <ebb9@byu.net>
4734
4735         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
4736         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
4737         * modules/wctype (Makefile.am): Likewise.
4738         Reported by Chris McGuire.
4739
4740 2007-01-10  Jim Meyering  <jim@meyering.net>
4741
4742         fts.c: a small readability/maintainability improvement
4743         * lib/fts.c (fts_read): Make this code slightly more readable and
4744         maintainable by hoisting the "sp->fts_cur = p" assignments to
4745         immediately follow the statements that set P.  Derived from
4746         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
4747
4748 2007-01-10  Eric Blake  <ebb9@byu.net>
4749
4750         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
4751         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
4752         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
4753         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
4754         Reported by Chris McGuire.
4755
4756 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4757
4758         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
4759         in sed script.
4760
4761 2007-01-09  Bruno Haible  <bruno@clisp.org>
4762
4763         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
4764         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
4765         variables.
4766         (func_module): Use them.
4767
4768 2007-01-09  Bruno Haible  <bruno@clisp.org>
4769
4770         * modules/unistr/base: New file.
4771         * lib/unistr.h: New file.
4772
4773         * modules/unistr/u8-to-u16: New file.
4774         * lib/unistr/u8-to-u16.c: New file.
4775
4776         * modules/unistr/u8-to-u32: New file.
4777         * lib/unistr/u8-to-u32.c: New file.
4778
4779         * modules/unistr/u16-to-u8: New file.
4780         * lib/unistr/u16-to-u8.c: New file.
4781
4782         * modules/unistr/u16-to-u32: New file.
4783         * lib/unistr/u16-to-u32.c: New file.
4784
4785         * modules/unistr/u32-to-u8: New file.
4786         * lib/unistr/u32-to-u8.c: New file.
4787
4788         * modules/unistr/u32-to-u16: New file.
4789         * lib/unistr/u32-to-u16.c: New file.
4790
4791         * modules/unistr/u8-check: New file.
4792         * modules/unistr/u16-check: New file.
4793         * modules/unistr/u32-check: New file.
4794         * lib/unistr/u8-check.c: New file.
4795         * lib/unistr/u16-check.c: New file.
4796         * lib/unistr/u32-check.c: New file.
4797
4798         * modules/unistr/u8-chr: New file.
4799         * modules/unistr/u16-chr: New file.
4800         * modules/unistr/u32-chr: New file.
4801         * lib/unistr/u8-chr.c: New file.
4802         * lib/unistr/u16-chr.c: New file.
4803         * lib/unistr/u32-chr.c: New file.
4804
4805         * modules/unistr/u8-cmp: New file.
4806         * modules/unistr/u16-cmp: New file.
4807         * modules/unistr/u32-cmp: New file.
4808         * lib/unistr/u8-cmp.c: New file.
4809         * lib/unistr/u16-cmp.c: New file.
4810         * lib/unistr/u32-cmp.c: New file.
4811
4812         * modules/unistr/u8-cpy: New file.
4813         * modules/unistr/u16-cpy: New file.
4814         * modules/unistr/u32-cpy: New file.
4815         * lib/unistr/u8-cpy.c: New file.
4816         * lib/unistr/u16-cpy.c: New file.
4817         * lib/unistr/u32-cpy.c: New file.
4818         * lib/unistr/u-cpy.h: New file.
4819
4820         * modules/unistr/u8-cpy-alloc: New file.
4821         * modules/unistr/u16-cpy-alloc: New file.
4822         * modules/unistr/u32-cpy-alloc: New file.
4823         * lib/unistr/u8-cpy-alloc.c: New file.
4824         * lib/unistr/u16-cpy-alloc.c: New file.
4825         * lib/unistr/u32-cpy-alloc.c: New file.
4826         * lib/unistr/u-cpy-alloc.h: New file.
4827
4828         * modules/unistr/u8-endswith: New file.
4829         * modules/unistr/u16-endswith: New file.
4830         * modules/unistr/u32-endswith: New file.
4831         * lib/unistr/u8-endswith.c: New file.
4832         * lib/unistr/u16-endswith.c: New file.
4833         * lib/unistr/u32-endswith.c: New file.
4834         * lib/unistr/u-endswith.h: New file.
4835
4836         * modules/unistr/u8-mblen: New file.
4837         * modules/unistr/u16-mblen: New file.
4838         * modules/unistr/u32-mblen: New file.
4839         * lib/unistr/u8-mblen.c: New file.
4840         * lib/unistr/u16-mblen.c: New file.
4841         * lib/unistr/u32-mblen.c: New file.
4842
4843         * modules/unistr/u8-mbtouc: New file.
4844         * modules/unistr/u16-mbtouc: New file.
4845         * modules/unistr/u32-mbtouc: New file.
4846         * lib/unistr/u8-mbtouc.c: New file.
4847         * lib/unistr/u16-mbtouc.c: New file.
4848         * lib/unistr/u32-mbtouc.c: New file.
4849
4850         * modules/unistr/u8-mbtouc-safe: New file.
4851         * modules/unistr/u16-mbtouc-safe: New file.
4852         * modules/unistr/u32-mbtouc-safe: New file.
4853         * lib/unistr/u8-mbtouc-safe.c: New file.
4854         * lib/unistr/u16-mbtouc-safe.c: New file.
4855         * lib/unistr/u32-mbtouc-safe.c: New file.
4856
4857         * modules/unistr/u8-move: New file.
4858         * modules/unistr/u16-move: New file.
4859         * modules/unistr/u32-move: New file.
4860         * lib/unistr/u8-move.c: New file.
4861         * lib/unistr/u16-move.c: New file.
4862         * lib/unistr/u32-move.c: New file.
4863         * lib/unistr/u-move.h: New file.
4864
4865         * modules/unistr/u8-next: New file.
4866         * modules/unistr/u16-next: New file.
4867         * modules/unistr/u32-next: New file.
4868         * lib/unistr/u8-next.c: New file.
4869         * lib/unistr/u16-next.c: New file.
4870         * lib/unistr/u32-next.c: New file.
4871
4872         * modules/unistr/u8-prev: New file.
4873         * modules/unistr/u16-prev: New file.
4874         * modules/unistr/u32-prev: New file.
4875         * lib/unistr/u8-prev.c: New file.
4876         * lib/unistr/u16-prev.c: New file.
4877         * lib/unistr/u32-prev.c: New file.
4878
4879         * modules/unistr/u8-set: New file.
4880         * modules/unistr/u16-set: New file.
4881         * modules/unistr/u32-set: New file.
4882         * lib/unistr/u8-set.c: New file.
4883         * lib/unistr/u16-set.c: New file.
4884         * lib/unistr/u32-set.c: New file.
4885         * lib/unistr/u-set.h: New file.
4886
4887         * modules/unistr/u8-startswith: New file.
4888         * modules/unistr/u16-startswith: New file.
4889         * modules/unistr/u32-startswith: New file.
4890         * lib/unistr/u8-startswith.c: New file.
4891         * lib/unistr/u16-startswith.c: New file.
4892         * lib/unistr/u32-startswith.c: New file.
4893         * lib/unistr/u-startswith.h: New file.
4894
4895         * modules/unistr/u8-stpcpy: New file.
4896         * modules/unistr/u16-stpcpy: New file.
4897         * modules/unistr/u32-stpcpy: New file.
4898         * lib/unistr/u8-stpcpy.c: New file.
4899         * lib/unistr/u16-stpcpy.c: New file.
4900         * lib/unistr/u32-stpcpy.c: New file.
4901         * lib/unistr/u-stpcpy.h: New file.
4902
4903         * modules/unistr/u8-stpncpy: New file.
4904         * modules/unistr/u16-stpncpy: New file.
4905         * modules/unistr/u32-stpncpy: New file.
4906         * lib/unistr/u8-stpncpy.c: New file.
4907         * lib/unistr/u16-stpncpy.c: New file.
4908         * lib/unistr/u32-stpncpy.c: New file.
4909         * lib/unistr/u-stpncpy.h: New file.
4910
4911         * modules/unistr/u8-strcat: New file.
4912         * modules/unistr/u16-strcat: New file.
4913         * modules/unistr/u32-strcat: New file.
4914         * lib/unistr/u8-strcat.c: New file.
4915         * lib/unistr/u16-strcat.c: New file.
4916         * lib/unistr/u32-strcat.c: New file.
4917         * lib/unistr/u-strcat.h: New file.
4918
4919         * modules/unistr/u8-strchr: New file.
4920         * modules/unistr/u16-strchr: New file.
4921         * modules/unistr/u32-strchr: New file.
4922         * lib/unistr/u8-strchr.c: New file.
4923         * lib/unistr/u16-strchr.c: New file.
4924         * lib/unistr/u32-strchr.c: New file.
4925
4926         * modules/unistr/u8-strcmp: New file.
4927         * modules/unistr/u16-strcmp: New file.
4928         * modules/unistr/u32-strcmp: New file.
4929         * lib/unistr/u8-strcmp.c: New file.
4930         * lib/unistr/u16-strcmp.c: New file.
4931         * lib/unistr/u32-strcmp.c: New file.
4932
4933         * modules/unistr/u8-strcpy: New file.
4934         * modules/unistr/u16-strcpy: New file.
4935         * modules/unistr/u32-strcpy: New file.
4936         * lib/unistr/u8-strcpy.c: New file.
4937         * lib/unistr/u16-strcpy.c: New file.
4938         * lib/unistr/u32-strcpy.c: New file.
4939         * lib/unistr/u-strcpy.h: New file.
4940
4941         * modules/unistr/u8-strcspn: New file.
4942         * modules/unistr/u16-strcspn: New file.
4943         * modules/unistr/u32-strcspn: New file.
4944         * lib/unistr/u8-strcspn.c: New file.
4945         * lib/unistr/u16-strcspn.c: New file.
4946         * lib/unistr/u32-strcspn.c: New file.
4947         * lib/unistr/u-strcspn.h: New file.
4948
4949         * modules/unistr/u8-strdup: New file.
4950         * modules/unistr/u16-strdup: New file.
4951         * modules/unistr/u32-strdup: New file.
4952         * lib/unistr/u8-strdup.c: New file.
4953         * lib/unistr/u16-strdup.c: New file.
4954         * lib/unistr/u32-strdup.c: New file.
4955         * lib/unistr/u-strdup.h: New file.
4956
4957         * modules/unistr/u8-strlen: New file.
4958         * modules/unistr/u16-strlen: New file.
4959         * modules/unistr/u32-strlen: New file.
4960         * lib/unistr/u8-strlen.c: New file.
4961         * lib/unistr/u16-strlen.c: New file.
4962         * lib/unistr/u32-strlen.c: New file.
4963         * lib/unistr/u-strlen.h: New file.
4964
4965         * modules/unistr/u8-strmblen: New file.
4966         * modules/unistr/u16-strmblen: New file.
4967         * modules/unistr/u32-strmblen: New file.
4968         * lib/unistr/u8-strmblen.c: New file.
4969         * lib/unistr/u16-strmblen.c: New file.
4970         * lib/unistr/u32-strmblen.c: New file.
4971
4972         * modules/unistr/u8-strmbtouc: New file.
4973         * modules/unistr/u16-strmbtouc: New file.
4974         * modules/unistr/u32-strmbtouc: New file.
4975         * lib/unistr/u8-strmbtouc.c: New file.
4976         * lib/unistr/u16-strmbtouc.c: New file.
4977         * lib/unistr/u32-strmbtouc.c: New file.
4978
4979         * modules/unistr/u8-strncat: New file.
4980         * modules/unistr/u16-strncat: New file.
4981         * modules/unistr/u32-strncat: New file.
4982         * lib/unistr/u8-strncat.c: New file.
4983         * lib/unistr/u16-strncat.c: New file.
4984         * lib/unistr/u32-strncat.c: New file.
4985         * lib/unistr/u-strncat.h: New file.
4986
4987         * modules/unistr/u8-strncmp: New file.
4988         * modules/unistr/u16-strncmp: New file.
4989         * modules/unistr/u32-strncmp: New file.
4990         * lib/unistr/u8-strncmp.c: New file.
4991         * lib/unistr/u16-strncmp.c: New file.
4992         * lib/unistr/u32-strncmp.c: New file.
4993
4994         * modules/unistr/u8-strncpy: New file.
4995         * modules/unistr/u16-strncpy: New file.
4996         * modules/unistr/u32-strncpy: New file.
4997         * lib/unistr/u8-strncpy.c: New file.
4998         * lib/unistr/u16-strncpy.c: New file.
4999         * lib/unistr/u32-strncpy.c: New file.
5000         * lib/unistr/u-strncpy.h: New file.
5001
5002         * modules/unistr/u8-strnlen: New file.
5003         * modules/unistr/u16-strnlen: New file.
5004         * modules/unistr/u32-strnlen: New file.
5005         * lib/unistr/u8-strnlen.c: New file.
5006         * lib/unistr/u16-strnlen.c: New file.
5007         * lib/unistr/u32-strnlen.c: New file.
5008         * lib/unistr/u-strnlen.h: New file.
5009
5010         * modules/unistr/u8-strpbrk: New file.
5011         * modules/unistr/u16-strpbrk: New file.
5012         * modules/unistr/u32-strpbrk: New file.
5013         * lib/unistr/u8-strpbrk.c: New file.
5014         * lib/unistr/u16-strpbrk.c: New file.
5015         * lib/unistr/u32-strpbrk.c: New file.
5016         * lib/unistr/u-strpbrk.h: New file.
5017
5018         * modules/unistr/u8-strrchr: New file.
5019         * modules/unistr/u16-strrchr: New file.
5020         * modules/unistr/u32-strrchr: New file.
5021         * lib/unistr/u8-strrchr.c: New file.
5022         * lib/unistr/u16-strrchr.c: New file.
5023         * lib/unistr/u32-strrchr.c: New file.
5024
5025         * modules/unistr/u8-strspn: New file.
5026         * modules/unistr/u16-strspn: New file.
5027         * modules/unistr/u32-strspn: New file.
5028         * lib/unistr/u8-strspn.c: New file.
5029         * lib/unistr/u16-strspn.c: New file.
5030         * lib/unistr/u32-strspn.c: New file.
5031         * lib/unistr/u-strspn.h: New file.
5032
5033         * modules/unistr/u8-strstr: New file.
5034         * modules/unistr/u16-strstr: New file.
5035         * modules/unistr/u32-strstr: New file.
5036         * lib/unistr/u8-strstr.c: New file.
5037         * lib/unistr/u16-strstr.c: New file.
5038         * lib/unistr/u32-strstr.c: New file.
5039         * lib/unistr/u-strstr.h: New file.
5040
5041         * modules/unistr/u8-strtok: New file.
5042         * modules/unistr/u16-strtok: New file.
5043         * modules/unistr/u32-strtok: New file.
5044         * lib/unistr/u8-strtok.c: New file.
5045         * lib/unistr/u16-strtok.c: New file.
5046         * lib/unistr/u32-strtok.c: New file.
5047         * lib/unistr/u-strtok.h: New file.
5048
5049         * modules/unistr/u8-uctomb: New file.
5050         * modules/unistr/u16-uctomb: New file.
5051         * modules/unistr/u32-uctomb: New file.
5052         * lib/unistr/u8-uctomb.c: New file.
5053         * lib/unistr/u16-uctomb.c: New file.
5054         * lib/unistr/u32-uctomb.c: New file.
5055
5056         * MODULES.html.sh (Unicode string functions): Add the new modules.
5057
5058 2007-01-08  Bruno Haible  <bruno@clisp.org>
5059
5060         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
5061         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
5062         subdirectories.
5063
5064 2007-01-08  Karl Berry  <karl@gnu.org>
5065
5066         * doc/error.texi: mention that main() fns must set program_name
5067         when progname is used.
5068
5069 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
5070
5071         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
5072         WCTYPE_H is empty, for the benefit of builds from non-distclean
5073         directories.  Problem reported by Eric Blake in
5074         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
5075
5076 2007-01-08  Bruno Haible  <bruno@clisp.org>
5077
5078         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
5079         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
5080         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
5081         PROVIDE_CANONICALIZE_FILENAME_MODE.
5082         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
5083
5084 2007-01-08  Bruno Haible  <bruno@clisp.org>
5085
5086         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
5087         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
5088         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
5089         * lib/fts.c: Likewise.
5090         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
5091
5092 2006-12-25  Bruno Haible  <bruno@clisp.org>
5093
5094         * modules/utf8-ucs4-safe: New file.
5095         * lib/utf8-ucs4-safe.h: New file.
5096         * lib/unistr/utf8-ucs4-safe.c: New file.
5097
5098         * modules/utf16-ucs4-safe: New file.
5099         * lib/utf16-ucs4-safe.h: New file.
5100         * lib/unistr/utf16-ucs4-safe.c: New file.
5101
5102         * MODULES.html.sh (Unicode string functions): Add the new modules.
5103
5104 2007-01-08  Bruno Haible  <bruno@clisp.org>
5105
5106         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
5107         (Depends-on): Add unitypes.
5108         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
5109         (u8_mbtouc_aux): Move out to separate file.
5110         (u8_mbtouc): Use ucs4_t, uint8_t types.
5111         * lib/unistr/utf8-ucs4.c: New file.
5112
5113         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
5114         (Depends-on): Add unitypes.
5115         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
5116         (u16_mbtouc_aux): Move out to separate file.
5117         (u16_mbtouc): Use ucs4_t, uint16_t types.
5118         * lib/unistr/utf16-ucs4.c: New file.
5119
5120         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
5121         (Depends-on): Add unitypes.
5122         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
5123         (u8_uctomb_aux): Move out to separate file.
5124         (u8_uctomb): Use ucs4_t, uint8_t types.
5125         * lib/unistr/ucs4-utf8.c: New file.
5126
5127         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
5128         (Depends-on): Add unitypes.
5129         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
5130         (u16_uctomb_aux): Move out to separate file.
5131         (u16_uctomb): Use ucs4_t, uint16_t types.
5132         * lib/unistr/ucs4-utf16.c: New file.
5133
5134 2006-12-25  Bruno Haible  <bruno@clisp.org>
5135
5136         * modules/unitypes: New file.
5137         * lib/unitypes.h: New file.
5138         * MODULES.html.sh (func_all_modules): New section "Unicode string
5139         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
5140         this section. Add unitypes.
5141
5142 2007-01-08  Bruno Haible  <bruno@clisp.org>
5143
5144         Avoid variable names that conflict with those from libtool.
5145         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
5146         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
5147         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
5148         library_names_spec to acl_library_names_spec, hardcode_* to
5149         acl_hardcode_*.
5150         Reported by Ralf Wildenhues.
5151
5152 2007-01-08  Bruno Haible  <bruno@clisp.org>
5153
5154         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
5155         definition.
5156         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
5157         definition.
5158         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
5159         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
5160         definition.
5161         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
5162         definition.
5163         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
5164         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
5165         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
5166         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
5167         definition.
5168         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
5169         definition.
5170         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
5171         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
5172         GC_USE_<algorithm>.
5173         * lib/gc-libgcrypt.c: Likewise.
5174         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
5175         * modules/gc-arctwo (configure.ac): Likewise.
5176         * modules/gc-des (configure.ac): Likewise.
5177         * modules/gc-hmac-md5 (configure.ac): Likewise.
5178         * modules/gc-hmac-sha1 (configure.ac): Likewise.
5179         * modules/gc-md2 (configure.ac): Likewise.
5180         * modules/gc-md4 (configure.ac): Likewise.
5181         * modules/gc-md5 (configure.ac): Likewise.
5182         * modules/gc-random (configure.ac): Likewise.
5183         * modules/gc-rijndael (configure.ac): Likewise.
5184         * modules/gc-sha1 (configure.ac): Likewise.
5185
5186 2007-01-08  Bruno Haible  <bruno@clisp.org>
5187
5188         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
5189         macro definition.
5190         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
5191         definition.
5192         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
5193         definition.
5194         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
5195         * modules/fcntl-safer (configure.ac): Likewise.
5196         * modules/fopen-safer (configure.ac): Likewise.
5197         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
5198         GNULIB_FWRITEERROR macro definition.
5199
5200 2007-01-08  Bruno Haible  <bruno@clisp.org>
5201
5202         * m4/gnulib-common.m4: New file.
5203         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
5204         (func_get_filelist): Add m4/gnulib-common.m4.
5205
5206 2007-01-08  Bruno Haible  <bruno@clisp.org>
5207
5208         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
5209         command.
5210
5211 2007-01-08  Jim Meyering  <jim@meyering.net>
5212
5213         Use a more robust test for a "can't happen" condition.
5214         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
5215         narrowed the st_size value.  Presuming the "can't happen" condition
5216         is true, that narrowing could conceivably convert an invalid st_size
5217         value into a valid one.  Instead, use a change based on Matthew
5218         Woehlke's original patch.
5219
5220         Slight readability improvement: use an assert-like macro
5221         in place of literal "abort ()" uses.
5222         * lib/fts.c (fts_assert): Define.
5223         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
5224         Use this macro instead of a bare 'abort'.
5225
5226 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
5227
5228         Don't worry about using IRIX 5.3's wctype.h broken definitions;
5229         simply work around them.
5230         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
5231         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
5232         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
5233         declaring.
5234         Don't bother to define as macros, since the standard doesn't require it.
5235         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
5236         longer worry about IRIX 5.3.
5237         (HAVE_WCTYPE_CTMP_BUG): Remove.
5238
5239 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
5240
5241         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
5242         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
5243         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
5244         Problems reported by Georg Schwarz for IRIX 5.3.
5245
5246         * gnulib-tool (autoconf_minversion): Take the maximum version number
5247         found, not the minimum.  Problem reported by James Youngman.
5248
5249 2007-01-03  Karl Berry  <karl@gnu.org>
5250
5251         * doc/error.texi: new file, explaining interaction with progname.
5252         * doc/gnulib.texi: include it.  Update copyright.
5253
5254 2007-01-03  Simon Josefsson  <simon@josefsson.org>
5255
5256         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
5257         AC_CANONICAL_HOST, to improve autobuild outputs.
5258
5259 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
5260             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
5261
5262         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
5263         sockets, server sockets, and other file descriptors.  Count errors
5264         to compute the return value.  Reorder the code a bit to be easier
5265         to follow.  Don't set event bits that were not requested (except
5266         POLLERR and POLLHUP).
5267
5268 2007-01-01  Bruno Haible  <bruno@clisp.org>
5269
5270         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
5271
5272 2007-01-03  Jim Meyering  <jim@meyering.net>
5273
5274         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
5275
5276 2007-01-02  Bruno Haible  <bruno@clisp.org>
5277
5278         * modules/settime (Include): Require timespec.h.
5279         * modules/nanosleep (Include): Likewise.
5280
5281 2007-01-01  Bruno Haible  <bruno@clisp.org>
5282
5283         * gnulib-tool (func_emit_copyright_notice): Bump year.
5284         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
5285
5286 2007-01-01  Bruno Haible  <bruno@clisp.org>
5287
5288         Improve support for OpenBSD.
5289         * build-aux/config.rpath (libname_spec): Export.
5290         (library_names_spec): New variable. Export.
5291         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
5292         library_names_spec from the config.rpath output. Locate shared library
5293         through the name pattern in library_names_spec.
5294
5295 2007-01-01  Eric Blake  <ebb9@byu.net>
5296
5297         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
5298
5299 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
5300
5301         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
5302         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
5303         assume the C locale, and avoid an "eval" that could cause trouble.
5304         Problem with SORT reported by Bob Proulx.
5305
5306         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
5307         Define.  Trivial patch from Henning Nielsen Lund, originally
5308         sent to bug-grep@gnu.org today.
5309
5310 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
5311
5312         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
5313         struct stat.  Problem reported by Henning Nielsen Lund.
5314         * lib/acl.c: Include acl.h first, to check interface.  Don't
5315         bother to include sys/types.h and sys/stat.h again.
5316
5317 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
5318
5319         Import the following change from libc; problem reported by
5320         Sven Verdoolaege.
5321
5322         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
5323
5324         [BZ #1373]
5325         * lib/argp.h: Remove __NTH for __argp_usage inline function.
5326
5327 2006-12-28  Jim Meyering  <jim@meyering.net>
5328
5329         * build-aux/announce-gen: Do not assume that the package
5330         builds any of tar.gz, tar.bz2, and .xdelta files.
5331         Suggestion from Simon Josefsson.
5332
5333 2006-12-28  Simon Josefsson  <simon@josefsson.org>
5334
5335         * modules/announce-gen: New file.
5336
5337 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
5338
5339         * lib/mbchar.h: Just include <wctype.h>; the wctype module
5340         handles its gotchas now.
5341         * lib/mbswidth.c: Likewise.
5342         * lib/wcwidth.h: Likewise.
5343         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
5344         and iswcntrl; the wctype module does this stuff now.
5345         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
5346         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
5347         * modules/mbchar (Depends-on): Add wctype.
5348         * modules/mbswidth (Depends-on): Likewise.
5349         * modules/wcwidth (Depends-on): Likewise.
5350
5351 2006-12-27  Eric Blake  <ebb9@byu.net>
5352
5353         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
5354         module uses more than what <wctype.h> is required to provide.
5355
5356 2006-12-26  Eric Blake  <ebb9@byu.net>
5357
5358         * gnulib-tool (sed_extract_prog): Avoid space-tab.
5359
5360 2006-12-26  Eric Blake  <ebb9@byu.net>
5361
5362         * modules/absolute-header: New module.
5363         * modules/fcntl (Depends-on): Depend on it.
5364         * modules/inttypes (Depends-on): Likewise.
5365         * modules/stdint (Depends-on): Likewise.
5366         * modules/sys_stat (Depends-on): Likewise.
5367         * modules/wctype (Depends-on): Likewise.
5368         * MODULES.html.sh (Support for building libraries and
5369         executables): Document it.
5370
5371 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
5372
5373         * gnulib-tool (SED): Remove, undoing previous change.
5374         The problem was that it broke coreutils on Solaris, because
5375         "sed --posix" leaked into a makefile.
5376         (sed): New alias, if 'alias' and GNU sed.
5377
5378 2006-12-24  Jim Meyering  <jim@meyering.net>
5379
5380         Work around an fchownat bug in glibc-2.4:
5381         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
5382         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
5383         in spite of the -P option.
5384         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
5385         New macros.
5386         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
5387         * modules/openat (Files): Add lib/fchownat.c.
5388         * lib/openat.c (fchownat): Don't define here.  Move to...
5389         * lib/fchownat.c: ...this new file.
5390
5391 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
5392
5393         Fix bug reported by Bruno Haible in
5394         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
5395         where quotearg.c didn't compile on Mac OS X 10.2 because it
5396         lacks <wchar.h> and wint_t.
5397         * lib/wctype_.h (__wctype_wint_t): New type.
5398         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
5399         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
5400         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
5401         Arg is now of type __wctype_wint_t, not wint_t.
5402         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
5403         substitute HAVE_WINT_T.
5404         * modules/wctype (Files): Add m4/wint_t.m4.
5405         (wctype.h): Substitute HAVE_WINT_T.
5406
5407 2006-12-23  Bruno Haible  <bruno@clisp.org>
5408
5409         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
5410
5411 2006-12-23  Bruno Haible  <bruno@clisp.org>
5412
5413         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
5414         S_ISLNK.
5415         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
5416         mingw.
5417
5418 2006-12-22  Bruno Haible  <bruno@clisp.org>
5419
5420         * lib/copy-file.c: Include acl.h.
5421         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
5422         Close the file descriptors only after being done with copy_acl.
5423         * modules/copy-file (Depends-on): Add acl.
5424
5425 2006-12-22  Bruno Haible  <bruno@clisp.org>
5426
5427         * gnulib-tool (SED): New variable.
5428         Use $SED instead of sed everywhere.
5429
5430 2006-12-22  Bruno Haible  <bruno@clisp.org>
5431
5432         * modules/no-c++: New file.
5433         * m4/no-c++.m4: New file.
5434         * MODULES.html.sh (Support for building libraries and executables):
5435         Add no-c++.
5436
5437 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
5438
5439         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
5440         Include <limits.h>, and use its INT_MAX to rewrite the
5441         j loop so that it does not overflow 'int'.  Problem reported by
5442         Ralf Wildenhues in
5443         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
5444         Play it safe by shifting left by 1 rather than multiplying by 2,
5445         as GCC is less likely to optimize this away when the value
5446         is signed (when it assumes overflow leads to undefined behavior).
5447         Also, don't assume time_t uses two's complement.
5448
5449 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
5450
5451         * MODULES.html.sh: New module wctype.
5452         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
5453         * lib/fnmatch.c: Don't bother to include <wchar.h> before
5454         <wctype.h>, since the new wctype module should fix this.
5455         * lib/quotearg.c: Include <wctype.h> unconditionally, since
5456         the wctype module should arrange for it.
5457         * lib/regex_internal.h: Likewise.
5458         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
5459         since the wctype module should handle this now.
5460         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
5461         * modules/fnmatch (Depends-on): Add wctype.
5462         * modules/quotearg (Depends-on): Likewise.
5463         * modules/regex (Depends-on): Likewise.
5464
5465 2006-12-19  Bruno Haible  <bruno@clisp.org>
5466
5467         * lib/strdup.h [C++]: Wrap definitions in extern "C".
5468         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
5469
5470 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5471
5472         * modules/savewd (Depends-on): Fix dependency on fcntl.
5473
5474 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
5475
5476         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
5477         conforms to C99, rather than relying on the user's environment
5478         setting of STDINT_H.
5479
5480 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
5481         and Eric Blake  <ebb9@byu.net>
5482
5483         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
5484         This is more consistent with the other defines here.
5485         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
5486         Port to z/OS.  Problem reported by Paul Gilmartin.
5487         Change local vars to use gl_ prefix rather than ac_.
5488         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
5489         with other defines.
5490         * modules/double-slash-root: New module.
5491         * modules/dirname (Files): Remove m4/double-slash-root.m4.
5492         (Depends-on): Add double-slash-root.
5493         * MODULES.html.sh (File system functions): Mention new module.
5494
5495 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
5496
5497         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
5498         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
5499         This is for the benefit of gzip, which doesn't do i18n.
5500
5501 2006-12-12  Jim Meyering  <jim@meyering.net>
5502
5503         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
5504         Reported by Andreas Schwab <schwab@suse.de>.
5505
5506 2006-12-12  Bruno Haible  <bruno@clisp.org>
5507
5508         Merge these changes.
5509         2006-09-05  Bruno Haible  <bruno@clisp.org>
5510         * lib/iconvme.c (iconv_string): No need to save and restore errno when
5511         iconv_alloc succeeded.
5512         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
5513         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
5514         test for " && dest " at the end - dest is always != NULL there. Call
5515         iconv with 4xNULL arguments initially, to reset the state. Call iconv
5516         with 2xNULL arguments, also to flush the state storage. Handle the
5517         IRIX iconv behaviour. Realloc the final result, to throw away unused
5518         memory.
5519
5520 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
5521
5522         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
5523         and fchmodat unconditionally, since glibc 2.4 has them.
5524         Problem reported by Arkadiusz Miskiewicz.
5525
5526 2006-12-10  Bruno Haible  <bruno@clisp.org>
5527
5528         * gnulib-tool (func_import): Show the include files only for those
5529         modules that are copied and specified.
5530         Reported by Karl Berry.
5531
5532 2006-12-08  Jim Meyering  <jim@meyering.net>
5533
5534         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
5535         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
5536
5537         * build-aux/announce-gen: Add two new options, both optional:
5538         --bootstrap-tools=TOOL_LIST
5539               a comma-separated list of tools, e.g.,
5540               autoconf,automake,bison,gnulib
5541         --gnulib-snapshot-date=DATE
5542               if gnulib is in the bootstrap tool list,
5543               then report this as the snapshot date.
5544               If not specified, use the current date/time.
5545               If you specify a date here, be sure it's UTC.
5546
5547 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5548
5549         * tests/test-argp-2.sh: Fix test to match actual output.
5550         (func_compare): Fix sed script to be portable.
5551
5552 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
5553
5554         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
5555         workaround for this case.  It is not autoconfigured now; offhand
5556         it's hard to see how to autoconfigure it.
5557
5558 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
5559
5560         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
5561         a directory that is about to be chowned.  Such a directory's
5562         initial file permissions should permit the owner only and this
5563         should not be changed until after the chown, since the group and
5564         other bits would be incorrect if they granted permission before
5565         the chown.
5566
5567         Fix porting problem for iswctype reported by Georg Schwarz in:
5568         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
5569         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
5570         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
5571         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
5572         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
5573
5574 2006-12-03  Jim Meyering  <jim@meyering.net>
5575
5576         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
5577         p->fts_statp may not yet be defined.
5578         (fts_read): Instead, set it in the caller, once p->fts_statp is
5579         sure to be defined, and corresponds to a top-level directory.
5580         This bug made du -x fail.  Here's the coreutils test case:
5581         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
5582         Reported by Mike Frysinger.
5583
5584 2006-12-01  Jim Meyering  <jim@meyering.net>
5585
5586         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
5587         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
5588         Reported by Simon Josefsson.
5589
5590 2006-11-30  Jim Meyering  <jim@meyering.net>
5591
5592         * m4/warning.m4: Use the all-permissive copyright notice
5593         recommended by RMS (rather than LGPL).
5594         * m4/vararrays.m4: Likewise.
5595         * m4/flexmember.m4: Likewise.
5596
5597 2006-11-29  Bruno Haible  <bruno@clisp.org>
5598
5599         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5600         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
5601         using +=.
5602         Reported by Simon Josefsson <simon@josefsson.org>.
5603
5604 2006-11-28  James Youngman <jay@gnu.org>
5605
5606         * README: Advise users that they might find the bug-gnulib@gnu.org
5607         and autotools-announce@gnu.org mailing lists useful.
5608
5609 2006-11-28  Bruno Haible  <bruno@clisp.org>
5610
5611         * m4/ptrdiff_max.m4: Remove file.
5612
5613 2006-11-21  Bruno Haible  <bruno@clisp.org>
5614
5615         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
5616         _AC_COMPUTE_INT.
5617         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
5618         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
5619         _AC_COMPUTE_INT.
5620         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
5621         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
5622         _AC_COMPUTE_INT.
5623         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
5624
5625 2006-11-28  Jim Meyering  <jim@meyering.net>
5626
5627         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
5628         warning from "gcc -Wshadow" about shadowing the builtin.
5629
5630 2006-11-27  Bruno Haible  <bruno@clisp.org>
5631
5632         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
5633         _AC_COMPUTE_INT.
5634         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
5635
5636 2006-11-27  Bruno Haible  <bruno@clisp.org>
5637             Paul Eggert  <eggert@cs.ucla.edu>
5638
5639         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
5640
5641 2006-11-26  Bruno Haible  <bruno@clisp.org>
5642
5643         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5644         noinst_LTLIBRARIES.
5645
5646 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
5647             Bruno Haible  <bruno@clisp.org>
5648
5649         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
5650         if compiling with "gcc -ansi".
5651
5652 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
5653
5654         Fix some incompatibilities with gcc -ansi -pedantic.
5655         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
5656         if compiling pedantically with GCC, unless it's C99 or later.
5657         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
5658         it mishandles gcc -ansi -pedantic as well.
5659         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
5660         if gcc -pedantic.
5661         * lib/regexec.c (check_node_accept_bytes): Don't use auto
5662         initializers for struct if -pedantic, unless it's C99 or later.
5663
5664 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
5665
5666         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
5667         Don't close an fd more than once. Identical atimes indicate
5668         success, not failure.
5669
5670 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
5671
5672         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
5673
5674 2006-11-23  Jim Meyering  <jim@meyering.net>
5675
5676         * build-aux/announce-gen: New file.  From coreutils.
5677
5678 2006-11-22  Jim Meyering  <jim@meyering.net>
5679
5680         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
5681         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
5682         (fts_read): Use a temporary to narrow the overused st_size member
5683         before using it in a switch statement.  Reported by Matthew Woehlke.
5684
5685         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
5686         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
5687
5688 2006-11-20  Bruno Haible  <bruno@clisp.org>
5689
5690         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
5691         changequote instead of pairs of brackets.
5692         Reported by Andreas Schwab <schwab@suse.de>.
5693
5694 2006-11-21  Jim Meyering  <jim@meyering.net>
5695
5696         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
5697         so as to remain compatible with older compilers.
5698         Patch from Michael Deutschmann.
5699
5700 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
5701
5702         * MODULES.html.sh (File system functions): Add openat.
5703
5704         * lib/openat.h (rpl_fstatat): New macro, if
5705         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
5706         (fstatat): Define to rpl_fstatat under the same conditions,
5707         unless COMPILING_FSTATAT.
5708         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
5709         seems to have the bug.
5710         * lib/fstatat.c: New file.
5711         * modules/openat (Files): Add it.
5712
5713 2006-11-20  Bruno Haible  <bruno@clisp.org>
5714
5715         * Makefile: New file.
5716
5717 2006-11-20  Jim Meyering  <jim@meyering.net>
5718
5719         The beginnings of syntax-related checks for gnulib.
5720         * lib/Makefile: New file.
5721         * lib/t-idcache: New script.  Ensure that the two halves of
5722         idcache.c stay in sync.
5723
5724         * lib/idcache.c: Adjust comments in user- and group- portions to
5725         be more accurate, and to be consistent with one another.
5726
5727 2006-11-20  Jim Meyering  <jim@meyering.net>
5728
5729         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
5730         continue using the flexible array member (thus, this module performs
5731         half as many malloc calls), with the addition that...
5732         (getgroup, getuser): Consistently record a non-match via an empty
5733         "name" string, and map an empty string match to a NULL return value.
5734         * modules/idcache (Depends-on): Re-add flexmember.
5735
5736         * lib/idcache.c (getuser): Remove all uses of the register keyword.
5737         (getuidbyname, getgroup, getgidbyname): Likewise.
5738
5739         Use cleaner syntax: NULL rather than 0.
5740         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
5741
5742 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
5743
5744         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
5745         It mishandled the case where the group was missing.
5746         Problem reported by Greg Schafer.
5747         * modules/idcache: Likewise.
5748
5749 2006-11-18  Jim Meyering  <jim@meyering.net>
5750
5751         * check-module (%exempt_header): Add exception for some
5752         conditionally-included headers.
5753
5754         * modules/i-ring (Depends-on): Add verify.
5755         (License): Change to LGPL.
5756
5757 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
5758
5759         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
5760         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
5761         and inttostr.h.  Use snprintf rather than uinttostr, so that
5762         LGPLed code doesn't depend on GPLed.
5763
5764 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
5765
5766         * modules/inline (License): Change from GPL to LGPL.
5767
5768 2006-11-17  Jim Meyering  <jim@meyering.net>
5769
5770         * modules/d-type (License): Switch to LGPL.
5771
5772 2006-11-15  Bruno Haible  <bruno@clisp.org>
5773
5774         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
5775
5776 2006-11-15  Eric Blake  <ebb9@byu.net>
5777
5778         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
5779         the module dependency.
5780
5781 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5782             Bruno Haible  <bruno@clisp.org>
5783
5784         * gnulib-tool (func_create_testdir): Add license consistency check.
5785
5786 2006-11-15  Eric Blake  <ebb9@byu.net>
5787
5788         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
5789         random "(cached)" in configure output.
5790
5791 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5792
5793         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
5794         test for conforming inttypes.h is both announced and cached.
5795
5796         * MODULES.html.sh (seen_modules, seen_files): New variables.
5797         (func_module): Rewrite to use a few less gnulib-tool and sed
5798         invocations.  Avoid a couple of quadratic algorithms for ...
5799         (missed_modules, missed_files): ... these, with ...
5800         (func_append, func_tmpdir): ... these new functions, from
5801         gnulib-tool.  Analogously, install traps for cleanup.
5802
5803         * tests/test-gc.c (main): Remove unused variables.
5804         * tests/test-read-file.c: Include stdlib.h, for 'free'.
5805
5806 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
5807
5808         * modules/inttostr (License): Change to LGPL.
5809
5810 2006-11-14  Eric Blake  <ebb9@byu.net>
5811
5812         * modules/tempname (License): Change to LGPL.
5813
5814 2006-11-14  Eric Blake  <ebb9@byu.net>
5815
5816         * doc/functions.texi (Function Portability): *printf functions on
5817         Cygwin now understand all POSIX size specifiers.
5818
5819 2006-11-14  Bruno Haible  <bruno@clisp.org>
5820
5821         * modules/c-ctype (License): Change to LGPL.
5822
5823 2006-11-12  Bruno Haible  <bruno@clisp.org>
5824
5825         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
5826         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
5827         for GNOME libraries, for which the include files are installed in
5828         subdirectories of $prefix/include.
5829
5830 2006-11-12  Bruno Haible  <bruno@clisp.org>
5831
5832         * m4/lib-link.m4: Require at least autoconf-2.54.
5833         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
5834         name to underscores for the --with option.
5835
5836 2006-11-13  Bruno Haible  <bruno@clisp.org>
5837
5838         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
5839         the tests directory.
5840         Reported by Ralf Wildenhues.
5841
5842 2006-11-13  Bruno Haible  <bruno@clisp.org>
5843
5844         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
5845         (func_emit_initmacro_end): Undo the override here.
5846         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
5847         Works around the famous automake error in coreutils.
5848
5849 2006-11-13  Eric Blake  <ebb9@byu.net>
5850
5851         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
5852         element, not its node.
5853
5854 2006-11-12  Bruno Haible  <bruno@clisp.org>
5855
5856         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
5857         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
5858
5859 2006-11-12  Bruno Haible  <bruno@clisp.org>
5860
5861         * gnulib-tool: New option --local-symlink.
5862         (func_usage): Document it.
5863         (lsymbolic): New variable.
5864         (func_import, func_create_testdir): If --symlink was not specified,
5865         test whether --local-symlink was specified and the file comes from
5866         the local_gnulib_dir.
5867
5868 2006-11-12  Bruno Haible  <bruno@clisp.org>
5869
5870         * gnulib-tool (func_ln): New function.
5871         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
5872
5873 2006-11-12  Bruno Haible  <bruno@clisp.org>
5874
5875         Finish support for source files in subdirectories.
5876         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
5877         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
5878         AUTOMAKE_OPTIONS.
5879         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
5880
5881 2006-11-12  Bruno Haible  <bruno@clisp.org>
5882
5883         * gnulib-tool (func_get_automake_snippet): Synthesize also an
5884         EXTRA_lib_SOURCES augmentation.
5885         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
5886
5887 2006-11-12  Jim Meyering  <jim@meyering.net>
5888
5889         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
5890         file descriptors.  This also averts a failure on systems with
5891         native openat support when a traversed directory lacks "x" access.
5892         * lib/fts_.h: Include "i-ring.h"
5893         (struct FTS) [fts_fd_ring]: New member.
5894         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
5895         (FCHDIR): Add parentheses.
5896         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
5897         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
5898         When descending, rather than simply closing the previous
5899         fts_cwd_fd value, push that file descriptor onto the ring.
5900         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
5901         (fts_open): Initialize the new fd_ring member.
5902         (fts_close): Clear the ring.
5903         (fts_safe_changedir): When possible, use our new fd_ring to skip
5904         the diropen and fstat and dev/ino comparison that would normally
5905         accompany a virtual `chdir ("..")'.
5906
5907         * modules/fts (Depends-on): Add i-ring.
5908         * modules/i-ring: New module.
5909         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
5910         * m4/i-ring.m4: New file.
5911
5912 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5913
5914         * gnulib-tool (func_create_testdir): Fix replacement of
5915         `build-aux' in configure.ac.  Run autotools in gltests
5916         subdirectory.
5917         (func_create_testdir, func_create_megatestdir, test): There is
5918         no need for '--force' in most autotool invocations in a new
5919         tree.  Actually fail the whole test if any of the tools, or the
5920         configure or make stages fail.
5921
5922         Sync from Automake.
5923         * build-aux/gnupload: Revert last change.  Add pointer to upload
5924         instructions of the GNU Maintenance Instructions.
5925         Suggestion by Karl Berry.
5926
5927 2006-11-10  Jim Meyering  <jim@meyering.net>
5928
5929         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
5930
5931 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
5932
5933         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
5934         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
5935         (bind_textdomain_codeset) [! ENABLE_NLS]:
5936         Evaluate all the arguments.  That way, callers get compatible behavior
5937         if the arguments have side effects.  Also, it avoids some GCC
5938         diagnostics in some cases; Joel E. Denny reported problems when Bison
5939         was configured with --enable-gcc-warnigs.
5940
5941 2006-11-10  Jim Meyering  <jim@meyering.net>
5942
5943         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
5944         relevant options in CFLAGS (like -O, -fno-inline) are taken into
5945         account.
5946
5947 2006-11-10  Jim Meyering  <jim@meyering.net>
5948
5949         * modules/inline: New file/module.
5950         * modules/xalloc (Files): Remove m4/inline.m4.
5951         (Depends-on): Add inline, instead.
5952         * modules/oset: Likewise.
5953         * modules/list: Likewise.
5954
5955 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
5956
5957         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
5958         Problem reported by Matthew Woehlke.
5959
5960 2006-11-09  Bruno Haible  <bruno@clisp.org>
5961
5962         * lib/tempname.c (gen_tempname): Remove variant that invokes
5963         __gen_tempname.
5964         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
5965         __gen_tempname.
5966
5967 2006-11-08  Bruno Haible  <bruno@clisp.org>
5968
5969         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
5970         to 'yes' instead of 'cross-compiling'.
5971
5972 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
5973
5974         * lib/quotearg.h (quotearg_free): New decl.
5975         * lib/quotearg.c (quotearg_free): New function.
5976         (slot0, nslots, slotvec0, slotvec):
5977         Now file-scope so that quotearg_free can get at them.
5978
5979 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5980
5981         Sync from Automake.
5982         * build-aux/gnupload: Add missing 'gnu' to example URL.
5983         Report by Karl Berry.
5984
5985 2006-11-08  Bruno Haible  <bruno@clisp.org>
5986
5987         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
5988         Suggested by Paul Eggert.
5989
5990 2006-11-08  Jim Meyering  <jim@meyering.net>
5991
5992         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
5993         It's already included if !_LIBC.
5994         (fts_safe_changedir): Add a comment.
5995
5996 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
5997
5998         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
5999         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
6000         Matthew Woehlke.
6001
6002         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
6003         definitions up, to avoid colliding with change below.
6004         (static_inline) [HAVE_INLINE]: New macro.
6005         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
6006         Provide extern decls when !HAVE_INLINE.  Do not define unless
6007         static_inline is defined, either by us or by xmalloc.c.  Use
6008         static_inline rather than static inline.
6009         (XCALLOC): Optimize sizeof(T) = 1 case.
6010         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
6011
6012 2006-11-07  Bruno Haible  <bruno@clisp.org>
6013
6014         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
6015         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
6016         AC_C_INLINE.
6017         * modules/xalloc (Files): Add m4/inline.m4.
6018
6019 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6020
6021         * README: Fix typo.
6022         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
6023         (Miscellanous Notes): ...from this.
6024
6025 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
6026
6027         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
6028         Mention that offsetof should be used instead of sizeof.
6029         From Bruno Haible.
6030
6031 2006-11-07  Bruno Haible  <bruno@clisp.org>
6032
6033         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
6034
6035 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
6036
6037         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
6038         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
6039         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
6040         (gl_tree_add_before, gl_tree_add_after):
6041         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
6042         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
6043         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
6044         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
6045         (gl_linked_add_after, gl_linked_add_at): Likewise.
6046         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
6047         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
6048         (gl_tree_add_before, gl_tree_add_after): Likewise.
6049         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
6050         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
6051         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
6052
6053 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6054
6055         * lib/gl_oset.h: Use C comment style, not C++ comment style.
6056
6057 2006-11-06  Bruno Haible  <bruno@clisp.org>
6058
6059         * m4/inline.m4: New file.
6060         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
6061         * modules/list (Files): Add m4/inline.m4.
6062         * modules/oset (Files): Likewise.
6063
6064 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
6065
6066         * lib/idcache.c: Include <stddef.h>, for offsetof.
6067         (struct userid.name): Change from char * to a flexible array member.
6068         All uses changed.
6069         * modules/idcache (Depends-on): Add flexmember.
6070
6071         * MODULES.html.sh (Core language properties): New module flexmember.
6072         * modules/flexmember, m4/flexmember.m4: New files.
6073
6074         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
6075         inline functions that are identical with the old xnmalloc_inline,
6076         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
6077         that we can avoid some unnecessary integer multiplications and
6078         divisions in the common case where the element size is known at
6079         compile time.
6080         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
6081         needed.
6082         (xnboundedmalloc): Remove.
6083         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
6084         arguments, for consistency with rest of this header.
6085         (xcharalloc): Rewrite using XNMALLOC.
6086         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
6087         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
6088         versions have been moved to lib/xalloc.h and renamed to be the
6089         non-*_inline versions.
6090         (xmalloc, xrealloc): Implement without reference to the xnmalloc
6091         and xnrealloc functions, since those functions are now inline and
6092         now call us.
6093         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
6094         renaming described above.
6095         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
6096         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
6097         captures the dependency in AC_C_INLINE.
6098
6099         New module canonicalize-lgpl, proposed by Charles Wilson in
6100         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
6101         with a few small changes afterwards.
6102         * MODULES.html.sh (File system functions): New module
6103         canonicalize-lgpl.
6104         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
6105         and canonicalize_file_name.
6106         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
6107         * modules/canonicalize-lgpl: New files.
6108
6109 2006-11-05  Bruno Haible  <bruno@clisp.org>
6110
6111         * gnulib-tool (func_import, func_create_testdir): Create directories
6112         also for files in subdirectories of lib/.
6113
6114 2006-11-05  Bruno Haible  <bruno@clisp.org>
6115
6116         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
6117         ANSI C compliant.
6118
6119 2006-11-03  Bruno Haible  <bruno@clisp.org>
6120
6121         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
6122         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
6123         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
6124         (xnboundedmalloc): New inline function.
6125         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
6126         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
6127         xmalloc.
6128         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
6129         xmalloc.
6130         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
6131         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
6132         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
6133         xmalloc.
6134         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
6135         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
6136         xmalloc.
6137         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
6138         gl_tree_add_after): Use XMALLOC instead of xmalloc.
6139         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
6140         xmalloc.
6141         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
6142         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
6143         gl_tree_add_after): Use XMALLOC instead of xmalloc.
6144         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
6145         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
6146         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
6147         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
6148
6149 2006-11-03  Bruno Haible  <bruno@clisp.org>
6150
6151         * lib/c-ctype.h [C++]: Define functions without name mangling.
6152         * lib/fwriteerror.h [C++]: Likewise.
6153         * lib/gcd.h [C++]: Likewise.
6154         * lib/linebreak.h [C++]: Likewise.
6155
6156 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
6157
6158         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
6159         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
6160         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
6161         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
6162         Check for functions and headers just once.
6163         Check for declaration of canonicalize_file_name.
6164         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
6165
6166 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6167
6168         * gnulib-tool (func_import): Fix typo in actioncmd.
6169
6170 2006-11-02  Bruno Haible  <bruno@clisp.org>
6171
6172         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
6173         newline sequence in the Makefile.am snippet as a space, like "make"
6174         does.
6175         Reported by Roger Persson <perrog@gmail.com>.
6176
6177 2006-11-01  Bruno Haible  <bruno@clisp.org>
6178
6179         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
6180         already declared in <string.h>.
6181         * lib/strcase.h (strncasecmp): Don't declare it if yes.
6182
6183 2006-11-01  Bruno Haible  <bruno@clisp.org>
6184
6185         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
6186         * lib/strcase.h: Include <string.h>.
6187         (strcasecmp): Define to rpl_strcasecmp here.
6188
6189 2006-11-01  Bruno Haible  <bruno@clisp.org>
6190
6191         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
6192
6193 2006-11-01  Eric Blake  <ebb9@byu.net>
6194
6195         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
6196
6197         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
6198
6199 2006-10-29  Bruno Haible  <bruno@clisp.org>
6200
6201         Make it compile in C++ mode.
6202         * lib/full-write.c (full_rw): Add a cast.
6203
6204 2006-11-01  Bruno Haible  <bruno@clisp.org>
6205
6206         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
6207         be POSIX compliant.
6208         Reported by Roger Persson <perrog@gmail.com>.
6209
6210 2006-11-01  Eric Blake  <ebb9@byu.net>
6211
6212         * lib/getopt_.h: Fix comments.
6213
6214 2006-10-31  Eric Blake  <ebb9@byu.net>
6215
6216         * modules/tmpdir (Depends-on): Add sys_stat.
6217         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
6218         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
6219         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
6220         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
6221         tempname.
6222
6223 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
6224
6225         Avoid some C++ diagnostics reported by Bruno Haible.
6226         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
6227         xmalloc.
6228         (quotearg_alloc): Use xcharalloc rather than xmalloc.
6229         (struct slotvec): Move to top level.
6230         (quotearg_n_options): Rewrite to avoid xmalloc.
6231         * lib/xalloc.h (xcharalloc): New function.
6232         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
6233         [defined __cplusplus]: Add function template that provides result
6234         type propagation.  This part of the change is from Bruno Haible.
6235
6236 2006-10-29  Bruno Haible  <bruno@clisp.org>
6237
6238         Make it compile in C++ mode.
6239         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
6240         * lib/strnlen1.c (strnlen1): Cast memchr result.
6241         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
6242         * lib/clean-temp.c (string_equals, string_hash): Add casts.
6243         (create_temp_dir): Rename local variable 'template'.
6244         (compile_csharp_using_sscli): Add cast.
6245         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
6246         * lib/findprog.c (find_in_path): Likewise.
6247         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
6248         * lib/wait-process.c (register_slave_subprocess): Likewise.
6249
6250 2006-10-22  Bruno Haible  <bruno@clisp.org>
6251
6252         * modules/tsearch: New file.
6253         * lib/tsearch.h: New file.
6254         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
6255         * m4/tsearch.m4: New file.
6256         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
6257
6258 2006-10-29  Eric Blake  <ebb9@byu.net>
6259
6260         * lib/arcfour.c: Assume config.h.
6261         * lib/arctwo.c: Likewise.
6262         * lib/base64.c: Likewise.
6263         * lib/check-version.c: Likewise.
6264         * lib/crc.c: Likewise.
6265         * lib/des.c: Likewise.
6266         * lib/gc-gnulib.c: Likewise.
6267         * lib/gc-libgcrypt.c: Likewise.
6268         * lib/gc-pbkdf2-sha1.c: Likewise.
6269         * lib/getaddrinfo.c: Likewise.
6270         * lib/getdelim.c: Likewise.
6271         * lib/getline.c: Likewise.
6272         * lib/hmac-md5.c: Likewise.
6273         * lib/hmac-sha1.c: Likewise.
6274         * lib/iconvme.c: Likewise.
6275         * lib/md2.c: Likewise.
6276         * lib/md4.c: Likewise.
6277         * lib/memxor.c: Likewise.
6278         * lib/read-file.c: Likewise.
6279         * lib/readline.c: Likewise.
6280         * lib/rijndael-alg-fst.c: Likewise.
6281         * lib/rijndael-api-fst.c: Likewise.
6282         * lib/xgetdomainname.c: Likewise.
6283
6284 2006-10-28  Eric Blake  <ebb9@byu.net>
6285
6286         * lib/xstrndup.c: Assume config.h.
6287
6288 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
6289
6290         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
6291         stat-macros.h is now for our own macros, whereas stat_h is for
6292         macros in the <sys/stat.h> name space.
6293         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
6294         (STAT_MACROS_H): Remove.
6295         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
6296         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
6297         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
6298         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
6299         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
6300         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
6301         Move these macros to ...
6302         * lib/stat_.h: here.  Don't include stat-macros.h.
6303         * lib/canonicalize.c: Don't include stat-macros.h.
6304         * lib/chown.c: Likewise.
6305         * lib/euidaccess.c: Likewise.
6306         * lib/file-type.c: Likewise.
6307         * lib/filemode.c: Likewise.
6308         * lib/glob.c: Likewise.
6309         * lib/isapipe.c: Likewise.
6310         * lib/lchown.c: Likewise.
6311         * lib/lstat.c: Likewise.
6312         * lib/mkdir-p.c: Likewise.
6313         * lib/rmdir.c: Likewise.
6314         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
6315         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
6316         unless mkdir isn't declared, to speed up 'configure'.
6317         Always create sys/stat.h, since it's unlikely any real sys/stat.h
6318         would define all the S_* symbols.
6319         * modules/canonicalize (Depends-on):
6320         Depend on sys_stat, not stat-macros.
6321         * modules/chown: Likewise.
6322         * modules/euidaccess: Likewise.
6323         * modules/filemode: Likewise.
6324         * modules/file-type: Likewise.
6325         * modules/glob: Likewise.
6326         * modules/isapipe: Likewise.
6327         * modules/lchown: Likewise.
6328         * modules/lstat: Likewise.
6329         * modules/mkancesdirs: Likewise.
6330         * modules/rmdir: Likewise.
6331         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
6332         * modules/modechange: Likewise.
6333         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
6334         (configure.ac): Remove gl_STAT_MACROS.
6335         * modules/sys_stat (Depends-on): Remove stat-macros.
6336
6337 2006-10-27  Bruno Haible  <bruno@clisp.org>
6338
6339         * m4/signed.m4: Remove file.
6340         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
6341         invocation.
6342         * modules/vasnprintf (Files): Remove m4/signed.m4.
6343
6344 2006-10-27  Bruno Haible  <bruno@clisp.org>
6345
6346         Update to GNU gettext 0.16.
6347         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
6348         m4/inttypes-h.m4, m4/signed.m4.
6349         * m4/gettext.m4: Update to GNU gettext 0.16.
6350         * m4/intl.m4: New file, from GNU gettext.
6351         * m4/intldir.m4: New file, from GNU gettext.
6352         * config/srclist.txt: Update
6353
6354 2006-10-27  Eric Blake  <ebb9@byu.net>
6355
6356         * MODULES.html.sh: Document tempname.
6357         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
6358         dependencies.
6359         (Files): Move lib/tempname.c...
6360         * modules/tempname: ...to this new module.
6361         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
6362         (gl_PREREQ_TEMPNAME): Move...
6363         * m4/tempname.m4: ...to this new file.
6364         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
6365         * modules/sys_stat (Depends-on): Add stat-macros.
6366         * lib/stat_.h (includes): Pick up stat macros.
6367         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
6368         if stat macros are broken.
6369         * lib/tempname.c (includes): No need to include "stat-macros.h".
6370         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
6371         (direxists, __path_search) [!_LIBC]: Don't compile these in
6372         gnulib; the tmpdir module covers that.
6373         * lib/tempname.h: New file.
6374
6375 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
6376
6377         * COPYING: Explain how gnulib-tool converts licence headers.
6378         Almost all wording by Eric Blake.
6379
6380 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
6381
6382         * lib/mbchar.h (is_basic_table): Make read-only.
6383         * lib/mbchar.c (is_basic_table): Likewise.
6384         Reported by John Darrington.
6385
6386 2006-10-25  Bruno Haible  <bruno@clisp.org>
6387
6388         * lib/progname.h (set_program_name): Undefine before defining.
6389
6390 2006-10-25  Bruno Haible  <bruno@clisp.org>
6391
6392         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
6393         false for non-gcc C++ compilers.
6394         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
6395
6396 2006-10-24  Bruno Haible  <bruno@clisp.org>
6397
6398         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
6399         iconv implementations like Irix iconv.
6400
6401 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
6402
6403         * modules/vararrays: New file.
6404         * m4/vararrays.m4: New file, taken from diffutils.
6405         * MODULES.html.sh: New module vararrays.
6406
6407 2006-10-24  Karl Berry  <karl@gnu.org>
6408
6409         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
6410         Don't call GNU Unix.
6411
6412 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6413
6414         * users.txt: Add Libtool.
6415
6416         Sync from Libtool:
6417
6418         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
6419
6420         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
6421         to gnulib's policy of including config.h unconditionally.
6422
6423 2006-10-24  Bruno Haible  <bruno@clisp.org>
6424
6425         * modules/wcwidth (Files): Add m4/wint_t.m4.
6426         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
6427         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
6428
6429 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
6430
6431         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
6432         to pacify GCC with some -W flags enabled.  Problem reported by
6433         Bruno Haible.
6434
6435 2006-10-24  Jim Meyering  <jim@meyering.net>
6436
6437         * MODULES.html.sh: Remove uinttostr.  It's not a module.
6438         Reported by Karl Berry.
6439
6440 2006-10-23  Bruno Haible  <bruno@clisp.org>
6441
6442         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
6443
6444 2006-10-24  Bruno Haible  <bruno@clisp.org>
6445
6446         * lib/gl_list.h: Use C comment style, not C++ comment style.
6447
6448 2006-10-23  Eric Blake  <ebb9@byu.net>
6449
6450         * lib/getaddrinfo.c (includes): Add missing include.
6451
6452 2006-10-23  Bruno Haible  <bruno@clisp.org>
6453             Paul Eggert  <eggert@cs.ucla.edu>
6454
6455         Ability to rename obstack_free.
6456         * lib/obstack.h (__obstack_free): New macro. Declare instead of
6457         obstack_free.
6458         (obstack_free): Invoke the __obstack_free macro.
6459         * lib/obstack.c (obstack_free): Use __obstack_free macro.
6460
6461 2006-10-23  Bruno Haible  <bruno@clisp.org>
6462             Paul Eggert  <eggert@cs.ucla.edu>
6463
6464         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
6465         __argc, __argv from the declaration. (They are defined as macros on
6466         mingw.)
6467
6468 2006-10-22  Bruno Haible  <bruno@clisp.org>
6469
6470         * doc/gnulib-intro.texi: New file.
6471         * doc/gnulib.texi: Include it.
6472
6473 2006-10-21  Bruno Haible  <bruno@clisp.org>
6474
6475         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
6476         "Introduction", "Miscellanous Notes", "Particular Modules".
6477
6478 2006-10-21  Bruno Haible  <bruno@clisp.org>
6479
6480         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6481         Change mostlyclean-local rule to avoid sh syntax error from bash
6482         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
6483
6484 2006-10-23  Jim Meyering  <jim@meyering.net>
6485
6486         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
6487         in place of snprintf.
6488
6489         * modules/inttostr (Files): Add lib/uinttostr.c.
6490         * lib/uinttostr.c (inttostr): New file/function.
6491         * lib/inttostr.h (uinttostr): Declare.
6492         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
6493         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
6494         Add uinttostr.
6495         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
6496
6497 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
6498
6499         * lib/canonicalize.c (ELOOP): Define if not already defined.
6500         Problem reported by Bruno Haible in
6501         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
6502
6503 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
6504
6505         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
6506         Problem reported by Perry Smith and Ville Laurikari.
6507
6508         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
6509         uses.
6510
6511 2006-10-19  Bruno Haible  <bruno@clisp.org>
6512
6513         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
6514         for mingw.
6515
6516 2006-10-19  Bruno Haible  <bruno@clisp.org>
6517
6518         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
6519         Needed for mingw.
6520
6521 2006-10-19  Bruno Haible  <bruno@clisp.org>
6522
6523         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
6524
6525 2006-10-19  Bruno Haible  <bruno@clisp.org>
6526
6527         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
6528         it.
6529
6530 2006-10-19  Bruno Haible  <bruno@clisp.org>
6531
6532         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
6533         invocation.
6534
6535 2006-10-19  Bruno Haible  <bruno@clisp.org>
6536
6537         * gnulib-tool (func_create_testdir): Don't include ftruncate and
6538         mountlist by default.
6539
6540 2006-10-16  Bruno Haible  <bruno@clisp.org>
6541
6542         * lib/c-strstr.c: Include c-strstr.h.
6543
6544 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6545
6546         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
6547         in a slash.
6548
6549 2006-10-18  Bruno Haible  <bruno@clisp.org>
6550
6551         * lib/lock.h [C++]: Wrap definitions in extern "C".
6552
6553 2006-10-18  Bruno Haible  <bruno@clisp.org>
6554
6555         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
6556         gl_LIBOBJS list.
6557
6558 2006-10-18  Bruno Haible  <bruno@clisp.org>
6559
6560         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
6561
6562 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
6563
6564         * lib/xstrtol.h: Include gettext.h.
6565         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
6566         Problem reported by Eric Blake.
6567         * modules/xstrtol (Depends-on): Add gettext-h.
6568
6569 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
6570
6571         * lib/strftime.c (advance): New macro.
6572         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
6573         incomplete type, so you can't add 0 to it.  Problem and patch
6574         reported by Eelco Dolstra for dietlibc.
6575
6576 2006-10-18  Jim Meyering  <jim@meyering.net>
6577
6578         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
6579         type for a local, and rename it: s/up/user_proc/.
6580
6581 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
6582
6583         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
6584         READ_UTMP_USER_PROCESS.
6585         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
6586
6587 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
6588
6589         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
6590         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
6591
6592 2006-10-17  Eric Blake  <ebb9@byu.net>
6593
6594         * lib/sigprocmask.c (sigprocmask): Fix typo.
6595
6596         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
6597
6598         * modules/clean-temp (Makefile.am): Don't add to make output...
6599         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
6600         config.h.
6601
6602 2006-10-17  Bruno Haible  <bruno@clisp.org>
6603
6604         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
6605         differently if DEFAULT_TEXT_DOMAIN is set.
6606
6607 2006-10-16  Bruno Haible  <bruno@clisp.org>
6608
6609         * lib/clean-temp.c: Include fwriteerror.h.
6610
6611 2006-10-16  Bruno Haible  <bruno@clisp.org>
6612
6613         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
6614
6615 2006-10-16  Bruno Haible  <bruno@clisp.org>
6616
6617         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
6618         * lib/sigprocmask.h: Include <sys/types.h>.
6619         (sigset_t): Use the system's definition if present.
6620
6621 2006-10-17  Eric Blake  <ebb9@byu.net>
6622
6623         * lib/xvasprintf.c (includes): Assume config.h.
6624         * lib/xasprintf.c (includes): Likewise.
6625
6626 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
6627
6628         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
6629         at least as wide as intmax_t.
6630
6631 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
6632
6633         (Imported from Automake.)
6634         * build-aux/gnupload: Update to version 1.1 of directive file.
6635
6636 2006-10-16  Eric Blake  <ebb9@byu.net>
6637
6638         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
6639         match Automake 1.10a.
6640
6641 2006-10-14  Bruno Haible  <bruno@clisp.org>
6642
6643         * modules/sigprocmask: New file.
6644         * lib/sigprocmask.h: New file.
6645         * lib/sigprocmask.c: New file.
6646         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
6647         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
6648         request sigprocmask.o.
6649         (gl_PREREQ_SIGPROCMASK): New macro.
6650         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
6651         (Depends-on): Add sigprocmask.
6652         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
6653         gt_SIGNALBLOCKING. Test for 'raise' only once.
6654         * lib/fatal-signal.c: Include sigprocmask.h.
6655         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
6656         unblock_fatal_signals): Define always.
6657         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
6658         sigprocmask.
6659
6660 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
6661
6662         Sync from Automake.
6663         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
6664         which incorrectly sets the mode of an existing destination
6665         directory.  In some cases the unpatched install-sh could do the
6666         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
6667         system.  We hope this is rare in practice, but it's clearly worth
6668         fixing.  Problem reported by Alex Unleashed in
6669         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
6670         Also, don't bother to check for -m bugs unless we're using -m;
6671         suggested by Stepan Kasal.
6672
6673 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6674
6675         Sync from Automake.
6676         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
6677         `-c' flag, so they appear at the same position as in %FASTDEP%
6678         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
6679         which ignores unknown options only after the first non-option.
6680         Bug report against M4 by Nelson H. F. Beebe.
6681
6682 2006-10-13  Jim Meyering  <jim@meyering.net>
6683
6684         Fix a bug in yesterday's change.
6685         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
6686         p->fts_statp->st_dev would be used uninitialized.
6687         Ensures that we always call fts_stat on the very first entry.
6688         Miklos Szeredi reported that find -xdev stopped working.
6689
6690 2006-10-12  Bruno Haible  <bruno@clisp.org>
6691
6692         * gnulib-tool (func_get_automake_snippet): Append an automatically
6693         computed EXTRA_DIST augmentation.
6694         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
6695         * modules/alloca-opt (Makefile.am): Likewise.
6696         * modules/allocsa (Makefile.am): Likewise.
6697         * modules/arcfour (Makefile.am): Likewise.
6698         * modules/arctwo (Makefile.am): Likewise.
6699         * modules/argmatch (Makefile.am): Likewise.
6700         * modules/argz (Makefile.am): Likewise.
6701         * modules/atexit (Makefile.am): Likewise.
6702         * modules/backupfile (Makefile.am): Likewise.
6703         * modules/byteswap (Makefile.am): Likewise.
6704         * modules/c-strtod (Makefile.am): Likewise.
6705         * modules/c-strtold (Makefile.am): Likewise.
6706         * modules/calloc (Makefile.am): Likewise.
6707         * modules/canon-host (Makefile.am): Likewise.
6708         * modules/canonicalize (Makefile.am): Likewise.
6709         * modules/chdir-long (Makefile.am): Likewise.
6710         * modules/chdir-safer (Makefile.am): Likewise.
6711         * modules/check-version (Makefile.am): Likewise.
6712         * modules/chown (Makefile.am): Likewise.
6713         * modules/cloexec (Makefile.am): Likewise.
6714         * modules/close-stream (Makefile.am): Likewise.
6715         * modules/closeout (Makefile.am): Likewise.
6716         * modules/crc (Makefile.am): Likewise.
6717         * modules/csharpexec (Makefile.am): Likewise.
6718         * modules/cycle-check (Makefile.am): Likewise.
6719         * modules/des (Makefile.am): Likewise.
6720         * modules/dev-ino (Makefile.am): Likewise.
6721         * modules/dirfd (Makefile.am): Likewise.
6722         * modules/dirname (Makefile.am): Likewise.
6723         * modules/dup2 (Makefile.am): Likewise.
6724         * modules/eealloc (Makefile.am): Likewise.
6725         * modules/error (Makefile.am): Likewise.
6726         * modules/euidaccess (Makefile.am): Likewise.
6727         * modules/exclude (Makefile.am): Likewise.
6728         * modules/exitfail (Makefile.am): Likewise.
6729         * modules/fcntl-safer (Makefile.am): Likewise.
6730         * modules/fcntl (Makefile.am): Likewise.
6731         * modules/file-type (Makefile.am): Likewise.
6732         * modules/fileblocks (Makefile.am): Likewise.
6733         * modules/filemode (Makefile.am): Likewise.
6734         * modules/filenamecat (Makefile.am): Likewise.
6735         * modules/fnmatch (Makefile.am): Likewise.
6736         * modules/fopen-safer (Makefile.am): Likewise.
6737         * modules/fpending (Makefile.am): Likewise.
6738         * modules/fprintftime (Makefile.am): Likewise.
6739         * modules/free (Makefile.am): Likewise.
6740         * modules/fsusage (Makefile.am): Likewise.
6741         * modules/ftruncate (Makefile.am): Likewise.
6742         * modules/fts (Makefile.am): Likewise.
6743         * modules/gc-arcfour (Makefile.am): Likewise.
6744         * modules/gc-des (Makefile.am): Likewise.
6745         * modules/gc-hmac-md5 (Makefile.am): Likewise.
6746         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
6747         * modules/gc-md4 (Makefile.am): Likewise.
6748         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
6749         * modules/gc-sha1 (Makefile.am): Likewise.
6750         * modules/gc (Makefile.am): Likewise.
6751         * modules/getaddrinfo (Makefile.am): Likewise.
6752         * modules/getcwd (Makefile.am): Likewise.
6753         * modules/getdelim (Makefile.am): Likewise.
6754         * modules/getdomainname (Makefile.am): Likewise.
6755         * modules/getgroups (Makefile.am): Likewise.
6756         * modules/gethostname (Makefile.am): Likewise.
6757         * modules/gethrxtime (Makefile.am): Likewise.
6758         * modules/getline (Makefile.am): Likewise.
6759         * modules/getloadavg (Makefile.am): Likewise.
6760         * modules/getlogin_r (Makefile.am): Likewise.
6761         * modules/getndelim2 (Makefile.am): Likewise.
6762         * modules/getopt (Makefile.am): Likewise.
6763         * modules/getpagesize (Makefile.am): Likewise.
6764         * modules/getpass-gnu (Makefile.am): Likewise.
6765         * modules/getpass (Makefile.am): Likewise.
6766         * modules/getsubopt (Makefile.am): Likewise.
6767         * modules/gettime (Makefile.am): Likewise.
6768         * modules/gettimeofday (Makefile.am): Likewise.
6769         * modules/getugroups (Makefile.am): Likewise.
6770         * modules/getusershell (Makefile.am): Likewise.
6771         * modules/glob (Makefile.am): Likewise.
6772         * modules/group-member (Makefile.am): Likewise.
6773         * modules/hard-locale (Makefile.am): Likewise.
6774         * modules/hash (Makefile.am): Likewise.
6775         * modules/hmac-md5 (Makefile.am): Likewise.
6776         * modules/hmac-sha1 (Makefile.am): Likewise.
6777         * modules/human (Makefile.am): Likewise.
6778         * modules/idcache (Makefile.am): Likewise.
6779         * modules/imaxabs (Makefile.am): Likewise.
6780         * modules/imaxdiv (Makefile.am): Likewise.
6781         * modules/inet_ntop (Makefile.am): Likewise.
6782         * modules/inet_pton (Makefile.am): Likewise.
6783         * modules/intprops (Makefile.am): Likewise.
6784         * modules/inttostr (Makefile.am): Likewise.
6785         * modules/inttypes (Makefile.am): Likewise.
6786         * modules/isapipe (Makefile.am): Likewise.
6787         * modules/javaversion (Makefile.am): Likewise.
6788         * modules/lchmod (Makefile.am): Likewise.
6789         * modules/lchown (Makefile.am): Likewise.
6790         * modules/localcharset (Makefile.am): Likewise.
6791         * modules/long-options (Makefile.am): Likewise.
6792         * modules/lstat (Makefile.am): Likewise.
6793         * modules/malloc (Makefile.am): Likewise.
6794         * modules/mathl (Makefile.am): Likewise.
6795         * modules/mbchar (Makefile.am): Likewise.
6796         * modules/md2 (Makefile.am): Likewise.
6797         * modules/md4 (Makefile.am): Likewise.
6798         * modules/md5 (Makefile.am): Likewise.
6799         * modules/memcasecmp (Makefile.am): Likewise.
6800         * modules/memchr (Makefile.am): Likewise.
6801         * modules/memcmp (Makefile.am): Likewise.
6802         * modules/memcoll (Makefile.am): Likewise.
6803         * modules/memcpy (Makefile.am): Likewise.
6804         * modules/memmem (Makefile.am): Likewise.
6805         * modules/memmove (Makefile.am): Likewise.
6806         * modules/mempcpy (Makefile.am): Likewise.
6807         * modules/memrchr (Makefile.am): Likewise.
6808         * modules/memset (Makefile.am): Likewise.
6809         * modules/memxor (Makefile.am): Likewise.
6810         * modules/mkancesdirs (Makefile.am): Likewise.
6811         * modules/mkdir-p (Makefile.am): Likewise.
6812         * modules/mkdir (Makefile.am): Likewise.
6813         * modules/mkdtemp (Makefile.am): Likewise.
6814         * modules/mkstemp (Makefile.am): Likewise.
6815         * modules/mktime (Makefile.am): Likewise.
6816         * modules/modechange (Makefile.am): Likewise.
6817         * modules/mountlist (Makefile.am): Likewise.
6818         * modules/nanosleep (Makefile.am): Likewise.
6819         * modules/obstack (Makefile.am): Likewise.
6820         * modules/openat (Makefile.am): Likewise.
6821         * modules/pagealign_alloc (Makefile.am): Likewise.
6822         * modules/pathmax (Makefile.am): Likewise.
6823         * modules/physmem (Makefile.am): Likewise.
6824         * modules/poll (Makefile.am): Likewise.
6825         * modules/posixtm (Makefile.am): Likewise.
6826         * modules/posixver (Makefile.am): Likewise.
6827         * modules/putenv (Makefile.am): Likewise.
6828         * modules/quote (Makefile.am): Likewise.
6829         * modules/quotearg (Makefile.am): Likewise.
6830         * modules/raise (Makefile.am): Likewise.
6831         * modules/read-file (Makefile.am): Likewise.
6832         * modules/readline (Makefile.am): Likewise.
6833         * modules/readlink (Makefile.am): Likewise.
6834         * modules/readtokens (Makefile.am): Likewise.
6835         * modules/readutmp (Makefile.am): Likewise.
6836         * modules/realloc (Makefile.am): Likewise.
6837         * modules/regex (Makefile.am): Likewise.
6838         * modules/rename-dest-slash (Makefile.am): Likewise.
6839         * modules/rename (Makefile.am): Likewise.
6840         * modules/rijndael (Makefile.am): Likewise.
6841         * modules/rmdir (Makefile.am): Likewise.
6842         * modules/rpmatch (Makefile.am): Likewise.
6843         * modules/safe-read (Makefile.am): Likewise.
6844         * modules/safe-write (Makefile.am): Likewise.
6845         * modules/same-inode (Makefile.am): Likewise.
6846         * modules/same (Makefile.am): Likewise.
6847         * modules/save-cwd (Makefile.am): Likewise.
6848         * modules/savedir (Makefile.am): Likewise.
6849         * modules/setenv (Makefile.am): Likewise.
6850         * modules/settime (Makefile.am): Likewise.
6851         * modules/sha1 (Makefile.am): Likewise.
6852         * modules/sig2str (Makefile.am): Likewise.
6853         * modules/snprintf (Makefile.am): Likewise.
6854         * modules/stat-macros (Makefile.am): Likewise.
6855         * modules/stat-time (Makefile.am): Likewise.
6856         * modules/stdbool (Makefile.am): Likewise.
6857         * modules/stdint (Makefile.am): Likewise.
6858         * modules/stdlib-safer (Makefile.am): Likewise.
6859         * modules/stpcpy (Makefile.am): Likewise.
6860         * modules/stpncpy (Makefile.am): Likewise.
6861         * modules/strcase (Makefile.am): Likewise.
6862         * modules/strcasestr (Makefile.am): Likewise.
6863         * modules/strchrnul (Makefile.am): Likewise.
6864         * modules/strcspn (Makefile.am): Likewise.
6865         * modules/strdup (Makefile.am): Likewise.
6866         * modules/strerror (Makefile.am): Likewise.
6867         * modules/strftime (Makefile.am): Likewise.
6868         * modules/strndup (Makefile.am): Likewise.
6869         * modules/strnlen (Makefile.am): Likewise.
6870         * modules/strpbrk (Makefile.am): Likewise.
6871         * modules/strsep (Makefile.am): Likewise.
6872         * modules/strstr (Makefile.am): Likewise.
6873         * modules/strtod (Makefile.am): Likewise.
6874         * modules/strtoimax (Makefile.am): Likewise.
6875         * modules/strtok_r (Makefile.am): Likewise.
6876         * modules/strtol (Makefile.am): Likewise.
6877         * modules/strtoll (Makefile.am): Likewise.
6878         * modules/strtoul (Makefile.am): Likewise.
6879         * modules/strtoull (Makefile.am): Likewise.
6880         * modules/strtoumax (Makefile.am): Likewise.
6881         * modules/strverscmp (Makefile.am): Likewise.
6882         * modules/sys_socket (Makefile.am): Likewise.
6883         * modules/sys_stat (Makefile.am): Likewise.
6884         * modules/sysexits (Makefile.am): Likewise.
6885         * modules/time_r (Makefile.am): Likewise.
6886         * modules/timegm (Makefile.am): Likewise.
6887         * modules/timespec (Makefile.am): Likewise.
6888         * modules/tmpfile-safer (Makefile.am): Likewise.
6889         * modules/trim (Makefile.am): Likewise.
6890         * modules/unistd-safer (Makefile.am): Likewise.
6891         * modules/unlinkdir (Makefile.am): Likewise.
6892         * modules/unlocked-io (Makefile.am): Likewise.
6893         * modules/userspec (Makefile.am): Likewise.
6894         * modules/utime (Makefile.am): Likewise.
6895         * modules/utimecmp (Makefile.am): Likewise.
6896         * modules/utimens (Makefile.am): Likewise.
6897         * modules/vasnprintf (Makefile.am): Likewise.
6898         * modules/vasprintf (Makefile.am): Likewise.
6899         * modules/vsnprintf (Makefile.am): Likewise.
6900         * modules/xalloc (Makefile.am): Likewise.
6901         * modules/xgetcwd (Makefile.am): Likewise.
6902         * modules/xnanosleep (Makefile.am): Likewise.
6903         * modules/xreadlink (Makefile.am): Likewise.
6904         * modules/xstrtod (Makefile.am): Likewise.
6905         * modules/xstrtol (Makefile.am): Likewise.
6906         * modules/xstrtold (Makefile.am): Likewise.
6907         * modules/yesno (Makefile.am): Likewise.
6908         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
6909
6910 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
6911
6912         * modules/error (Makefile.am): Distribute files through
6913         EXTRA_DIST, not lib_SOURCES.
6914
6915 2006-10-12  Eric Blake  <ebb9@byu.net>
6916
6917         * modules/error (Makefile.am): Distribute files in /lib.
6918         * modules/obstack (Makefile.am): Likewise.
6919
6920 2006-10-12  Bruno Haible  <bruno@clisp.org>
6921
6922         * modules/acl (Makefile.am): Distribute all files in lib/ through
6923         EXTRA_DIST.
6924         * modules/arcfour (Makefile.am): Likewise.
6925         * modules/arctwo (Makefile.am): Likewise.
6926         * modules/argmatch (Makefile.am): Likewise.
6927         * modules/argz (Makefile.am): Likewise.
6928         * modules/atexit (Makefile.am): Likewise.
6929         * modules/backupfile (Makefile.am): Likewise.
6930         * modules/c-strtod (Makefile.am): Likewise.
6931         * modules/c-strtold (Makefile.am): Likewise.
6932         * modules/calloc (Makefile.am): Likewise.
6933         * modules/canon-host (Makefile.am): Likewise.
6934         * modules/canonicalize (Makefile.am): Likewise.
6935         * modules/chdir-long (Makefile.am): Likewise.
6936         * modules/chdir-safer (Makefile.am): Likewise.
6937         * modules/check-version (Makefile.am): Likewise.
6938         * modules/chown (Makefile.am): Likewise.
6939         * modules/cloexec (Makefile.am): Likewise.
6940         * modules/close-stream (Makefile.am): Likewise.
6941         * modules/closeout (Makefile.am): Likewise.
6942         * modules/crc (Makefile.am): Likewise.
6943         * modules/cycle-check (Makefile.am): Likewise.
6944         * modules/des (Makefile.am): Likewise.
6945         * modules/dirfd (Makefile.am): Likewise.
6946         * modules/dirname (Makefile.am): Likewise.
6947         * modules/dup2 (Makefile.am): Likewise.
6948         * modules/euidaccess (Makefile.am): Likewise.
6949         * modules/exclude (Makefile.am): Likewise.
6950         * modules/exitfail (Makefile.am): Likewise.
6951         * modules/fcntl-safer (Makefile.am): Likewise.
6952         * modules/file-type (Makefile.am): Likewise.
6953         * modules/fileblocks (Makefile.am): Likewise.
6954         * modules/filemode (Makefile.am): Likewise.
6955         * modules/filenamecat (Makefile.am): Likewise.
6956         * modules/fnmatch (Makefile.am): Likewise.
6957         * modules/fopen-safer (Makefile.am): Likewise.
6958         * modules/fpending (Makefile.am): Likewise.
6959         * modules/fprintftime (Makefile.am): Likewise.
6960         * modules/free (Makefile.am): Likewise.
6961         * modules/fsusage (Makefile.am): Likewise.
6962         * modules/ftruncate (Makefile.am): Likewise.
6963         * modules/fts (Makefile.am): Likewise.
6964         * modules/gc (Makefile.am): Likewise.
6965         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
6966         * modules/getaddrinfo (Makefile.am): Likewise.
6967         * modules/getcwd (Makefile.am): Likewise.
6968         * modules/getdelim (Makefile.am): Likewise.
6969         * modules/getdomainname (Makefile.am): Likewise.
6970         * modules/getgroups (Makefile.am): Likewise.
6971         * modules/gethostname (Makefile.am): Likewise.
6972         * modules/gethrxtime (Makefile.am): Likewise.
6973         * modules/getline (Makefile.am): Likewise.
6974         * modules/getloadavg (Makefile.am): Likewise.
6975         * modules/getlogin_r (Makefile.am): Likewise.
6976         * modules/getopt (Makefile.am): Likewise.
6977         * modules/getpass (Makefile.am): Likewise.
6978         * modules/getpass-gnu (Makefile.am): Likewise.
6979         * modules/getsubopt (Makefile.am): Likewise.
6980         * modules/gettime (Makefile.am): Likewise.
6981         * modules/gettimeofday (Makefile.am): Likewise.
6982         * modules/getugroups (Makefile.am): Likewise.
6983         * modules/getusershell (Makefile.am): Likewise.
6984         * modules/glob (Makefile.am): Likewise.
6985         * modules/group-member (Makefile.am): Likewise.
6986         * modules/hard-locale (Makefile.am): Likewise.
6987         * modules/hash (Makefile.am): Likewise.
6988         * modules/hmac-md5 (Makefile.am): Likewise.
6989         * modules/hmac-sha1 (Makefile.am): Likewise.
6990         * modules/human (Makefile.am): Likewise.
6991         * modules/idcache (Makefile.am): Likewise.
6992         * modules/imaxabs (Makefile.am): Likewise.
6993         * modules/imaxdiv (Makefile.am): Likewise.
6994         * modules/inet_ntop (Makefile.am): Likewise.
6995         * modules/inet_pton (Makefile.am): Likewise.
6996         * modules/inttostr (Makefile.am): Likewise.
6997         * modules/isapipe (Makefile.am): Likewise.
6998         * modules/lchown (Makefile.am): Likewise.
6999         * modules/long-options (Makefile.am): Likewise.
7000         * modules/lstat (Makefile.am): Likewise.
7001         * modules/malloc (Makefile.am): Likewise.
7002         * modules/mathl (Makefile.am): Likewise.
7003         * modules/mbchar (Makefile.am): Likewise.
7004         * modules/md2 (Makefile.am): Likewise.
7005         * modules/md4 (Makefile.am): Likewise.
7006         * modules/md5 (Makefile.am): Likewise.
7007         * modules/memcasecmp (Makefile.am): Likewise.
7008         * modules/memchr (Makefile.am): Likewise.
7009         * modules/memcmp (Makefile.am): Likewise.
7010         * modules/memcoll (Makefile.am): Likewise.
7011         * modules/memcpy (Makefile.am): Likewise.
7012         * modules/memmem (Makefile.am): Likewise.
7013         * modules/memmove (Makefile.am): Likewise.
7014         * modules/mempcpy (Makefile.am): Likewise.
7015         * modules/memrchr (Makefile.am): Likewise.
7016         * modules/memset (Makefile.am): Likewise.
7017         * modules/memxor (Makefile.am): Likewise.
7018         * modules/mkancesdirs (Makefile.am): Likewise.
7019         * modules/mkdir (Makefile.am): Likewise.
7020         * modules/mkdir-p (Makefile.am): Likewise.
7021         * modules/mkdtemp (Makefile.am): Likewise.
7022         * modules/mkstemp (Makefile.am): Likewise.
7023         * modules/mktime (Makefile.am): Likewise.
7024         * modules/modechange (Makefile.am): Likewise.
7025         * modules/mountlist (Makefile.am): Likewise.
7026         * modules/nanosleep (Makefile.am): Likewise.
7027         * modules/openat (Makefile.am): Likewise.
7028         * modules/pagealign_alloc (Makefile.am): Likewise.
7029         * modules/physmem (Makefile.am): Likewise.
7030         * modules/poll (Makefile.am): Likewise.
7031         * modules/posixtm (Makefile.am): Likewise.
7032         * modules/posixver (Makefile.am): Likewise.
7033         * modules/putenv (Makefile.am): Likewise.
7034         * modules/quote (Makefile.am): Likewise.
7035         * modules/quotearg (Makefile.am): Likewise.
7036         * modules/raise (Makefile.am): Likewise.
7037         * modules/read-file (Makefile.am): Likewise.
7038         * modules/readline (Makefile.am): Likewise.
7039         * modules/readlink (Makefile.am): Likewise.
7040         * modules/readtokens (Makefile.am): Likewise.
7041         * modules/readutmp (Makefile.am): Likewise.
7042         * modules/realloc (Makefile.am): Likewise.
7043         * modules/regex (Makefile.am): Likewise.
7044         * modules/rename (Makefile.am): Likewise.
7045         * modules/rename-dest-slash (Makefile.am): Likewise.
7046         * modules/rijndael (Makefile.am): Likewise.
7047         * modules/rmdir (Makefile.am): Likewise.
7048         * modules/rpmatch (Makefile.am): Likewise.
7049         * modules/safe-read (Makefile.am): Likewise.
7050         * modules/safe-write (Makefile.am): Likewise.
7051         * modules/same (Makefile.am): Likewise.
7052         * modules/save-cwd (Makefile.am): Likewise.
7053         * modules/savedir (Makefile.am): Likewise.
7054         * modules/setenv (Makefile.am): Likewise.
7055         * modules/settime (Makefile.am): Likewise.
7056         * modules/sha1 (Makefile.am): Likewise.
7057         * modules/sig2str (Makefile.am): Likewise.
7058         * modules/snprintf (Makefile.am): Likewise.
7059         * modules/stdlib-safer (Makefile.am): Likewise.
7060         * modules/stpcpy (Makefile.am): Likewise.
7061         * modules/stpncpy (Makefile.am): Likewise.
7062         * modules/strcase (Makefile.am): Likewise.
7063         * modules/strcasestr (Makefile.am): Likewise.
7064         * modules/strchrnul (Makefile.am): Likewise.
7065         * modules/strcspn (Makefile.am): Likewise.
7066         * modules/strdup (Makefile.am): Likewise.
7067         * modules/strerror (Makefile.am): Likewise.
7068         * modules/strftime (Makefile.am): Likewise.
7069         * modules/strndup (Makefile.am): Likewise.
7070         * modules/strnlen (Makefile.am): Likewise.
7071         * modules/strpbrk (Makefile.am): Likewise.
7072         * modules/strsep (Makefile.am): Likewise.
7073         * modules/strstr (Makefile.am): Likewise.
7074         * modules/strtod (Makefile.am): Likewise.
7075         * modules/strtoimax (Makefile.am): Likewise.
7076         * modules/strtok_r (Makefile.am): Likewise.
7077         * modules/strtol (Makefile.am): Likewise.
7078         * modules/strtoll (Makefile.am): Likewise.
7079         * modules/strtoul (Makefile.am): Likewise.
7080         * modules/strtoull (Makefile.am): Likewise.
7081         * modules/strtoumax (Makefile.am): Likewise.
7082         * modules/strverscmp (Makefile.am): Likewise.
7083         * modules/time_r (Makefile.am): Likewise.
7084         * modules/timegm (Makefile.am): Likewise.
7085         * modules/tmpfile-safer (Makefile.am): Likewise.
7086         * modules/unistd-safer (Makefile.am): Likewise.
7087         * modules/unlinkdir (Makefile.am): Likewise.
7088         * modules/userspec (Makefile.am): Likewise.
7089         * modules/utime (Makefile.am): Likewise.
7090         * modules/utimecmp (Makefile.am): Likewise.
7091         * modules/utimens (Makefile.am): Likewise.
7092         * modules/vasnprintf (Makefile.am): Likewise.
7093         * modules/vasprintf (Makefile.am): Likewise.
7094         * modules/vsnprintf (Makefile.am): Likewise.
7095         * modules/xalloc (Makefile.am): Likewise.
7096         * modules/xgetcwd (Makefile.am): Likewise.
7097         * modules/xnanosleep (Makefile.am): Likewise.
7098         * modules/xreadlink (Makefile.am): Likewise.
7099         * modules/xstrtod (Makefile.am): Likewise.
7100         * modules/xstrtol (Makefile.am): Likewise.
7101         * modules/xstrtold (Makefile.am): Likewise.
7102         * modules/yesno (Makefile.am): Likewise.
7103
7104 2006-10-12  Jim Meyering  <jim@meyering.net>
7105
7106         * m4/getloadavg.m4: Revert the change below.
7107
7108         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
7109         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
7110         fail with a symlink, which is what coreutils' ./bootstrap now
7111         creates by default.
7112
7113 2006-10-12  Bruno Haible  <bruno@clisp.org>
7114
7115         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
7116         mingw.
7117         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
7118         MSVC and mingw explicitly.
7119
7120 2006-10-11  Simon Josefsson  <jas@extundo.com>
7121             Bruno Haible  <bruno@clisp.org>
7122
7123         Add support for multiple gnulib-tool invocations in the scope of a
7124         single configure.ac file.
7125         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
7126         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
7127         with the same contents as the _LIBADD variable.
7128         (func_emit_initmacro_start, func_emit_initmacro_end,
7129         func_emit_initmacro_done): New functions.
7130         (func_import, func_create_testdir): Invoke them. Allow the identifiers
7131         gl_LIBOBJS and gl_LTLIBOBJS.
7132
7133 2006-10-11  Bruno Haible  <bruno@clisp.org>
7134
7135         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
7136         (func_create_testdir): Don't create po/Makefile.am, don't invoke
7137         autoreconf. Instead, invoke autopoint explicitly but move back the
7138         *.m4 files from gnulib.
7139
7140 2006-10-11  Bruno Haible  <bruno@clisp.org>
7141
7142         * gnulib-tool (func_usage): Make module names after --create-testdir
7143         optional.
7144         (func_create_testdir): If no module was specified, use nearly all
7145         modules.
7146
7147 2006-10-12  Jim Meyering  <jim@meyering.net>
7148
7149         Big performance improvement for fts-based tools that use FTS_NOSTAT.
7150         Avoid spurious inode-mismatch problems on non-POSIX file systems.
7151         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
7152         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
7153         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
7154         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
7155         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
7156         (fts_set_stat_required): New function.
7157         (fts_open): Defer the calls to fts_stat, if possible or requested.
7158         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
7159         into fts_stat itself.
7160         (fts_read): Perform any required (deferred) fts_stat call.
7161         (fts_build): Likewise, for the directory we're about to open and read.
7162         In the readdir loop, carefully decide whether each entry will require
7163         an eventual call to fts_stat, using dirent.d_type info if available.
7164         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
7165         a command line argument into this function.  Update all callers.
7166         Map a return value of FTS_DOT to FTS_D for a command line argument.
7167         * modules/fts (Depends-on): Add d-type.  Alphabetize.
7168         Thanks to Miklos Szeredi for his tenacity and for the initial
7169         bug report about "find" failing on a FUSE-based file system.
7170
7171         * lib/fts.c (fts_open): Use consistent indentation.
7172
7173 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
7174
7175         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
7176         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
7177         reported by Jim Meyering.  All uses of cache variables renamed
7178         to match Autoconf's.
7179         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
7180         the other one.
7181
7182         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
7183         Fix misspelling in diagnostic.
7184
7185 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
7186
7187         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
7188         defined.  Problem reported by Matthew Woehlke.
7189
7190         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
7191         Add support for Tandem NonStop R series.
7192         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
7193         Use new macro.
7194
7195         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
7196         (has_trailing_slash): Omit size arg; all callers changed.
7197         Omit 'inline', since it doesn't help performance and we'd
7198         need to configure it.
7199         Don't count //, ///, etc. as having a trailing slash.
7200         As a side effect, this removes a C99ism reported by Matthew Woehlke.
7201         (rpl_rename_dest_slash): On failure, use rename's errno rather
7202         than (in some cases) an incorrect or junk errno.
7203         Simplify code by removing need to compute length; this does
7204         cause it to make two passes instead of one over the file name,
7205         but it's worth it.
7206
7207         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
7208         change, since Autoconf's version may no longer be appropriate now
7209         that we are using CVS Autoconf's version.  Add support for Tandem.
7210
7211 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
7212             Bruno Haible  <bruno@clisp.org>
7213
7214         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
7215         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
7216         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
7217         gl_AC_TYPE_LONG_LONG.
7218
7219         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
7220         instead of HAVE_LONG_LONG.
7221         * lib/printf-args.c (printf_fetchargs): Likewise.
7222         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
7223         * lib/vasnprintf.c (VASNPRINTF): Likewise.
7224         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
7225         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
7226         gl_AC_TYPE_LONG_LONG.
7227
7228 2006-10-11  Bruno Haible  <bruno@clisp.org>
7229
7230         * m4/longlong.m4: Add comments.
7231         * m4/ulonglong.m4: Likewise.
7232
7233 2006-10-10  Bruno Haible  <bruno@clisp.org>
7234
7235         Make it possible to #define stpcpy, strdup to aliases.
7236         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
7237         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
7238
7239 2006-10-10  Bruno Haible  <bruno@clisp.org>
7240
7241         Make it possible to #define gcd to an alias.
7242         * lib/gcd.c: Include config.h.
7243
7244 2006-10-10  Bruno Haible  <bruno@clisp.org>
7245
7246         Make it possible to #define c_isascii to an alias.
7247         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
7248         defined. Undefine the macros before defining them, to avoid gcc
7249         warnings.
7250         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
7251         define NO_C_CTYPE_MACROS early.
7252
7253 2006-10-10  Bruno Haible  <bruno@clisp.org>
7254
7255         Make it possible to #define set_program_name to an alias.
7256         * lib/progname.c: Don't undefine set_program_name; instead, undefine
7257         ENABLE_RELOCATABLE early.
7258
7259 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
7260
7261         Port to Tandem NSK OSS, which has 64-bit signed int but at most
7262         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
7263         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
7264         More generally, don't assume that 64-bit signed int is available
7265         if unsigned int is, and vice versa.
7266         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
7267         unsigned symbols, not on their signed counterparts.
7268         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
7269         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
7270         (UINT64_C, UINTMAX_C):
7271         Likewise.
7272         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
7273         unsigned counterparts.
7274         (Have_long_long, Unsigned): New macros.
7275         (Int): Renamed from INT.
7276         (strtoimax): Use the new macros.
7277         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
7278         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
7279         * modules/inttypes (inttypes.h): Substitute
7280         HAVE_UNSIGNED_LONG_LONG_INT.
7281         * modules/stdint (stdint.h): Likewise.
7282         (Files): Add m4/ulonglong.m4.
7283
7284 2006-10-10  Bruno Haible  <bruno@clisp.org>
7285
7286         Fix a gcc -Wshadow warning.
7287         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
7288         to 'bucket'.
7289         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
7290         gl_linked_indexof_from_to): Likewise.
7291         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
7292         Likewise.
7293         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
7294         Likewise.
7295         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
7296         Reported by Eric Blake.
7297
7298 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
7299
7300         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
7301         for NetBSD.  Problem reported by Bruno Haible.
7302
7303 2006-10-09  Jim Meyering  <jim@meyering.net>
7304
7305         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
7306         Patch from Bruno Haible.
7307
7308 2006-10-09  Jim Meyering  <jim@meyering.net>
7309
7310         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
7311         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
7312         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
7313
7314 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
7315
7316         Don't include <config.h> twice; this doesn't work in some cases,
7317         e.g., when config.h has "#define intmax_t long long int" and
7318         we include <config.h>, <inttypes.h>, <config.h> in that order.
7319         Problem reported by Matthew Woehlke in:
7320         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
7321         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
7322         * lib/fts-cycle.c: Don't include config.h.
7323         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
7324         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
7325         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
7326         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
7327         inttypes.h.
7328         * lib/xstrtoumax.c: Likewise.
7329         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
7330         __strtol and the like, so that this module is more like its siblings.
7331         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
7332         Remove; no longer needed now that we assume gnulib inttypes.h.
7333
7334 2006-10-08  Bruno Haible  <bruno@clisp.org>
7335
7336         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
7337         option.
7338
7339 2006-10-07  Jim Meyering  <jim@meyering.net>
7340
7341         * modules/inttypes (inttypes.h): Revert what seems to have been
7342         an inadvertent part of today's change: use "|", not "/" in the
7343         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
7344
7345 2006-10-07  Bruno Haible  <bruno@clisp.org>
7346
7347         * modules/sublist: New file.
7348
7349 2006-10-07  Bruno Haible  <bruno@clisp.org>
7350
7351         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
7352         * modules/argz (argz.h): Likewise.
7353         * modules/arpa_inet (arpa/inet.h): Likewise.
7354         * modules/byteswap (byteswap.h): Likewise.
7355         * modules/configmake (configmake.h): Likewise.
7356         * modules/fcntl (fcntl.h): Likewise.
7357         * modules/fnmatch (fnmatch.h): Likewise.
7358         * modules/getopt (getopt.h): Likewise.
7359         * modules/glob (glob.h): Likewise.
7360         * modules/inttypes (inttypes.h): Likewise.
7361         * modules/netinet_in (netinet/in.h): Likewise.
7362         * modules/poll (poll.h): Likewise.
7363         * modules/stdbool (stdbool.h): Likewise.
7364         * modules/stdint (stdint.h): Likewise.
7365         * modules/sys_select (sys/select.h): Likewise.
7366         * modules/sys_socket (sys/socket.h): Likewise.
7367         * modules/sys_stat (sys/stat.h): Likewise.
7368         * modules/sysexits (sysexits.h): Likewise.
7369         * modules/unistd (unistd.h): Likewise.
7370         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7371         Add a "DO NOT EDIT" comment to the generated file.
7372         (func_import): Likewise for gnulib-comp.m4.
7373
7374 2006-10-07  Bruno Haible  <bruno@clisp.org>
7375
7376         * lib/gl_sublist.h: New file.
7377         * lib/gl_sublist.c: New file.
7378
7379 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
7380
7381         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
7382         name (relative to the original working directory) and the file
7383         name component (relative to the temporary working directory).  All
7384         callers changed.
7385         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
7386         * lib/mkdir-p.c (make_dir_parents): Likewise.
7387         * lib/mkdir-p.h (make_dir_parents): Likewise.
7388
7389 2006-10-06  Eric Blake  <ebb9@byu.net>
7390
7391         Define several macros for use by the clean-temp module.
7392         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
7393         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
7394         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
7395
7396         * lib/clean-temp.h (close_stream_temp): New declaration.
7397         * lib/clean-temp.c (includes): Pull in headers according to what
7398         other modules are in use.
7399         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
7400
7401 2006-10-06  Bruno Haible  <bruno@clisp.org>
7402
7403         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
7404         instead of fopen, fwriteerror.
7405
7406 2006-10-06  Bruno Haible  <bruno@clisp.org>
7407
7408         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
7409         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
7410         int.
7411         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
7412         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
7413         Return an error indicator.
7414         Suggested by Eric Blake.
7415
7416 2006-10-06  Bruno Haible  <bruno@clisp.org>
7417
7418         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
7419         Reported by Eric Blake.
7420
7421 2006-10-06  Bruno Haible  <bruno@clisp.org>
7422
7423         * modules/closeout (Description): Mention stderr too.
7424
7425 2006-10-06  Bruno Haible  <bruno@clisp.org>
7426         and Paul Eggert  <eggert@cs.ucla.edu>
7427
7428         * lib/closeout.c (close_stdout): Also close stderr.
7429         * lib/closeout.h: Update comment.
7430
7431 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
7432
7433         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
7434         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
7435         * lib/dirchownmod.c: Include lchown.h.
7436         * lib/lchown.c: Don't include files that lchown.h now includes.
7437         Don't declare chown, since lchown.h now does that.
7438         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
7439         (lchown): Define to rpl_chown if lchown is declared but
7440         does not exist.  Declare using a prototype if lchown is not
7441         declared.  Add a copyright notice.
7442         * lib/mkstemp.h: Include <unistd.h>.
7443         * lib/openat.c: Include lchown.h.
7444
7445         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
7446         we now test for that separately.
7447         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
7448         rather than O_NOFOLLOW, when testing whether it's possible to
7449         avoid a race condition reliably.
7450         * lib/savewd.c (savewd_chdir): Likewise.
7451
7452         Remove macros that are no longer needed now that stdint.h is
7453         reliable.
7454         * lib/fsusage.c (UINTMAX_MAX): Remove.
7455         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
7456         * lib/utimecmp.c (SIZE_MAX): Remove.
7457
7458         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
7459
7460         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
7461         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
7462         O_NOATIME works.
7463
7464 2006-10-05  Bruno Haible  <bruno@clisp.org>
7465
7466         * lib/gl_list.h (gl_sortedlist_search_from_to,
7467         gl_sortedlist_indexof_from_to): New declarations.
7468         (gl_list_implementation): New fields sortedlist_search_from_to,
7469         sortedlist_indexof_from_to.
7470         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
7471         inline functions.
7472         * lib/gl_list.c (gl_sortedlist_search_from_to,
7473         gl_sortedlist_indexof_from_to): New functions.
7474         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
7475         function.
7476         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
7477         (gl_array_sortedlist_search_from_to): New function.
7478         (gl_array_list_implementation): Update.
7479         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
7480         function.
7481         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
7482         (gl_carray_sortedlist_search_from_to): New function.
7483         (gl_carray_list_implementation): Update.
7484         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
7485         gl_linked_sortedlist_indexof_from_to): New functions.
7486         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
7487         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
7488         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
7489         gl_tree_sortedlist_indexof_from_to): New functions.
7490         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
7491         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
7492         Update.
7493         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
7494         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
7495         Update.
7496
7497 2006-10-05  Bruno Haible  <bruno@clisp.org>
7498
7499         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
7500         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
7501         (struct gl_list_implementation): Add fields search_from_to,
7502         indexof_from_to. Remove fields search, indexof.
7503         (gl_list_search): Use the search_from_to method.
7504         (gl_list_search_from, gl_list_search_from_to): New functions.
7505         (gl_list_indexof): Use the indexof_from_to method.
7506         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
7507         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
7508         (gl_list_search_from, gl_list_search_from_to): New functions.
7509         (gl_list_indexof): Use the indexof_from_to method.
7510         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
7511         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
7512         gl_array_indexof. Add start_index, end_index arguments.
7513         (gl_array_search_from_to): Renamed from gl_array_search. Add
7514         start_index, end_index arguments.
7515         (gl_array_remove, gl_array_list_implementation): Update.
7516         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
7517         gl_carray_indexof. Add start_index, end_index arguments.
7518         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
7519         start_index, end_index arguments.
7520         (gl_carray_remove, gl_carray_list_implementation): Update.
7521         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
7522         gl_linked_search. Add start_index, end_index arguments.
7523         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
7524         start_index, end_index arguments.
7525         (gl_linked_remove): Update.
7526         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
7527         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
7528         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
7529         field to 'size_t'.
7530         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
7531         gl_tree_search. Add start_index, end_index arguments.
7532         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
7533         start_index, end_index arguments.
7534         (gl_tree_remove): Update.
7535         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
7536         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
7537         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
7538         function.
7539         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
7540         gl_tree_search. Add start_index, end_index arguments.
7541         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
7542         start_index, end_index arguments.
7543         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
7544         Update.
7545         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
7546
7547 2006-10-05  Bruno Haible  <bruno@clisp.org>
7548
7549         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
7550
7551         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
7552         fwriteerror_temp): New declarations.
7553         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
7554         (descriptors): New variable.
7555         (cleanup): First, close the descriptors.
7556         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
7557         fclose_temp, fwriteerror_temp): New functions.
7558
7559 2006-10-04  Jim Meyering  <jim@meyering.net>
7560
7561         * lib/fts.c (fts_open): Tiny comment change.
7562
7563 2006-10-04  Bruno Haible  <bruno@clisp.org>
7564
7565         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
7566         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
7567         gl_LOCK_BODY.
7568         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
7569         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
7570         gl_LOCK_EARLY_BODY.
7571         (gl_LOCK): Require gl_LOCK_BODY.
7572
7573 2006-10-04  Bruno Haible  <bruno@clisp.org>
7574
7575         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
7576         (gl_oset_search_atleast): New declaration.
7577         (struct gl_oset_implementation): Add field 'search_atleast'.
7578         (gl_oset_search_atleast): New inline function.
7579         * lib/gl_oset.c (gl_oset_search_atleast): New function.
7580         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
7581         (gl_array_oset_implementation): Update.
7582         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
7583         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
7584         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
7585
7586 2006-10-04  Bruno Haible  <bruno@clisp.org>
7587
7588         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
7589
7590 2006-10-03  Bruno Haible  <bruno@clisp.org>
7591
7592         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
7593         from gl_avltreehash_list_implementation.
7594
7595 2006-10-03  Bruno Haible  <bruno@clisp.org>
7596
7597         * lib/gl_oset.c (gl_oset_add): Fix return type.
7598
7599 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
7600
7601         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
7602
7603 2006-10-02  Eric Blake  <ebb9@byu.net>
7604
7605         * modules/strnlen (Depends-on): Add extensions.
7606
7607 2006-10-02  Eric Blake  <ebb9@byu.net>
7608
7609         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
7610         definition in 2.60+.
7611
7612 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
7613
7614         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
7615         checks.
7616
7617 2006-10-02  Bruno Haible  <bruno@clisp.org>
7618
7619         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
7620         to the AUTOMAKE_OPTIONS.
7621         Reported by Jim Meyering.
7622
7623 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
7624
7625         Work around bug in Solaris 10 /proc file system:
7626         /proc/self/fd/NNN/.. isn't the parent directory of
7627         the directory whose file descriptor is NNN.  This needs to
7628         be worked around at run time, not compile time, since a
7629         program might be built on Solaris 8, where things work, and
7630         run on Solaris 10.
7631         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
7632         to use the following interface instead:
7633         (OPENAT_BUFFER_SIZE): New macro.
7634         (openat_proc_name): New function.
7635         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
7636         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
7637         Likewise.
7638         * lib/openat-proc.c: New file.
7639         * modules/openat (Files): Add lib/openat-proc.c.
7640         (Depends-on): Add same-inode, stdbool.
7641         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
7642
7643 2006-09-29  Bruno Haible  <bruno@clisp.org>
7644
7645         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
7646         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
7647         argument. Set stdout_closed before testing for ferror, not after.
7648         (fwriteerror, fwriteerror_no_ebadf): New functions.
7649
7650 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7651
7652         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
7653
7654 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
7655
7656         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
7657         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
7658
7659 2006-09-28  Jim Meyering  <jim@meyering.net>
7660
7661         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
7662         Include <unistd.h>.
7663
7664 2006-09-28  Bruno Haible  <bruno@clisp.org>
7665
7666         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
7667         * modules/linkedhash-list (Depends-on): Likewise.
7668         * modules/rbtreehash-list (Depends-on): Likewise.
7669
7670 2006-09-28  Bruno Haible  <bruno@clisp.org>
7671
7672         * lib/strndup.h: Simplify the redefinition of strndup.
7673         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
7674         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
7675
7676 2006-09-28  Bruno Haible  <bruno@clisp.org>
7677
7678         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
7679         * lib/gl_linkedhash_list.c: Likewise.
7680         * lib/gl_rbtreehash_list.c: Likewise.
7681
7682 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
7683
7684         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
7685         getaddrinfo.
7686
7687         * lib/__fpending.h: Don't include <stdio_ext.h> unless
7688         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
7689         it causes <stdio_ext.h> to cause a compile-time error.
7690         Problem reported by Nelson H. F. Beebe.
7691         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
7692         of HAVE_DECL___PENDING.
7693
7694         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
7695         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
7696         declaration.
7697
7698 2006-09-27  Jim Meyering  <jim@meyering.net>
7699
7700         This file could end up with a definition for a function
7701         named __strndup, rather than rpl_strndup on a system with
7702         incomplete weak_alias support.
7703         * lib/strndup.c (strndup): Rename from __strndup.
7704         Remove #defines that used to map __strndup to strndup.
7705         Don't use K&R prototypes.
7706         Remove LIBC-related code, since this file is not sync'd with glibc.
7707         * lib/strndup.h: Revamp, accordingly.
7708         * m4/strndup.m4: Modernize.
7709
7710 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
7711
7712         * modules/savewd (Depends-on): Add 'raise'.
7713         * lib/savewd.c: Include <signal.h>, for 'raise'.
7714
7715 2006-09-26  Jim Meyering  <jim@meyering.net>
7716
7717         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
7718         when we detect Darwin 8.7.0's acl_get_file bug.
7719         Rearrange to perform the new (below) run-test while $LIBS
7720         contains any acl-related library.  Set USE_ACL at the end.
7721         (gl_ACL_GET_FILE): New function.
7722
7723 2006-09-26  Eric Blake  <ebb9@byu.net>
7724
7725         * lib/verror.c: Include <config.h> unconditionally.
7726
7727 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
7728
7729         * modules/clock-time (Maintainer): Add self.
7730         * modules/getlogin_r (Depends-on): Add extensions.
7731
7732 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7733
7734         * modules/clock-time: New module.
7735         * modules/nanosleep (Depends-on): Add clock-time.
7736         * modules/gethrxtime (Depends-on): Likewise.
7737         * modules/gettime (Depends-on): Likewise.
7738         * modules/settime (Depends-on): Likewise.
7739
7740         * modules/fts-lgpl: Depend on openat.
7741         * modules/mkancesdirs: Depend on savewd.
7742         * modules/mkdir-p: Likewise.
7743
7744 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7745
7746         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
7747
7748         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
7749         `gl_have_arbitrary_file_name_length_limit' to
7750         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
7751         actually works between configure runs.
7752
7753 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7754             Bruno Haible  <bruno@clisp.org>
7755
7756         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
7757
7758 2006-09-25  Jim Meyering  <jim@meyering.net>
7759
7760         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
7761         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
7762
7763 2006-09-25  Eric Blake  <ebb9@byu.net>
7764
7765         * gnulib-tool (func_import, func_create_testdir): Fix typos in
7766         exec's in 2006-09-18 patch when shuffling fds.
7767
7768 2006-09-25  Bruno Haible  <bruno@clisp.org>
7769
7770         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
7771         Reported by Jim Meyering.
7772
7773 2006-09-24  Jim Meyering  <jim@meyering.net>
7774
7775         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
7776         compare a pointer against a literal "0".  That caused failures with
7777         at least HP-UX's hpcc.
7778
7779 2006-09-22  Simon Josefsson  <jas@extundo.com>
7780
7781         * modules/gc-sha1:
7782         * modules/gc-md4:
7783         * modules/gc-hmac-sha1:
7784         * modules/gc-hmac-md5:
7785         * modules/gc-des:
7786         * modules/gc-arcfour: Distribute more files.
7787
7788 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7789
7790         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
7791         (gl_linked_iterator_from_to): Initialize struct completely.
7792         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
7793         (gl_tree_iterator_from_to): Likewise
7794         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
7795         * lib/gl_array_list.c [lint] (gl_array_iterator)
7796         (gl_array_iterator_from_to): Likewise.
7797         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
7798         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
7799         (gl_carray_iterator_from_to): Likewise.
7800
7801         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
7802         * lib/md4.c (md4_process_block): Remove unused variable.
7803         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
7804         parentheses for clarity.
7805
7806 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7807
7808         * modules/bison-i18n (Depends-on): Add gettext.
7809
7810 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7811
7812         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
7813         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
7814         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
7815         also add missing comma that caused broken test.
7816         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
7817         stdlib.h, for `abort'.
7818         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
7819         variables.
7820         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
7821         include unistd.h if present, for `rmdir'.
7822         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
7823         variables.
7824         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
7825         in the process include standard headers for prototypes.
7826         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
7827         gets declared on GNU/Linux.
7828         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
7829         unistd.h, for `rmdir'.
7830         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
7831
7832         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
7833         always true.
7834         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
7835
7836         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
7837
7838 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7839
7840         * gnulib-tool (func_version): Create output all at once.  This
7841         may help avoid triggering unnecessary SIGPIPEs, and at any
7842         rate it doesn't hurt.
7843
7844 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7845             Bruno Haible  <bruno@clisp.org>
7846
7847         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
7848         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
7849         * m4/signed.m4 (bh_C_SIGNED): Likewise.
7850
7851         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
7852         (gl_FUNC_VASPRINTF): Invoke it.
7853
7854 2006-09-22  Bruno Haible  <bruno@clisp.org>
7855
7856         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
7857         getloadavg.c as first argument.
7858
7859 2006-09-22  Bruno Haible  <bruno@clisp.org>
7860
7861         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
7862         at the beginning of the gl_INIT macro.
7863         * modules/getloadavg (configure.ac): Pass $gl_source_base to
7864         gl_GETLOADAVG.
7865
7866 2006-09-22  Bruno Haible  <bruno@clisp.org>
7867
7868         * gnulib-tool (func_create_megatestdir): Don't include the config-h
7869         module.
7870         Suggested by Ralf Wildenhues.
7871
7872 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
7873
7874         Import this patch from libc:
7875
7876         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
7877
7878         * lib/regex_internal.c (re_string_reconstruct): Handle
7879         offset < pstr->valid_raw_len && pstr->offsets_needed case.
7880         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
7881         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
7882         re_string_context_at.
7883
7884         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
7885         now requires it.
7886         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
7887         gl_REGEX now does it for us.
7888         (gl_REGEX): Add test taken from
7889         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
7890
7891         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
7892         Check that large offsets work.  Modernize Autoconf usages.
7893         Prefer "yes" to mean a good thing rather than a bad.
7894         Don't put "#define mkstemp" in config.h, as this might interfere
7895         with standard system headers that "#define mkstemp mkstemp64".
7896
7897         * modules/mkstemp (Depends-on): Add extensions, so that
7898         mkstemp is visible on some platforms.
7899         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
7900         (Include): Change to "mkstemp.h" from <stdlib.h>.
7901         (Files): Add mkstemp.h.
7902
7903         * lib/mkstemp.h: New file, since some standard headers
7904         #define mkstemp.
7905         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
7906         Include "mkstemp.h".
7907         Make the _LIBC code resemble glibc original more,
7908         e.g., use K&R style.
7909         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
7910         (mkstemp): Remove, since mkstemp.h does this for us.
7911         * lib/stdlib--.h: Include mkstemp.h.
7912
7913         Import this patch from libc:
7914
7915         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
7916
7917         * lib/tempname.c (__gen_tempname): Change attempts_min
7918         into a macro.  Use preprocessor to decide how to initialize
7919         attempts [Coverity CID 67].
7920
7921 2006-09-20  Bruno Haible  <bruno@clisp.org>
7922
7923         * lib/mkdtemp.c: Import from libc.
7924         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
7925                 * sysdeps/posix/tempname.c (__gen_tempname): Change
7926                 attempts_min into a macro.  Use preprocessor to decide how to
7927                 initialize attempts [Coverity CID 67].
7928         2001-11-27  Paul Eggert  <eggert@twinsun.com>
7929                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
7930                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
7931
7932 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7933
7934         * gnulib-tool (func_exit): New function, to allow to pass the
7935         exit status portably through the trap.  Use everywhere.
7936         (--help, --version): Signal a write error.
7937         (trap): catch SIGPIPE, for write errors.
7938         Exit at the end of the trap, with the correct exit status.
7939
7940 2006-09-19  Karl Berry  <karl@gnu.org>
7941
7942         * doc/gnulib.texi: note about the license texinfo files.
7943
7944 2006-09-19  Eric Blake  <ebb9@byu.net>
7945
7946         * gnulib-tool: Avoid space-tab.
7947
7948 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
7949
7950         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
7951         that prevented coreutils 6.1 from building.  Problem reported
7952         by Petter Reinholdtsen.
7953
7954 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
7955
7956         * gnulib-tool (avoidlist): Fix typo that broke options like
7957         --avoid=lock that are used by coreutils bootstrap.
7958
7959 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
7960
7961         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
7962         more systematically.
7963
7964 2006-09-18  Jim Meyering  <jim@meyering.net>
7965
7966         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
7967
7968 2006-09-18  Bruno Haible  <bruno@clisp.org>
7969
7970         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
7971
7972 2006-09-18  Bruno Haible  <bruno@clisp.org>
7973
7974         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
7975         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
7976         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
7977         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
7978         * m4/gettext.m4: Require autoconf >= 2.52.
7979         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
7980         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
7981         of gl_cv_header_inttypes_h.
7982
7983 2006-09-18  Bruno Haible  <bruno@clisp.org>
7984
7985         * lib/javaversion.c: Include configmake.h.
7986
7987 2006-09-18  Bruno Haible  <bruno@clisp.org>
7988
7989         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
7990         avoid that the while loops be executed in a subshell.
7991
7992 2006-09-18  Bruno Haible  <bruno@clisp.org>
7993
7994         * MODULES.html.sh (func_module): Break long lines.
7995         Suggested by Bruce Korb <bkorb@gnu.org>.
7996
7997 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7998
7999         Speed up by a factor of 1.12.
8000         * gnulib-tool (nl): New variable.
8001         (func_import): Rewrite include directive extraction to only read each
8002         directive once.
8003
8004 2006-09-17  Bruno Haible  <bruno@clisp.org>
8005
8006         * modules/javaversion (Makefile.am): Remove DEFS setting.
8007         (Depends-on): Add configmake, for PKGDATADIR definition.
8008
8009 2006-09-17  Bruno Haible  <bruno@clisp.org>
8010
8011         * gnulib-tool (func_create_testdir): Rewrite all files at once.
8012
8013 2006-09-17  Bruno Haible  <bruno@clisp.org>
8014
8015         * gnulib-tool (func_append): New function, stolen from libtool.m4.
8016         (func_modules_transitive_closure, func_modules_add_dummy,
8017         func_modules_to_filelist, func_import, func_create_testdir,
8018         func_create_megatestdir, ...): Use it wherever possible.
8019         Suggested by Ralf Wildenhues.
8020
8021 2006-09-16  Karl Berry  <karl@gnu.org>
8022
8023         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
8024         to avoid sectioning errors.
8025         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
8026         [ifinfo]: blank line after @center-ed titles.
8027         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
8028         Spell FSF address consistently with others.
8029         (These changes approved by rms.)
8030
8031 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8032
8033         Speed up by a factor of 1.61.
8034         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
8035         already checked module names again.
8036
8037 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8038
8039         Speed up by a factor of 1.13.
8040         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
8041         for new_files, and the input to func_add_or_update.
8042
8043 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8044
8045         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
8046         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
8047
8048 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
8049
8050         * modules/mkancesdirs (Depends-on): Add fcntl.
8051         * modules/savewd: New file.
8052         * MODULES.html.sh (File system functions): Add savewd.
8053
8054         * modules/configmake (Makefile.am): Add support for the
8055         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
8056
8057 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
8058
8059         * m4/savewd.m4: New file.
8060
8061 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
8062
8063         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
8064         (dirchownmod): New arg FD.  All callers changed.
8065         Use FD rather than opening the directory ourself, as opening is
8066         now the caller's responsibility.
8067         * lib/dirchownmod.h: Likewise.
8068         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
8069         hosts that require <sys/types.h> before <sys/stat.h>.  Include
8070         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
8071         (test_dir): Remove.
8072         (mkancesdirs): Return length of prefix of FILE that has already
8073         been made, or -2 if there is a child doing the work.  Redo
8074         algorithm so that it is O(N) rather than O(N**2).  Optimize away
8075         ".", and treat ".." specially since it might stray back into
8076         already-created areas.  Use a subprocess if necessary.  New arg
8077         WD; all users changed.  MAKE_DIR function should now return 1
8078         if it creates a directory that is not readable.  Return -2 if
8079         a child process is spun off.
8080         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
8081         Adjust signature to match code.
8082         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
8083         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
8084         all users changed.
8085         * lib/savewd.c, lib/savewd.h: New files.
8086
8087 2006-09-15  Jim Meyering  <jim@meyering.net>
8088
8089         * modules/rename-dest-slash: New module.
8090         * MODULES.html.sh (posix_compat): Add it here.
8091
8092         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
8093
8094 2006-09-15  Jim Meyering  <jim@meyering.net>
8095
8096         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
8097         file.
8098
8099         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
8100
8101 2006-09-15  Jim Meyering  <jim@meyering.net>
8102
8103         * lib/rename-dest-slash.c (has_trailing_slash): Use
8104         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
8105         (rpl_rename_dest_slash): Perform the cheaper trailing slash
8106         test before testing whether SRC is a directory.
8107         Suggestions from Bruno Haible.
8108
8109         Avoid a warning about an unused variable.
8110         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
8111         into the #ifdef block where it's used.
8112
8113         * lib/rename-dest-slash.c: New file.
8114
8115 2006-09-14  Bruno Haible  <bruno@clisp.org>
8116
8117         * lib/allocsa.c: Include <config.h> unconditionally.
8118         * lib/asnprintf.c: Likewise.
8119         * lib/asprintf.c: Likewise.
8120         * lib/c-strcasecmp.c: Likewise.
8121         * lib/c-strcasestr.c: Likewise.
8122         * lib/c-strncasecmp.c: Likewise.
8123         * lib/c-strstr.c: Likewise.
8124         * lib/classpath.c: Likewise.
8125         * lib/clean-temp.c: Likewise.
8126         * lib/concatpath.c: Likewise.
8127         * lib/copy-file.c: Likewise.
8128         * lib/csharpcomp.c: Likewise.
8129         * lib/csharpexec.c: Likewise.
8130         * lib/execute.c: Likewise.
8131         * lib/fatal-signal.c: Likewise.
8132         * lib/findprog.c: Likewise.
8133         * lib/fwriteerror.c: Likewise.
8134         * lib/gl_array_list.c: Likewise.
8135         * lib/gl_array_oset.c: Likewise.
8136         * lib/gl_avltree_list.c: Likewise.
8137         * lib/gl_avltree_oset.c: Likewise.
8138         * lib/gl_avltreehash_list.c: Likewise.
8139         * lib/gl_carray_list.c: Likewise.
8140         * lib/gl_linked_list.c: Likewise.
8141         * lib/gl_linkedhash_list.c: Likewise.
8142         * lib/gl_list.c: Likewise.
8143         * lib/gl_oset.c: Likewise.
8144         * lib/gl_rbtree_list.c: Likewise.
8145         * lib/gl_rbtree_oset.c: Likewise.
8146         * lib/gl_rbtreehash_list.c: Likewise.
8147         * lib/imaxabs.c: Likewise.
8148         * lib/imaxdiv.c: Likewise.
8149         * lib/javacomp.c: Likewise.
8150         * lib/javaexec.c: Likewise.
8151         * lib/javaversion.c: Likewise.
8152         * lib/linebreak.c: Likewise.
8153         * lib/localcharset.c: Likewise.
8154         * lib/lock.c: Likewise.
8155         * lib/mbchar.c: Likewise.
8156         * lib/mbswidth.c: Likewise.
8157         * lib/mkdtemp.c: Likewise.
8158         * lib/pipe.c: Likewise.
8159         * lib/printf-args.c: Likewise.
8160         * lib/printf-parse.c: Likewise.
8161         * lib/progname.c: Likewise.
8162         * lib/progreloc.c: Likewise.
8163         * lib/readlink.c: Likewise.
8164         * lib/sh-quote.c: Likewise.
8165         * lib/stpcpy.c: Likewise.
8166         * lib/stpncpy.c: Likewise.
8167         * lib/strcasecmp.c: Likewise.
8168         * lib/strcasestr.c: Likewise.
8169         * lib/strcspn.c: Likewise.
8170         * lib/striconv.c: Likewise.
8171         * lib/strncasecmp.c: Likewise.
8172         * lib/strnlen1.c: Likewise.
8173         * lib/strstr.c: Likewise.
8174         * lib/strtok_r.c: Likewise.
8175         * lib/tls.c: Likewise.
8176         * lib/tmpdir.c: Likewise.
8177         * lib/unicodeio.c: Likewise.
8178         * lib/unsetenv.c: Likewise.
8179         * lib/vasnprintf.c: Likewise.
8180         * lib/vasprintf.c: Likewise.
8181         * lib/wait-process.c: Likewise.
8182         * lib/xallocsa.c: Likewise.
8183         * lib/xsetenv.c: Likewise.
8184         * lib/xstriconv.c: Likewise.
8185
8186 2006-09-13  Simon Josefsson  <jas@extundo.com>
8187
8188         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
8189         that internally, suggested by Ralf Wildenhues
8190         <Ralf.Wildenhues@gmx.de>.
8191
8192 2006-09-13  Simon Josefsson  <jas@extundo.com>
8193
8194         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
8195         @LIBOBJS@.
8196         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8197
8198 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
8199
8200         * lib/_fpending.c: Include <config.h> unconditionally, since we no
8201         longer worry about uses that don't define HAVE_CONFIG_H.
8202         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
8203         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
8204         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
8205         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
8206         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
8207         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
8208         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
8209         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
8210         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
8211         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
8212         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
8213         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
8214         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
8215         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
8216         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
8217         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
8218         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
8219         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
8220         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
8221         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
8222         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
8223         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
8224         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
8225         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
8226         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
8227         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
8228         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
8229         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
8230         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
8231         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
8232         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
8233         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
8234         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
8235         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
8236         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
8237         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
8238         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
8239         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
8240         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
8241         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
8242         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
8243         Likewise.
8244
8245 2006-09-13  Eric Blake  <ebb9@byu.net>
8246
8247         * lib/getopt.c: Fix typo in last commit.
8248
8249 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
8250
8251         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
8252         dgettext.
8253
8254 2006-09-12  Jim Meyering  <jim@meyering.net>
8255
8256         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
8257         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
8258         Reported by Nelson H. F. Beebe.
8259
8260 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8261
8262         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
8263         program_invocation_name and program_invocation_short_name are
8264         initialized.
8265         * lib/argp-namefrob.h: Move declarations of program_invocation_name
8266         and program_invocation_short_name to argp.h, so they are visible
8267         to user programs.
8268         * lib/argp.h: Likewise
8269
8270 2006-09-10  Bruno Haible  <bruno@clisp.org>
8271
8272         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
8273         m4/inttypes_h.m4, m4/uintmax_t.m4.
8274
8275 2006-09-10  Bruno Haible  <bruno@clisp.org>
8276
8277         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
8278         gl_AC_TYPE_UINTMAX_T.
8279
8280 2006-09-10  Bruno Haible  <bruno@clisp.org>
8281
8282         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
8283
8284 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8285
8286         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
8287         convention.  Text proposed by Bruno Haible.
8288         (struct argp_option): Document the use of N_() wrappers.
8289
8290         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
8291         '\v', and translate the two parts separately, instead of feeding
8292         the whole string to gettext.  This allows to exclude
8293         '\v' from the strings visible to the translator by writing doc
8294         strings as N_("..") "\v" N_("..").
8295
8296 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
8297
8298         * config/srclist.txt: Undo latest change; the bug was fixed.
8299
8300 2006-09-09  Bruno Haible  <bruno@clisp.org>
8301
8302         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
8303         assignments if building a library without libtool.
8304         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
8305         in func_emit_lib_Makefile_am.
8306         (func_import): When building a static library libfoo.a, arrange to
8307         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
8308         (func_create_testdir): Likewise.
8309         * modules/gc (configure.ac, Makefile.am): If building statically,
8310         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
8311         * modules/iconvme (configure.ac, Makefile.am): Likewise.
8312         * modules/striconv (configure.ac, Makefile.am): Likewise.
8313         Based on a suggestion by Ralf Wildenhues.
8314
8315 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8316
8317         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
8318         Check for unistd.h too, since Autoconf doesn't assume POSIX.
8319         Also:
8320
8321         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8322         Add year_2050_test to catch glibc bug 2821
8323         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
8324
8325         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8326         Prefer #ifdef to #if.
8327
8328         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
8329         Return from 'main' instead of calling 'exit'.
8330
8331 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8332
8333         * lib/mktime.c (guess_time_tm): Fix bug where mktime
8334         returned the maximum time_t value rather than (time_t) -1.
8335         Problem originally reported by William Bardwell
8336         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
8337
8338         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
8339         Moved to here ...
8340         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
8341         ... from here.
8342
8343 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8344
8345         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
8346         2821 is fixed.
8347
8348 2006-09-08  Jim Meyering  <jim@meyering.net>
8349
8350         Don't make generated files read-only.  That would bother too many
8351         people.  However, do retain the ability to work when targets are
8352         read-only: remove the destination and temporary files before writing
8353         them (when generated via sed or echo), or by using the -f option for
8354         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
8355         * modules/alloca-opt, modules/argz, modules/arpa_inet:
8356         * modules/byteswap, modules/configmake, modules/fcntl:
8357         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
8358         * modules/localcharset, modules/netinet_in, modules/poll:
8359         * modules/stdbool, modules/stdint, modules/sys_select:
8360         * modules/sys_socket, modules/sys_stat, modules/sysexits:
8361
8362 2006-09-08  Jim Meyering  <jim@meyering.net>
8363
8364         Avoid new build failure on FreeBSD 6.0.
8365         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
8366         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
8367         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
8368
8369 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8370
8371         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
8372
8373 2006-09-07  Jim Meyering  <jim@meyering.net>
8374
8375         Fix global typo in last change: use chmod u-w, not chmod u-x.
8376         Spotted by Paul Eggert and Bruce Korb.
8377         * modules/alloca-opt, modules/argz, modules/arpa_inet:
8378         * modules/byteswap, modules/configmake, modules/fcntl:
8379         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
8380         * modules/localcharset, modules/netinet_in, modules/poll:
8381         * modules/stdbool, modules/stdint, modules/sys_select:
8382         * modules/sys_socket, modules/sys_stat, modules/sysexits:
8383
8384 2006-09-06  Jim Meyering  <jim@meyering.net>
8385
8386         Make generated files be read-only.
8387         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
8388         Ensure that each generated file is now read-only.
8389         * modules/argz: Likewise.
8390         * modules/arpa_inet: Likewise.
8391         * modules/byteswap: Likewise.
8392         * modules/configmake: Likewise.
8393         * modules/fcntl: Likewise.
8394         * modules/fnmatch: Likewise.
8395         * modules/getopt: Likewise.
8396         * modules/glob: Likewise.
8397         * modules/inttypes: Likewise.
8398         * modules/netinet_in: Likewise.
8399         * modules/poll: Likewise.
8400         * modules/stdbool: Likewise.
8401         * modules/stdint: Likewise.
8402         * modules/sys_select: Likewise.
8403         * modules/sys_socket: Likewise.
8404         * modules/sys_stat: Likewise.
8405         * modules/sysexits: Likewise.
8406         * modules/localcharset: Same as above, but continue using temporary
8407         file named "t-$@" (why different?) rather than the "$@-t" used
8408         everywhere else.
8409
8410         * modules/sysexits (Makefile.am): Replace literal occurrences
8411         of "sysexit.h" more readable, and more consistent, "$@".
8412
8413 2006-09-06  Bruno Haible  <bruno@clisp.org>
8414
8415         * modules/striconv: New file.
8416         * modules/xstriconv: New file.
8417         * MODULES.html.sh (Internationalization functions): Add striconv,
8418         xstriconv.
8419
8420 2006-09-06  Bruno Haible  <bruno@clisp.org>
8421
8422         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
8423         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
8424         not using libtool correctly.
8425
8426 2006-09-06  Bruno Haible  <bruno@clisp.org>
8427
8428         * lib/striconv.h: New file.
8429         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
8430         iconvstring.c.
8431         * lib/xstriconv.h: New file.
8432         * lib/xstriconv.c: New file.
8433
8434 2006-09-06  Bruno Haible  <bruno@clisp.org>
8435
8436         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8437         lib_..._LDFLAGS.
8438
8439 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8440
8441         * lib/argz_.h: Sync from Libtool.
8442
8443         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
8444                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8445
8446         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
8447
8448 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
8449
8450         * modules/trim: New file.
8451
8452 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
8453
8454         * lib/trim.h: New file.
8455         * lib/trim.c: New file.
8456
8457 2006-09-05  Bruno Haible  <bruno@clisp.org>
8458
8459         * MODULES.html.sh (String handling): Add trim.
8460
8461 2006-09-04  Karl Berry  <karl@gnu.org>
8462
8463         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
8464         until next release.
8465
8466 2006-09-03  Bruno Haible  <bruno@clisp.org>
8467
8468         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
8469         correctly.
8470
8471 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8472
8473         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
8474         not gl_GETLOADAVG.  Omit unneeded semicolons.
8475         Problems reported by Ralf Wildenhues in
8476         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
8477         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
8478         at the end, which is the usual gnulib style.
8479
8480         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
8481         of doing all the work ourselves.
8482         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
8483         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
8484
8485 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8486
8487         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
8488         Problem reported by Ralf Wildenhues in
8489         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
8490
8491         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
8492         HAVE_STRUCT_STATFS_F_FSTYPENAME.
8493
8494 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8495
8496         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
8497         yesterday's patch by changing test -n to test -z.
8498
8499 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8500
8501         * modules/getloadavg (Files): Add m4/getloadavg.m4.
8502         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
8503         the former is now obsolescent.
8504
8505         * modules/chdir-long (Depends-on): Add fcntl.
8506
8507 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8508
8509         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
8510         obsolescent, and programs should use gnulib instead.
8511         * m4/getloadavg.m4: New file, with contents taken from Autoconf
8512         but with prefixes changed.
8513
8514 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8515
8516         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
8517         or stdbool.h, because they might not exist while configuring.
8518
8519         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
8520         Don't include unistd.h or limits.h; not needed, since chdir-long.h
8521         does that for us.
8522         (O_DIRECTORY): Remove.
8523
8524 2006-08-31  Eric Blake  <ebb9@byu.net>
8525
8526         * gnulib-tool: Don't let emacs change spaces to TAB.
8527
8528 2006-08-31  Bruno Haible  <bruno@clisp.org>
8529
8530         * gnulib-tool: When calling func_import more than once, do it in a
8531         subshell.
8532         Reported by Eric Blake <ebb9@byu.net>.
8533
8534 2006-08-31  Bruno Haible  <bruno@clisp.org>
8535
8536         * gnulib-tool (nl): Remove variable.
8537         (sed_transform_lib_file): Use more robust test for config-h module.
8538         (func_import): Fix typo in 2006-08-25 patch.
8539
8540 2006-08-31  Bruno Haible  <bruno@clisp.org>
8541
8542         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
8543         specified, augment Makefile.am variables instead of assigning them.
8544
8545 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
8546
8547         Work around a bug in both the Linux and SunOS 64-bit kernels:
8548         nanosleep mishandles sleeps for longer than 2**31 seconds.
8549         Problem reported by Frank v Waveren in
8550         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
8551         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
8552         Check for nanosleep bug.
8553         (LIB_NANOSLEEP): Append clock_gettime library if needed.
8554
8555 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
8556
8557         Work around a bug in both the Linux and SunOS 64-bit kernels:
8558         nanosleep mishandles sleeps for longer than 2**31 seconds.
8559         Problem reported by Frank v Waveren in
8560         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
8561         * lib/nanosleep.c (BILLION): New constant.
8562         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
8563         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
8564         implementation.
8565
8566 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
8567
8568         * modules/nanosleep (Depends-on): Add gettime.
8569
8570 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
8571         and Simon Josefsson  <jas@extundo.com>
8572         and Oskar Liljeblad  <oskar@osk.mine.nu>
8573
8574         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
8575         * gnulib-tool (func_import): New license type 'unmodifiable license
8576         text'.
8577         * modules/fdl: Use it.  Longer description.
8578         * module/gpl, module/lgpl: New files.
8579
8580 2006-08-30  Jim Meyering  <jim@meyering.net>
8581
8582         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
8583         shadowing the parameter.
8584
8585 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8586
8587         Sync from Libtool:
8588
8589         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8590
8591         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
8592         sharing with gnulib.  Report by Eric Blake.
8593
8594 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
8595
8596         * modules/isapipe: New file.
8597         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
8598
8599 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
8600
8601         * modules/configmake (Makefile.am): Add a comment, and omit
8602         the CONFIGMAKE_ prefix from generated macro names.  Suggested
8603         by Bruno Haible.
8604
8605 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
8606
8607         * m4/isapipe.m4: New file.
8608
8609 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
8610
8611         * lib/isapipe.c, lib/isapipe.h: New files.
8612
8613 2006-08-29  Jim Meyering  <jim@meyering.net>
8614
8615         * modules/configmake (Makefile.am): Make configmake.h depend on
8616         Makefile.  Otherwise, a stale configmake.h could hang around.
8617
8618 2006-08-29  Eric Blake  <ebb9@byu.net>
8619
8620         * lib/error.c (error_at_line, print_errno_message): Match libc, after
8621         resolution of upstream bug 3044.
8622
8623 2006-08-29  Bruno Haible  <bruno@clisp.org>
8624
8625         * modules/localcharset (Depends-on): Add configmake.
8626         (Makefile.am): Remove setting of LIBDIR through DEFS.
8627
8628 2006-08-29  Bruno Haible  <bruno@clisp.org>
8629
8630         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
8631         defined.
8632
8633 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
8634
8635         * modules/fcntl: New file.
8636         * modules/chdir-safer (Depends-on): Add fcntl.
8637         * modules/fts: Likewise.
8638         * modules/mkdir-p: Likewise.
8639
8640         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
8641         This undoes the most recent change, since we're now addressing the
8642         problem in a different way.
8643
8644         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
8645         into output, since the output might be called Makefile.am even
8646         if $makefile_name is something different.
8647         (func_import): Use $makefile_am rather than
8648         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
8649         empty.
8650
8651         * modules/inttypes (Files): Add m4/inttypes-h.m4.
8652
8653 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
8654
8655         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
8656         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
8657         recent change to stdint.m4, since we're now addressing the problem in a
8658         different way.
8659
8660 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
8661
8662         * m4/fcntl_h.m4: New file.
8663
8664 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
8665
8666         * lib/fcntl_.h: New file.
8667         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
8668         the fcntl module.
8669         * lib/dirchownmod.c: Likewise.
8670         * lib/fts.c: Likewise.
8671
8672         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
8673         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
8674         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
8675         just before including <inttypes.h>, to avoid circular inclusion.
8676
8677 2006-08-28  Jim Meyering  <jim@meyering.net>
8678
8679         * doc/visibility.texi: Actually read and correct the grammar of the
8680         sentence affected by yesterday's change.
8681
8682 2006-08-28  Eric Blake  <ebb9@byu.net>
8683
8684         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
8685         needs wrapper.
8686
8687 2006-08-28  Eric Blake  <ebb9@byu.net>
8688
8689         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
8690
8691 2006-08-28  Eric Blake  <ebb9@byu.net>
8692
8693         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
8694
8695 2006-08-28  Bruno Haible  <bruno@clisp.org>
8696
8697         * modules/c-strstr: New file, from GNU gettext.
8698         * MODULES.html.sh (String handling): Add c-strstr.
8699
8700 2006-08-28  Bruno Haible  <bruno@clisp.org>
8701
8702         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
8703         macros.
8704         Reported by Eric Blake.
8705
8706 2006-08-28  Bruno Haible  <bruno@clisp.org>
8707
8708         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
8709         (VASNPRINTF): Return a string of length > INT_MAX without failing.
8710         * lib/vasprintf.c: Include errno.h, limits.h.
8711         (EOVERFLOW): New fallback definition.
8712         (vasprintf): Test here whether the string length is > INT_MAX.
8713         * lib/vsnprintf.c: Include errno.h, limits.h.
8714         (EOVERFLOW): New fallback definition.
8715         (vsnprintf): Fix bug when generated string was too long for the buffer.
8716         Test here whether the string length is > INT_MAX.
8717
8718 2006-08-28  Bruno Haible  <bruno@clisp.org>
8719
8720         * lib/inttypes_.h (SCNX*): Remove definitions.
8721         Reported by Eric Blake.
8722
8723 2006-08-28  Bruno Haible  <bruno@clisp.org>
8724
8725         * lib/c-strstr.h: New file, from GNU gettext.
8726         * lib/c-strstr.c: New file, from GNU gettext.
8727
8728 2006-08-28  Bruno Haible  <bruno@clisp.org>
8729
8730         * gnulib-tool: Reorder some statements.
8731
8732 2006-08-28  Bruno Haible  <bruno@clisp.org>
8733
8734         * gnulib-tool: New option --makefile-name.
8735         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
8736         $makefile_name.
8737         (func_import): Write $makefile_name to the cache file, and read it from
8738         there unless explicitly specified. Use $makefile_name as file name
8739         instead of Makefile.am. Adjust the recommendations accordingly.
8740
8741 2006-08-28  Bruno Haible  <bruno@clisp.org>
8742
8743         * gnulib-tool (func_verify_module): Check against misapplying patch.
8744
8745 2006-08-28  Bruno Haible  <bruno@clisp.org>
8746
8747         * gnulib-tool (func_relativize, func_relconcat): New functions.
8748         Give an error if --local-dir is given with --update.
8749         Remove trailing slashes from $local_gnulib_dir.
8750         (func_import): Store the relativized $local_gnulib_dir in
8751         gnulib-cache.m4, and read it from there if not specified explicitly.
8752
8753 2006-08-28  Bruno Haible  <bruno@clisp.org>
8754
8755         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
8756         is the current directory. Respect also $local_gnulib_dir.
8757
8758 2006-08-28  Bruno Haible  <bruno@clisp.org>
8759             Simon Josefsson  <jas@extundo.com>
8760
8761         BeOS portability.
8762         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
8763
8764 2006-08-27  Jim Meyering  <jim@meyering.net>
8765
8766         * doc/visibility.texi: Remove duplicate word: "pointer".
8767
8768 2006-08-26  Bruno Haible  <bruno@clisp.org>
8769
8770         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
8771         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
8772         (Makefile.am): Create inttypes.h from inttypes_.h.
8773         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
8774
8775         * modules/imaxabs: New file.
8776
8777         * modules/imaxdiv: New file.
8778
8779 2006-08-26  Bruno Haible  <bruno@clisp.org>
8780
8781         * m4/inttypes.m4: New file.
8782         * m4/_inttypes_h.m4: Remove file.
8783         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
8784         PRI_MACROS_BROKEN.
8785         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
8786
8787         * m4/imaxabs.m4: New file.
8788
8789         * m4/imaxdiv.m4: New file.
8790
8791 2006-08-26  Bruno Haible  <bruno@clisp.org>
8792
8793         * lib/inttypes_.h: New file.
8794         * lib/inttypes.h: Remove file.
8795         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
8796
8797         * lib/imaxabs.c: New file.
8798
8799         * lib/imaxdiv.c: New file.
8800
8801 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
8802
8803         New config-h module, so that "make" output needn't be cluttered
8804         by -DHAVE_CONFIG_H.
8805         * MODULES.html.sh (Support for building libraries and executables):
8806         Add config-h.
8807         * modules/config-h: New file.
8808         * gnulib-tool (nl, sed_transform_lib_file): New vars.
8809         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
8810         the config-h module is used.
8811
8812         New configmake module, so that "make" output needn't be cluttered
8813         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
8814         * MODULES.html.sh (Support for building libraries and executables):
8815         Add configmake.
8816         * modules/configmake: New file.
8817
8818 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
8819
8820         * m4/config-h.m4: New file.
8821
8822 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
8823
8824         * config/srclist.txt: Add elisp-comp.
8825
8826 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
8827
8828         * MODULES.html.sh (Support for building libraries and executables):
8829         Add elisp-comp.
8830         * build-aux/elisp-comp: New file.
8831         * modules/elisp-comp: New file.
8832
8833 2006-08-24  Bruno Haible  <bruno@clisp.org>
8834
8835         * gnulib-tool (func_create_testdir): Use non-default values of
8836         sourcebase and m4base.
8837
8838 2006-08-24  Bruno Haible  <bruno@clisp.org>
8839
8840         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
8841         HTML structure.
8842
8843 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
8844
8845         * modules/openat (Depends-on): Add lchown.
8846
8847 2006-08-23  Bruno Haible  <bruno@clisp.org>
8848
8849         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
8850         of gl_LOCK_EARLY instead of gl_LOCK.
8851
8852 2006-08-23  Bruno Haible  <bruno@clisp.org>
8853
8854         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
8855         on OSF/1 to no.
8856         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
8857
8858 2006-08-23  Bruno Haible  <bruno@clisp.org>
8859
8860         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
8861         as unusable.
8862
8863         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
8864         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
8865         (gl_LOCK): New macro.
8866
8867 2006-08-22  Simon Josefsson  <jas@extundo.com>
8868
8869         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
8870         to md5 module.
8871
8872 2006-08-22  Simon Josefsson  <jas@extundo.com>
8873
8874         * MODULES.html.sh: Add "Support for maintaining and release
8875         projects".
8876
8877         * build-aux/gnupload: New file, from coreutils.
8878
8879 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
8880
8881         Avoid the need for AC_LIBSOURCES in m4 macros.
8882         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
8883         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
8884         * modules/check-version (EXTRA_DIST): Add check-version.h.
8885         * modules/crc (EXTRA_DIST): Add crc.h.
8886         * modules/des (EXTRA_DIST): Add des.h.
8887         * modules/gc (EXTRA_DIST): Add gc.h.
8888         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
8889         * modules/getline (EXTRA_DIST): Add getline.h.
8890         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
8891         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
8892         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
8893         * modules/md2 (EXTRA_DIST): Add md2.h.
8894         * modules/md4 (EXTRA_DIST): Add md4.h.
8895         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
8896         * modules/read-file (EXTRA_DIST): Add read-file.h.
8897         * modules/readline (EXTRA_DIST): Add readline.h.
8898         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
8899         rijndael-api-fst.h.
8900
8901 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
8902
8903         * m4/rijndael.m4 (gl_ARCFOUR):
8904         * m4/arctwo.m4 (gl_ARCTWO):
8905         * m4/check-version.m4 (gl_CHECK_VERSION):
8906         * m4/crc.m4 (gl_CRC):
8907         * m4/des.m4 (gl_DES):
8908         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
8909         * m4/gc.m4 (gl_GC):
8910         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
8911         * m4/getline.m4 (gl_FUNC_GETLINE):
8912         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
8913         * m4/hmac-md5.m4 (gl_HMAC_MD5):
8914         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
8915         * m4/md2.m4 (gl_MD2):
8916         * m4/md4.m4 (gl_MD4):
8917         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
8918         * m4/read-file.m4 (gl_FUNC_READ_FILE):
8919         * m4/readline.m4 (gl_FUNC_READLINE):
8920         * m4/rijndael.m4 (gl_RIJNDAEL):
8921         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
8922         to get the necessary .h files and whatnot.
8923
8924 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
8925
8926         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
8927         gnulib rather than the other way around.
8928         * config/srclistvars.sh (COREUTILS): Remove.
8929
8930 2006-08-22  Jim Meyering  <jim@meyering.net>
8931
8932         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
8933
8934         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
8935
8936 2006-08-22  Eric Blake  <ebb9@byu.net>
8937
8938         * modules/regexprops-generic: New file.
8939         * MODULES.html.sh (Support for building documentation): List it.
8940
8941 2006-08-22  Eric Blake  <ebb9@byu.net>
8942
8943         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
8944         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
8945         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
8946         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
8947
8948 2006-08-22  Bruno Haible  <bruno@clisp.org>
8949
8950         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
8951         and lib_LTLIBRARIES like the other lib_* variables.
8952
8953 2006-08-22  Bruno Haible  <bruno@clisp.org>
8954
8955         * build-aux/x-to-1.in: New file, from GNU gettext.
8956
8957 2006-08-22  Bruno Haible  <bruno@clisp.org>
8958
8959         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
8960         <utmpx.h> exists.
8961
8962 2006-08-22  Bruno Haible  <bruno@clisp.org>
8963
8964         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
8965         <utmpx.h> exists.
8966
8967 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
8968
8969         BeOS portability.
8970         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
8971         exist.
8972         Problem reported by Bruno Haible.
8973
8974 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
8975
8976         Avoid the need for AC_LIBSOURCES in m4 macros.
8977         * modules/acl (EXTRA_DIST): Add acl.h.
8978         * modules/argmatch (Files): Add m4/argmatch.m4.
8979         (configure.ac): Add gl_ARGMATCH.
8980         (EXTRA_DIST): Renamed from lib_SOURCES, for
8981         consistency with the other modules.  Remove argmatch.c.
8982         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
8983         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
8984         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
8985         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
8986         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
8987         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
8988         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
8989         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
8990         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
8991         * modules/closeout (EXTRA_DIST): Add closeout.h.
8992         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
8993         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
8994         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
8995         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
8996         dirname.h; remove basename.c and stripslash.c.
8997         * modules/exclude (EXTRA_DIST): Add exclude.h.
8998         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
8999         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
9000         * modules/file-type (EXTRA_DIST): Add file-type.h.
9001         * modules/filemode (EXTRA_DIST): Add filemode.h.
9002         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
9003         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
9004         * modules/fpending (EXTRA_DIST): Add __fpending.h.
9005         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
9006         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
9007         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
9008         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
9009         * modules/getdate (EXTRA_DIST): Add getdate.c.
9010         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
9011         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
9012         * modules/getpass (EXTRA_DIST): Add getpass.h.
9013         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
9014         * modules/group-member (EXTRA_DIST): Add group-member.h.
9015         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
9016         * modules/hash (EXTRA_DIST): Add hash.h.
9017         * modules/human (EXTRA_DIST): Add human.h.
9018         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
9019         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
9020         * modules/lchown (EXTRA_DIST): Add lchown.h.
9021         * modules/long-options (EXTRA_DIST): Add long-options.h.
9022         * modules/lstat (EXTRA_DIST): Add lstat.h.
9023         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
9024         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
9025         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
9026         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
9027         * modules/memxor (EXTRA_DIST): Add memxor.h.
9028         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
9029         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
9030         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
9031         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
9032         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
9033         * modules/physmem (EXTRA_DIST): Add physmem.h.
9034         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
9035         * modules/posixver (EXTRA_DIST): Add posixver.h.
9036         * modules/quote (EXTRA_DIST): Add quote.h.
9037         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
9038         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
9039         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
9040         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
9041         regex_internal.h regexec.c.
9042         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
9043         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
9044         * modules/same (EXTRA_DIST): Add same.h.
9045         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
9046         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
9047         * modules/savedir (EXTRA_DIST): Add savedir.h.
9048         * modules/sha1 (EXTRA_DIST): Add sha1.h.
9049         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
9050         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
9051         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
9052         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
9053         * modules/strdup (EXTRA_DIST): Add strdup.h.
9054         * modules/strftime (EXTRA_DIST): Add strftime.h.
9055         * modules/strndup (EXTRA_DIST): Add strndup.h.
9056         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
9057         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
9058         * modules/time_r (EXTRA_DIST): Add time_r.h.
9059         * modules/timespec (EXTRA_DIST): Add timespec.h.
9060         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
9061         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
9062         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
9063         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
9064         * modules/userspec (EXTRA_DIST): Add userspec.h.
9065         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
9066         * modules/utimens (EXTRA_DIST): Add utimens.h.
9067         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
9068         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
9069         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
9070         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
9071         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
9072         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
9073         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
9074         * modules/yesno (EXTRA_DIST): Add yesno.h.
9075
9076 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
9077
9078         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
9079
9080         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
9081         * m4/dev-ino.m4, same-inode.m4: Remove.
9082
9083         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
9084         * m4/acl.m4 (AC_FUNC_ACL):
9085         * m4/backupfile.m4 (gl_BACKUPFILE):
9086         * m4/c-strtod.m4 (gl_C99_STRTOLD):
9087         * m4/canon-host.m4 (gl_CANON_HOST):
9088         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
9089         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
9090         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
9091         * m4/cloexec.m4 (gl_CLOEXEC):
9092         * m4/close-stream.m4 (gl_CLOSE_STREAM):
9093         * m4/closeout.m4 (gl_CLOSEOUT):
9094         * m4/dirfd.m4 (gl_FUNC_DIRFD):
9095         * m4/dirname.m4 (gl_DIRNAME):
9096         * m4/exclude.m4 (gl_EXCLUDE):
9097         * m4/exitfail.m4 (gl_EXITFAIL):
9098         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
9099         * m4/file-type.m4 (gl_FILE_TYPE):
9100         * m4/filemode.m4 (gl_FILEMODE):
9101         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
9102         * m4/fpending.m4 (gl_FUNC_FPENDING):
9103         * m4/fprintftime.m4 (gl_FPRINTFTIME):
9104         * m4/fts.m4 (gl_FUNC_FTS):
9105         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
9106         * m4/getdate.m4 (gl_GETDATE):
9107         * m4/gethrxtime.m4 (gl_GETHRXTIME):
9108         * m4/getpagesize.m4 (gl_GETPAGESIZE):
9109         * m4/getpass.m4 (gl_FUNC_GETPASS):
9110         * m4/gettime.m4 (gl_GETTIME):
9111         * m4/getugroups.m4 (gl_GETUGROUPS):
9112         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
9113         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
9114         * m4/hard-locale.m4 (gl_HARD_LOCALE):
9115         * m4/hash.m4 (gl_HASH):
9116         * m4/idcache.m4 (gl_IDCACHE):
9117         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
9118         * m4/lchown.m4 (gl_FUNC_LCHOWN):
9119         * m4/long-options.m4 (gl_LONG_OPTIONS):
9120         * m4/lstat.m4 (gl_FUNC_LSTAT):
9121         * m4/md5.m4 (gl_MD5):
9122         * m4/memcasecmp.m4 (gl_MEMCASECMP):
9123         * m4/memcoll.m4 (gl_MEMCOLL):
9124         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
9125         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
9126         * m4/memxor.m4 (gl_MEMXOR):
9127         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
9128         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
9129         * m4/modechange.m4 (gl_MODECHANGE):
9130         * m4/mountlist.m4 (gl_MOUNTLIST):
9131         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
9132         * m4/openat.m4 (gl_FUNC_OPENAT):
9133         * m4/pathmax.m4 (gl_PATHMAX):
9134         * m4/physmem.m4 (gl_PHYSMEM):
9135         * m4/posixtm.m4 (gl_POSIXTM):
9136         * m4/posixver.m4 (gl_POSIXVER):
9137         * m4/quote.m4 (gl_QUOTE):
9138         * m4/quotearg.m4 (gl_QUOTEARG):
9139         * m4/readtokens.m4 (gl_READTOKENS):
9140         * m4/readutmp.m4 (gl_READUTMP):
9141         * m4/regex.m4 (gl_REGEX):
9142         * m4/safe-read.m4 (gl_SAFE_READ):
9143         * m4/safe-write.m4 (gl_SAFE_WRITE):
9144         * m4/same.m4 (gl_SAME):
9145         * m4/save-cwd.m4 (gl_SAVE_CWD):
9146         * m4/savedir.m4 (gl_SAVEDIR):
9147         * m4/settime.m4 (gl_SETTIME):
9148         * m4/sha1.m4 (gl_SHA1):
9149         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
9150         * m4/stat-macros.m4 (gl_STAT_MACROS):
9151         * m4/stat-time.m4 (gl_STAT_TIME):
9152         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
9153         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
9154         * m4/strdup.m4 (gl_FUNC_STRDUP):
9155         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
9156         * m4/strndup.m4 (gl_FUNC_STRNDUP):
9157         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
9158         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
9159         * m4/time_r.m4 (gl_TIME_R):
9160         * m4/timespec.m4 (gl_TIMESPEC):
9161         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
9162         * m4/unlinkdir.m4 (gl_UNLINKDIR):
9163         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
9164         * m4/userspec.m4 (gl_USERSPEC):
9165         * m4/utimecmp.m4 (gl_UTIMECMP):
9166         * m4/utimens.m4 (gl_UTIMENS):
9167         * m4/xalloc.m4 (gl_XALLOC):
9168         * m4/xgetcwd.m4 (gl_XGETCWD):
9169         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
9170         * m4/xreadlink.m4 (gl_XREADLINK):
9171         * m4/xstrtod.m4 (gl_XSTRTOD):
9172         * m4/yesno.m4 (gl_YESNO):
9173         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
9174         to get the necessary .h files and whatnot.
9175
9176 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
9177             Bruno Haible  <bruno@clisp.org>
9178
9179         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
9180         /bin/sh understanding of '!' conditional negation.
9181
9182 2006-08-21  Jim Meyering  <jim@meyering.net>
9183
9184         * modules/openat (Depends-on): Really alphabetize.
9185
9186         * modules/acl (Depends-on): Add error and quote.
9187
9188         * check-module (find_included_lib_files): Add at-func.c to the
9189         ok-to-include-more-than-once white list.
9190
9191         * modules/openat (Depends-on): Add lstat.  Alphabetize.
9192
9193 2006-08-21  Bruno Haible  <bruno@clisp.org>
9194
9195         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9196         Emit a pkgdata_DATA variable only if some snippets add contents to it.
9197         Reported by Martin Lambers <marlam@marlam.de>.
9198
9199 2006-08-21  Bruno Haible  <bruno@clisp.org>
9200
9201         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
9202         specify an installation location, don't emit a noinst_LIBRARIES or
9203         noinst_LTLIBRARIES assignment.
9204
9205 2006-08-21  Bruno Haible  <bruno@clisp.org>
9206
9207         BeOS portability.
9208         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
9209         BeOS has mbrtowc() but no <wctype.h>.
9210
9211 2006-08-21  Bruno Haible  <bruno@clisp.org>
9212
9213         BeOS portability.
9214         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
9215         exist.
9216
9217 2006-08-21  Bruno Haible  <bruno@clisp.org>
9218
9219         BeOS portability.
9220         * lib/mbchar.h: Include <wctype.h> only if it exists.
9221
9222 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9223
9224         Remove files that are no longer needed by their respective modules.
9225         * m4/obstack.m4: Remove.
9226         * m4/strerror_r.m4: Remove.
9227         * m4/uint32_t.m4: Remove.
9228         * m4/uintptr_t.m4: Remove.
9229         * m4/ullong_max.m4: Remove.
9230         * m4/xstrtoimax.m4: Remove.
9231         * m4/xstrtoumax.m4: Remove.
9232
9233         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
9234         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
9235         dependencies now capture this.
9236
9237         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
9238         Do not use AC_LIBSOURCES, since gnulib modules now do this.
9239         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
9240         * m4/human.m4 (gl_HUMAN): Likewise.
9241         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
9242         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
9243
9244         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
9245
9246         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
9247         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
9248         stdint.
9249         * m4/human.m4 (gl_HUMAN): Likewise.
9250         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
9251         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
9252         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
9253         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
9254         * m4/xstrtol (gl_XSTRTOL): Likewise.
9255
9256         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
9257         AC_TYPE_LONG_LONG_INT.
9258         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
9259         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
9260         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
9261         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
9262
9263         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
9264         on stdbool.
9265
9266         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
9267         (gl_PREREQ_XSTRTOUL): Remove.
9268
9269         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
9270
9271         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
9272         mode.
9273
9274 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9275
9276         Add and change modules to make it easier for coreutils to use
9277         gnulib-tool.
9278         * modules/backupfile (Files): Remove m4/d-ino.m4.
9279         (Depends-on): Add d-ino.
9280         * modules/cycle-check (Depends-on): Add stdint.
9281         (lib_SOURCES): Add cycle-check.h.
9282         * modules/d-ino: New module.
9283         * modules/d-type: New module.
9284         * modules/error (Files): Remove m4/strerror_r.m4.
9285         * modules/filemode (Files): Add m4/st_dm_mode.m4.
9286         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
9287         m4/inttypes_h.m4, m4/uintmax_t.m4.
9288         (Depends-on): Add stdint.
9289         (lib_SOURCES): Add fsusage.h.
9290         * modules/getcwd (Files): Remove d-ino.m4.
9291         (Depends-on): Add d-ino.
9292         * modules/getndelim2 (Depends-on): Add stdint.
9293         * modules/glob (Files): Remove m4/d-type.m4.
9294         (Depends-on): Add d-type.
9295         * modules/host-os: New module.
9296         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
9297         m4/inttypes_h.m4, m4/uintmax_t.m4.
9298         * Depends-on: Add stdint.
9299         (lib_SOURCES): Add human.h.
9300         * modules/inttostr (Files): Remove m4/intmax_t.m4,
9301         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
9302         m4/uintmax_t.m4, m4/ulonglong.m4.
9303         (Depends-on): Add stdint.
9304         (EXTRA_DIST): Add inttostr.h.
9305         * modules/lchmod: New module.
9306         * modules/link-follow: New module.
9307         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
9308         (Depends-on): Add lchmod.
9309         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
9310         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
9311         (Depends-on): Add stdint.
9312         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
9313         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
9314         (Depends-on): Add stdint.
9315         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
9316         * modules/perl: New module.
9317         * modules/regex (Depends-on): Add stdint.
9318         * modules/rmdir-errno: New module.
9319         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
9320         m4/intmax_t.m4.
9321         (Depends-on): Add stdint.
9322         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
9323         m4/uintmax_t.m4.
9324         (Depends-on): Add stdint.
9325         * modules/unlink-busy: New module.
9326         * modules/utimecmp (Depends-on): Add stdint.
9327         * modules/uptime: New module.
9328         * modules/winsz-ioctl: New module.
9329         * modules/winsz-termios: New module.
9330         * modules/xnanosleep (Depends-on): Add nanosleep.
9331         * modules/ullong_max: Remove.
9332         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
9333         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
9334         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
9335         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
9336         (Depends-on): Add inttypes.
9337         (lib_SOURCES): Add xstrtol.h.
9338         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
9339         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
9340         * MODULES.html.sh: Move 'assert' into the assert section.
9341         Move 'dummy' into the linking section.
9342         Remove ullong_max.
9343         Add section for compatibility checks for POSIX:2001 functions,
9344         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
9345         winsz-ioctl, and winsz-termios into it.
9346         Add lchmod.
9347         Add top-level Misc section and put host-os, perl, and uptime
9348         into it.
9349
9350 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9351
9352         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
9353         now assume the stdint module.  Do not include inttypes.h.
9354         * lib/fsusage.h: Likewise.
9355         * lib/getndelim2.c: Likewise.
9356         * lib/human.h: Likewise.
9357         * lib/inttostr.h: Likewise.
9358         * lib/obstack.c: Likewise.
9359         * lib/regex_internal.h: Likewise.
9360         * lib/tempname.c: Likewise.
9361         * lib/utimecmp.c: Likewise.
9362         * lib/xstrtol.h: Likewise.
9363
9364         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
9365
9366         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
9367         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
9368         * lib/xtime.h: Likewise.
9369
9370 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9371
9372         * modules/openat (Files): Add lib/fchmodat.c.
9373         Fixes problem reported by Jay Youngman.
9374
9375 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9376
9377         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
9378         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
9379
9380 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
9381             Bruno Haible  <bruno@clisp.org>
9382
9383         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
9384         and is a script that invokes bison. Tighten the code. Add comments.
9385
9386 2006-08-18  Jim Meyering  <jim@meyering.net>
9387
9388         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
9389         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
9390         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
9391         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
9392
9393 2006-08-18  Bruno Haible  <bruno@clisp.org>
9394
9395         * modules/bison-i18n: New file.
9396         * MODULES.html.sh (Internationalization functions): Add it.
9397
9398 2006-08-18  Bruno Haible  <bruno@clisp.org>
9399
9400         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
9401         sys/statvfs.h. When getmntinfo was found, check its declaration and
9402         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
9403
9404 2006-08-18  Bruno Haible  <bruno@clisp.org>
9405
9406         * m4/bison-i18n.m4: New file, from bison.
9407
9408 2006-08-18  Bruno Haible  <bruno@clisp.org>
9409
9410         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
9411         (ME_DUMMY): Treat "kernfs" as a dummy.
9412         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
9413
9414 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
9415
9416         Update from coreutils.
9417
9418         2006-08-15  Jim Meyering  <jim@meyering.net>
9419
9420         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
9421
9422         2006-01-17  Jim Meyering  <jim@meyering.net>
9423
9424         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
9425
9426         2006-01-11  Jim Meyering  <jim@meyering.net>
9427
9428         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
9429         Check for the lchmod function.
9430
9431 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
9432
9433         Update from coreutils.
9434
9435         * lib/__fpending.h: Add copyright notice.
9436         * lib/fprintftime.h: Likewise.
9437         * lib/savedir.c: Use (C) in copyright notice.
9438         * lib/savedir.h: Likewise.
9439
9440         2006-08-15  Jim Meyering  <jim@meyering.net>
9441
9442         * lib/at-func.c: New file, with the logic of all emulated at-functions.
9443         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
9444         in support of the EXPECTED_ERRNO macro.
9445         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
9446         definitions.  Instead, define the appropriate symbols and include
9447         "at-func.c".
9448         * lib/mkdirat.c (mkdirat): Likewise.
9449         * lib/fchmodat.c (fchmodat): Likewise.
9450         (ENOSYS): Remove definition.
9451         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
9452         it.  Don't include "unistd--.h" -- it wasn't ever used.
9453
9454         2006-01-17  Jim Meyering  <jim@meyering.net>
9455
9456         Rewrite fts.c not to change the current working directory,
9457         by using openat, fstatat, fdopendir, etc..
9458
9459         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
9460         (HAVE_OPENAT_SUPPORT): Define.
9461         [_LIBC] (fchdir): Don't undef or define; no longer used.
9462         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
9463         Now, this `function' always succeeds, and consumes its file descriptor
9464         parameter -- so callers must not close such FDs.  Update callers.
9465         (diropen_fd, opendirat, cwd_advance_fd): New functions.
9466         (diropen): Add parameter, SP.  Adjust all callers.
9467         Implement using diropen_fd, rather than open.
9468         (fts_open): Initialize new member, fts_cwd_fd.
9469         Remove fts_rft-setting code.
9470         (fts_close): Close fts_cwd_fd, if necessary.
9471         (__opendir2): Define in terms of opendir or opendirat,
9472         depending on whether the FST_NOCHDIR flag is set.
9473         (fts_build): Since fts_safe_changedir consumes its FD, and since
9474         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
9475         and close the dup'd file descriptor upon failure.
9476         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
9477         (fts_safe_changedir): Tweak semantics to reflect that this function
9478         now calls cwd_advance_fd and hence consumes its FD argument.
9479         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
9480         [struct FTS] (fts_rft): Remove now-unused member.
9481         [struct FTS] (fts_cycle.state): Improve comment.
9482
9483         * lib/openat.c (openat_needs_fchdir): New function.
9484         * lib/openat.h (openat_needs_fchdir): Declare it.
9485
9486 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
9487
9488         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
9489         Problem and fix reported by Pádraig Brady in
9490         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
9491
9492 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
9493
9494         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
9495
9496 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
9497
9498         * lib/memcoll.c (memcoll): Optimize for the common case where the
9499         arguments are bytewise equal.
9500
9501 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
9502
9503         * doc/regexprops-generic.texi: Add a copyright notice.
9504
9505 2006-08-15  Bruno Haible  <bruno@clisp.org>
9506
9507         * modules/tmpdir (License): Change to LGPL.
9508
9509 2006-08-15  Bruno Haible  <bruno@clisp.org>
9510
9511         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
9512         module.
9513
9514 2006-08-14  Simon Josefsson  <jas@extundo.com>
9515
9516         * config/srclist.txt: Add gnupload.
9517
9518 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
9519
9520         Change copyright notice from LGPL 2 to GPL 2, since that's the
9521         standard form used in the gnulib repository.
9522         * tests/test-lock.c: Likewise.
9523         * tests/test-stdint.c: Likewise.
9524         * tests/test-tls.c: Likewise.
9525
9526         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
9527         prelude-manager.  User shorter URLs for GNU projects, without '?'.
9528         Add copyright notice.
9529
9530         * check-module: Add copyright notice.  Output a copyright
9531         notice if "--version" is specified.
9532         * modules/COPYING: New file.
9533         * tests/test-getaddrinfo.c: Add copyright notice.
9534         * tests/test-verify.c: Likewise.
9535
9536 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
9537
9538         Change copyright notice from LGPL 2 to GPL 2, since that's the
9539         standard form used in the gnulib repository.
9540         * lib/lock.c: LGPL -> GPL.
9541         * lib/lock.h: Likewise.
9542         * lib/strnlen1.c: Likewise.
9543         * lib/strnlen1.h: Likewise.
9544         * lib/tls.c: Likewise.
9545         * lib/tls.h: Likewise.
9546         * lib/tmpdir.c: Likewise.
9547
9548         * lib/TODO: Remove; this belongs only in coreutils.
9549
9550 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
9551
9552         Add copyright notices to long-enough files that lack them, since
9553         otherwise the files aren't clearly free.  Use the same notice that
9554         getdate.texi already uses.
9555         * doc/alloca-opt.texi: Add copyright notice.
9556         * doc/alloca.texi: Likewise.
9557         * doc/ctime.texi: Likewise.
9558         * doc/functions.texi: Likewise.
9559         * doc/gcd.texi: Likewise.
9560         * doc/gnulib-tool.texi: Likewise.
9561         * doc/inet_ntoa.texi: Likewise.
9562         * doc/visibility.texi: Likewise.
9563
9564         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
9565         * doc/quote.texi: Add copyright notice.
9566
9567         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
9568         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
9569         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
9570         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
9571         is now obsolete, and give a pointer to the Sun list.
9572         Add copyright notice.
9573
9574 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
9575
9576         * config/srclistvars.sh: Add copyright notice.
9577
9578 2006-08-14  Eric Blake  <ebb9@byu.net>
9579
9580         Import the following change from libc:
9581
9582         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
9583
9584         Upstream bug 2997.
9585         * lib/misc/error.c: Add space between program name and message if file
9586         name is missing.
9587
9588 2006-08-12  Karl Berry  <karl@gnu.org>
9589
9590         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
9591         remove, these originate in gnulib now.
9592
9593 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9594
9595         * doc/Makefile (standards.info standards.html standards.dvi):
9596         Also depend on make-stds.texi.
9597
9598 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
9599
9600         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
9601         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
9602
9603         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
9604         in wchar_t.  Problem reported by Eric Blake.
9605
9606         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
9607         LEN is smaller than SIZE.  Suggested by Bruno Haible.
9608         Also, help the compiler to keep LEN in a register.
9609
9610 2006-08-11  Eric Blake  <ebb9@byu.net>
9611
9612         * users.txt: Sort.  Add tar.
9613
9614 2006-08-11  Bruno Haible  <bruno@clisp.org>
9615
9616         * users.txt: New file.
9617
9618 2006-08-11  Bruno Haible  <bruno@clisp.org>
9619
9620         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
9621         before <wchar.h>. Needed for OSF/1 and BSD/OS.
9622
9623 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
9624
9625         * modules/snprintf (Depends-on): Remove minmax.
9626         (Maintainer): Add self and Bruno.
9627
9628 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
9629
9630         * lib/.cppi-disable: Add snprintf.h, socket_.h.
9631         * lib/snprintf.c: Include <errno.h> and <limits.h>.
9632         (EOVERFLOW): Define if the system does not.
9633         Do not include "minmax.h"; it wasn't used.
9634         (snprintf): Don't assume size_t promotes to an unsigned type.
9635         Fix bug when generated string was too long for the buffer: the
9636         buffer's contents are supposed to be the initial prefix of the
9637         output.  Don't assume vasnprintf returns EOVERFLOW if the size
9638         exceeds INT_MAX; do the check ourselves.
9639
9640         Import the following changes from libc:
9641
9642         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
9643
9644         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
9645         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
9646         set wc to the byte which couldn't be converted.
9647         (re_string_reconstruct): Don't clear valid_raw_len before calling
9648         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
9649         tip_context using re_string_context_at.
9650
9651         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
9652
9653         * lib/posix/regex.h: g++ still cannot handled [restrict].
9654
9655         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
9656
9657         * lib/posix/regex.h: Remove special handling for VMS.
9658
9659 2006-08-10  Jim Meyering  <jim@meyering.net>
9660
9661         * modules/same-inode: New module.
9662         * modules/dev-ino: New module.
9663         * modules/cycle-check: Depend on these modules, rather than simply
9664         including their .h files.
9665         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
9666         required via m4/cycle-check.m4.
9667         * modules/same: Depend on new same-inode module, rather than
9668         including same-inode.h.
9669         * modules/chdir-safer: New file.
9670
9671         * modules/chown (Depends-on): Add stat-macros.
9672
9673 2006-08-10  Jim Meyering  <jim@meyering.net>
9674
9675         * m4/cycle-check.m4: New file.
9676         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
9677         * m4/dev-ino.m4, m4/same-inode.m4: New files.
9678
9679 2006-08-10  Eric Blake  <ebb9@byu.net>
9680
9681         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
9682         in from original proposal.
9683
9684 2006-08-10  Eric Blake  <ebb9@byu.net>
9685         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9686
9687         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
9688         namespace.
9689
9690 2006-08-10  Bruno Haible  <bruno@clisp.org>
9691
9692         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
9693         as well.
9694
9695 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
9696
9697         Sync from coreutils.
9698
9699         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
9700
9701         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
9702         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
9703
9704 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
9705
9706         * modules/restrict: Remove; no longer needed now that we assume
9707         Autoconf 2.59 or later.
9708         * MODULES.html.sh: Remove 'restrict'.
9709         * modules/argp (Depends-on): Remove 'restrict'.
9710         * modules/base64 (Depends-on): Likewise.
9711         * modules/gc (Depends-on): Likewise.
9712         * modules/getaddrinfo (Depends-on): Likewise.
9713         * modules/glob (Depends-on): Likewise.
9714         * modules/inet_ntop (Depends-on): Likewise.
9715         * modules/inet_pton (Depends-on): Likewise.
9716         * modules/memxor (Depends-on): Likewise.
9717         * modules/regex (Depends-on): Likewise.
9718         * modules/strtok_r (Depends-on): Likewise.
9719         * modules/time_r (Depends-on): Likewise.
9720
9721 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
9722
9723         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
9724         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
9725         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
9726         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
9727         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
9728         * m4/memxor.m4 (gl_MEMXOR): Likewise.
9729         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
9730         gl_C_RESTRICT replaced by AC_C_RESTRICT.
9731
9732         Merge from coreutils.
9733         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
9734         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
9735         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
9736         * m4/time_r.m4 (gl_TIME_R): Likewise.
9737
9738 2006-08-09  Karl Berry  <karl@gnu.org>
9739
9740         * config/srclist.txt: no more gettext-tools, per Bruno.
9741
9742 2006-08-08  Eric Blake  <ebb9@byu.net>
9743
9744         * modules/verror: New module.
9745         * MODULES.html.sh: Document it.
9746
9747 2006-08-08  Eric Blake  <ebb9@byu.net>
9748
9749         * lib/verror.h, lib/verror.c: New files.
9750
9751 2006-08-08  Eric Blake  <ebb9@byu.net>
9752
9753         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
9754         verror_at_line output complies with GNU Coding Standards even when
9755         file is NULL.
9756
9757 2006-08-07  Bruno Haible  <bruno@clisp.org>
9758
9759         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
9760         versions of AIX.
9761         Reported by Ralf Wildenhues.
9762
9763 2006-08-07  Bruno Haible  <bruno@clisp.org>
9764
9765         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
9766         in an AC_DEFUN. Needed so that the autoconf snippets can use
9767         AC_REQUIRE.
9768
9769 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9770
9771         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9772         Initialize pkgdata_DATA.
9773         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
9774         overriding it.
9775
9776 2006-08-06  Eric Blake  <ebb9@byu.net>
9777
9778         * lib/error.h: Fold in some upstream changes from glibc.
9779         * lib/error.c: Likewise.
9780
9781 2006-08-04  Bruno Haible  <bruno@clisp.org>
9782
9783         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9784         Make the mostlyclean-local rule depend on mostlyclean-generic.
9785         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
9786
9787 2006-07-31  Bruno Haible  <bruno@clisp.org>
9788
9789         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
9790         <stdlib.h>, <string.h>.
9791
9792 2006-07-30  Bruno Haible  <bruno@clisp.org>
9793
9794         * modules/readlink (License): Change to LGPL.
9795
9796 2006-07-30  Bruno Haible  <bruno@clisp.org>
9797
9798         * modules/javaversion (Makefile.am): Distribute javaversion.java and
9799         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
9800         set PKGDATADIR to point to it.
9801
9802 2006-07-30  Bruno Haible  <bruno@clisp.org>
9803
9804         * modules/csharpexec (configure.ac): Comment out macro invocation.
9805         * modules/javaexec (configure.ac): Likewise.
9806         * modules/javacomp-script (configure.ac): Likewise.
9807
9808         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
9809
9810 2006-07-30  Bruno Haible  <bruno@clisp.org>
9811
9812         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
9813         linked-list.
9814
9815 2006-07-30  Bruno Haible  <bruno@clisp.org>
9816
9817         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
9818
9819 2006-07-30  Bruno Haible  <bruno@clisp.org>
9820
9821         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9822         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
9823         get removed.
9824
9825 2006-07-29  Bruno Haible  <bruno@clisp.org>
9826
9827         Make it possible for gnulib-tool to work with locally modified or
9828         augmented gnulib repositories.
9829         * gnulib-tool (func_usage): Document --local-dir option.
9830         (local_gnulib_dir): New variable.
9831         Handle --local-dir option.
9832         (func_lookup_file): New function.
9833         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
9834         (func_get_description, func_get_filelist, func_get_description,
9835         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
9836         func_get_automake_snippet, func_get_include_directive,
9837         func_get_license, func_get_maintainer): Use func_lookup_file.
9838         (func_import, func_create_testdir): Use func_lookup_file.
9839
9840 2006-07-29  Bruno Haible  <bruno@clisp.org>
9841
9842         * modules/setenv (Depends-on): Add unistd.
9843
9844 2006-07-29  Bruno Haible  <bruno@clisp.org>
9845
9846         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
9847
9848 2006-07-29  Bruno Haible  <bruno@clisp.org>
9849
9850         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
9851
9852 2006-07-29  Bruno Haible  <bruno@clisp.org>
9853
9854         * gnulib-tool (import, update): If there is no Makefile.am, look at
9855         aclocal.m4, instead of bailing out.
9856
9857 2006-07-29  Bruno Haible  <bruno@clisp.org>
9858
9859         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
9860         Categorize the options by when they are useful.
9861
9862 2006-07-29  Bruno Haible  <bruno@clisp.org>
9863
9864         * gnulib-tool (func_usage): Document option --no-libtool.
9865         Handle option --no-libtool.
9866         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
9867         for changed semantics of $libtool variable.
9868         (func_import): Likewise. If libtool is not used, show this through
9869         an option --no-libtool.
9870         (func_create_testdir): Update.
9871
9872 2006-07-29  Bruno Haible  <bruno@clisp.org>
9873
9874         * gnulib-tool (func_import): Extend error message about missing
9875         --doc-base.
9876
9877 2006-07-29  Bruno Haible  <bruno@clisp.org>
9878
9879         * gnulib-tool (func_import): Don't create the $docbase directory if
9880         there is no file to store there.
9881
9882 2006-07-29  Bruno Haible  <bruno@clisp.org>
9883
9884         * gnulib-tool (autoconf_minversion): If a --dir option is given and
9885         relevant, look for configure.ac there, not in the current directory.
9886         Also use a simple search for AC_PREREQ, not "autoconf --trace".
9887
9888 2006-07-29  Bruno Haible  <bruno@clisp.org>
9889
9890         * gnulib-tool (SORT): New variable.
9891         (func_usage): Undocument --assume-autoconf option.
9892         Remove --assume-autoconf option handling.
9893         (autoconf_minversion): Determine from the contents of configure.ac.
9894         (func_import): Remove autoconf_minversion handling.
9895         Suggested by Eric Blake.
9896
9897 2006-07-29  Bruno Haible  <bruno@clisp.org>
9898
9899         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
9900
9901 2006-07-29  Bruno Haible  <bruno@clisp.org>
9902
9903         * config/srclist.txt (*setenv.[ch]): Remove rules.
9904
9905 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9906
9907         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
9908
9909 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9910
9911         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
9912         arpa/inet.h.
9913
9914 2006-07-28  Simon Josefsson  <jas@extundo.com>
9915
9916         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
9917         * modules/inet_pton (Depends-on): Likewise.
9918
9919 2006-07-28  Simon Josefsson  <jas@extundo.com>
9920
9921         * m4/netinet_in_h.m4: New file.
9922
9923 2006-07-28  Simon Josefsson  <jas@extundo.com>
9924
9925         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
9926         #include's.
9927
9928 2006-07-28  Simon Josefsson  <jas@extundo.com>
9929
9930         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
9931         #include's.
9932
9933 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
9934
9935         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
9936         setgid on directories only if they set these bits.
9937         * lib/modechange.h: Remove obsolete comment about masks.
9938
9939 2006-07-28  Eric Blake  <ebb9@byu.net>
9940
9941         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
9942         macro expansion.
9943
9944 2006-07-28  Bruno Haible  <bruno@clisp.org>
9945
9946         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
9947
9948 2006-07-28  Bruno Haible  <bruno@clisp.org>
9949
9950         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
9951
9952 2006-07-28  Bruno Haible  <bruno@clisp.org>
9953
9954         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
9955         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
9956         Define fallbacks.
9957         Avoids link error on FreeBSD 4.x.
9958         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
9959
9960         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
9961         encoding.
9962         * lib/mbswidth.c (iswcntrl): Likewise.
9963
9964 2006-07-27  Bruno Haible  <bruno@clisp.org>
9965
9966         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
9967         test.
9968
9969 2006-07-27  Bruno Haible  <bruno@clisp.org>
9970
9971         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
9972         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
9973         defined.
9974
9975 2006-07-26  Eric Blake  <ebb9@byu.net>
9976
9977         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
9978
9979 2006-07-26  Eric Blake  <ebb9@byu.net>
9980
9981         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
9982         like mingw that lack mkstemp.
9983         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
9984         avoid compilation warning on mingw.
9985
9986 2006-07-26  Bruno Haible  <bruno@clisp.org>
9987
9988         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
9989         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
9990         INT_FAST*_MIN, INTPTR_MIN.
9991
9992 2006-07-25  Bruno Haible  <bruno@clisp.org>
9993
9994         * modules/version-etc (Depends-on): Add stdarg.
9995
9996 2006-07-25  Bruno Haible  <bruno@clisp.org>
9997
9998         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
9999         complex commands.
10000
10001 2006-07-25  Bruno Haible  <bruno@clisp.org>
10002
10003         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
10004         defined in <stdarg.h> or config.h.
10005
10006 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
10007
10008         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
10009         (gl_STDIO_SAFER): Remove.
10010
10011 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
10012
10013         * MODULES.html.sh (File stream based Input/Output):
10014         Add fopen-safer, tmpfile-safer; remove stdio-safer.
10015         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
10016         * modules/fopen-safer, modules/tmpfile-safer: New files.
10017         * modules/stdio-safer: Remove.
10018
10019 2006-07-24  Bruno Haible  <bruno@clisp.org>
10020
10021         * modules/tmpdir: New file.
10022         * MODULES.html.sh (File system functions): Add it.
10023
10024 2006-07-24  Bruno Haible  <bruno@clisp.org>
10025
10026         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
10027         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
10028
10029 2006-07-24  Bruno Haible  <bruno@clisp.org>
10030
10031         * modules/clean-temp: New file.
10032
10033 2006-07-24  Bruno Haible  <bruno@clisp.org>
10034
10035         * m4/tmpdir.m4: New file, from GNU gettext.
10036
10037 2006-07-24  Bruno Haible  <bruno@clisp.org>
10038
10039         * lib/tmpdir.h: New file, from GNU gettext.
10040         * lib/tmpdir.c: New file, from GNU gettext.
10041
10042 2006-07-24  Bruno Haible  <bruno@clisp.org>
10043
10044         * lib/clean-temp.h: New file, from GNU gettext.
10045         * lib/clean-temp.c: New file, from GNU gettext.
10046
10047 2006-07-23  Eric Blake  <ebb9@byu.net>
10048
10049         * modules/stdio-safer (Files): Add tmpfile-safer.c.
10050         (Depends-on): Add binary-io.
10051
10052 2006-07-23  Eric Blake  <ebb9@byu.net>
10053
10054         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
10055
10056 2006-07-23  Eric Blake  <ebb9@byu.net>
10057
10058         * lib/tmpfile-safer.c: New file.
10059         * lib/stdio-safer.h (fopen_safer): Add prototype.
10060         * lib/stdio--.h (tmpfile): Make safer.
10061
10062 2006-07-23  Bruno Haible  <bruno@clisp.org>
10063
10064         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
10065         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
10066         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
10067         gl_linked_remove_at): Use it.
10068
10069 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
10070         and Simon Josefsson <jas@extundo.com>
10071
10072         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
10073
10074         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
10075
10076 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
10077
10078         * modules/close-stream: New file.
10079         * modules/closeout (Description): Make it clear that it exits
10080         with a diagnostic on error.
10081         (Depends-on): Add close-stream.  Remove fpending, stdbool.
10082         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
10083
10084 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
10085
10086         * m4/close-stream.m4: New file.
10087
10088 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
10089
10090         * lib/close-stream.c, lib/close-stream.h: New files.
10091
10092 2006-07-22  Bruno Haible  <bruno@clisp.org>
10093
10094         Merge from GNU gettext 0.15.
10095
10096         2006-05-01  Bruno Haible  <bruno@clisp.org>
10097
10098                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
10099
10100         2006-07-22  Bruno Haible  <bruno@clisp.org>
10101
10102                 * modules/javaversion: New file.
10103                 * MODULES.html.sh (Java): Add javaversion.
10104
10105         2006-03-12  Bruno Haible  <bruno@clisp.org>
10106
10107                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
10108
10109         2005-12-04  Bruno Haible  <bruno@clisp.org>
10110
10111                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
10112                 (untested).
10113
10114         2006-06-21  Bruno Haible  <bruno@clisp.org>
10115
10116                 Avoid warnings from recent versions of mcs.
10117                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
10118                 -o, -L, -r any more. Use options documented since mcs-1.0
10119                 instead. Similarly for -g.
10120
10121         2005-12-04  Bruno Haible  <bruno@clisp.org>
10122
10123                 * build-aux/csharpcomp.sh.in: Suffix for resources is
10124                 .resources, not .resource.
10125
10126         2005-07-09  Bruno Haible  <bruno@clisp.org>
10127
10128                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
10129                 add a .dll suffix.
10130                 Reported by Mark Junker <mjscod@gmx.de>.
10131
10132         2006-07-22  Bruno Haible  <bruno@clisp.org>
10133
10134                 * modules/gettext: Upgrade to gettext-0.15.
10135                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
10136                 m4/visibility.m4.
10137                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
10138
10139 2006-07-22  Bruno Haible  <bruno@clisp.org>
10140
10141         Merge from GNU gettext 0.15.
10142
10143         2006-03-25  Bruno Haible  <bruno@clisp.org>
10144
10145                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
10146
10147         2006-07-21  Bruno Haible  <bruno@clisp.org>
10148
10149                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
10150                 "1.1".
10151
10152         2006-05-09  Bruno Haible  <bruno@clisp.org>
10153
10154                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
10155                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
10156                 for the conftestver execution.
10157
10158         2006-05-01  Bruno Haible  <bruno@clisp.org>
10159
10160                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
10161                 optional target-version argument. Verify that the compiler
10162                 groks source of the specified source-version, or add -source
10163                 option as necessary. Verify that the compiler produces
10164                 bytecode in the specified target-version, or add -target and
10165                 -source options as necessary. Make the result of the test
10166                 available as variable CONF_JAVAC. Also log error output in
10167                 config.log.
10168
10169         2006-03-11  Bruno Haible  <bruno@clisp.org>
10170
10171                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
10172
10173         2006-05-09  Bruno Haible  <bruno@clisp.org>
10174
10175                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
10176                 CLASSPATH_SEPARATOR to a semicolon.
10177
10178         2006-03-12  Bruno Haible  <bruno@clisp.org>
10179
10180                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
10181                 available as variable CONF_JAVA, for subsequent autoconf
10182                 tests. Also log error output in config.log.
10183
10184         2006-07-19  Bruno Haible  <bruno@clisp.org>
10185
10186                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
10187                 that getline works on glibc2 systems. Needed to avoid trouble
10188                 in relocatable.c.
10189                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
10190
10191         2005-12-04  Bruno Haible  <bruno@clisp.org>
10192
10193                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
10194                 launcher (untested).
10195
10196         2005-12-04  Bruno Haible  <bruno@clisp.org>
10197
10198                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
10199
10200         2006-07-22  Bruno Haible  <bruno@clisp.org>
10201
10202                 * gettext.m4: Update from GNU gettext-0.15.
10203                 * nls.m4: Likewise.
10204                 * po.m4: Likewise.
10205                 * inttypes-pri.m4: Likewise.
10206                 * inttypes-h.m4: Renamed from inttypes.m4.
10207                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
10208
10209 2006-07-22  Bruno Haible  <bruno@clisp.org>
10210
10211         Merge from GNU gettext 0.15.
10212
10213         2005-07-05  Bruno Haible  <bruno@clisp.org>
10214
10215                 * printf-args.c (printf_fetchargs): Work around broken
10216                 definition of wint_t on mingw.
10217
10218         2005-02-12  Bruno Haible  <bruno@clisp.org>
10219
10220                 * xallocsa.h: Add extern "C" for C++.
10221
10222         2006-05-17  Bruno Haible  <bruno@clisp.org>
10223
10224                 Cygwin portability.
10225                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
10226
10227         2006-04-30  Bruno Haible  <bruno@clisp.org>
10228
10229                 * progreloc.c: Include <mach-o/dyld.h> if available.
10230                 (find_executable): Use _NSGetExecutablePath when possible.
10231
10232         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
10233
10234                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
10235                 function.
10236
10237         2005-12-29  Bruno Haible  <bruno@clisp.org>
10238
10239                 * progreloc.c (set_program_name_and_installdir): Fix
10240                 compilation error.
10241
10242         2005-12-04  Bruno Haible  <bruno@clisp.org>
10243
10244                 Cygwin portability.
10245                 * progreloc.c: Include <windows.h> also on Cygwin.
10246                 (find_executable): Add support for Cygwin.
10247                 (set_program_name_and_installdir): Handle also platforms with
10248                 nonempty EXEEXT.
10249
10250         2006-07-11  Bruno Haible  <bruno@clisp.org>
10251
10252                 * javacomp.c: Fix a comment.
10253                 Reported by Jim Meyering.
10254
10255         2006-04-30  Bruno Haible  <bruno@clisp.org>
10256
10257                 * javacomp.h (compile_java_class): Add source_version,
10258                 target_version arguments.
10259                 * javacomp.c: Rewritten to choose only a compiler that
10260                 respects the specified source_version and target_version.
10261
10262         2006-06-27  Bruno Haible  <bruno@clisp.org>
10263
10264                 Assume correct S_ISDIR macro.
10265                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
10266
10267         2006-07-22  Bruno Haible  <bruno@clisp.org>
10268
10269                 * javaversion.h: New file, from GNU gettext.
10270                 * javaversion.c: New file, from GNU gettext.
10271                 * javaversion.java: New file, from GNU gettext.
10272                 * javaversion.class: New file, from GNU gettext.
10273
10274         2006-05-17  Bruno Haible  <bruno@clisp.org>
10275
10276                 Cygwin portability.
10277                 * javaexec.c (execute_java_class): Test for jview program
10278                 also on Cygwin.
10279
10280         2006-04-09  Bruno Haible  <bruno@clisp.org>
10281
10282                 * fatal-signal.c: Don't include string.h.
10283                 (at_fatal_signal): Use a copying loop instead of memcpy.
10284
10285         2005-12-04  Bruno Haible  <bruno@clisp.org>
10286
10287                 * csharpexec.c: Add support for 'clix' launcher (untested).
10288                 (execute_csharp_using_sscli): New function.
10289                 (execute_csharp_program): Call it.
10290
10291         2006-06-21  Bruno Haible  <bruno@clisp.org>
10292
10293                 Avoid warnings from recent versions of mcs.
10294                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
10295                 -o, -L, -r any more. Use options documented since mcs-1.0
10296                 instead. Similarly for -g.
10297
10298         2005-07-09  Bruno Haible  <bruno@clisp.org>
10299
10300                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
10301                 add a .dll suffix.
10302                 Reported by Mark Junker <mjscod@gmx.de>.
10303
10304         2006-06-17  Bruno Haible  <bruno@clisp.org>
10305
10306                 * config.charset: Update for NetBSD 3.0.
10307
10308         2006-05-17  Bruno Haible  <bruno@clisp.org>
10309
10310                 Cygwin portability.
10311                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
10312
10313         2006-05-16  Bruno Haible  <bruno@clisp.org>
10314
10315                 * localcharset.c [CYGWIN]: Include <windows.h>.
10316                 (get_charset_aliases): For Cygwin, return the same CPxxx
10317                 aliases list as under WIN32.
10318                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
10319                 the environment variables. Fall back to GetACP().
10320
10321         2006-04-05  Bruno Haible  <bruno@clisp.org>
10322
10323                 * config.charset: Update Juan Manuel Guerrero's address.
10324
10325         2005-02-12  Bruno Haible  <bruno@clisp.org>
10326
10327                 * allocsa.h: Add extern "C" for C++.
10328
10329         2005-02-10  Bruno Haible  <bruno@clisp.org>
10330
10331                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
10332                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
10333
10334         2006-07-22  Bruno Haible  <bruno@clisp.org>
10335
10336                 * gettext.h: Update to GNU gettext-0.15.
10337
10338 2006-07-22  Bruno Haible  <bruno@clisp.org>
10339
10340         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
10341         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
10342         lib-prefix.m4, longdouble.m4, ssize_t.m4.
10343
10344 2006-07-21  Eric Blake  <ebb9@byu.net>
10345
10346         * modules/stdlib-safer: New file.
10347         * MODULES.html.sh (File stream based Input/Output): Add
10348         stdlib-safer.
10349
10350 2006-07-21  Eric Blake  <ebb9@byu.net>
10351
10352         * lib/stdlib-safer.h: New file from coreutils, required by
10353         stdlib--.h.
10354
10355 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
10356
10357         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
10358
10359 2006-07-20  Bruno Haible  <bruno@clisp.org>
10360
10361         * gnulib-tool: Recognize new option --assume-autoconf.
10362         (autoconf_minversion): New variable.
10363         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
10364
10365 2006-07-20  Bruno Haible  <bruno@clisp.org>
10366
10367         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
10368
10369 2006-07-19  Derek R. Price  <derek@ximbiot.com>
10370
10371         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
10372         Reindent and repaginate.
10373
10374 2006-07-19  Derek Price  <derek@ximbiot.com>
10375
10376         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
10377         Correct grammar.
10378
10379 2006-07-17  Bruno Haible  <bruno@clisp.org>
10380
10381         * modules/list: New file.
10382         * modules/array-list: New file.
10383         * modules/carray-list, modules/carray-list-tests: New files.
10384         * modules/linked-list, modules/linked-list-tests: New files.
10385         * modules/avltree-list, modules/avltree-list-tests: New files.
10386         * modules/rbtree-list, modules/rbtree-list-tests: New files.
10387         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
10388         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
10389         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
10390         * modules/oset: New file.
10391         * modules/array-oset: New file.
10392         * modules/avltree-oset, modules/avltree-oset-tests: New files.
10393         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
10394         * tests/test-carray_list.c: New file.
10395         * tests/test-linked_list.c: New file.
10396         * tests/test-avltree_list.c: New file.
10397         * tests/test-rbtree_list.c: New file.
10398         * tests/test-linkedhash_list.c: New file.
10399         * tests/test-avltreehash_list.c: New file.
10400         * tests/test-rbtreehash_list.c: New file.
10401         * tests/test-avltree_oset.c: New file.
10402         * tests/test-rbtree_oset.c: New file.
10403         * MODULES.html.sh (Container data structures): New section.
10404
10405 2006-07-17  Bruno Haible  <bruno@clisp.org>
10406
10407         * m4/gl_list.m4: New file.
10408
10409 2006-07-17  Bruno Haible  <bruno@clisp.org>
10410
10411         * lib/gl_list.h: New file.
10412         * lib/gl_list.c: New file.
10413         * lib/gl_array_list.h: New file.
10414         * lib/gl_array_list.c: New file.
10415         * lib/gl_carray_list.h: New file.
10416         * lib/gl_carray_list.c: New file.
10417         * lib/gl_linked_list.h: New file.
10418         * lib/gl_linked_list.c: New file.
10419         * lib/gl_anylinked_list1.h: New file.
10420         * lib/gl_anylinked_list2.h: New file.
10421         * lib/gl_avltree_list.h: New file.
10422         * lib/gl_avltree_list.c: New file.
10423         * lib/gl_anyavltree_list1.h: New file.
10424         * lib/gl_anyavltree_list2.h: New file.
10425         * lib/gl_rbtree_list.h: New file.
10426         * lib/gl_rbtree_list.c: New file.
10427         * lib/gl_anyrbtree_list1.h: New file.
10428         * lib/gl_anyrbtree_list2.h: New file.
10429         * lib/gl_anytree_list1.h: New file.
10430         * lib/gl_anytree_list2.h: New file.
10431         * lib/gl_linkedhash_list.h: New file.
10432         * lib/gl_linkedhash_list.c: New file.
10433         * lib/gl_anyhash_list1.h: New file.
10434         * lib/gl_anyhash_list2.h: New file.
10435         * lib/gl_avltreehash_list.h: New file.
10436         * lib/gl_avltreehash_list.c: New file.
10437         * lib/gl_rbtreehash_list.h: New file.
10438         * lib/gl_rbtreehash_list.c: New file.
10439         * lib/gl_anytreehash_list1.h: New file.
10440         * lib/gl_anytreehash_list2.h: New file.
10441
10442         * lib/gl_oset.h: New file.
10443         * lib/gl_oset.c: New file.
10444         * lib/gl_array_oset.h: New file.
10445         * lib/gl_array_oset.c: New file.
10446         * lib/gl_avltree_oset.h: New file.
10447         * lib/gl_avltree_oset.c: New file.
10448         * lib/gl_rbtree_oset.h: New file.
10449         * lib/gl_rbtree_oset.c: New file.
10450         * lib/gl_anytree_oset.h: New file.
10451
10452 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
10453
10454         * m4/mkancesdirs.m4: New file.
10455         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
10456         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
10457         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
10458         it.
10459
10460 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
10461
10462         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
10463         * lib/mkancesdirs.h: New files.
10464         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
10465         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
10466         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
10467         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
10468         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
10469         callers changed.  Revamp internals significantly, by not
10470         attempting to create directories that are temporarily more
10471         permissive than the final results.  Do not attempt to use
10472         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
10473         This removes some race conditions, fixes some bugs, and simplifies
10474         things.  Use new dirchownmod function to do owner and mode changes.
10475         * lib/mkdir-p.h: Likewise.
10476         * lib/modechange.c (octal_to_mode): New function.
10477         (struct mode_change): New member mentioned.
10478         (make_node_op_equals): New arg mentioned.  All callers changed.
10479         (mode_compile): Keep track of which mode bits the user has explicitly
10480         mentioned.
10481         (mode_adjust): New arg DIR, so that we implement the X op correctly.
10482         New arg PMODE_BITS, to keep track of which mode bits the user
10483         mentioned; it treats S_ISUID and S_ISGID speciall.
10484         All callers changed.
10485         * lib/modechange.h: Likewise.
10486
10487 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
10488
10489         * MODULES.html.sh: Add mkancestors.
10490         * modules/mkancesdirs: New module.
10491         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
10492         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
10493         The chdir-safer and afs files are now orphans; I'll remove them
10494         unless someone speaks up.
10495         Add lib/dirchownmod.c, lib/dirchownmod.h.
10496         (Depends-on): Remove alloca, chown, save-cwd, dirname.
10497         Add lchown, mkancesdirs.
10498         (Maintainer): Add self.
10499
10500 2006-07-15  Karl Berry  <karl@gnu.org>
10501
10502         * gnulib-tool: help message wording/arrangement.
10503
10504 2006-07-14  Simon Josefsson  <jas@extundo.com>
10505
10506         * doc/gnulib.texi (Libtool and Windows): New section.
10507
10508 2006-07-12  Simon Josefsson  <jas@extundo.com>
10509
10510         * modules/gendocs (License): Fix license, approved by Karl.
10511
10512 2006-07-12  Eric Blake  <ebb9@byu.net>
10513
10514         * MODULES.html.sh: Add gendocs.
10515
10516 2006-07-11  Eric Blake  <ebb9@byu.net>
10517
10518         * modules/fdl: New module, to install doc/fdl.texi.
10519         * MODULES.html.sh: Add new section for documentation modules.
10520         * gnulib-tool: Avoid space-tab.
10521         (--doc-base): New option, to manage files from doc.
10522
10523 2006-07-11  Eric Blake  <ebb9@byu.net>
10524
10525         * m4/absolute-header.m4: Fix comments to match recent change.
10526
10527 2006-07-11  Eric Blake  <ebb9@byu.net>
10528
10529         * gnulib-tool: List --doc-base before --tests-base.
10530
10531 2006-07-11  Derek R. Price  <derek@ximbiot.com>
10532
10533         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
10534
10535 2006-07-11  Bruno Haible  <bruno@clisp.org>
10536
10537         * README: Mention where to put documentation.
10538
10539 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10540
10541         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
10542
10543 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
10544
10545         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
10546         to stdint.m4.
10547
10548 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
10549
10550         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
10551         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
10552         "no/such/file/stdint.h" when there is no such file, so that
10553         the resulting C code can be parsed by dodgy compilers.
10554         Problems reported by Bob Proulx.
10555
10556 2006-07-10  Derek R. Price  <derek@ximbiot.com>
10557
10558         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
10559         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
10560         macros into the GNU _D_EXACT_NAMLEN.
10561         * lib/savedir.c:  Likewise.
10562         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
10563
10564 2006-07-10  Derek R. Price  <derek@ximbiot.com>
10565         and Paul Eggert  <eggert@cs.ucla.edu>
10566
10567         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
10568         * m4/savedir.m4:
10569         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
10570         macros into the GNU _D_EXACT_NAMLEN.
10571
10572 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
10573
10574         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
10575         around the absolute name, to work around a problem with the HP-UX
10576         11.23 native C compiler, reported by Bob Proulx.
10577
10578 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
10579
10580         * doc/maintain.texi, make-stds.texi: Sync from
10581         <http://savannah.gnu.org/projects/gnustandards>.
10582
10583 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
10584
10585         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
10586
10587 2006-07-09  Jim Meyering  <jim@meyering.net>
10588
10589         * m4/glob.m4: Remove a doubled word in a comment.
10590
10591 2006-07-09  Jim Meyering  <jim@meyering.net>
10592
10593         * lib/argp-pv.c: Remove a doubled word in a comment.
10594         * lib/check-version.c (check_version): Likewise.
10595         * lib/javacomp.c (compile_java_class): Likewise.
10596
10597 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
10598
10599         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
10600         for the benefit of people using Autoconf 2.60.  If you want to
10601         support older Autoconf versions you can copy m4/onceonly_2_57.m4
10602         (or m4/onceonly.m4, if pre-2.57) manually.
10603
10604 2006-07-08  Jim Meyering  <jim@meyering.net>
10605
10606         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
10607         comment.
10608         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
10609         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
10610         comment.
10611
10612 2006-07-08  Jim Meyering  <jim@meyering.net>
10613
10614         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
10615
10616 2006-07-07  Simon Josefsson  <jas@extundo.com>
10617
10618         * tests/test-crc.c: Change expected crc value, the test vector
10619         were probably computed using the old broken crc.c?
10620
10621 2006-07-06  Simon Josefsson  <jas@extundo.com>
10622
10623         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
10624         now the canonical place for the M4 file).
10625
10626         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
10627         from the sys_socket dependency now.
10628
10629         * modules/inet_pton (Files): Ditto.
10630
10631         * modules/inet_ntop (Files): Ditto.
10632
10633 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10634
10635         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
10636         not gl_PREREQ_GETUSERSHELL.
10637
10638 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10639
10640         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
10641         with only one argument, for Autoconf 2.60.
10642         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
10643         expand to nothing, so add a shell command to avoid syntax error.
10644         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
10645
10646 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10647
10648         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
10649
10650 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
10651
10652         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
10653         no longer needed.  Check for isblank decl.
10654         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
10655         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
10656         of existence.
10657
10658 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
10659
10660         * lib/getloadavg.c: Use __VMS, not VMS.
10661         * lib/getopt.c: Likewise.
10662         * lib/getpagesize.h: Likewise.
10663         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
10664         and probably does not work.
10665
10666 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
10667
10668         * lib/.cppi-disable: Add wcwidth.
10669         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
10670         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
10671         (ISGRAPH): Remove.  All uses changed to isgraph.
10672         (FOLD) [!defined _LIBC]: Remove special case.
10673         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
10674         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
10675         HAVE_ISBLANK.
10676         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
10677         case.
10678
10679 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
10680
10681         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
10682         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
10683         brackets.  Other minor changes to suppress some compiler
10684         warnings.
10685
10686 2006-07-06  Derek R. Price  <derek@ximbiot.com>
10687         and Paul Eggert  <eggert@cs.ucla.edu>
10688
10689         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
10690         of invoking obsolescent AC_HEADER_DIRENT macro.
10691         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
10692         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
10693         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
10694         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
10695         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
10696         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
10697         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
10698         * m4/readdir.m4: Remove; no longer needed.
10699
10700 2006-07-06  Derek R. Price  <derek@ximbiot.com>
10701         and Paul Eggert  <eggert@cs.ucla.edu>
10702
10703         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
10704         Don't worry about this obsolete case any more.
10705         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
10706         directories.
10707         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
10708         worry about this obsolete case any more.
10709         * lib/fts.c: Likewise.
10710         * lib/getcwd.c: Likewise.
10711         * lib/glob.h: Likewise.
10712         * lib/savedir.c: Likewise.
10713
10714 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
10715
10716         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
10717         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
10718         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
10719         needed.
10720         All uses removed.
10721         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
10722         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
10723         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
10724         needed.
10725         * m4/getdate.m4 (gl_GETDATE): Likewise.
10726         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
10727         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
10728         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
10729         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
10730         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
10731         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
10732         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
10733         needed.
10734
10735 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
10736
10737         * lib/memcasecmp.c: Include <limits.h>.
10738         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
10739         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
10740         Don't assume isdigit succeeds only on '0' through '9'.
10741
10742 2006-07-05  Eric Blake  <ebb9@byu.net>
10743
10744         * modules/getaddrinfo (Depends-on): Add snprintf.
10745
10746 2006-07-05  Eric Blake  <ebb9@byu.net>
10747
10748         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
10749         to avoid 'header present but could not be compiled' on cygwin.
10750
10751 2006-07-05  Eric Blake  <ebb9@byu.net>
10752
10753         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
10754         missing from netdb.h.
10755         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
10756
10757 2006-07-05  Derek R. Price  <derek@ximbiot.com>
10758
10759         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
10760         no longer needed.
10761         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
10762         * m4/getdate.m4 (gl_GETDATE): Likewise.
10763         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
10764         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
10765         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
10766         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
10767         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
10768
10769 2006-07-05  Derek R. Price  <derek@ximbiot.com>
10770
10771         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
10772         All uses of is_space replaced by isspace.
10773         * lib/exit.h: Don't talk about STDC_HEADERS.
10774         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
10775         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
10776         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
10777         replaced by isprint etc.
10778         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
10779         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
10780         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
10781         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
10782         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
10783         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
10784
10785 2006-07-05  Bruno Haible  <bruno@clisp.org>
10786
10787         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
10788         the function exists, before testing against AIX.
10789         Reported by Martin Lambers <marlam@marlam.de>.
10790
10791 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
10792
10793         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
10794         From Mark D. Baushke.
10795
10796 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
10797
10798         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
10799         to the absolute name, not just one, to bypass Sun C 5.8's
10800         "warning: #include of /usr/include/... may be non-portable".
10801
10802 2006-07-04  Eric Blake  <ebb9@byu.net>
10803
10804         * modules/dirname-tests: New test module.
10805         * tests/test-dirname.c: New file, replacing dirname.c
10806         TEST_DIRNAME section that was recently deleted.
10807
10808 2006-07-04  Bruno Haible  <bruno@clisp.org>
10809
10810         Assume ANSI C header files and <ctype.h> functions.
10811         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
10812         (mbsnwidth): Use isprint, iscntrl instead.
10813
10814 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10815
10816         Merge from coreutils.
10817         * MODULES.html.sh: Add xstrtold.
10818         * modules/xstrtold: New file.
10819         * modules/cycle-check (Files): Add lib/same-inode.h.
10820         * modules/dirname (Files): Add m4/double-slash-root.m4.
10821         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
10822         * modules/mkdir-p (Files): Add lib/same-inode.h.
10823         * modules/same (Files): Add lib/same-inode.h.
10824
10825 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10826
10827         * m4/absolute-header.m4: Renamed from full-header-path.m4.
10828         This is to keep the terminology clean; POSIX talks about
10829         "absolute pathnames", not "full pathnames", but the GNU
10830         Coding Standards say to use "path" for something else;
10831         so use "absolute" to keep both sides happy.
10832         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
10833         Set gl_absolute_header, not gl_full_header_path.
10834         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
10835         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
10836         All uses changed.
10837
10838         Merge from coreutils.
10839
10840         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
10841
10842         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
10843         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
10844         want to require the building of c-strtod.o.
10845         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
10846         needs -lm directly.
10847         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
10848
10849         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
10850
10851         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
10852         --as-needed option if available.  Problem reported by Albert Chin in
10853         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
10854         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
10855         cc merely issues a bunch of annoying warnings for --as-needed
10856         (this problem was reported by Bob Proulx).  Also, try linking with
10857         -lm to detect a bug in binutils 2.16 (this problem was reported
10858         by Ralf Wildenhues).
10859
10860         2006-06-18  Jim Meyering  <jim@meyering.net>
10861
10862         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
10863         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
10864         macro.
10865         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
10866         also check for glibc-2.4's abort-inducing bug.
10867
10868         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
10869         Low-probability clean-up should be to use rmdir to get rid of
10870         the just-created directory, not unlink.
10871
10872         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
10873         configure fail, and request a bug report to inform us about it.
10874         Add a comment that, barring reports to the contrary, in 2007 we'll
10875         assume ftruncate is universally available.
10876
10877         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
10878
10879         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
10880
10881         2006-03-12  Jim Meyering  <jim@meyering.net>
10882
10883         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
10884         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
10885         * m4/same.m4 (gl_SAME): Likewise.
10886         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
10887
10888         2006-03-11  Eric Blake  <ebb9@byu.net>
10889
10890         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
10891         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
10892         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
10893         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
10894
10895 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10896
10897         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
10898         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
10899         reported by Mark D. Baushke, one in
10900         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
10901
10902         Merge from coreutils.
10903
10904         * lib/.cppi-disable: Add stdint_.h.
10905         * lib/.cvsignore: Add stdint.h.
10906
10907         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
10908
10909         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
10910         both double and long double versions.
10911         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
10912         * lib/xstrtold.c: New file.
10913         * lib/xstrtod.h (xstrtold): New decl.
10914
10915         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
10916
10917         * lib/filemode.c (setst): Remove.
10918         (strmode): Rewrite to avoid setst.  This makes the code shorter,
10919         (arguably) clearer, and the generated code is a bit smaller on my
10920         Debian GNU/Linux stable x86 host.
10921
10922         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
10923
10924         * lib/filemode.c: Include "filemode.h" first, to test the interface.
10925         Assume that filemode.h includes sys/types.h and sys/stat.h.
10926         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
10927         (ftypelet): Reorder to put common cases first, for efficiency.
10928         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
10929         to do 'M'.
10930         (strmode): Renamed from mode_string, and now stores 12 bytes instead
10931         of 10, for compatibility with FreeBSD.  All callers changed.
10932         (filemodestring): Now stores 12 bytes instead of 10, and sets file
10933         types that can't be deduced solely from st_mode.  First arg is now a
10934         const pointer.
10935         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
10936         (strmode): Renamed from mode_string.
10937         (filemodestring): New decl.
10938         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
10939         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
10940         needed.
10941         (S_ISPORT, S_ISWHT): New macros, if not already defined.
10942
10943         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
10944
10945         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
10946         fsusage.h now does that.  Include fsusage.h first, to test interface.
10947         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
10948         at most one method (the old code could have generated decls that
10949         didn't conform to C89, not that this was ever exercised).
10950         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
10951
10952         2006-03-19  Jim Meyering  <jim@meyering.net>
10953
10954         Work even in a chroot where d_ino values for entries in "/"
10955         don't match the stat.st_ino values for the same names.
10956         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
10957         number, iterate through all entries again, using lstat instead.
10958         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
10959         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
10960
10961         * lib/getcwd.c (__getcwd): Clarify a comment.
10962         Use memcpy in place of a call to strcpy.
10963
10964         2006-03-12  Jim Meyering  <jim@meyering.net>
10965
10966         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
10967         matches that of the current directory (which we're about to chdir ".."
10968         out of), then save the dev-ino of the parent, instead.
10969
10970         * lib/same-inode.h (SAME_INODE): New file/macro.
10971         * lib/chdir-safer.c (SAME_INODE): Remove definition.
10972         Include "same-inode.h", instead.
10973         * lib/same.c: Likewise.
10974         * lib/cycle-check.h: Include "same-inode.h".
10975         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
10976         * lib/cycle-check.c (SAME_INODE): Remove definition.
10977         * lib/root-dev-ino.h: Include "same-inode.h".
10978
10979         2006-03-11  Eric Blake  <ebb9@byu.net>
10980
10981         * lib/same.c (same_name): s/base_name/last_component/
10982         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
10983         * lib/filenamecat.c (file_name_concat): Likewise.
10984
10985         2006-03-11  Eric Blake  <ebb9@byu.net>,
10986                     Paul Eggert  <eggert@cs.ucla.edu>
10987
10988         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
10989         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
10990         drive prefix.
10991         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
10992         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
10993         (last_component): New method.
10994         * lib/dirname.c (dir_len): Determine when drive letters need a
10995         subsequent slash.  Preserve // when it is special.
10996         (dir_name): Don't append dot when drive letter is absolute.
10997         [TEST_DIRNAME]: Move into a full-blown gnulib test.
10998         * lib/basename.c (base_name): New semantics - malloc the result.
10999         Preserve // when it is special.  Preserve relative files that look
11000         like drive letters.
11001         (base_len): Preserve // when it is special.
11002         (last_component): New method, similar to old base_name semantics.
11003         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
11004         base_name.  Strip redundant slashes from ///.
11005
11006 2006-07-03  Jim Meyering  <jim@meyering.net>
11007
11008         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
11009         macro is used before the first cycle_check call.
11010
11011 2006-07-03  Eric Blake  <ebb9@byu.net>
11012
11013         * modules/dirname (Depends-on): Add xstrndup.
11014
11015 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
11016
11017         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
11018         test cases, so that config.log is a bit easier to follow.
11019
11020 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
11021
11022         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
11023         both are 64 bits, since this seems to be the tradition, and this
11024         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
11025         we ever run into a host that prefers long long to long in this
11026         case, we'll need another configure-time test.  Problem reported by
11027         Jim Meyering.
11028
11029 2006-07-02  Eric Blake  <ebb9@byu.net>
11030
11031         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
11032
11033 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
11034
11035         * modules/inttypes (Depends-on): No longer depends on stdint.
11036         * modules/stdint (Description): Say more about assumptions.
11037         Say that the fast types might differ.  Say macros are used.
11038         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
11039         (Makefile.am): Revise list of substituted symbols to match
11040         new stdint.m4.
11041         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
11042         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
11043         * tests/test-stdint.c (verify_same_types)
11044         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
11045         the code conforms to C99/C89.
11046         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
11047         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
11048
11049 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
11050
11051         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
11052         but fix a bug, by requiring at least 64 bits.
11053         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
11054         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
11055         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
11056         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
11057
11058         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
11059         changes.  Make 2.59 a prerequisite.  Check and substitute for
11060         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
11061         inttypes.h.  Do not use special include files; just use the
11062         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
11063         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
11064         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
11065         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
11066         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
11067         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
11068         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
11069         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
11070         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
11071         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
11072         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
11073         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
11074         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
11075         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
11076         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
11077         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
11078         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
11079         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
11080         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
11081         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
11082         WINT_MAX.  Check for C99 conformance more strictly, by detecting
11083         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
11084         not check for things that C99 does not require, e.g., int8_t.  If
11085         a test isn't needed unless <stdint.h> isn't working, and is
11086         unlikely to be needed for any other reason, then don't do it
11087         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
11088         size_t, since we assume C89 freestanding at least.  Do not check
11089         for sig_atomic_t, wchar_t, or wint_t, since the code now does
11090         the right thing even if the types are not defined.  Instead use:
11091         (gl_STDINT_TYPE_PROPERTIES): New macro.
11092         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
11093         testing whether <sys/types.h> clashes, as Autoconf does this for
11094         us now.  All uses removed.
11095         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
11096         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
11097         (gl_CHECK_TYPE_SAME):
11098         Remove; no longer needed.
11099         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
11100         exists, since we'll return 0 anyway in that case.
11101         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
11102
11103 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
11104
11105         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
11106         possible collision with system files.
11107         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
11108         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
11109         WCHAR_MIN and WCHAR_MAX in this case.
11110         (<stddef.h>): Do not include; no longer needed.
11111         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
11112         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
11113         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
11114         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
11115         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
11116         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
11117         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
11118         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
11119         !defined(__c99))]: Include in this case too, since it's harmless
11120         now.
11121         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
11122         dangerous to do so.
11123         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
11124         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
11125         (_STDINT_MIN, _STDINT_MAX): New macros.
11126         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
11127         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
11128         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
11129         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
11130         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
11131         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
11132         macros, not typedefs; this simplifies things quite a bit.
11133         Use long int for all types narrower than int64_t.
11134         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
11135         Define in terms of long long int or int64_t or long int,
11136         not int64_t or int32_t.  This saves some compile-time testing.
11137         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
11138         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
11139         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
11140         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
11141         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
11142         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
11143         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
11144         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
11145         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
11146         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
11147         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
11148         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
11149         undef any previous version and define our own version, for
11150         simplicity and consistency with the new macros for types.
11151         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
11152         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
11153         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
11154         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
11155         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
11156         @WINT_T_SUFFIX@ to keep things simple here.
11157         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
11158         Simplify by assuming typical 8/16/32/64 host, since we're
11159         already doing that elsewhere anyway.
11160         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
11161         and assume long long int is 64 bits if available.  This
11162         speeds up 'configure'.
11163
11164 2006-07-01  Eric Blake  <ebb9@byu.net>
11165
11166         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
11167         Reported by Andreas Buening.
11168
11169 2006-07-01  Eric Blake  <ebb9@byu.net>
11170
11171         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
11172
11173 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
11174
11175         * lib/getaddrinfo.c: fixed typo
11176
11177 2006-06-29  Jim Meyering  <jim@meyering.net>
11178
11179         * modules/strftime (Maintainer): Add my name, since with the
11180         FPRINTFTIME changes strftime.c has forked from glibc.
11181
11182 2006-06-29  Eric Blake  <ebb9@byu.net>
11183
11184         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
11185
11186 2006-06-29  Eric Blake  <ebb9@byu.net>
11187
11188         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
11189
11190 2006-06-29  Eric Blake  <ebb9@byu.net>
11191
11192         * lib/stat_.h: New file.
11193
11194 2006-06-29  Eric Blake  <ebb9@byu.net>
11195
11196         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
11197         unused static function.
11198
11199 2006-06-29  Eric Blake  <ebb9@byu.net>
11200
11201         * doc/functions.texi (Function Portability): Document missing lstat
11202         on mingw.
11203
11204 2006-06-29  Eric Blake  <ebb9@byu.net>
11205
11206         * MODULES.html.sh: Add sys_stat.
11207         * modules/sys_stat: New module.
11208         * modules/mkstemp (Depends-on): Add sys_stat.
11209
11210 2006-06-29  Derek R. Price  <derek@ximbiot.com>
11211
11212         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
11213
11214 2006-06-29  Derek R. Price  <derek@ximbiot.com>
11215
11216         * m4/c-bs-a.m4: Removed.
11217
11218 2006-06-29  Derek R. Price  <derek@ximbiot.com>
11219
11220         * lib/strftime.c: Assume strftime() exists.
11221
11222 2006-06-29  Derek Price  <derek@ximbiot.com>
11223
11224         * modules/c-bs-a: Removed - \a is C89.
11225         * MODULES.html.sh: Remove c-bs-a.
11226
11227 2006-06-29  Bruno Haible  <bruno@clisp.org>
11228
11229         * modules/wcwidth (License): Change to LGPL.
11230
11231 2006-06-28  Simon Josefsson  <jas@extundo.com>
11232
11233         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
11234         on _WIN32.
11235
11236         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
11237         getnameinfo.
11238
11239 2006-06-28  Simon Josefsson  <jas@extundo.com>
11240
11241         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
11242
11243 2006-06-28  Simon Josefsson  <jas@extundo.com>
11244
11245         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
11246         functions there.  It will succeed on Windows XP, but on Windows
11247         2000 and (presumably) earlier, it will fail, and use the internal
11248         re-implementation.
11249         (use_win32_p): New function.
11250         (getaddrinfo): Use strtoul on servname, to support numeric ports.
11251         Support AI_NUMERICSERV to disable getservbyname.
11252         (getnameinfo): New function, only supports
11253         NI_NUMERICHOST|NI_NUMERICSERV for now.
11254
11255         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
11256         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
11257         getnameinfo.
11258
11259 2006-06-28  Eric Blake  <ebb9@byu.net>
11260
11261         * modules/wcwidth: New file.
11262         * modules/mbchar (Depends-on): Add wcwidth.
11263         * modules/mbswidth (Depends-on): Add wcwidth.
11264         * MODULES.html.sh: Add wcwidth.
11265
11266 2006-06-28  Eric Blake  <ebb9@byu.net>
11267
11268         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
11269         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
11270
11271 2006-06-28  Eric Blake  <ebb9@byu.net>
11272
11273         * lib/xvasprintf.h: Fix comments.
11274
11275 2006-06-28  Eric Blake  <ebb9@byu.net>
11276
11277         * lib/mbchar.h (wcwidth): Include wcwidth.h.
11278         * lib/mbswidth.c (wcwidth): Move from here...
11279         * lib/wcwidth.h: ...to this new file.
11280
11281 2006-06-28  Derek R. Price  <derek@ximbiot.com>
11282
11283         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
11284
11285         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
11286         it's obsolete.
11287         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
11288
11289 2006-06-28  Derek R. Price  <derek@ximbiot.com>
11290
11291         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
11292         Autoconf 2.60 says this stuff was obsolete.
11293
11294 2006-06-28  Bruno Haible  <bruno@clisp.org>
11295
11296         * modules/wcwidth (Files): Add m4/wchar_t.m4.
11297
11298 2006-06-28  Bruno Haible  <bruno@clisp.org>
11299
11300         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
11301         gt_TYPE_WCHAR_T.
11302
11303 2006-06-28  Bruno Haible  <bruno@clisp.org>
11304
11305         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
11306         declaration for wcwidth.
11307         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
11308
11309 2006-06-28  Bruno Haible  <bruno@clisp.org>
11310
11311         * lib/mkdtemp.c [MINGW]: Include <io.h>.
11312         (mkdir): Define using _mkdir.
11313
11314 2006-06-28  Bruno Haible  <bruno@clisp.org>
11315
11316         * lib/getaddrinfo.h: Fix POSIX URL.
11317         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
11318         _WIN32.
11319         (use_win32_p): Make static.
11320         (getaddrinfo): Reject service name if it is empty or does not consist
11321         solely of decimal digits, or if its value is > 65535.
11322         (getnameinfo): Remove useless casts.
11323
11324 2006-06-27  Simon Josefsson  <jas@extundo.com>
11325
11326         * modules/sys_select: New file, suggested by Bruno Haible, Paul
11327         Eggert and Martin Lambers.
11328
11329 2006-06-27  Simon Josefsson  <jas@extundo.com>
11330
11331         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
11332         Eggert and Martin Lambers.
11333
11334 2006-06-27  Bruno Haible  <bruno@clisp.org>
11335
11336         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
11337         result to 0, not to empty.
11338         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
11339
11340 2006-06-27  Bruno Haible  <bruno@clisp.org>
11341
11342         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
11343
11344 2006-06-26  Simon Josefsson  <jas@extundo.com>
11345
11346         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
11347         present.
11348
11349 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
11350
11351         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
11352         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
11353         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
11354
11355 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
11356
11357         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
11358
11359 2006-06-26  Bruno Haible  <bruno@clisp.org>
11360
11361         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
11362
11363 2006-06-26  Bruno Haible  <bruno@clisp.org>
11364
11365         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
11366
11367 2006-06-26  Bruno Haible  <bruno@clisp.org>
11368
11369         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
11370         SGI C compiler in pre-C99 mode.
11371         Suggested by Mark D. Baushke and Larry Jones.
11372
11373 2006-06-26  Bruno Haible  <bruno@clisp.org>
11374
11375         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
11376         WCHAR_MAX.
11377         Reported by Mark D. Baushke and Larry Jones.
11378
11379 2006-06-26  Bruno Haible  <bruno@clisp.org>
11380
11381         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
11382         in pre-C99 mode.
11383         Suggested by Mark D. Baushke and Larry Jones.
11384
11385 2006-06-23  Simon Josefsson  <jas@extundo.com>
11386             Bruno Haible  <bruno@clisp.org>
11387
11388         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
11389         Emit mostlyclean-local rule.
11390         (func_emit_tests_Makefile_am): Likewise.
11391         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
11392
11393 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
11394
11395         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
11396
11397 2006-06-23  Bruno Haible  <bruno@clisp.org>
11398
11399         * tests/test-stdint.c: Update to match ISO C 99 Technical
11400         Corrigendum 1.
11401
11402 2006-06-23  Bruno Haible  <bruno@clisp.org>
11403
11404         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
11405
11406 2006-06-23  Bruno Haible  <bruno@clisp.org>
11407
11408         * lib/stdint_.h: Treat IRIX like OpenBSD.
11409
11410 2006-06-23  Bruno Haible  <bruno@clisp.org>
11411
11412         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
11413         ISO C 99 Technical Corrigendum 1.
11414
11415 2006-06-22  Simon Josefsson  <jas@extundo.com>
11416
11417         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
11418         MinGW.
11419
11420 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
11421
11422         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
11423         needed.  Some compiler complained about some of them.  Problem reported
11424         by Larry Jones in
11425         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
11426
11427 2006-06-21  Simon Josefsson  <jas@extundo.com>
11428
11429         * tests/test-getaddrinfo.c: New file.
11430
11431         * modules/getaddrinfo-tests: New file.
11432
11433         * MODULES.html.sh: Add inet_pton.
11434
11435         * modules/inet_pton: New file.
11436
11437 2006-06-21  Simon Josefsson  <jas@extundo.com>
11438
11439         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
11440         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
11441         of using the (limited) gnulib implementation on Windows XP.
11442
11443         * m4/inet_pton.m4: New file.
11444
11445 2006-06-21  Simon Josefsson  <jas@extundo.com>
11446
11447         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
11448         variable.
11449
11450         * lib/socket_.h: Don't define WINVER.
11451
11452         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
11453         slightly modified to work in gnulib.
11454
11455 2006-06-21  Simon Josefsson  <jas@extundo.com>
11456
11457         * doc/gnulib.texi (Windows sockets): Add.
11458
11459 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
11460
11461         * lib/read-file.c (fread_file): Start with buffer allocation of
11462         0 bytes rather than 1 byte; this simplifies the code.
11463         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
11464         code to free buffer and save/restore errno.
11465         (internal_read_file): Remove unused local.
11466
11467 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
11468
11469         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
11470         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
11471         Problem reported by Denis Excoffier in
11472         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
11473
11474 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11475
11476         * modules/sys_socket, modules/socklen: Include sys/types since
11477         FreeBSD 4.x's sys/socket.h needs it.
11478
11479 2006-06-19  Simon Josefsson  <jas@extundo.com>
11480
11481         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
11482
11483 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
11484
11485         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
11486
11487 2006-06-19  Bruno Haible  <bruno@clisp.org>
11488
11489         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
11490         and FULL_PATH_INTTYPES_H in angle brackets.
11491         Reported by Mark D. Baushke <mdb@gnu.org>.
11492
11493 2006-06-17  Eric Blake  <ebb9@byu.net>
11494
11495         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
11496         errno.
11497
11498 2006-06-17  Bruno Haible  <bruno@clisp.org>
11499
11500         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
11501         <sys/inttypes.h>.
11502
11503 2006-06-17  Bruno Haible  <bruno@clisp.org>
11504
11505         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
11506         whether errno is declared. Assume <errno.h> declares errno.
11507
11508 2006-06-17  Bruno Haible  <bruno@clisp.org>
11509
11510         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
11511
11512 2006-06-17  Bruno Haible  <bruno@clisp.org>
11513
11514         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
11515         problem on Solaris 2.5.1.
11516
11517 2006-06-16  Eric Blake  <ebb9@byu.net>
11518
11519         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
11520         * lib/unicodeio.c [!defined errno]: Likewise.
11521         * lib/strtol.c [!defined errno]: Likewise.
11522         * lib/strtod.c [!defined errno]: Likewise.
11523
11524 2006-06-15  Eric Blake  <ebb9@byu.net>
11525
11526         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
11527
11528 2006-06-15  Eric Blake  <ebb9@byu.net>
11529
11530         * config/srclist.txt (ssize_t.m4): Lose sync.
11531
11532 2006-06-15  Bruno Haible  <bruno@clisp.org>
11533
11534         * modules/stdint (Files): Include m4/full-header-path.m4,
11535         m4/size_max.m4, m4/wchar_t.m4.
11536         (Makefile.am): Many more substitutions.
11537         * modules/stdint-tests: New file.
11538         * tests/test-stdint.c: New file.
11539
11540 2006-06-15  Bruno Haible  <bruno@clisp.org>
11541
11542         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
11543         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
11544         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
11545         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
11546         gl_CHECK_TYPE_SAME): New macros.
11547
11548 2006-06-15  Bruno Haible  <bruno@clisp.org>
11549
11550         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
11551
11552 2006-06-15  Bruno Haible  <bruno@clisp.org>
11553
11554         * lib/stdint_.h: Rewritten to be fully auto-configured.
11555         Fixes bug on HP-UX/IA64.
11556
11557 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
11558
11559         * lib/getdate.y (__attribute__): Don't define if already defined.
11560         Problem reported by Larry Jones.
11561         * lib/utimens.c (__attribute__): Likewise.
11562
11563 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
11564
11565         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
11566         reported by Andreas Schwab.
11567
11568 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11569             Bruno Haible  <bruno@clisp.org>
11570
11571         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
11572         check for the declaration of strnlen and a run test that exposes the
11573         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
11574         rpl_strndup.
11575
11576 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11577             Bruno Haible  <bruno@clisp.org>
11578
11579         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
11580
11581 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11582
11583         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
11584         compile test, for Tru64 4.0D.
11585
11586 2006-05-28  Karl Berry  <karl@gnu.org>
11587
11588         * config/srclist.txt (printf-args.c): lose sync.
11589
11590 2006-05-26  Martin Lambers  <marlam@marlam.de>
11591
11592         * lib/getpass.c: Updates the test for the native W32 API, and adds
11593         missing includes, thus fixing compilation warnings.
11594
11595 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
11596
11597         * lib/exclude.c (exclude_fnmatch): New function.
11598         (excluded_file_name): Call exclude_fnmatch.
11599         * lib/exclude.h (excluded_file_name): New prototype
11600
11601 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
11602
11603         * lib/tempname.c (small_open, large_open): New macros.
11604         (__open, __open64) [!_LIBC]: Remove.
11605         (__gen_tempname): Use small_open and large_open instead of __open
11606         and __open64.  This fixes a portability bug on HP-UX 11.11i
11607         reported by Simon Wing-Tang in
11608         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
11609
11610 2006-05-24  Bruno Haible  <bruno@clisp.org>
11611
11612         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
11613         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
11614         Reported by Thorsten Maerz <torte@netztorte.de> via
11615         Aaron Stone <aaron@serendipity.cx>.
11616
11617 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
11618
11619         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
11620         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
11621         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
11622         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
11623         not really conditional on the cache.
11624         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
11625
11626 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
11627
11628         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
11629         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
11630         (my_usleep): Don't mishandle maximum value.
11631
11632 2006-05-19  Jim Meyering  <jim@meyering.net>
11633
11634         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
11635
11636 2006-05-17  Bruno Haible  <bruno@clisp.org>
11637
11638         Cygwin portability.
11639         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
11640
11641 2006-05-17  Bruno Haible  <bruno@clisp.org>
11642
11643         * lib/stdint_.h: Fix recognition of Cygwin.
11644
11645 2006-05-15  Bruno Haible  <bruno@clisp.org>
11646
11647         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
11648         on libtool patch by Ralf Wildenhues.
11649
11650 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11651
11652         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
11653         test for C99 conformance; (bool) 0.5 is an integer constant
11654         expression, but (bool) -0.5 is not.  Problem reported by Fedor
11655         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
11656
11657 2006-05-11  Simon Josefsson  <jas@extundo.com>
11658
11659         * m4/xvasprintf.m4: Fix obvious typo.
11660
11661 2006-05-11  Jim Meyering  <jim@meyering.net>
11662
11663         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
11664         James Lemley.
11665
11666 2006-05-10  Simon Josefsson  <jas@extundo.com>
11667
11668         * lib/md4.c: Typo fix, update copyright years.
11669         (K1, K2): Don't use L because it turn computations into 64-bit on
11670         64-bit platforms.
11671
11672 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
11673
11674         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
11675         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
11676         unwanted sign propagation, e.g., on hosts with 64-bit int.
11677         There still are some problems with reeelly weird theoretical hosts
11678         (e.g., 33-bit int) but it's not worth worrying about now.
11679         * lib/sha1.c (rol): Likewise.
11680         (K1, K2, K3, K4): Remove unnecessary L suffix.
11681
11682 2006-05-10  Bruno Haible  <bruno@clisp.org>
11683
11684         * lib/des.c: Cast to avoid warnings.
11685
11686 2006-05-09  Bruno Haible  <bruno@clisp.org>
11687
11688         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
11689         (Depends-on): Depend also on xsize, stdarg.
11690         (configure.ac): Add gl_XVASPRINTF.
11691
11692 2006-05-09  Bruno Haible  <bruno@clisp.org>
11693
11694         * m4/xvasprintf.m4: New file.
11695
11696 2006-05-09  Bruno Haible  <bruno@clisp.org>
11697
11698         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
11699         (EOVERFLOW): Define fallback value.
11700         (xstrcat): New function.
11701         (xvasprintf): Recognize the special case of a string concatenation.
11702
11703 2006-05-08  Eric Blake  <ebb9@byu.net>
11704
11705         * gnulib-tool (func_version): Base copyright year on CVS date.
11706         (func_emit_copyright_notice): New function.
11707         (func_emit_lib_Makefile_am): Use it.
11708         (func_emit_tests_Makefile_am): Likewise.
11709         (func_import): Likewise.
11710
11711 2006-05-08  Bruno Haible  <bruno@clisp.org>
11712
11713         * modules/stdarg: New file.
11714         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
11715
11716 2006-05-08  Bruno Haible  <bruno@clisp.org>
11717
11718         * m4/stdarg.m4: New file, from GNU gettext.
11719
11720 2006-05-08  Bruno Haible  <bruno@clisp.org>
11721
11722         * config/srclist.txt (build-aux/config.rpath): different from latest
11723         release.
11724
11725 2006-05-08  Bruno Haible  <bruno@clisp.org>
11726
11727         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
11728
11729 2006-05-05  Jim Meyering  <jim@meyering.net>
11730
11731         * m4/warning.m4: New file, derived from bison's file by the same name.
11732
11733 2006-05-03  Bruno Haible  <bruno@clisp.org>
11734
11735         * lib/stdint_.h: Shorter URL.
11736         * lib/inttypes.h: Likewise.
11737
11738 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
11739
11740         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
11741
11742 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
11743
11744         * lib/verify.h: Document the internals better.  Most of this change
11745         was written by Bruno Haible.
11746
11747 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
11748
11749         * doc/verify.texi: New file, partly based on a proposal by
11750         Bruno Haible.
11751
11752 2006-05-02  Bruno Haible  <bruno@clisp.org>
11753
11754         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
11755         test from here...
11756         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
11757
11758 2006-04-29  Bruno Haible  <bruno@clisp.org>
11759
11760         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
11761         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
11762
11763 2006-04-29  Bruno Haible  <bruno@clisp.org>
11764
11765         * gnulib-tool: Make --update option actually work.
11766
11767 2006-04-29  Bruno Haible  <bruno@clisp.org>
11768
11769         * doc/gcd.texi: New file.
11770         * doc/gnulib.texi: Include it.
11771
11772 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
11773
11774         * lib/getdate.y (get_date): When adding relative date, start with the
11775         initial time, not with the result of the first mktime call.
11776
11777 2006-04-25  Bruno Haible  <bruno@clisp.org>
11778
11779         * gnulib-tool (func_import): Output the include directives in three
11780         blocks, sorted separately.
11781         Reported by Ben Pfaff <blp@cs.stanford.edu>.
11782
11783 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
11784
11785         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
11786         to define main with arguments, for C++.  Reported by Eric Blake.
11787         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
11788         Prefer 'int main ()' to 'int main (void)', for C++.
11789         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
11790         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
11791         for 'main', for C99 and C++.
11792
11793 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
11794
11795         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
11796         Don't assume that exit status -1 is valid.
11797         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
11798         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
11799         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
11800         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
11801         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
11802         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
11803         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
11804         functions can be used without declaring them, or that you can
11805         exit with status -1.
11806         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
11807
11808 2006-04-24  Karl Berry  <karl@gnu.org>
11809
11810         * config/srclist.txt (longdouble.m4): sync lost.
11811
11812 2006-04-24  Eric Blake  <ebb9@byu.net>
11813
11814         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
11815
11816 2006-04-24  Bruno Haible  <bruno@clisp.org>
11817
11818         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
11819         poll() implementation in AIX.
11820         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11821
11822 2006-04-24  Bruno Haible  <bruno@clisp.org>
11823
11824         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
11825         assigned exactly once.
11826
11827 2006-04-23  Claudio Fontana  <claudio@gnu.org>
11828             Bruno Haible  <bruno@clisp.org>
11829
11830         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
11831         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
11832         for AM_CPPFLAGS.
11833
11834 2006-04-23  Bruno Haible  <bruno@clisp.org>
11835
11836         * modules/copy-file: Depend on unistd.
11837         * modules/execute: Likewise.
11838         * modules/fatal-signal: Likewise.
11839         * modules/findprog: Likewise.
11840         * modules/mkdtemp : Likewise.
11841         * modules/pipe: Likewise.
11842         * modules/wait-process: Likewise.
11843
11844 2006-04-23  Bruno Haible  <bruno@clisp.org>
11845
11846         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
11847         condition was already detected.
11848         Reported by Ben Pfaff <blp@cs.stanford.edu>.
11849
11850 2006-04-23  Bruno Haible  <bruno@clisp.org>
11851
11852         * lib/copy-file.c: Include <unistd.h> unconditionally.
11853         * lib/execute.c: Likewise.
11854         * lib/fatal-signal.c: Likewise.
11855         * lib/findprog.c: Likewise.
11856         * lib/mkdtemp.c: Likewise.
11857         * lib/pipe.h: Likewise.
11858         * lib/pipe.c: Likewise.
11859         * lib/wait-process.h: Likewise.
11860
11861 2006-04-23  Bruno Haible  <bruno@clisp.org>
11862
11863         * gnulib-tool (func_usage): Fix --import description. Document
11864         --update.
11865         (func_import): Create temporary file in a temporary directory, if
11866         --dry-run is specified. Silence errors from 'grep' when there are no
11867         m4 files in $m4dir.
11868         (func_create_testdir): Silence errors from 'grep' when there are no
11869         m4 files in $m4dir.
11870         Reported by Karl Berry <karl@freefriends.org>.
11871
11872 2006-04-20  Bruno Haible  <bruno@clisp.org>
11873
11874         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
11875         one argument, so that the code will be portable to Autoconf 2.60.
11876         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
11877         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
11878         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
11879
11880 2006-04-19  Derek Price  <derek@ximbiot.com>
11881             Eric Blake  <ebb9@byu.net>
11882
11883         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
11884         rather than "/full/path.h".  Update comment to match.  Shorten &
11885         generalize m4_translit call via AS_TR_CPP.
11886
11887 2006-04-19  Derek Price  <derek@ximbiot.com>
11888             Eric Blake  <ebb9@byu.net>
11889
11890         * lib/inttypes.h: Correct grammar in comment.
11891
11892 2006-04-18  Derek Price  <derek@ximbiot.com>
11893             Paul Eggert  <eggert@cs.ucla.edu>
11894
11895         * modules/inttypes: New file.
11896         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
11897
11898 2006-04-18  Derek Price  <derek@ximbiot.com>
11899             Paul Eggert  <eggert@cs.ucla.edu>
11900
11901         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
11902         New files.
11903
11904 2006-04-18  Derek Price  <derek@ximbiot.com>
11905             Paul Eggert  <eggert@cs.ucla.edu>
11906
11907         * lib/inttypes.h: New file.
11908         * lib/strtoimax.c: Assume <inttypes.h>.
11909
11910 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
11911
11912         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
11913         isn't mounted.  Problem reported by Kir Kolyshkin.
11914
11915 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
11916
11917         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
11918         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
11919         Derek R. Price.
11920         * lib/regex.h (RE_DUP_MAX): Update comment to match current
11921         implementation.
11922
11923 2006-04-12  Eric Blake  <ebb9@byu.net>
11924
11925         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
11926         is now done automatically by the corresponding Autoconf macro.
11927
11928 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
11929
11930         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
11931         time_r.h.
11932
11933 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
11934
11935         Merge regex changes from libc, removing some of our
11936         POSIX-conformance changes that were rejected and redoing them in a
11937         less-intrusive way.
11938
11939         * lib/regcomp.c (re_compile_internal, init_dfa):
11940         Length arg is now size_t, not Idx.  All uses changed.
11941         (peek_token): Forward decl now says internal_function.
11942         (__re_error_msgid, __re_error_msgid_idx):
11943         Now static rather than extern with attribute_hidden.
11944         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
11945         For some reason libc prefers K&R style defns for external functions.
11946         (regerror) [!defined _LIBC]: Likewise.
11947         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
11948         (seek_collating_symbol_entry, lookup_collation_sequence_value):
11949         (build_range_exp, build_collating_symbol):
11950         Use K&R-style defn.
11951         (re_compile_fastmap): Use '\0' to memset, not 0.
11952         (utf8_sb_map): Make the calculations more obvious.
11953         (init_dfa, parse_bracket_exp, build_charclass_op):
11954         Call calloc and cast result, as glibc does.
11955         (init_word_char, fetch_token, peek_token, peek_token_bracket):
11956         (build_range_exp, build_collating_symbol):
11957         Now internal functions.
11958
11959         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
11960
11961         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
11962         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
11963         Don't depend on VMS; depend on __VMS instead, for POSIX
11964         namespace cleanness.
11965         (regoff_t): Define to ssize_t, not long int.
11966
11967         Remove the REG_ macros named below.  Instead, make the old names
11968         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
11969         __USE_GNU_REGEX.
11970         (REG_BACKSLASH_ESCAPE_IN_LISTS):
11971         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
11972         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
11973         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
11974         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
11975         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
11976         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
11977         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
11978         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
11979         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
11980         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
11981         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
11982         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
11983         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
11984         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
11985         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
11986         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
11987         (REG_NREGS):
11988         Remove.  All uses replaced by the old RE_* names.
11989         (RE_BACKSLASH_ESCAPE_IN_LISTS):
11990         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
11991         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
11992         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
11993         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
11994         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
11995         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
11996         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
11997         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
11998         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
11999         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
12000         Don't bother having these macros be independent of each others'
12001         values, since they no longer exist in the POSIX name space.
12002
12003         Rename the following member names back to their old names,
12004         unless !__USE_GNU_REGEX.  All uses changed back.
12005         (buffer): Renamed from re_buffer.
12006         (allocated): Renamed from re_allocated.
12007         (used): Renamed from re_used.
12008         (syntax): Renamed from re_syntax.
12009         (fastmap): Renamed from re_fastmap.
12010         (translate): Renamed from re_translate.
12011         (can_be_null): Renamed from re_can_be_null.
12012         (regs_allocated): Renamed from re_regs_allocated.
12013         (fastmap_accurate): Renamed from re_fastmap_accurate.
12014         (no_sub): Renamed from re_no_sub.
12015         (not_bol): Renamed from re_not_bol.
12016         (not_eol): Renamed from re_not_eol.
12017         (newline_anchor): Renamed from re_newline_anchor.
12018         (num_regs): Renamed from rm_num_regs.
12019         (start): Renamed from rm_start.
12020         (end): Renamed from rm_end.
12021
12022         (free_state): Move up a bit.
12023
12024         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
12025         #define to be empty.
12026         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
12027         when that is what is intended.
12028         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
12029         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
12030         (MAX): New macro.
12031         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
12032         All uses changed back to re_malloc, etc.  It's now the caller's
12033         responsibility to check for overflow; all callers changed.
12034         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
12035         (re_x2nrealloc): Remove.
12036         (free_state): Remove decl.
12037
12038         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
12039         (re_set_registers, re_exec):
12040         Use K&R-style defn.
12041
12042         2006-01-31  Roland McGrath  <roland@redhat.com>
12043
12044         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
12045         Reported by Mike Frysinger <vapier@gentoo.org>.
12046
12047         2006-01-15  Andreas Jaeger  <aj@suse.de>
12048
12049         [BZ #1950]
12050         * lib/regex_internal.c (re_string_reconstruct): Adjust for
12051         build_wcs_upper_buffer change.
12052         (build_wcs_upper_buffer): Change return type.
12053
12054         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
12055
12056         * lib/regex_internal.h: Include <stdint.h> if available.
12057
12058         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
12059
12060         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
12061
12062         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
12063
12064         * lib/regcomp.c: Adjust for changed secondary hash function.
12065
12066         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
12067
12068         * lib/regex.h: Pretty printing.
12069         Clean up namespace a bit.
12070
12071         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
12072
12073         * lib/regexec.c (update_cur_sifted_state, check_arrival,
12074         check_arrival_add_next_nodes): Avoid using uninitialized variable.
12075
12076         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12077                     Ulrich Drepper  <drepper@redhat.com>
12078
12079         [BZ #1302]
12080         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
12081         changed.
12082         (bitset_word_t): Renamed from bitset_word.  All uses changed.
12083
12084         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
12085
12086         [BZ #281]
12087         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
12088         * lib/regcomp.c: Remove unnecessary uses of
12089         unsigned RE_TRANSLATE_TYPE.
12090         * lib/regex_internal.h: Likewise.
12091         * lib/regex_internal.c: Likewise.
12092         * lib/regexec.c: Likewise.
12093         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
12094
12095         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
12096
12097         * lib/regexec.c (find_recover_state): Remove unnecessary
12098         initialization.
12099         (transit_state_bkref): Make DFA a const pointer.
12100         (get_subexp): Likewise.
12101         (check_arrival): Likewise.
12102         (update_cur_sifted_state): Likewise.
12103         (re_search_internal): Likewise.
12104         (prune_impossible_nodes): Likewise.
12105         (acquire_init_state_context): Likewise.
12106         (proceed_next_node): Likewise.
12107         (set_regs): Likewise.
12108         (free_fail_stack_return): Likewise.
12109         (check_arrival_expand_ecl): Mark DFA parameter as const.
12110         (check_arrival_expand_ecl_sub): Likewise.
12111         (check_subexp_limits): Likewise.
12112         (sub_epsilon_src_nodes):  Likewise.
12113         (add_epsilon_src_nodes):  Likewise.
12114         (merge_state_array): Likewise.
12115         (update_regs): Likewise.
12116         (build_trtable): Likewise.
12117         (sift_states_backward): Mark MCTX parameter as const.
12118         (build_sifted_states): Likewise.
12119         (update_cur_sifted_state): Likewise.
12120         (sift_states_mkref): Likewise.
12121         (check_arrival_expand_ecl): Mark eclosure as const.
12122         (check_dst_limits_calc_pos_1): Likewise.
12123         * lib/regex_internal.h (re_match_context_t): Make dfa a const
12124         pointer.
12125
12126         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
12127
12128         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
12129         (transit_state_sb): Likewise.
12130         (transit_state_mb): Likewise.
12131         (sift_states_iter_mb): Likewise.
12132         (check_arrival_add_next_nodes): Likewise.
12133         (check_node_accept_bytes): Change first parameter to pointer-to-const.
12134         [_LIBC] (re_search_2_stub): Use mempcpy.
12135
12136         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
12137         mbrtowc for very simple UTF-8 case.
12138
12139         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
12140         a pointer-to-const.
12141         (re_acquire_state_context): Likewise.
12142         * lib/regex_internal.h: Adjust prototypes.
12143
12144         * lib/regex.c: Prevent using C++ compilers.
12145
12146         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
12147         (re_acquire_state_context): Likewise.
12148
12149 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
12150
12151         * modules/regex (Depends-on): Add ssize_t.
12152
12153 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
12154
12155         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
12156         translation table.
12157
12158 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
12159
12160         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
12161
12162 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
12163             Bruno Haible  <bruno@clisp.org>
12164
12165         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
12166         <sys/types.h> and <inttypes.h>.
12167
12168 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12169
12170         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
12171         `__error_t_defined', so argp.h will not typedef the former.
12172
12173 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
12174
12175         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
12176         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
12177         glibc names.  Even if glibc is changed to conform to POSIX, the
12178         traditional names will be available anyway, since regex depends on
12179         the extensions module.  Also, fix a longstanding typo in the
12180         implementation of Spencer ERE test #75 from grep 2.3.  Problems
12181         reported by Emanuele Giaquinta.  Also, change sense of cached
12182         variable, so that the message makes sense.
12183
12184 2006-03-24  Simon Josefsson  <jas@extundo.com>
12185
12186         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
12187         including some doc fixes.
12188         (base64_encode_alloc): Fix +1 bug on allocation failures.
12189
12190 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12191
12192         * lib/base64.c (base64_encode): Do not read past end of array with
12193         unsanitized input on systems with CHAR_BIT > 8.
12194
12195 2006-03-24  Eric Blake  <ebb9@byu.net>
12196
12197         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
12198
12199 2006-03-22  Karl Berry  <karl@gnu.org>
12200
12201         * config/srclist.txt (*setenv.[ch]): get from coreutils.
12202         * config/srclistvars.sh (COREUTILS): new var.
12203
12204 2006-03-17  Jim Meyering  <jim@meyering.net>
12205
12206         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
12207         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
12208
12209 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
12210
12211         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
12212         no longer needs it.  Instead, check that regoff_t is as least
12213         as wide as ptrdiff_t.
12214
12215         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
12216         so that our regex.h stays compatible with the installed regex.
12217         This is helpful for installers who configure --without-included-regex.
12218         Problem reported by Emanuele Giaquinta.
12219
12220 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
12221
12222         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
12223         Typedef to long int, not to off_, as POSIX will likely change
12224         in that direction.
12225
12226 2006-03-15  Eric Blake  <ebb9@byu.net>
12227
12228         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
12229
12230 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
12231
12232         * lib/argp-help.c (validate_uparams): Fix typo
12233         * lib/argp-parse.c (argp_default_options): Consistently begin help
12234         messages with a lowercase letter.
12235
12236 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
12237
12238         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
12239         overrun buffers and shouldn't be used (much as gets shouldn't be
12240         used).
12241         * lib/time_r.c (asctime_r, ctime_r): Likewise.
12242
12243 2006-03-08  Simon Josefsson  <jas@extundo.com>
12244
12245         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
12246         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12247
12248 2006-03-08  Simon Josefsson  <jas@extundo.com>
12249
12250         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
12251         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12252
12253 2006-03-08  Simon Josefsson  <jas@extundo.com>
12254
12255         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
12256         signal that configure disabled the device.
12257
12258 2006-03-08  Simon Josefsson  <jas@extundo.com>
12259
12260         * build-aux/maint.mk: Fix refresh-po, to handle no translated
12261         languages.
12262
12263 2006-03-07  Simon Josefsson  <jas@extundo.com>
12264
12265         * modules/getopt (Depends-on): Add unistd.
12266
12267         * modules/unistd: New file.
12268
12269 2006-03-07  Simon Josefsson  <jas@extundo.com>
12270
12271         * modules/gc-random: New file.
12272
12273 2006-03-07  Simon Josefsson  <jas@extundo.com>
12274
12275         * m4/unistd_h.m4: New file.
12276
12277 2006-03-07  Simon Josefsson  <jas@extundo.com>
12278
12279         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
12280         test to be side-effect free by storing the result in the cache
12281         variable gl_cv_lib_readline, and moving the assignment of
12282         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
12283         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12284
12285 2006-03-07  Simon Josefsson  <jas@extundo.com>
12286
12287         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
12288         error on missing devices (the functions will return an error).
12289
12290         * m4/gc.m4: Move random stuff to gc-random.m4
12291
12292 2006-03-07  Simon Josefsson  <jas@extundo.com>
12293
12294         * lib/unistd_.h: New file.
12295
12296 2006-03-07  Simon Josefsson  <jas@extundo.com>
12297
12298         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
12299
12300 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
12301
12302         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
12303         Problem reported by Juan Manuel Guerrero.
12304
12305 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
12306
12307         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
12308         the unistd module.
12309         * lib/getlogin_r.c: Likewise.
12310         * lib/getlogin_r.h: Likewise.
12311         * lib/glob.c: Likewise.
12312         * lib/pagealign_alloc.c: Likewise.
12313         * lib/unistd_.h: Remove; no longer needed.
12314
12315 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
12316
12317         * MODULES.html.sh (Support for systems lacking POSIX:2001):
12318         Add unistd.
12319         * modules/c-stack (Depends-on): Add unistd.
12320         * modules/getlogin_r: Likewise.
12321         * modules/glob: Likewise.
12322         * modules/pagealign_alloc: Likewise.
12323         * modules/unistd (Files): Remove lib/unistd_.h.
12324         (EXTRA_DIST): Remove.
12325         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
12326         need unistd_.h.
12327         (MOSTLYCLEANFILES): Remove unistd.h-t.
12328
12329 2006-03-03  Simon Josefsson  <jas@extundo.com>
12330
12331         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
12332
12333 2006-03-03  Simon Josefsson  <jas@extundo.com>
12334
12335         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
12336         libidn and bison.
12337
12338 2006-03-03  Simon Josefsson  <jas@extundo.com>
12339
12340         * build-aux/maint.mk: Add indent target.
12341
12342 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
12343
12344         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
12345         our replacement poll.h in any case, to avoid a differing
12346         declaration from a system header.  Seen on AIX.
12347
12348 2006-03-01  Simon Josefsson  <jas@extundo.com>
12349
12350         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
12351         <kasal@ucw.cz>.
12352
12353 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12354
12355         * modules/gettime (Depends-on): Add extensions module.
12356         * modules/nanosleep (Depends-on): Likewise.
12357         * modules/settime (Depends-on): Likewise.
12358
12359 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12360
12361         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
12362         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
12363         pedantically.
12364         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
12365         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
12366
12367         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
12368         not "==".  Reported by Ralf Wildenhues.
12369
12370 2006-03-01  Karl Berry  <karl@gnu.org>
12371
12372         * doc/Copyright/request-*: new files, synced from gnuorg.
12373
12374 2006-03-01  Karl Berry  <karl@gnu.org>
12375
12376         * config/srclist.txt (Copyright/*): new entries.
12377
12378 2006-02-28  Simon Josefsson  <jas@extundo.com>
12379
12380         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
12381
12382 2006-02-27  Simon Josefsson  <jas@extundo.com>
12383
12384         * lib/base64.h: Indent #define's.  From Jim Meyering
12385         <jim@meyering.net>.
12386
12387 2006-02-27  Jim Meyering  <jim@meyering.net>
12388
12389         Revert the change of 2006-02-24, so these files can continue
12390         to be sync'd from gettext.
12391         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
12392         of `config.h'.
12393
12394 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
12395
12396         * modules/intprops: New file.
12397         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
12398         Add intprops.
12399         * modules/getloadavg (Files): Remove lib/intprops.h.
12400         (Depends-on): Add intprops.
12401         * modules/human: Likewise.
12402         * modules/inttostr: Likewise.
12403         * modules/openat: Likewise.
12404         * modules/sig2str: Likewise.
12405         * modules/userspec: Likewise.
12406         * modules/utimecmp: Likewise.
12407         * modules/xnanosleep: Likewise.
12408         * modules/xstrtol: Likewise.
12409
12410 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
12411
12412         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
12413         * modules/lock-tests (TESTS): Use $(EXEEXT).
12414         * modules/tls-tests: Likewise.
12415         * modules/argp-tests: Likewise.
12416         (check_PROGRAMS): New var, replacing...
12417         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
12418
12419 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12420
12421         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
12422         `config.h'.
12423
12424 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
12425
12426         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
12427
12428 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12429
12430         Sync from coreutils.
12431         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
12432         gl_CHDIR_SAFER.
12433
12434 2006-02-22  Jim Meyering  <jim@meyering.net>
12435
12436         Sync from coreutils.
12437         * m4/chdir-safer.m4: New file.
12438
12439 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
12440
12441         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
12442         AT_FDCWD exceeds INT_MAX.
12443         * lib/openat.h (AT_FDCWD): Likewise.
12444
12445 2006-02-17  Eric Blake  <address@hidden>
12446
12447         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
12448
12449 2006-02-16  Simon Josefsson  <jas@extundo.com>
12450
12451         * modules/getaddrinfo (Depends-on): Add sys_socket.
12452
12453 2006-02-15  Simon Josefsson  <jas@extundo.com>
12454
12455         * build-aux/maint.mk: Add dsyntax-check rule.
12456
12457 2006-02-15  Eric Blake  <ebb9@byu.net>
12458
12459         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
12460         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
12461         'present but cannot compile' warnings on cygwin.
12462         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
12463         use ws2tcpip.h if sys/socket.h works.
12464         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
12465         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
12466
12467 2006-02-14  Simon Josefsson  <jas@extundo.com>
12468
12469         * modules/maintainer-makefile (Files): Rename.
12470
12471         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
12472         and (the local) Makefile.cfg to maint-cfg.mk.
12473
12474         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
12475         to the latter.
12476
12477         * modules/maintainer-makefile: New module.
12478
12479         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
12480         severaly stripped to make it possible to build it up from scratch
12481         with reliable tests.
12482
12483         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
12484         fixes to permit overriding the default actions when configure and
12485         makefile are not available.
12486
12487 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
12488
12489         Sync from coreutils.
12490         * modules/lstat (Depends-on): Don't depend on xalloc.
12491         (License): Change from GPL to LGPL, since this is now simply a
12492         replacement for a libc function.
12493
12494 2006-02-14  Jim Meyering  <jim@meyering.net>
12495
12496         Sync from coreutils.
12497
12498         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
12499         failure on deficient systems, and simplify gnulib lgpl dependencies.
12500         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
12501         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
12502
12503         * lib/xalloc-die.c: Remove unused definition of N_.
12504
12505 2006-02-14  Jim Meyering  <jim@meyering.net>
12506
12507         Sync from coreutils.
12508         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
12509         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
12510         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
12511         double-quote uses of that variable, to accommodate the rare case in
12512         which getmntent is available in none of the libraries checked.  This
12513         happens at least on FreeBSD 5.0.
12514
12515 2006-02-13  Simon Josefsson  <jas@extundo.com>
12516
12517         * gnulib-tool (Usage): Fix --import, from
12518         karl@freefriends.org (Karl Berry).
12519
12520 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
12521
12522         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
12523
12524 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
12525
12526         * lib/argp-namefrob.h: Restore changes accidentally lost during the
12527         "autoupdate" on 2005-12-12.
12528
12529 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
12530
12531         * modules/closeout (Depends-on): Remove atexit.
12532
12533 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
12534
12535         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
12536         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
12537
12538 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
12539
12540         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
12541         __EXTENSIONS__ if this causes compilation to fail.  Problem
12542         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
12543         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
12544
12545 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
12546
12547         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
12548         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
12549         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
12550         All uses changed.
12551
12552 2006-01-26  Simon Josefsson  <jas@extundo.com>
12553
12554         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
12555         prototype is visible on mingw32.
12556
12557         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
12558         for mingw32.
12559
12560         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
12561         mingw32).
12562
12563 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
12564
12565         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
12566         attempt to open for write; this always fails, at least on POSIX
12567         hosts.  This reinstates the 2006-01-09 change, which was
12568         inadvertently removed.
12569
12570 2006-01-26  Bruno Haible  <bruno@clisp.org>
12571
12572         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
12573         Reported by Paul Eggert.
12574
12575 2006-01-26  Bruno Haible  <bruno@clisp.org>
12576             Paul Eggert  <eggert@cs.ucla.edu>
12577
12578         * lib/stdbool_.h (_Bool)
12579         [(! (defined __cplusplus || defined __BEOS__)
12580           && !defined __GNUC__
12581           && !(defined __HP_cc || defined __xlc__
12582                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
12583                || defined __sgi))]:
12584         #define to signed char in these cases too; this simplifies
12585         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
12586         etc., separately) and makes it more conservative.
12587
12588 2006-01-25  Simon Josefsson  <jas@extundo.com>
12589
12590         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
12591         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
12592         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
12593
12594 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
12595
12596         * lib/argp-namefrob.h: Bugfix. Remove stray #
12597
12598 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
12599
12600         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
12601         so that we test the test.
12602         Check for yet another HP-UX cc bug involving *bool |= bool.
12603
12604 2006-01-25  Karl Berry  <karl@gnu.org>
12605
12606         * config/srclist.txt (vasnprintf.c): sync lost.
12607
12608 2006-01-25  Jim Meyering  <jim@meyering.net>
12609
12610         Sync from the stable (b5) branch of coreutils:
12611
12612         * lib/fts.c (fts_children): Don't let close() clobber errno from
12613         failed fchdir().
12614
12615         * lib/fts.c (fts_stat): When following a symlink-to-directory,
12616         don't necessarily interpret stat-fails+lstat-succeeds as indicating
12617         a dangling symlink.  That can also happen at least for ELOOP.
12618         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
12619         FYI, this bug predates the inclusion of fts.c in coreutils.
12620
12621         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
12622         in their own block, so pre-c99 compilers don't object.
12623
12624         Avoid the double-free (first in fts_read, second in fts_close) that
12625         would occur when an `active' directory is made inaccessible (e.g.,
12626         via chmod a-x) during a traversal.
12627         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
12628         before returning.  Reproduce this failure by
12629         mkdir -p a/b; cd a; chmod a-x . b
12630         Reported by Stavros Passas.
12631
12632 2006-01-25  Jim Meyering  <jim@meyering.net>
12633
12634         * lib/fileblocks.c: Remove more useless parentheses.
12635         * lib/readutmp.h: Likewise.
12636
12637 2006-01-25  Bruno Haible  <bruno@clisp.org>
12638
12639         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
12640         warnings.
12641         Reported by Paul Eggert.
12642
12643 2006-01-25  Bruno Haible  <bruno@clisp.org>
12644
12645         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
12646         rid of a trap command. For Solaris sh.
12647         Reported by Mark D. Baushke <mdb@gnu.org>.
12648
12649 2006-01-24  Simon Josefsson  <jas@extundo.com>
12650
12651         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
12652         Bruno.
12653
12654 2006-01-24  Karl Berry  <karl@gnu.org>
12655
12656         * config/srclist.txt (argp-namefrob.h): sync lost.
12657
12658 2006-01-24  Jim Meyering  <jim@meyering.net>
12659
12660         * modules/openat (Files): Add lib/intprops.h.
12661         From Mark D. Baushke.
12662
12663 2006-01-24  Jim Meyering  <jim@meyering.net>
12664
12665         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
12666         Reported by Mark D. Baushke.
12667
12668 2006-01-24  Jim Meyering  <jim@meyering.net>
12669
12670         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
12671
12672 2006-01-24  Bruno Haible  <bruno@clisp.org>
12673
12674         * modules/strnlen (Maintainer): Change from glibc to all.
12675
12676 2006-01-24  Bruno Haible  <bruno@clisp.org>
12677
12678         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
12679         Patch by Paul Eggert.
12680
12681 2006-01-24  Bruno Haible  <bruno@clisp.org>
12682
12683         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
12684         already has it.
12685         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
12686         2005-11-26.
12687
12688         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
12689         'signed char' to avoid problems with the built-in _Bool type.
12690         Reported by Paul Eggert on 2005-11-26.
12691
12692 2006-01-24  Bruno Haible  <bruno@clisp.org>
12693
12694         * gnulib-tool (func_import): Avoid constructing complicated sed
12695         expressions inside backquote.
12696         Report and solution by Mark D. Baushke <mdb@gnu.org>.
12697
12698 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
12699
12700         These changes imported from libc.
12701         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
12702         test and two separate function calls.
12703         * lib/strndup.c (__strndup): Add libc_hidden_def.
12704
12705 2006-01-23  Simon Josefsson  <jas@extundo.com>
12706
12707         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
12708         Remove the test_*_SOURCES variable: automake infers it by default.
12709         * modules/tls-tests: Likewise.
12710
12711 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
12712
12713         Work around porting bugs reported by Dieter in
12714         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
12715         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
12716         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
12717         Include "getopt.h" first, to check interface.
12718         (getenv): Declare only if defined HAVE_DECL_GETENV &&
12719         !HAVE_DECL_GETENV.
12720         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
12721         (__strndup): Revert to K&R-style function dfns, the glibc style.
12722         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
12723         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
12724         Include strnlen.h first, to get prototype properly.
12725         (strnlen): Renamed from __strnlen.
12726         Remove weak alias.
12727
12728 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
12729
12730         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
12731
12732 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
12733
12734         * config/srclist.txt: Adjust to reflect glibc reorganization.
12735         This affects only comments.
12736
12737 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12738
12739          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
12740          Reported by Bruce Korb <bkorb@gnu.org>.
12741
12742 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
12743
12744         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
12745         to pacify gcc -Wswitch-default.
12746
12747 2006-01-22  Bruno Haible  <bruno@clisp.org>
12748
12749         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
12750         temporary buffer for sprintf, take into account the precision also
12751         for 'd', 'i', 'u', 'o', 'x', 'X'.
12752
12753 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
12754
12755         * modules/argp-tests: New module
12756         * tests/test-argp.c: New file
12757         * tests/test-argp-2.sh: New file
12758
12759 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
12760
12761         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
12762         (__argp_base_name): Removed
12763         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
12764         typo.
12765         (__argp_base_name): Provide macro definition or extern declaration
12766         depending on the configuration
12767
12768 2006-01-20  Simon Josefsson  <jas@extundo.com>
12769
12770         * modules/inet_ntop (Depends-on): Depend on sys_socket.
12771
12772 2006-01-20  Simon Josefsson  <jas@extundo.com>
12773
12774         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
12775
12776 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12777
12778         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
12779         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
12780         Suggested by Bruno Haible.
12781
12782 2006-01-20  Karl Berry  <karl@gnu.org>
12783
12784         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
12785         until changes propagate, I guess.
12786
12787 2006-01-19  Simon Josefsson  <jas@extundo.com>
12788
12789         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
12790
12791 2006-01-19  Simon Josefsson  <jas@extundo.com>
12792
12793         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
12794
12795 2006-01-19  Simon Josefsson  <jas@extundo.com>
12796
12797         * gnulib-tool: Set check_PROGRAMS.
12798
12799         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
12800         modules/des-tests, modules/gc-arcfour-tests,
12801         modules/gc-arctwo-tests, modules/gc-des-tests,
12802         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
12803         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
12804         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
12805         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
12806         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
12807         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
12808         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
12809         test_*_SOURCES.
12810
12811 2006-01-18  Simon Josefsson  <jas@extundo.com>
12812
12813         * modules/socklen (Depends-on): Depend on sys_socket.
12814
12815 2006-01-18  Simon Josefsson  <jas@extundo.com>
12816
12817         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
12818         modules/des-tests, modules/gc-arcfour-tests,
12819         modules/gc-arctwo-tests, modules/gc-des-tests,
12820         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
12821         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
12822         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
12823         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
12824         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
12825         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
12826         $(EXEEXT) to automake TESTS variable, for mingw32.
12827
12828 2006-01-17  Simon Josefsson  <jas@extundo.com>
12829
12830         * modules/socklen (Include): Need sys/socket.h.
12831
12832 2006-01-17  Bruno Haible  <bruno@clisp.org>
12833
12834         * modules/ssize_t (Include): Add <sys/types.h>.
12835
12836 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
12837
12838         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
12839         it's not portable and it doesn't work with cross-compiles.
12840         Problem reported by Bruno Haible.  Fix missing-$ typo in
12841         'test "gl_cv_ignore_unused_libraries" ...' that prevented
12842         -zignore from being used with Sun's C compiler.
12843
12844 2006-01-12  Simon Josefsson  <jas@extundo.com>
12845
12846         * lib/base64.c: Fix warning, reported by Bruno Haible
12847         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
12848
12849 2006-01-12  Bruno Haible  <bruno@clisp.org>
12850
12851         * modules/ldd: New file.
12852         * build-aux/ldd.sh.in: New file.
12853         * MODULES.html.sh (Support for building libraries and executables): Add
12854         ldd.
12855
12856 2006-01-12  Bruno Haible  <bruno@clisp.org>
12857
12858         * m4/ldd.m4: New file.
12859
12860 2006-01-12  Bruno Haible  <bruno@clisp.org>
12861
12862         * gnulib-tool (func_import, func_create_testdir): Don't go into an
12863         endless loop while replacing $auxdir with build-aux.
12864
12865 2006-01-11  Simon Josefsson  <jas@extundo.com>
12866
12867         * lib/stdint_.h (SIZE_MAX): Add missing (.
12868
12869 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
12870
12871         Sync from coreutils.
12872         * lib/md5.c: Fix commentary typos.
12873         (alignof, UNALIGNED_P): No need for a GCC-specific version.
12874         * lib/md5.h (__attribute__): Remove; unused.
12875         * lib/sha1.c: Fix commentary to match md5 better.
12876         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
12877         so that we don't need to worry about alignment.  All uses changed.
12878         This merges the 2005-10-28 md5 change into sha1.
12879
12880 2006-01-11  Jim Meyering  <jim@meyering.net>
12881
12882         Sync from coreutils.
12883         * lib/md5.c (OP): Fix spacing.
12884
12885 2006-01-11  Bruno Haible  <bruno@clisp.org>
12886
12887         Ensure automatic ordering between gl_LOCK and gl_ARGP.
12888         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
12889         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
12890
12891 2006-01-11  Bruno Haible  <bruno@clisp.org>
12892
12893         Ensure automatic ordering between gl_LOCK and gl_ARGP.
12894         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
12895         the "early" section as well.
12896
12897 2006-01-11  Bruno Haible  <bruno@clisp.org>
12898
12899         Avoid "ar: no archive members specified" error on MacOS X.
12900         * gnulib-tool (func_modules_add_dummy): New function.
12901         (func_import, func_create_testdir): Invoke it.
12902
12903 2006-01-11  Bruno Haible  <bruno@clisp.org>
12904
12905         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
12906         with $auxdir in AC_CONFIG_FILES statements.
12907
12908 2006-01-11  Bruno Haible  <bruno@clisp.org>
12909
12910         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12911         Initialize also noinst_HEADERS to empty.
12912
12913 2006-01-11  Bruno Haible  <bruno@clisp.org>
12914
12915         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
12916         variables.
12917         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
12918         autoreconf.
12919
12920 2006-01-11  Bruno Haible  <bruno@clisp.org>
12921
12922         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
12923         overridable by the user.
12924         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12925
12926 2006-01-10  Simon Josefsson  <jas@extundo.com>
12927
12928         * modules/sys_socket: New file.
12929
12930 2006-01-10  Simon Josefsson  <jas@extundo.com>
12931
12932         * m4/sys_socket_h.m4: New file.
12933
12934 2006-01-10  Simon Josefsson  <jas@extundo.com>
12935
12936         * lib/socket_.h: New file.
12937
12938 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
12939
12940         * modules/readutmp (Maintainer): Add myself.
12941
12942 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
12943
12944         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
12945         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
12946         People who are still concerned with buggy memcmp implementations
12947         can invoke gl_FUNC_MEMCMP themselves.
12948
12949 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
12950
12951         * lib/regex_internal.h (BITSET_WORD_BITS):
12952         Work around a bug in 64-bit PGC (before version 6.1-2), where the
12953         preprocessor mishandles large unsigned values as if they were signed.
12954         Problem reported by Claudio Fontana in
12955         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
12956
12957 2006-01-10  Jim Meyering  <jim@meyering.net>
12958
12959         Avoid the double-free (first in fts_read, second in fts_close) that
12960         would occur when an `active' directory is made inaccessible (e.g.,
12961         via chmod a-x) during a traversal.
12962         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
12963         before returning.  Reproduce this failure by
12964         mkdir -p a/b; cd a; chmod a-x . b
12965         Reported by Stavros Passas.
12966
12967         Sync from coreutils.
12968         * lib/sha1.c: Tweak grammar in a comment.
12969
12970 2006-01-10  Jim Meyering  <jim@meyering.net>
12971
12972         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
12973         Patch by Joerg Sonnenberger.
12974
12975 2006-01-10  Bruno Haible  <bruno@clisp.org>
12976
12977         * modules/readutmp: Depend on module free.
12978         * modules/strtok_r: Depend on module restrict.
12979
12980 2006-01-10  Bruno Haible  <bruno@clisp.org>
12981
12982         * modules/gettext (configure.ac): Add an invocation of
12983         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
12984
12985 2006-01-10  Bruno Haible  <bruno@clisp.org>
12986
12987         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
12988         Reported by Werner Lemberg <wl@gnu.org>.
12989
12990 2006-01-10  Bruno Haible  <bruno@clisp.org>
12991
12992         * lib/localcharset.c: Update from GNU gettext.
12993
12994 2006-01-10  Bruno Haible  <bruno@clisp.org>
12995
12996         * lib/argp.h (__const): Remove macro. Use const instead.
12997         * lib/argp-fmtstream.h (__const): Likewise.
12998         * lib/glob_.h (__const): Remove macro.
12999         * lib/glob-libc.h: Use const instead of __const.
13000
13001 2006-01-10  Bruno Haible  <bruno@clisp.org>
13002
13003         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
13004         variable.
13005         Needed to avoid an automake error regarding the 'gettext' module.
13006
13007 2006-01-09  Simon Josefsson  <jas@extundo.com>
13008
13009         * modules/inet_ntop (Depends-on): Add restrict.
13010
13011 2006-01-09  Simon Josefsson  <jas@extundo.com>
13012
13013         * modules/gc-rijndael-tests (License): Put under LGPL.
13014
13015         * modules/gc-des-tests (License): Likewise.
13016
13017         * modules/gc-arcfour-tests (License): Likewise.
13018
13019         * modules/gc-arctwo-tests (License): Likewise.
13020
13021         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
13022
13023         * modules/gc-hmac-sha1-tests (Files): Likewise.
13024
13025         * modules/gc-hmac-md5-tests (License): Likewise.
13026
13027         * modules/gc-sha1-tests (License): Likewise.
13028
13029         * modules/gc-md5-tests (License): Likewise.
13030
13031         * modules/gc-md4-tests (License): Likewise.
13032
13033         * modules/gc-md2-tests (License): Likewise.
13034
13035         * modules/gc-tests (License): Likewise.
13036
13037         * modules/des-tests (License): Likewise.
13038
13039         * modules/md4-tests (License): Likewise.
13040
13041         * modules/md2-tests (License): Likewise.
13042
13043 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
13044
13045         Sync from coreutils:
13046
13047         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
13048         * modules/lib-ignore: New file.
13049         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
13050         chdir-safer.m4, lchmod.m4.
13051         * modules/openat: Add mkdirat.c, openat-priv.h.
13052
13053 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
13054
13055         Sync from coreutils.
13056         * m4/lib-ignore.m4: New file.
13057         * m4/lchmod.m4: New file.
13058
13059 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
13060
13061         Sync from coreutils.
13062         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
13063         for write access: POSIX says that must fail.
13064         * lib/fts.c (diropen): Likewise.
13065         * lib/save-cwd.c (save_cwd): Likewise.
13066         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
13067         well, for minor improvements on hosts that lack O_DIRECTORY.
13068         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
13069         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
13070         Fall back on chown if open failed with EACCES.
13071
13072         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
13073         Report an error at compile-time if only a 1-second nominal clock
13074         resolution is found.
13075
13076         * lib/lchmod.h: New file.
13077         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
13078         (make_dir_parents): Use lchown rather than chown, and
13079         lchmod rather than chmod.
13080
13081         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
13082         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
13083         "proc" reported by n0dalus.
13084
13085         * lib/mountlist.c: Include <limits.h>.
13086         (dev_from_mount_options)
13087         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
13088         New function.  It no longer assumes "dev=" has the System V meaning
13089         on Linux (since it doesn't).  It also parses "dev=" more carefully.
13090         (read_file_system_list)
13091         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
13092         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
13093         dev= in that case.
13094
13095         * lib/posixtm.h (PDS_PRE_2000): New macro.
13096         * lib/posixtm.c (year): Arg is now syntax_bits rather than
13097         allow_century.  All usages changed.  Reject dates outside the range
13098         1969-1999 if PDS_PRE_2000 is used.
13099
13100 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
13101
13102         Sync from coreutils.
13103         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
13104         (Time of day items): Mention the possibility of leap seconds.
13105         Problem reported by Dr. David Alan Gilbert.
13106
13107 2006-01-09  Jim Meyering  <jim@meyering.net>
13108
13109         Sync from coreutils.
13110
13111         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
13112
13113         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
13114
13115         * lib/modechange.c (mode_compile): Reject an invalid mode string
13116         that starts with an octal digit.  From Andreas Gruenbacher.
13117
13118         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
13119         and dup to open_safer and dup_safer, respectively.
13120         (openat_permissive): Fix typo in comment.
13121
13122         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
13123         "gettext.h"; either no longer needed or are guaranteed by openat.h.
13124         (_): Remove; no longer needed.
13125         (openat): Renamed from rpl_openat; no need for rpl_openat
13126         since openat.h renames openat for us.
13127         Replace most of the body with a call to openat_permissive,
13128         to avoid duplicate code.
13129         Port to (probably hypothetical) environments were mode_t is
13130         wider than int.
13131         (openat_permissive): Require mode arg, so that we can check
13132         types better.  Put it just after flags.  Change cwd failure
13133         indicator from pointer-to-bool to pointer-to-errno-value.
13134         All callers changed.
13135         Invoke openat_save_fail and/or openat_restore_fail if
13136         cwd_errno is null, so that openat can call us.
13137         (openat_permissive, fdopendir, fstatat, unlinkat):
13138         Simplify errno handling to avoid some duplicate code,
13139         as it's OK to set errno on success.
13140         * lib/openat.h: Revamp code so that function macros depend on
13141         __OPENAT_PREFIX only, not also on AT_FDCWD.
13142         (openat_ro): Remove.  Caller changed to use openat_permissive.
13143         (openat_permissive): Now a macro, if not a function.
13144         (openat_restore_fail, openat_save_fail): Now always functions,
13145         since mkdirat needs them even if __OPENAT_PREFIX is defined.
13146
13147         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
13148         and openat.c.
13149         * lib/mkdirat.c: Include openat-priv.h.
13150         Remove definitions of macros defined therein.
13151         * lib/openat.c: Likewise.
13152
13153         * lib/mkdirat.c (mkdirat): New file and function.
13154         * lib/openat.h (mkdirat): Declare.
13155
13156         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
13157
13158         * lib/openat.h (openat_permissive): Declare.
13159         (openat_ro): Define.
13160
13161         * lib/openat.c (EXPECTED_ERRNO): New macro.
13162         (openat_permissive): New function -- used in remove.c rewrite.
13163         (all functions): Set errno just before returning, only if there
13164         was an actual failure.
13165         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
13166
13167         Emulate openat-family functions using Linux's procfs, if possible.
13168         Idea and some code based on Ulrich Drepper's glibc changes.
13169
13170         * lib/openat.c: (BUILD_PROC_NAME): New macro.
13171         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
13172         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
13173         before falling back on save_cwd and restore_cwd.
13174         (fdopendir, fstatat, unlinkat): Likewise.
13175
13176         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
13177         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
13178
13179         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
13180         as second argument to va_arg.  Otherwise, some versions of gcc
13181         warn that `if this code is reached, the program will abort'.
13182
13183 2006-01-09  Jim Meyering  <jim@meyering.net>
13184
13185         Sync from coreutils.
13186         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
13187         Require openat-priv.h.
13188
13189 2006-01-09  Bruno Haible  <bruno@clisp.org>
13190
13191         * modules/strnlen (Include): Use strnlen.h.
13192
13193 2006-01-09  Bruno Haible  <bruno@clisp.org>
13194
13195         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
13196
13197 2006-01-09  Bruno Haible  <bruno@clisp.org>
13198
13199         * lib/sysexit_.h (EX_OK): New macro.
13200         Suggested by Martin Lambers <marlam@marlam.de>.
13201
13202 2006-01-09  Bruno Haible  <bruno@clisp.org>
13203
13204         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
13205         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
13206
13207 2006-01-09  Bruno Haible  <bruno@clisp.org>
13208
13209         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
13210         numbers.
13211
13212 2006-01-09  Bruno Haible  <bruno@clisp.org>
13213
13214         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
13215         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
13216         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
13217         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
13218
13219 2006-01-09  Bruno Haible  <bruno@clisp.org>
13220
13221         * build-aux/javacomp.sh.in: New file, moved from lib/.
13222         * modules/javacomp-script (Files): Update.
13223         (configure.ac): Add AC_CONFIG_FILES invocation.
13224         (EXTRA_DIST): Remove variable.
13225
13226         * build-aux/javaexec.sh.in: New file, moved from lib/.
13227         * modules/javaexec (Files): Update.
13228         (configure.ac): Add AC_CONFIG_FILES invocation.
13229         (EXTRA_DIST): Remove javaexec.sh.in.
13230
13231         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
13232         * modules/csharpcomp-script (Files): Update.
13233         (configure.ac): Add AC_CONFIG_FILES invocation.
13234         (EXTRA_DIST): Remove variable.
13235
13236         * build-aux/csharpexec.sh.in: New file, moved from lib/.
13237         * modules/csharpexec (Files): Update.
13238         (configure.ac): Add AC_CONFIG_FILES invocation.
13239         (EXTRA_DIST): Remove csharpexec.sh.in.
13240
13241 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
13242
13243         Sync from coreutils.
13244
13245         Add POSIX ACL support
13246         * lib/acl.h (copy_acl, set_acl): Add declarations.
13247         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
13248         systems other than Linux.
13249         (chmod_or_fchmod): New function: use fchmod when possible,
13250         and chmod otherwise.
13251         (file_has_acl): Add a POSIX ACL implementation, with a
13252         Linux-specific subcase.
13253         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
13254         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
13255         acls are unsupported.
13256         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
13257         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
13258         are unsupported.
13259
13260 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
13261
13262         Sync from coreutils.
13263         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
13264
13265 2006-01-07  Bruno Haible  <bruno@clisp.org>
13266
13267         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
13268         gl_EARLY.
13269
13270 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
13271
13272         * lib/strftime.c (tzname): Don't declare if it is already #defined.
13273         Problem reported for Mingw by Mark Junker.
13274
13275 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
13276
13277         * README: Gnulib normally doesn't generate a tarball.
13278
13279 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
13280
13281         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
13282         long int, not int, for nanosecond counts, so that people who are
13283         used to POSIX struct timespec won't be surprised.  Reported by Jim
13284         Meyering.
13285
13286 2005-12-28  Bruno Haible  <bruno@clisp.org>
13287
13288         * build-aux/config.rpath: Update from GNU gettext.
13289
13290 2005-12-16  Jim Meyering  <jim@meyering.net>
13291
13292         * modules/fprintftime: New module.
13293         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
13294
13295 2005-12-16  Jim Meyering  <jim@meyering.net>
13296
13297         * m4/fprintftime.m4: New file.
13298
13299 2005-12-16  Jim Meyering  <jim@meyering.net>
13300
13301         * lib/fprintftime.c, lib/fprintftime.h: New files.
13302
13303 2005-12-15  Simon Josefsson  <jas@extundo.com>
13304
13305         * modules/socklen (configure.ac): Fix M4 macro name, to align with
13306         new m4/socklen.m4.
13307
13308 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
13309
13310         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
13311         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
13312
13313 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
13314
13315         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
13316         * lib/argp-help.c (fill_in_uparams): Check if the constructed
13317         struct uparams is valid. Fall back to the default values if it is
13318         not.
13319
13320 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13321
13322         * modules/argp (Files): Add argp-pin.c
13323         (Depends-on): dirname
13324         (lib_SOURCES): Add argp-pin.c
13325
13326 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13327
13328         * m4/argp.m4:  Check if program_invocation_name and
13329         program_invocation_short_name are declared and define appropriate
13330         macros if they are not.
13331
13332 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13333
13334         * lib/argp-help.c (__argp_base_name): New function
13335         (__argp_short_program_name): Rewrite using __argp_base_name
13336         * lib/argp-namefrob.h: Define program_invocation_name and
13337         program_invocation_short_name if requested
13338         (__argp_base_name): Add prototype
13339         * lib/argp-parse.c (argp_def): Use gettext wrappers
13340         (argp_default_parser): Use __argp_base_name
13341         * lib/argp-pin.c: New file. Defines program_invocation_name and
13342         program_invocation_short_name on systems that lack them.
13343
13344 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
13345
13346         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
13347         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
13348         porting problem reported by Georg Schwarz in
13349         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
13350
13351 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
13352
13353         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
13354         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
13355         porting problem reported by Georg Schwarz in
13356         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
13357
13358 2005-12-05  Bruno Haible  <bruno@clisp.org>
13359
13360         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
13361         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
13362         Reported by Mark Junker <mjscod@gmx.de>.
13363
13364 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
13365
13366         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
13367         Use implementation from Albert Chin, with some
13368         comments/corrections by Stepan Kasal and myself.
13369
13370 2005-12-02  Bruno Haible  <bruno@clisp.org>
13371
13372         * gnulib-tool (func_import): Accept GPLed build tool modules when
13373         --lgpl is given.
13374         * modules/csharpcomp-script: New file.
13375         * modules/csharpcomp: Depend on it.
13376         * modules/javacomp-script: New file.
13377         * modules/javacomp: Depend on it.
13378         Suggested by Simon Josefsson.
13379
13380 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
13381
13382         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
13383         statement, to work around an HP-UX 10.20 compiler bug reported by
13384         Peter O'Gorman.
13385
13386 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
13387
13388         * modules/savedir (Depends-on): Add openat.
13389
13390 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
13391
13392         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
13393         (uintmax_t) [defined uintmax_t]: Do not declare.
13394         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
13395         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
13396         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
13397         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
13398         sake of portability to weird hosts that C allows (though we don't
13399         know of any practical examples).
13400
13401         * lib/savedir.h (fdsavedir): New decl.
13402         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
13403         contains most of the former guts of savedir.
13404         (savedir): Use savedirstream.
13405         Include "openat.h".
13406
13407 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
13408
13409         * modules/obstack (Files): Add m4/ulonglong.m4.
13410         Problem reported by Davide Angelocola.
13411
13412 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
13413
13414         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
13415         coreutils no longer futzes with rounding modes.
13416
13417 2005-11-14  Jim Meyering  <jim@meyering.net>
13418
13419         * lib/mkstemp-safer.c: Include <config.h>, required for possible
13420         replacement of mkstemp.
13421
13422 2005-11-10  Simon Josefsson  <jas@extundo.com>
13423
13424         * lib/readline.c: Remove EOL.
13425
13426 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13427
13428         * modules/gethrxtime (Depends-on): Add gettime.
13429
13430 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13431
13432         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
13433         or gettimeofday; no longer needed.
13434
13435 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13436
13437         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
13438         time business.
13439         (gethrxtime) [! (HAVE_NANOUPTIME
13440         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
13441         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
13442         our own approximation.
13443
13444 2005-11-08  Eric Blake  <ebb9@byu.net>
13445
13446         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
13447
13448 2005-11-08  Eric Blake  <ebb9@byu.net>
13449
13450         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
13451
13452 2005-11-04  Bruno Haible  <bruno@clisp.org>
13453
13454         * gnulib-tool: Implement --update mode.
13455
13456 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
13457
13458         Fix porting problem reported by Theodoros V. Kalamatianos.
13459         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
13460         Don't assume that futimes failing means we must fail.
13461
13462 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
13463
13464         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
13465         variables to suggest the intended function of the PATH_MAX check.
13466
13467 2005-10-30  Kean Johnston  <jkj@sco.com>
13468
13469         Trivial changes to support SCO systems.
13470         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
13471         as PATH_MAX.
13472         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
13473         where __ptr is null when no I/O is pending.
13474
13475 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13476
13477         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
13478         leave errno alone.  Problem reported by Dmitry V. Levin.
13479
13480 2005-10-28  Simon Josefsson  <jas@extundo.com>
13481
13482         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
13483         Test more.
13484
13485         * tests/test-gc-md2.c, tests/test-md2.c: New files.
13486
13487         * modules/md2, modules/md2-tests: New files.
13488
13489 2005-10-28  Simon Josefsson  <jas@extundo.com>
13490
13491         * m4/inet_ntop.m4: More tests.
13492
13493         * m4/gc-md2.m4, md2.m4: New file.
13494
13495 2005-10-28  Simon Josefsson  <jas@extundo.com>
13496
13497         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
13498         "restrict" keywords, as per POSIX.  Protect the function
13499         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
13500         Don't use K&R prototypes.  Check the sprintf return values.
13501         Re-define EAFNOSUPPORT if not present.  Indent.
13502
13503         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
13504         suggested by Bruno Haible <bruno@clisp.org>.
13505
13506         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
13507
13508         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
13509
13510         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
13511         libgcrypt).
13512
13513         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
13514
13515         * lib/md2.h, lib/md2.c: New files.
13516
13517 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
13518
13519         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
13520         errno alone.  Problem reported by Frederic Jolliton.
13521
13522 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
13523
13524         * modules/verify (License): Change from GPL to LGPL.  This is a
13525         tiny module and there are apparently near-equivalents that are
13526         under the BSD license.
13527
13528 2005-10-24  Simon Josefsson  <jas@extundo.com>
13529
13530         * modules/sha1: Relicense to LGPL.
13531
13532 2005-10-24  Simon Josefsson  <jas@extundo.com>
13533
13534         * lib/md4.h: Shrink buffer size, now that we changed the type.
13535
13536 2005-10-23  Simon Josefsson  <jas@extundo.com>
13537
13538         * gnulib-tool (func_import): Fix --tests-base.
13539
13540 2005-10-22  Simon Josefsson  <jas@extundo.com>
13541
13542         * modules/arcfour (Depends-on): Need stdint.
13543
13544 2005-10-22  Simon Josefsson  <jas@extundo.com>
13545
13546         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
13547         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
13548
13549 2005-10-22  Simon Josefsson  <jas@extundo.com>
13550
13551         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
13552         suggested by Bruno Haible <bruno@clisp.org>.
13553
13554 2005-10-22  Simon Josefsson  <jas@extundo.com>
13555
13556         * lib/crc.h: Include stddef.h, for size_t.
13557
13558 2005-10-22  Simon Josefsson  <jas@extundo.com>
13559
13560         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
13561         arcfour_context struct (simplify test vector testing in GNU
13562         Shishi).
13563
13564 2005-10-21  Simon Josefsson  <jas@extundo.com>
13565
13566         * modules/des, modules/des-tests: New files.
13567
13568         * modules/gc-des, modules/gc-des-tests: New files.
13569
13570         * tests/test-des.c, tests/test-gc-des.c: New file.
13571
13572 2005-10-21  Simon Josefsson  <jas@extundo.com>
13573
13574         * modules/arctwo, modules/arctwo-tests: New files.
13575
13576         * tests/test-arctwo.c: New file.
13577
13578         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
13579
13580         * tests/test-gc-arctwo.c: New file.
13581
13582 2005-10-21  Simon Josefsson  <jas@extundo.com>
13583
13584         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
13585         Bruno Haible <bruno@clisp.org>.
13586
13587         * m4/gc-des.m4: New file.
13588
13589 2005-10-21  Simon Josefsson  <jas@extundo.com>
13590
13591         * m4/arctwo.m4: New file.
13592
13593         * m4/gc-arctwo.m4: New file.
13594
13595 2005-10-21  Simon Josefsson  <jas@extundo.com>
13596
13597         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
13598         block.
13599
13600 2005-10-21  Simon Josefsson  <jas@extundo.com>
13601
13602         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
13603         <bruno@clisp.org>.
13604
13605         * lib/hmac-sha1.c (hmac_sha1): Likewise.
13606
13607         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
13608         Bruno Haible <bruno@clisp.org>.
13609
13610         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
13611         <bruno@clisp.org>.
13612
13613 2005-10-21  Simon Josefsson  <jas@extundo.com>
13614
13615         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
13616
13617 2005-10-21  Simon Josefsson  <jas@extundo.com>
13618
13619         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
13620
13621 2005-10-21  Simon Josefsson  <jas@extundo.com>
13622
13623         * lib/des.h, lib/des.c: New files.
13624
13625         * lib/gc-gnulib.c: Support DES.c
13626
13627 2005-10-21  Simon Josefsson  <jas@extundo.com>
13628
13629         * lib/arctwo.h, lib/arctwo.c: New files.
13630
13631         * lib/gc-gnulib.c: Support ARCTWO.
13632
13633 2005-10-21  Simon Josefsson  <jas@extundo.com>
13634
13635         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
13636         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
13637
13638 2005-10-21  Simon Josefsson  <jas@extundo.com>
13639
13640         * gnulib-tool (func_import, func_create_testdir): Define automake
13641         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
13642         Makefile.am snippet),
13643         suggested by Bruno Haible <bruno@clisp.org>.
13644
13645         * modules/gc (Makefile.am): Use it.
13646
13647 2005-10-21  Bruno Haible  <bruno@clisp.org>
13648
13649         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
13650         patch.
13651
13652 2005-10-19  Simon Josefsson  <jas@extundo.com>
13653
13654         * tests/test-gc-rijndael.c: New file.
13655
13656         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
13657
13658 2005-10-19  Simon Josefsson  <jas@extundo.com>
13659
13660         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
13661         interface too.
13662
13663 2005-10-19  Simon Josefsson  <jas@extundo.com>
13664
13665         * tests/test-gc-arcfour.c: New file.
13666
13667         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
13668
13669 2005-10-19  Simon Josefsson  <jas@extundo.com>
13670
13671         * modules/gc-md4, modules/gc-md4-tests: New file.
13672
13673         * tests/test-gc-md4.c: New file.
13674
13675 2005-10-19  Simon Josefsson  <jas@extundo.com>
13676
13677         * m4/gc-md4.m4: New file.
13678
13679 2005-10-19  Simon Josefsson  <jas@extundo.com>
13680
13681         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
13682         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
13683         <kasal@ucw.cz>.
13684
13685 2005-10-19  Simon Josefsson  <jas@extundo.com>
13686
13687         * m4/gc-arcfour.m4: New file.
13688
13689         * m4/gc-rijndael.m4: New file.
13690
13691 2005-10-19  Simon Josefsson  <jas@extundo.com>
13692
13693         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
13694
13695 2005-10-19  Simon Josefsson  <jas@extundo.com>
13696
13697         * lib/gc-gnulib.c: Support ARCFOUR.
13698
13699 2005-10-19  Simon Josefsson  <jas@extundo.com>
13700
13701         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
13702         support.
13703
13704         * lib/gc.h: Add ECB enum type.
13705
13706         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
13707
13708 2005-10-18  Simon Josefsson  <jas@extundo.com>
13709
13710         * tests/test-md5.c: New file.
13711
13712         * modules/md5-tests: New file.
13713
13714 2005-10-18  Simon Josefsson  <jas@extundo.com>
13715
13716         * tests/test-md4.c: New file.
13717
13718         * modules/md4, modules/md4-tests: New files.
13719
13720 2005-10-18  Simon Josefsson  <jas@extundo.com>
13721
13722         * m4/md4.m4: New file.
13723
13724 2005-10-18  Simon Josefsson  <jas@extundo.com>
13725
13726         * lib/md4.h, lib/md4.c: New files, based on md5.?.
13727
13728 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
13729
13730         * gnulib-tool (func_create_testdir): Omit the second check whether
13731         BUILT_SOURCES in nonempty.
13732
13733 2005-10-17  Simon Josefsson  <jas@extundo.com>
13734
13735         * tests/test-rijndael.c: New file.
13736
13737 2005-10-17  Simon Josefsson  <jas@extundo.com>
13738
13739         * modules/sha1: Depend on stdint instead of md5.
13740
13741         * modules/md5: Depend on stdint, remove uint32_t.
13742
13743 2005-10-17  Simon Josefsson  <jas@extundo.com>
13744
13745         * modules/gc-sha1-tests: New file.
13746
13747         * tests/test-gc-sha1.c: New file.
13748
13749 2005-10-17  Simon Josefsson  <jas@extundo.com>
13750
13751         * m4/md5.m4: Remove call to uint32_t.m4.
13752
13753 2005-10-17  Simon Josefsson  <jas@extundo.com>
13754
13755         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
13756
13757         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
13758         md5.h.
13759
13760         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
13761
13762         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
13763
13764 2005-10-17  Simon Josefsson  <jas@extundo.com>
13765
13766         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
13767
13768 2005-10-17  Simon Josefsson  <jas@extundo.com>
13769
13770         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
13771
13772 2005-10-17  Simon Josefsson  <jas@extundo.com>
13773
13774         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
13775
13776         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
13777
13778 2005-10-17  Bruno Haible  <bruno@clisp.org>
13779
13780         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
13781         that it can also be used in a test.
13782
13783 2005-10-16  Bruno Haible  <bruno@clisp.org>
13784
13785         * gnulib-tool (func_emit_tests_Makefile_am): Also define
13786         TESTS_ENVIRONMENT, so that individual tests can augment it.
13787
13788         * gnulib-tool (func_create_testdir): Use an intermediate target for
13789         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
13790         macros, like $(ALLOCA_H), which cannot be passed through the command
13791         line.
13792
13793 2005-10-15  Simon Josefsson  <jas@extundo.com>
13794
13795         * modules/rijndael-tests: New file.
13796
13797         * modules/rijndael: New file.
13798
13799 2005-10-15  Simon Josefsson  <jas@extundo.com>
13800
13801         * m4/rijndael.m4: New file.
13802
13803 2005-10-15  Simon Josefsson  <jas@extundo.com>
13804
13805         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
13806
13807         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
13808
13809 2005-10-14  Simon Josefsson  <jas@extundo.com>
13810
13811         * tests/test-arcfour.c: New file.
13812
13813         * modules/arcfour, modules/arcfour-tests: New files.
13814
13815 2005-10-14  Simon Josefsson  <jas@extundo.com>
13816
13817         * m4/arcfour.m4: New file.
13818
13819 2005-10-14  Simon Josefsson  <jas@extundo.com>
13820
13821         * lib/arcfour.h, lib/arcfour.c: New files.
13822
13823 2005-10-14  Roland McGrath  <roland@redhat.com>
13824
13825         Import from libc.  [BZ #1331]
13826         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
13827         macro argument.
13828         Reported by Matej Vela <vela@debian.org>.
13829
13830 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
13831
13832         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
13833         include <wchar.h>; no longer needed.
13834
13835 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
13836
13837         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
13838
13839 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
13840         and  Ulrich Drepper  <drepper@redhat.com>
13841
13842         Import from libc.
13843         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
13844         instead of inline stream orientation test and two separate
13845         function calls.  Pay no attention to USE_IN_LIBIO.
13846
13847 2005-10-13  Simon Josefsson  <jas@extundo.com>
13848
13849         * modules/gc-hmac-md5-tests: New file.
13850
13851         * tests/test-gc-hmac-sha1.c: New file.
13852
13853         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
13854
13855         * modules/gc-hmac-md5-tests: New file.
13856
13857         * tests/test-gc-md5.c: New file.
13858
13859         * modules/gc-md5-tests: New file.
13860
13861 2005-10-13  Simon Josefsson  <jas@extundo.com>
13862
13863         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
13864         Move memory allocation outside of loop.
13865
13866 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
13867
13868         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
13869         intermediate directory is in a read-only file system.  Problem
13870         reported by Eric Blake.
13871
13872 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
13873
13874         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
13875
13876 2005-10-12  Simon Josefsson  <jas@extundo.com>
13877
13878         * tests/test-hmac-sha1.c: New file.
13879
13880         * modules/hmac-sha1-tests: New file.
13881
13882         * modules/hmac-sha1: New file.
13883
13884 2005-10-12  Simon Josefsson  <jas@extundo.com>
13885
13886         * modules/gc-sha1: New file.
13887
13888 2005-10-12  Simon Josefsson  <jas@extundo.com>
13889
13890         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
13891
13892         * tests/test-gc-pbkdf2-sha1.c: New file.
13893
13894 2005-10-12  Simon Josefsson  <jas@extundo.com>
13895
13896         * modules/gc-md5, modules/gc-hmac-md5: New files.
13897
13898         * modules/gc (Files): Remove md5, memxor and hmac files.
13899
13900 2005-10-12  Simon Josefsson  <jas@extundo.com>
13901
13902         * m4/gc-pbkdf2-sha1.m4: New file.
13903
13904         * m4/gc-hmac-sha1.m4: New file.
13905
13906         * m4/gc-sha1: New file.
13907
13908         * m4/hmac-sha1.m4: New file.
13909
13910 2005-10-12  Simon Josefsson  <jas@extundo.com>
13911
13912         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
13913
13914         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
13915
13916 2005-10-12  Simon Josefsson  <jas@extundo.com>
13917
13918         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
13919         suggested by Bruno Haible <bruno@clisp.org>.
13920
13921 2005-10-12  Simon Josefsson  <jas@extundo.com>
13922
13923         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
13924
13925 2005-10-12  Simon Josefsson  <jas@extundo.com>
13926
13927         * lib/gc-pbkdf2-sha1.c: New file.
13928
13929         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
13930
13931 2005-10-12  Simon Josefsson  <jas@extundo.com>
13932
13933         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
13934
13935         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
13936
13937 2005-10-12  Simon Josefsson  <jas@extundo.com>
13938
13939         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
13940         GC_USE_HMAC_MD5, respectively.
13941
13942         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
13943         (gc_md5): Fix typo.
13944
13945         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
13946
13947         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
13948
13949         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
13950
13951 2005-10-12  Bruno Haible  <bruno@clisp.org>
13952
13953         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
13954         Reported by Stepan Kasal <kasal@ucw.cz>.
13955
13956 2005-10-11  Simon Josefsson  <jas@extundo.com>
13957
13958         * tests/test-crc.c: New file.
13959
13960         * modules/crc, modules/crc-tests: New files.
13961
13962 2005-10-11  Simon Josefsson  <jas@extundo.com>
13963
13964         * m4/crc.m4: New file.
13965
13966 2005-10-11  Simon Josefsson  <jas@extundo.com>
13967
13968         * lib/gc.h: Add gc_hash and gc_hash_buffer.
13969
13970         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
13971
13972         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
13973
13974 2005-10-11  Simon Josefsson  <jas@extundo.com>
13975
13976         * lib/crc.h, lib/crc.c: New files.
13977
13978         * lib/gc.h (gc_hash_buffer): Add doc.
13979
13980 2005-10-11  Bruno Haible  <bruno@clisp.org>
13981
13982         * modules/c-strcasestr: New file.
13983         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
13984
13985 2005-10-11  Bruno Haible  <bruno@clisp.org>
13986
13987         * modules/c-strcase: New file.
13988         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
13989
13990 2005-10-11  Bruno Haible  <bruno@clisp.org>
13991
13992         * lib/strcasecmp.c: Include limits.h.
13993         (strcasecmp): Avoid integer overflow on exotic platforms.
13994         * lib/strncasecmp.c: Include limits.h.
13995         (strncasecmp): Avoid integer overflow on exotic platforms.
13996         Reported by Paul Eggert.
13997
13998 2005-10-11  Bruno Haible  <bruno@clisp.org>
13999
14000         * lib/c-strcasestr.h: New file, from GNU gettext.
14001         * lib/c-strcasestr.c: New file, from GNU gettext.
14002
14003 2005-10-11  Bruno Haible  <bruno@clisp.org>
14004
14005         * lib/c-strcase.h: New file, from GNU gettext.
14006         * lib/c-strcasecmp.c: New file, from GNU gettext.
14007         * lib/c-strncasecmp.c: New file, from GNU gettext.
14008
14009 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
14010
14011         * modules/mempcpy (License): GPL -> LGPL.
14012         * modules/strchrnul (License): Likewise.
14013         * modules/sysexits (License): Likewise.
14014
14015 2005-10-08  Simon Josefsson  <jas@extundo.com>
14016
14017         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
14018
14019 2005-10-07  Simon Josefsson  <jas@extundo.com>
14020
14021         * m4/memxor.m4: Remove gl_C_RESTRICT call.
14022
14023 2005-10-06  Simon Josefsson  <jas@extundo.com>
14024
14025         * tests/test-hmac-md5.c: New file.
14026
14027         * modules/hmac-md5-tests: New file.
14028
14029         * modules/hmac-md5: New file.
14030
14031 2005-10-06  Simon Josefsson  <jas@extundo.com>
14032
14033         * m4/hmac-md5.m4: New file.
14034
14035         * m4/memxor.m4: Require gl_C_RESTRICT.
14036
14037 2005-10-06  Simon Josefsson  <jas@extundo.com>
14038
14039         * lib/memxor.c (memxor): Avoid casts and warnings.
14040
14041 2005-10-06  Simon Josefsson  <jas@extundo.com>
14042
14043         * lib/hmac-md5.c: New file.
14044
14045         * lib/hmac.h: New file.
14046
14047 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
14048
14049         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
14050         promotes to int, not unsigned int, to catch the AIX 5.3
14051         compiler bug.
14052
14053 2005-10-05  Simon Josefsson  <jas@extundo.com>
14054
14055         * modules/memxor: New file.
14056
14057         * modules/iconv (Files): Move config.rpath to havelib, it is used
14058         there.
14059
14060         * modules/havelib (Files): Add config.rpath.
14061
14062 2005-10-05  Simon Josefsson  <jas@extundo.com>
14063
14064         * m4/memxor.m4: New file.
14065
14066 2005-10-05  Simon Josefsson  <jas@extundo.com>
14067
14068         * lib/memxor.c (memxor): Fix compiler error.
14069
14070         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
14071         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
14072
14073         * lib/memxor.h, lib/memxor.c: New files.
14074
14075         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
14076         we assume all systems have it, suggested by Jim Meyering
14077         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
14078         any systems lack sys/socket.h; mingw32 is known to lack it, but we
14079         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
14080         same reasons.
14081
14082 2005-10-05  Simon Josefsson  <jas@extundo.com>
14083
14084         * config/srclist.txt: Add glibc bug 1423 for md5.h.
14085
14086 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
14087
14088         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
14089         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
14090         needed, since the source code now assumes these .h files.
14091
14092 2005-10-05  Derek Price  <derek@ximbiot.com>
14093
14094         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
14095
14096 2005-10-05  Bruno Haible  <bruno@clisp.org>
14097
14098         * modules/stdint (License): Change to LGPL.
14099
14100 2005-10-04  Simon Josefsson  <jas@extundo.com>
14101
14102         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
14103         D. Baushke" <mdb@gnu.org>.
14104
14105 2005-10-04  Bruno Haible  <bruno@clisp.org>
14106
14107         * lib/verify.h (verify_true): Provide alternative definition for C++.
14108
14109 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
14110
14111         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
14112         (SSIZE_MAX): New macro, if not already defined.
14113         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
14114         than 2 GiB.
14115
14116 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
14117
14118         Sync from coreutils.
14119         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
14120         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
14121         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
14122         ULLONG_MAX doesn't work with 2.7.2.1.
14123
14124 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
14125
14126         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
14127         From Ben Pfaff.
14128
14129         * modules/exclude (Depends-on): Depend on verify.
14130         * modules/strtoimax (Depends-on): Likewise.
14131         * modules/utimecmp (Depends-on): Likewise.
14132
14133 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
14134
14135         * lib/exclude.c: Include verify.h.
14136         (verify): Remove.  All callers changed to use verify.h's version.
14137         * lib/strtoimax.c: Likewise.
14138         * lib/utimecmp.c: Likewis.e
14139
14140         Sync from coreutils.
14141         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
14142         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
14143         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
14144         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
14145         bother returning ENOSYS if settimeofday or stime fails; just let
14146         them return whatever errno they want to return.
14147         * lib/utimens.c: Include unistd.h, for dup2.
14148         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
14149         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
14150
14151 2005-10-02  Jim Meyering  <jim@meyering.net>
14152
14153         Sync from coreutils.
14154         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
14155         from glibc-2.2.5 that fails for read-only files.
14156
14157 2005-10-02  Jim Meyering  <jim@meyering.net>
14158
14159         Sync from coreutils.
14160         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
14161         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
14162         `#if HAVE_CONFIG_H'.
14163         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
14164         Remove AT_FDCWD test.
14165         Do not consume the fd unless successful.
14166         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
14167         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
14168         block, so that we don't even try to compile it if settimeofday is
14169         available.  This works around a compilation failure on OSF1 V5.1,
14170         due to stime requiring a `long int*' while tv_sec is `int'.
14171
14172 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
14173
14174         Sync from coreutils.
14175         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
14176         against `yes', rather than just testing for nonempty.
14177
14178 2005-10-01  Simon Josefsson  <jas@extundo.com>
14179
14180         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
14181         and Darwin.
14182
14183         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
14184         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
14185         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
14186         freeaddrinfo and gai_strerror are declared by the POSIX headers.
14187         Check if struct addrinfo is declared.
14188
14189 2005-10-01  Simon Josefsson  <jas@extundo.com>
14190
14191         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
14192         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
14193         AI_* and EAI_* definitions.  Protect function declarations.
14194
14195 2005-10-01  Jim Meyering  <jim@meyering.net>
14196
14197         Sync from coreutils.
14198
14199         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
14200         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
14201         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
14202         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
14203         in the inet and nsl libraries.  Required on Solaris 5.7.
14204
14205 2005-10-01  Jim Meyering  <jim@meyering.net>
14206
14207         Sync from coreutils.
14208         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
14209         in the inet and nsl libraries.  Required on Solaris 5.7.
14210
14211 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
14212
14213         * lib/getdelim.c (getdelim): Remove unused variables.
14214
14215 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
14216
14217         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
14218         so that the code works even with ancient cpp.  Portability problem
14219         with GCC 2.7.2.1 reported by Thomas M.Ott.
14220
14221 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
14222
14223         * modules/regex (Depends-on): Add strcase.
14224
14225         * modules/gethostname (Licence): Change from GPL to LGPL, since
14226         gethostname.c is a trivial implementation of a standard library
14227         function.
14228         * modules/poll (License): Change from GPL to LGPL, since it's
14229         derived from LGPL code.
14230
14231 2005-09-27  Jim Meyering  <jim@meyering.net>
14232
14233         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
14234         HAVE_CONFIG_H.
14235
14236         * lib/intprops.h (signed_type_or_expr__): Define.
14237         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
14238         for unsigned types.
14239
14240 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
14241
14242         * lib/verify.h (verify_expr): Remove, replacing with:
14243         (verify_true): New macro that returns true instead of void.
14244         (verify_type__): Remove.
14245         (verify): Use verify_true rather than verify_type__.
14246
14247 2005-09-26  Bruno Haible  <bruno@clisp.org>
14248
14249         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
14250         is necessary.
14251         (lib_SOURCES): Remove mbchar.c.
14252         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
14253         (Files): Add m4/mbrtowc.m4.
14254         * modules/mbiter: Likewise.
14255         * modules/mbuiter: Likewise.
14256
14257 2005-09-26  Bruno Haible  <bruno@clisp.org>
14258
14259         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
14260         compile mbchar.c if they are not both present.
14261         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
14262         * m4/mbiter.m4 (gl_MBITER): Likewise.
14263         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
14264         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
14265         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
14266
14267 2005-09-25  Jim Meyering  <jim@meyering.net>
14268
14269         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
14270         also uses socklen_t.
14271
14272 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
14273
14274         * lib/utimens.c (ENOSYS): Define if not already defined.
14275         (futimens): Support having a null PATH if the file descriptor
14276         is nonnegative.
14277
14278         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
14279         Remove.
14280         (__attribute): Define to empty unless GCC 3.1 or later.
14281         This works around a core dump on OpenBSD 3.4, which has GCC
14282         2.95.3, which dumps core when given __attribute__(()).  It also
14283         simplifies other tests, since we really don't want to bother with
14284         worrying about which ancient version of GCC supported what.
14285         Original problem reported by Yoann Vandoorselaere, with part of
14286         the fix suggested by Derek Price.
14287
14288 2005-09-24  Jim Meyering  <jim@meyering.net>
14289
14290         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
14291         so we can once again use a positive bitfield width of 1 -- now we
14292         don't have to explain why we were using a bitfield width of 2.
14293
14294 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
14295
14296         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
14297         and similarly for the other external symbols.  Problem reported
14298         by James Gallager.
14299
14300         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
14301         bug reported by Jim Meyering.
14302
14303         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
14304         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
14305         not needed, since socklen is a prerequisite module.
14306
14307 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
14308
14309         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
14310         Problem reported by Eric Blake.
14311         (getaddrinfo): Initialize se so that it's not garbage.
14312         Redo internal storage allocation so that it doesn't make unportable
14313         assumptions about alignment.
14314         Fix a memory leak.
14315
14316         * lib/utimens.c (futimens): Use futimesat if available.
14317         Prefer it to futimes since it doesn't have the futimes bug.
14318
14319         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
14320         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
14321         Instead, declare a function that returns a pointer to an array,
14322         and use verify_type__ to declare the size of the array.
14323         Problem and germ of a solution reported by Bruno Haible.
14324         (verify_type__): Use 2, not 1, for bitfield size, to avoid
14325         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
14326
14327 2005-09-23  Jim Meyering  <jim@meyering.net>
14328
14329         Sync from coreutils.
14330         Correct build failure (socklen_t not defined) on at least
14331         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
14332         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
14333
14334 2005-09-23  Jim Meyering  <jim@meyering.net>
14335
14336         * modules/getaddrinfo (Depends-on): Add socklen.
14337
14338 2005-09-23  Bruno Haible  <bruno@clisp.org>
14339
14340         * tests/test-verify.c: New file.
14341
14342 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14343
14344         Sync from coreutils.
14345
14346         * modules/argmatch (Depends-on): Add verify.
14347         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
14348         unistd-safer.
14349         * modules/save-cwd (Depends-on): Likewise.
14350
14351         * modules/openat (Files): Add lib/openat-die.c.
14352         (Depends-on): Remove error, exitfail.
14353         Add dirname.
14354
14355         * modules/verify: New file.
14356         * MODULES.html.sh (Diagnostics <assert.h>): New section,
14357         with "verify" module.
14358
14359 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14360
14361         Sync from coreutils.
14362
14363         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
14364         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
14365         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
14366         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
14367         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
14368         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
14369         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
14370         Don't bother checking for string.h, stdlib.h, unistd.h.
14371         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
14372         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
14373         module's job.
14374         * m4/jm-macros.m4 (gl_MACROS): Likewise.
14375         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
14376
14377         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
14378         (gl_GETDATE): Use it.
14379
14380         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
14381
14382 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14383
14384         Sync from coreutils.
14385
14386         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
14387         stat-time.h.
14388         * lib/argmatch.h: Include verify.h
14389         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
14390         (ARGMATCH_ASSERT): Remove; unused.
14391         * lib/canonicalize.c: Assume STDC_HEADERS.
14392         * lib/exclude.c: Include "strcase.h".
14393         * lib/regex_internal.h [!defined _LIBC]: Likewise.
14394         * lib/getusershell.c: Include stdio--.h rather than stdio.h
14395         and stdio-safer.h.
14396         (getusershell): Call fopen, not fopen_safer.
14397         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
14398         Do not include unistd-safer.h.
14399         (save_cwd): Don't call fd_safer; no longer needed
14400         now that we include fcntl--.h.
14401
14402         * lib/getdate.y (relative_time): New type.
14403         (RELATIVE_TIME_0): New constant.
14404         (parser_control): Use relative_time instead of doing it ourselves.
14405         (%union): Add new relative_time rel member.
14406         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
14407         Now typeless.
14408         (relunit, relunit_snumber): Now of type rel.
14409         (zone, rel, relunit, get_date): Adjust to above changes.
14410
14411         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
14412         Do not include unistd-safer.h.
14413         (getloadavg): Don't call fd_safer; no longer needed
14414         now that we include fcntl--.h.
14415
14416         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
14417         (make_dir_parents): Treat ENOSYS like EEXIST.
14418
14419         Improve quality of diagnostics on restore_cwd failure.
14420         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
14421         (make_dir_parents): Last arg is now int * (for errno), not bool *.
14422         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
14423         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
14424         each time through the loop.  Do not diagnose restore_cwd failure;
14425         that is the caller's job (and perhaps the caller does not care).
14426
14427         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
14428         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
14429         If the file already exists but is not a directory, don't bother
14430         to try to make its parents.
14431         Close potential file descriptor leak if we can't chdir("/") (!).
14432         Don't always return true if chdir($PWD) fails; return true only
14433         if the requested action was done successfully (except for the
14434         chdir($PWD)).
14435         Don't log final directory unless we actually made it.
14436         Refactor to avoid duplicate code to fix up permissions.
14437         Don't attempt to fix up parent permissions if chdir($PWD) fails.
14438
14439         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
14440         to make it a bit faster and (I hope) clearer.
14441         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
14442         Fix bug in formats like %2N.
14443
14444         * lib/verify.h: New file.
14445
14446 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14447
14448         Sync from coreutils.
14449         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
14450
14451 2005-09-22  Jim Meyering  <jim@meyering.net>
14452
14453         Sync from coreutils.
14454
14455         * m4/lstat.m4 (gl_FUNC_LSTAT):
14456         Use AC_LIBSOURCES to require lstat.c and lstat.h.
14457         Remove obsolete comment.
14458         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
14459         * m4/xstrtod.m4: Likewise.
14460
14461         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
14462
14463 2005-09-22  Jim Meyering  <jim@meyering.net>
14464
14465         Sync from coreutils.
14466
14467         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
14468
14469         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
14470         the .tm_year member, since otherwise gcc-4.0 would now warn about
14471         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
14472
14473         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
14474         order to avoid an unsuppressible warning from gcc on 64-bit systems.
14475
14476         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
14477         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
14478         when run in a time zone for which daylight savings time is in effect
14479         for the starting date.
14480
14481         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
14482         stop us from restricting permissions of just-created absolute-named
14483         directories.
14484         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
14485         to restore initial working directory.
14486         * lib/mkdir-p.c (make_dir_parents): New parameter:
14487         different_working_dir, to tell caller if/when we change the working
14488         directory and are unable to return to the initial one.
14489         * lib/mkdir-p.h (make_dir_parents): Update prototype.
14490         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
14491         `return false'.  This fixes a bug introduced on 2004-07-30.
14492
14493         * lib/openat.c (fdopendir): Be sure to close the supplied
14494         file descriptor before returning.  This makes our replacement
14495         implementation a little closer to Solaris's, where fdopendir
14496         ties the file descriptor to the returned DIR* pointer.
14497         * lib/openat.c (unlinkat): New function.
14498         * lib/openat.h (unlinkat): Add prototype.
14499         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
14500         (openat_restore_fail): Rename from openat_restore_die.
14501         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
14502
14503         Provide an alternative to exiting immediately upon save_cwd or
14504         restore_cwd failure.  Now, an application can arrange e.g.,
14505         to perform a longjump in that case.
14506         * lib/openat.c: Include dirname.h.
14507         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
14508         (rpl_openat, fdopendir, fstatat): Call openat_save_die
14509         and openat_restore_die rather than calling error directly.
14510         Don't include "error.h" or "exitfail.h"; they're no longer needed.
14511
14512         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
14513         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
14514         define.
14515
14516         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
14517         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
14518                             int utc, int nanoseconds);
14519         Background:
14520         date should not have to allocate a megabyte of virtual memory to
14521         handle a format argument like +%1048575T.  When implemented with
14522         strftime, it must allocate such a buffer, use strftime to fill it
14523         in, print it, then free it.
14524         With fprintftime, it simply prints everything and exits.
14525         With no need for memory allocation, that's one fewer way to fail.
14526         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
14527         optional field width, not before, so we accept %9:z, not %:9z.
14528         (my_strftime): Be sure to use L_('x') for literals.
14529
14530         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
14531         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
14532         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
14533         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
14534         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
14535         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
14536         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
14537         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
14538         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
14539         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
14540         * lib/xgethostname.c, lib/xreadlink.c:
14541         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
14542
14543         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
14544         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
14545         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
14546         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
14547         and don't include <sys/file.h>).
14548
14549 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
14550
14551         Sync from coreutils.
14552
14553         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
14554         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
14555         [!LDAV_DONE]: Avoid unused variable warning.
14556
14557 2005-09-21  Bruno Haible  <bruno@clisp.org>
14558
14559         * lib/unicodeio.h (unicode_to_mb): New declaration.
14560
14561 2005-09-20  Derek Price  <derek@ximbiot.com>
14562
14563         * lib/getaddrinfo.c: Don't include <netdb.h> included from
14564         getaddrinfo.h.
14565
14566 2005-09-20  Bruno Haible  <bruno@clisp.org>
14567
14568         * gnulib-tool: Remove trailing slashes from the values specified for
14569         --source-base, --m4-base, --tests-base, --aux-dir.
14570         Suggested by Simon Josefsson <jas@extundo.com>.
14571
14572 2005-09-20  Bruno Haible  <bruno@clisp.org>
14573
14574         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
14575         func_modules_to_filelist, func_import, func_create_testdir): Make all
14576         sorting results locale-independent, so that gnulib-cache.m4 doesn't
14577         change when gnulib-tool is invoked in a different locale.
14578
14579 2005-09-19  Simon Josefsson  <jas@extundo.com>
14580
14581         * m4/socklen.m4: Fix typo.
14582
14583 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14584
14585         Use a consistent style for including <config.h>.
14586         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
14587         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
14588         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
14589         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
14590         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
14591         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
14592         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
14593         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
14594         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
14595         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
14596         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
14597         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
14598         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
14599         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
14600         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
14601         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
14602         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
14603         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
14604         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
14605         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
14606         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
14607         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
14608         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
14609         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
14610         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
14611         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
14612         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
14613         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
14614         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
14615         lib/xstrtoumax.c, lib/yesno.c:
14616         Standardize inclusion of config.h.
14617         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
14618         lib/inttostr.h:  Removed inclusion of config.h from header files.
14619         * lib/inttostr.c:  Adjusted in-tree users.
14620         * lib/timespec.h: Remove superfluous warning to include config.h.
14621         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
14622         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
14623         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
14624         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
14625         config.h with HAVE_CONFIG_H.
14626
14627 2005-09-19  Jim Meyering  <jim@meyering.net>
14628
14629         * modules/pathmax (License): Change to LGPL.
14630
14631 2005-09-19  Derek Price  <derek@ximbiot.com>
14632
14633         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
14634
14635 2005-09-19  Bruno Haible  <bruno@clisp.org>
14636
14637         * gnulib-tool (import): Provide default for --tests-base.
14638
14639 2005-09-19  Bruno Haible  <bruno@clisp.org>
14640
14641         * doc/quote.texi: New file, extracted from gnulib.texi.
14642         * doc/ctime.texi: New file, extracted from gnulib.texi.
14643         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
14644         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
14645         * doc/gnulib.texi: Include them.
14646
14647 2005-09-18  Bruno Haible  <bruno@clisp.org>
14648
14649         Portability fix.
14650         * gnulib-tool (func_readlink): New function.
14651         (func_ln_if_changed): Use it.
14652
14653 2005-09-18  Bruno Haible  <bruno@clisp.org>
14654
14655         * gnulib-tool: Support --with-tests also with --import.
14656         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
14657         (func_import): Use variables $testsbase and $inctests. Emit a
14658         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
14659         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
14660         SUBDIRS += $testsdir.
14661         (func_create_testdir): Update.
14662
14663 2005-09-18  Bruno Haible  <bruno@clisp.org>
14664
14665         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
14666         instead of $dry_run.
14667         (func_cp_if_changed, func_mv_if_changed): Remove functions.
14668         (func_ln_if_changed): Don't handle dry-run here.
14669         (func_import): In dry-run mode, detect more precisely which actions
14670         would be performed, and don't use "...ing" verbs.
14671
14672 2005-09-18  Bruno Haible  <bruno@clisp.org>
14673
14674         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
14675         (func_import): Use join on two temporary files instead of three nested
14676         loops, in order to determine which files are new or old.
14677
14678 2005-09-18  Bruno Haible  <bruno@clisp.org>
14679
14680         * gnulib-tool (func_import): Comment out code that spits out the
14681         new files with --dry-run.
14682
14683 2005-09-18  Bruno Haible  <bruno@clisp.org>
14684
14685         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
14686
14687 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
14688
14689         * lib/stat-time.h: New file.
14690         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
14691         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
14692         in a different way.
14693         (timespec_cmp): New function.
14694         * lib/utimecmp.c: Include stat-time.h.
14695         (SYSCALL_RESOLUTION): Depend on whether various struct stat
14696         members exist, not on the obsolescent ST_MTIM_NSEC.
14697         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
14698
14699 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
14700
14701         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
14702
14703 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
14704
14705         * MODULES.html.sh (File system functions): Add stat-time.
14706         * modules/stat-time: New file.
14707         * modules/timespec (Files): Remove m4/st_mtim.m4; this
14708         is now done in a different way, by the stat-time module.
14709         * modules/utimecmp (Depends-on): Add stat-time.
14710
14711 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
14712
14713         * m4/st_mtim.m4: Remove.  Superseded by...
14714         * m4/stat-time.m4: New file.
14715         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
14716         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
14717
14718 2005-09-15  Derek Price  <derek@ximbiot.com>
14719
14720         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
14721
14722 2005-09-15  Derek Price  <derek@ximbiot.com>
14723
14724         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
14725         * lib/regex_internal.c: Ditto, using this...
14726         (__GNUC_PREREQ): ...new macro.
14727         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
14728         using...
14729         (__GNUC_PREREQ): ...this new macro.
14730
14731         * lib/strstr.h: Include string.h. Define strstr as a macro here.
14732
14733 2005-09-15  Derek Price  <derek@ximbiot.com>
14734             Paul Eggert  <eggert@cs.ucla.edu>
14735
14736         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
14737         changes, consolidating in...
14738         * lib/regex_internal.h: ...this file.
14739
14740 2005-09-13  Jim Meyering  <jim@meyering.net>
14741
14742         * lib/canon-host.c: Filter through gnu indent and reword comments
14743         slightly.
14744         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
14745
14746 2005-09-13  Derek Price  <derek@ximbiot.com>
14747
14748         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
14749         failure.
14750         Reported by Jim Meyering  <jim@meyering.net>.
14751
14752 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
14753
14754         * lib/base64.c: Typo.
14755         (base64_encode): Put b64str in initialized data section.
14756
14757 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
14758
14759         Merge glibc and coreutils changes into gnulib, plus a few
14760         extra fixes.
14761         * lib/md5.c: Use #error rather than a string.
14762         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
14763         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
14764         (__attribute__): Define to empty for non recent-GCC.
14765         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
14766         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
14767         Renamed from their non-__ counterparts, with new macros replacing
14768         them if not _LIBC.  Add __THROW attribute.
14769         (rol): Remove.
14770         (struct md5_ctx): Align buffer if using GCC.
14771         * lib/sha1.h (struct sha1_ctx): Likewise.
14772         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
14773         The old name was backwards.
14774         (NOTSWAP): Remove; not used.
14775         (rol): New macro, moved here from md5.h.
14776         (sha1_process_block): Remove a FIXME that doesn't make sense.
14777
14778 2005-09-12  Derek Price  <derek@ximbiot.com>
14779
14780         Return usable errors from canon-host.
14781         * lib/canon-host.h: New file.
14782         * lib/canon-host.c (canon_host): Wrap...
14783         (canon_host_r): ...this new function, which now relies exclusively on
14784         getaddrinfo.
14785         (ch_strerror): New function.
14786         (last_cherror): New global.
14787         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
14788         interface.
14789         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
14790         void *.
14791         (freeaddrinfo): Free ai->ai_canonname when set.
14792
14793 2005-09-12  Derek Price  <derek@ximbiot.com>
14794
14795         Make canon-host require getaddrinfo.
14796         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
14797         AC_LIBSOURCE canon-host.h.  Call...
14798         (gl_PREREQ_CANON_HOST): ...this new function, which requires
14799         gl_GETADDRINFO.
14800         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
14801
14802 2005-09-12  Derek Price  <derek@ximbiot.com>
14803
14804         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
14805         LGPL.
14806         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
14807
14808 2005-09-12  Derek Price  <derek@ximbiot.com>
14809
14810         * lib/gai_strerror.c: Include config.h when available.  Include
14811         getaddrinfo.h before other headers to test interface.
14812         Reported by Larry Jones <lawrence.jones@ugs.com>.
14813
14814 2005-09-12  Derek Price  <derek@ximbiot.com>
14815             Paul Eggert  <eggert@cs.ucla.edu>
14816
14817         * modules/glob (Files): Add glob-libc.h.
14818
14819 2005-09-12  Derek Price  <derek@ximbiot.com>
14820             Paul Eggert  <eggert@cs.ucla.edu>
14821
14822         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
14823         glob_.h, glob-libc.h.
14824         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
14825
14826 2005-09-12  Derek Price  <derek@ximbiot.com>
14827             Paul Eggert  <eggert@cs.ucla.edu>
14828
14829         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
14830         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
14831         protecting things that should be done only in gnulib contexts.
14832         * lib/glob_.h: New file, containing only the glob things needed for
14833         gnulib.
14834         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
14835         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
14836         (glob, globfree, glob_pattern_p): Now defined simply in terms of
14837         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
14838         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
14839         and to respect the namespace rules better.
14840
14841 2005-09-08  Simon Josefsson  <jas@extundo.com>
14842
14843         * modules/socklen: New file.
14844
14845 2005-09-08  Simon Josefsson  <jas@extundo.com>
14846
14847         * m4/socklen.m4: New file.
14848
14849 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
14850
14851         * modules/utimens (Files): Add m4/utimbuf.m4, since
14852         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
14853         Reported by Sergey Poznyakoff.
14854
14855 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
14856
14857         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
14858         definitions, since that's the preferred style in glibc.
14859         Fix a minor spacing issue, and update copyright notice to match
14860         glibc's.
14861
14862 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
14863
14864         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
14865
14866 2005-09-06  Simon Josefsson  <jas@extundo.com>
14867
14868         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
14869         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
14870
14871 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
14872
14873         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
14874         warning.
14875
14876 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
14877
14878         * config/srclist.txt: Add glibc bug 1302.
14879
14880 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
14881
14882         Change bitset word type from unsigned int to unsigned long int,
14883         as this has better performance on typical 64-bit hosts.
14884         Port bitset code to hosts with unusual word sizes.
14885         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
14886         (build_collating_symbol):
14887         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
14888         argument is a bitset.  This is merely a style issue, but it makes
14889         it clearer that an entire array is expected.
14890         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
14891         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
14892         Port to the case where bitset_word is not the same as unsigned int.
14893         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
14894         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
14895         Likewise.
14896         * lib/regexec.c (check_dst_limits_calc_pos_1,
14897         check_subexp_matching_top):
14898         (build_trtable, group_nodes_into_DFAstates):
14899         Likewise.
14900         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
14901         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
14902         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
14903         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
14904         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
14905         * lib/regcomp.c (optimize_subexps, lower_subexp):
14906         Work even if bitset_word has holes in its bitwise representation.
14907         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
14908         * lib/regexec.c (check_dst_limits_calc_pos_1,
14909         check_subexp_matching_top):
14910         Likewise.
14911         * lib/regex_internal.c (re_string_reconstruct):
14912         Don't assume UCHAR_MAX == 255.
14913         * lib/regex_internal.h (bitset_set_all): Likewise.
14914         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
14915         All uses changed.
14916         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
14917         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
14918         All uses changed.
14919         (BITSET_WORD_MAX): New macro.
14920         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
14921         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
14922         (bitset_empty, bitset_copy):
14923         Prefer sizeof (bitset) to multiplying it out ourselves.
14924         (bitset_not_merge): Remove; unused.
14925         (bitset_contain): Return bool, not unsigned int with one bit on.
14926         All callers changed.
14927         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
14928         alignment than re_node_set; do this by defining a new internal
14929         type struct dests_alloc and using it to allocate memory.
14930
14931 2005-09-05  Bruno Haible  <bruno@clisp.org>
14932
14933         * gnulib-tool (func_import): Fix comparison in handling of symbolic
14934         links.
14935
14936 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
14937
14938         * modules/size_max (Makefile.am): Add size_max.h
14939
14940 2005-09-04  Derek Price  <derek@ximbiot.com>
14941
14942         * gnulib-tool (func_import): Fix reversed $symbolic logic.
14943
14944 2005-09-03  Simon Josefsson  <jas@extundo.com>
14945
14946         * gnulib-tool: Fix typo.
14947
14948 2005-09-03  Simon Josefsson  <jas@extundo.com>
14949
14950         * config/srclist.txt: Add glibc bug 1293.
14951
14952 2005-09-03  Derek Price  <derek@ximbiot.com>
14953
14954         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
14955         From Larry Jones <lawrence.jones@ugs.com>.
14956
14957 2005-09-02  Simon Josefsson  <jas@extundo.com>
14958
14959         * modules/socklen: New file.
14960
14961 2005-09-02  Simon Josefsson  <jas@extundo.com>
14962
14963         * modules/havelib: New module.
14964
14965         * modules/gettext, modules/iconv, modules/lock, modules/readline:
14966         Use havelib.
14967
14968 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
14969
14970         Check for arithmetic overflow when calculating sizes, to prevent
14971         some buffer-overflow issues.  These patches are conservative, in the
14972         sense that when I couldn't determine whether an overflow was possible,
14973         I inserted a run-time check.
14974         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
14975         macros.
14976         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
14977         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
14978         (re_xnrealloc, re_x2nrealloc): New inline functions.
14979         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
14980         parse_bracket_exp):
14981         (build_equiv_class, build_charclass): Check for arithmetic overflow
14982         in size expression calculations.
14983         * lib/regex_internal.c (re_string_realloc_buffers):
14984         (build_wcs_upper_buffer, re_node_set_add_intersect):
14985         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
14986         (re_dfa_add_node, register_state): Likewise.
14987         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
14988         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
14989         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
14990         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
14991
14992 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
14993
14994         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
14995         m4/ulonglong.m4.  Problem reported by Martin Lambers.
14996
14997 2005-09-02  Bruno Haible  <bruno@clisp.org>
14998
14999         Support for lib vs. lib64 distinction on biarch platforms.
15000         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
15001         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
15002         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
15003
15004 2005-09-02  Bruno Haible  <bruno@clisp.org>
15005
15006         * gnulib-tool (import): In the other first-use case, provide defaults
15007         as well.
15008
15009 2005-09-02  Bruno Haible  <bruno@clisp.org>
15010
15011         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
15012         patches not yet found in the latest gettext release.
15013
15014 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
15015
15016         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
15017         to avoid a collision with bits/local_lim.h in glibc.
15018         All uses changed.  Problem reported by Dmitry V. Levin in
15019         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
15020
15021         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
15022         bugs in int versus size_t comparisons.
15023         (re_string_context_at): Fix bug where the code assumed that
15024         Idx is signed.
15025
15026         Use bool where appropriate.
15027         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
15028         All callers changed.
15029         (calc_eclosure_iter): Likewise, for ROOT arg.
15030         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
15031         (build_charclass_op): Likewise, for NON_MATCH arg.
15032         * lib/regex_internal.c (re_string_allocate, re_string_construct):
15033         (re_string_construct_common): Likewise, for ICASE arg.
15034         * lib/regexec.c (re_search_2_stub, re_search_stub):
15035         Likewise, for RET_LEN arg.
15036         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
15037         (set_regs): Likewise, for FL_BACKTRACK arg.
15038         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
15039         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
15040         (calc_eclosure_iter, parse_bracket_exp):
15041         Use bool for internal variables that are booleans.
15042         * lib/regexec.c (re_search_internal, check_matching,
15043         proceed_next_node):
15044         (set_regs, build_sifted_states, sift_states_bkref):
15045         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
15046         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
15047         (find_collation_sequence_value):
15048         Likewise.
15049         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
15050         (re_node_set_compare):
15051         Return bool, not int. All callers changed.
15052         * lib/regexec.c (check_halt_node_context, check_dst_limits):
15053         (build_trtable, check_node_accept): Likewise.
15054         * lib/regex_internal.h: Include stdbool.h.
15055
15056         Fix bugs uncovered when converting to bool.
15057         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
15058         failure instead of charging ahead blindly.
15059         * lib/regex_internal.c (register_state): Likewise.
15060         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
15061         for freeing internal storage.
15062         (group_nodes_into_DFA_states): Use unsigned int, not int, for
15063         bitset pieces used as boolean, to avoid undefined behavior
15064         on hosts that do int overflow checking.
15065
15066 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
15067
15068         * config/srclist.txt: Add glibc bugs 1285-1287.
15069
15070 2005-09-01  Jim Meyering  <jim@meyering.net>
15071
15072         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
15073         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
15074         Require gl_STAT_MACROS, too.
15075
15076 2005-09-01  Bruno Haible  <bruno@clisp.org>
15077
15078         * gnulib-tool (import): In the first-use case, provide defaults.
15079
15080 2005-09-01  Bruno Haible  <bruno@clisp.org>
15081
15082         * gnulib-tool (func_import): Remove the .tmp files.
15083
15084 2005-09-01  Bruno Haible  <bruno@clisp.org>
15085
15086         * gnulib-tool (func_import): Fix handling of symbolic links.
15087
15088 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
15089
15090         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
15091         old glibc regex code mishandles strings longer than 2**31 bytes.
15092         This patch fixes this when the regex code is used in gnulib
15093         (i.e., outside glibc).
15094
15095         This patch should not affect the use of the regex code inside
15096         glibc.  No doubt this problem also needs to be handled for glibc
15097         as well, but the result will be an incompatible change to the
15098         glibc ABI, and the old ABI will have to be supported too.  That
15099         can be the the subject for another patch.
15100
15101         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
15102         governing whether the rest of this patch is active.  By default,
15103         the macro is disabled and the patch has no effect.
15104         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
15105         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
15106         (struct re_pattern_buffer, re_search, re_search_2, re_match):
15107         (re_match_2, re_set_registers): Use the new types.
15108         * lib/regex_internal.h (Idx, re_hashval_t): New types.
15109         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
15110         New macros.
15111         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
15112         (re_string_context_at, bin_tree_t, re_dfastate_t):
15113         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
15114         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
15115         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
15116         (re_string_char_size_at, re_string_wchar_at):
15117         (re_string_elem_size_at):
15118         Use the new types and macros to port to 64-bit hosts.
15119         Use unsigned types for internal values, so that the code
15120         mostly works even for arrays larger than SSIZE_MAX.
15121         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
15122         (search_duplicated_node, calc_eclosure_iter, fetch_number):
15123         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
15124         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
15125         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
15126         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
15127         (calc_inveclosure, parse_dup_op, build_range_exp):
15128         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
15129         (fetch_number, create_token_tree, mark_opt_subexp):
15130         Likewise.
15131         * lib/regex_internal.c (re_string_construct_common,
15132         create_ci_newstate):
15133         (create_cd_newstate, re_string_allocate, re_string_construct):
15134         (re_string_realloc_buffers, build_wcs_upper_buffer):
15135         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
15136         (re_string_reconstruct, re_string_peek_byte_case):
15137         (re_string_fetch_byte_case, re_string_context_at):
15138         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
15139         (re_node_set_init_copy, re_node_set_add_intersect):
15140         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
15141         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
15142         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
15143         (re_acquire_state, re_acquire_state_context, register_state):
15144         Likewise.
15145         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
15146         search_cur_bkref_entry):
15147         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
15148         (re_search_internal, re_search_2_stub, re_search_stub)
15149         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
15150         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
15151         (update_cur_sifted_state, check_dst_limits):
15152         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
15153         (check_subexp_limits, sift_states_bkref, merge_state_array):
15154         (check_subexp_matching_top, get_subexp, get_subexp_sub):
15155         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
15156         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
15157         (expand_bkref_cache, check_node_accept_bytes):
15158         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
15159         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
15160         (acquire_init_state_context, check_halt_node_context):
15161         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
15162         (sift_states_backward, clean_state_log_if_needed):
15163         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
15164         (find_recover_state, transit_state_sb, transit_state_mb):
15165         (transit_state_bkref, build_trtable, match_ctx_clean):
15166         Likewise.
15167         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
15168         to work around an assumption that REG_MISSING is negative.
15169
15170         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
15171         (seek_collating_symbol_entry) [defined _LIBC]:
15172         (lookup_collation_sequence_value) [defined _LIBC]:
15173         (build_range_exp, build_collating_symbol) [defined _LIBC]:
15174         Use prototypes rather than old-style function definitions.
15175         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
15176         (transit_state_sb) [0]:
15177         (find_collation_sequence_value) [defined _LIBC]: Likewise.
15178
15179         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
15180         rm_eo.
15181
15182         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
15183         (optimize_subexps, lower_subexp):
15184         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
15185         since the signed shift might overflow.  Use 1u<<31 instead.
15186         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
15187         Likewise.
15188         * lib/regexec.c (check_dst_limits_calc_pos_1,
15189         check_subexp_matching_top): Likewise.
15190
15191         * lib/regcomp.c (optimize_subexps, lower_subexp):
15192         Use CHAR_BIT rather than 8, for clarity.
15193         * lib/regexec.c (check_dst_limits_calc_pos_1):
15194         (check_subexp_matching_top): Likewise.
15195         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
15196         have to worry about portability issues when shifting it left.
15197         Remove no-longer-needed test for table_size > 0.
15198         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
15199         in a word, as the resulting behavior is undefined.
15200         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
15201         in one case, a <= should have been an <, and in another case the
15202         whole test was missing.
15203         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
15204         the standard name CHAR_BIT.
15205         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
15206         this is not true on one's complement and signed-magnitude hosts.
15207
15208         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
15209         next_last_offset.
15210         (struct re_dfa_t): Remove unused member states_alloc.
15211         * lib/regcomp.c (init_dfa): Don't initialize unused members.
15212
15213 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
15214
15215         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
15216         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
15217         and large-file glibc and in 32-bit large-file Solaris.
15218
15219 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
15220
15221         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
15222         lengths fit in regoff_t; this isn't true if regoff_t is the same
15223         width as size_t.
15224         * lib/regex.c (re_search_internal): 5th arg is LAST_START
15225         (= START + RANGE) instead of RANGE.  This avoids overflow
15226         problems when regoff_t is the same width as size_t.
15227         All callers changed.
15228         (re_search_2_stub): Check for overflow when adding the
15229         sizes of the two strings.
15230         (re_search_stub): Check for overflow when adding START
15231         to RANGE; if it occurs, substitute the extreme value.
15232
15233 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
15234
15235         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
15236
15237 2005-08-31  Jim Meyering  <jim@meyering.net>
15238
15239         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
15240         a pointer-to-const.
15241         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
15242         (register_state): Likewise.
15243         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
15244         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
15245         (group_nodes_into_DFAstates): Likewise.
15246
15247 2005-08-31  Jim Meyering  <jim@meyering.net>
15248
15249         * check-module: Add a FIXME comment.
15250
15251 2005-08-31  Eric Blake  <ebb9@byu.net>
15252
15253         * modules/unistd-safer (Files): Add unistd--.h.
15254         * modules/stdio-safer (Files): Add stdio--.h.
15255
15256 2005-08-31  Derek Price  <derek@ximbiot.com>
15257
15258         * lib/getdelim.c (getdelim): Return EOF on EOF.
15259         Reported by Larry Jones <lawrence.jones@ugs.com>.
15260
15261 2005-08-31  Bruno Haible  <bruno@clisp.org>
15262
15263         Avoid unnecessary diffs in the generated lib/Makefile.am.
15264         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
15265         the generated files.
15266         (func_import): Don't set cmd.
15267
15268 2005-08-31  Bruno Haible  <bruno@clisp.org>
15269
15270         * lib/strstr.c: Include <stddef.h>, for NULL.
15271         * lib/strcasestr.c: Likewise.
15272         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
15273
15274 2005-08-31  Bruno Haible  <bruno@clisp.org>
15275
15276         * gnulib-tool: New option --macro-prefix.
15277         (func_import): Use macro_prefix.
15278         (import): Handle option --macro-prefix.
15279
15280 2005-08-31  Bruno Haible  <bruno@clisp.org>
15281
15282         * gnulib-tool (import): Rename most ac_* variables to cached_*.
15283         Also use new variables cached_lgpl, cached_libtool.
15284
15285 2005-08-31  Bruno Haible  <bruno@clisp.org>
15286
15287         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
15288         always instantiating them.
15289
15290 2005-08-31  Bruno Haible  <bruno@clisp.org>
15291
15292         * gnulib-tool (func_import): Read the previous cached settings
15293         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
15294         earlier added by gnulib but are now dropped. Warn when a gnulib file
15295         overwrites a non-gnulib file.
15296
15297 2005-08-31  Bruno Haible  <bruno@clisp.org>
15298
15299         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
15300         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
15301         projects that don't keep autogenerated files in CVS. Put into
15302         actioncmd only the specified modules, not the transitive closure.
15303
15304 2005-08-31  Bruno Haible  <bruno@clisp.org>
15305
15306         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
15307         Create directories that shall be filled.
15308         (import): Don't look for gl_* macros in configure.ac. Recurse across
15309         all directories containing a gnulib-cache.m4 files, if meaningful.
15310
15311 2005-08-31  Bruno Haible  <bruno@clisp.org>
15312
15313         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
15314         (import): Set seen_libtool when we see gl_LIBTOOL.
15315
15316 2005-08-31  Bruno Haible  <bruno@clisp.org>
15317
15318         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
15319         declaration macro definitions from generated gnulib.m4.
15320
15321 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
15322
15323         * lib/iconvme.h: Add prototype for iconv_alloc.
15324
15325 2005-08-29  Simon Josefsson  <jas@extundo.com>
15326
15327         * lib/iconvme.c: Fix errno.
15328
15329 2005-08-29  Bruno Haible  <bruno@clisp.org>
15330
15331         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
15332         that it works when the directory contains spaces.
15333
15334 2005-08-29  Bruno Haible  <bruno@clisp.org>
15335
15336         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
15337
15338 2005-08-29  Bruno Haible  <bruno@clisp.org>
15339
15340         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
15341         Emit more advice.
15342
15343 2005-08-29  Bruno Haible  <bruno@clisp.org>
15344         and Stepan Kasal  <kasal@ucw.cz>
15345
15346         * check-module: If more parameters are given, check each of them
15347         separately; add more exceptions, as noted by Jim Meyering.
15348         (check_module): New procedure.
15349         (%exempt_header): Now contains all exceptions.
15350
15351 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
15352
15353         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
15354
15355 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
15356
15357         * lib/iconvme.c: Split iconv_string into iconv_alloc.
15358
15359 2005-08-28  Bruno Haible  <bruno@clisp.org>
15360
15361         * m4/gnulib-tool.m4: New file.
15362
15363 2005-08-27  Jim Meyering  <jim@meyering.net>
15364
15365         * modules/unistd-safer (Files): Add pipe-safer.c.
15366         * modules/fcntl-safer (Files): Add creat-safer.c.
15367
15368 2005-08-27  Jim Meyering  <jim@meyering.net>
15369
15370         * m4/stdlib-safer.m4: New file.  From coreutils.
15371         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
15372         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
15373         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
15374         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
15375         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
15376
15377 2005-08-27  Jim Meyering  <jim@meyering.net>
15378
15379         * lib/fopen-safer.c: Merge minor changes from coreutils.
15380         * lib/dup-safer.c: Likewise.
15381         * lib/fd-safer.c: Likewise.
15382
15383         Merge from coreutils.
15384         * lib/stdio--.h: New file.
15385         * lib/stdlib--.h: New file.
15386         * lib/mkstemp-safer.c: New file.
15387
15388         GNU tar needs these.
15389         * lib/pipe-safer.c: New file.
15390         * lib/creat-safer.c: New file.
15391         * lib/fcntl--.h (creat): Define to creat_safer.
15392         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
15393         * lib/unistd--.h (pipe): Define to pipe_safer.
15394         * lib/unistd-safer.h: Declare pipe_safer.
15395
15396 2005-08-26  Simon Josefsson  <jas@extundo.com>
15397
15398         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
15399         Haible <bruno@clisp.org>.
15400
15401 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
15402
15403         * lib/regex_internal.h: Remove all references to
15404         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
15405         or better.
15406         (bitset_not, bitset_merge, bitset_not_merge):
15407         (bitset_mask, re_string_allocate, re_string_construct):
15408         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
15409         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
15410         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
15411         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
15412         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
15413         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
15414         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
15415         (re_acquire_state_context):
15416         Remove unnecessary forward decls.
15417         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
15418         Put __attribute at function definition,
15419         now that the function decl has been removed.
15420         * lib/regex_internal.c (re_string_peek_byte_case):
15421         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
15422         Likewise.
15423
15424 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
15425
15426         * m4/regex.m4: Add AC_PREREQ(2.50).
15427         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
15428
15429 2005-08-25  Simon Josefsson  <jas@extundo.com>
15430
15431         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
15432         __fsetlocking.
15433
15434 2005-08-25  Simon Josefsson  <jas@extundo.com>
15435
15436         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
15437         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
15438         GLIBC specific code.
15439
15440 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15441
15442         Make regex safe for g++.  This fixes one real bug (an "err"
15443         that should have been "*err").  g++ problem reported by
15444         Sam Steingold.
15445         * lib/regex_internal.h (re_calloc): New macro, consistent with
15446         re_malloc etc.  All callers of calloc changed to use re_calloc.
15447         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
15448         not int.  All callers changed.
15449         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
15450         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
15451         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
15452         (find_recover_state): Change "err" to "*err"; this fixes what
15453         appears to be a real bug.
15454         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
15455         versus int.
15456
15457 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15458
15459         * modules/regex (Depends-on): Add malloc, since the code
15460         assumes that !malloc(0) means failure.
15461
15462 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15463
15464         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
15465
15466         alloca modernization/simplification for regex.
15467         * lib/regex.c: Remove portability cruft for alloca.  This no longer
15468         needs to be at the start of the file, and can be moved into
15469         regex_internal.h and simplified.
15470         * lib/regex_internal.h: Include <alloca.h>.
15471         (__libc_use_alloca) [!defined _LIBC]: New macro.
15472         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
15473         now works outside glibc.
15474
15475 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15476
15477         * config/srclist.txt: Add glibc bugs 1241, 1245.
15478
15479 2005-08-25  Jim Meyering  <jim@meyering.net>
15480
15481         * lib/open-safer.c: Include <config.h>.
15482         Otherwise, we'd lose LARGEFILE support in any file using
15483         e.g. "fcntl--.h"
15484
15485 2005-08-25  Bruno Haible  <bruno@clisp.org>
15486
15487         * m4/minmax.m4: Require autoconf 2.52.
15488         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
15489         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
15490         alternatives of translit over the alphabet.
15491         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
15492
15493 2005-08-24  Simon Josefsson  <jas@extundo.com>
15494
15495         * tests/test-getpass.c: New file.
15496
15497 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
15498
15499         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
15500         for GNU regex features.
15501
15502 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
15503
15504         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
15505         * lib/regex.h (regerror): Likewise.
15506
15507         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
15508         requires this.  (The code never needed it.)
15509
15510         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
15511         All uses of recently-renamed identifiers changed to use the new,
15512         POSIX-compliant names.  The code will build and run just fine
15513         without these changes, but it's better to eat our own dog food
15514         and use the standard-conforming names.
15515
15516         * lib/regex.h: Fix a multitude of POSIX name space violations.
15517         These changes have an effect only for programs that define
15518         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
15519         do not change anything for programs compiled in the normal way.
15520         Also, there is no effect on the ABI.
15521
15522         (_REGEX_SOURCE): New macro.
15523         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
15524         defined and _GNU_SOURCE is not; this fixes a name space violation.
15525
15526         Rename the following macros to obey POSIX requirements.
15527         The old names are still visible as macros if _REGEX_SOURCE is defined.
15528         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
15529         RE_BACKSLASH_ESCAPE_IN_LISTS.
15530         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
15531         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
15532         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
15533         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
15534         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
15535         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
15536         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
15537         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
15538         (REG_INTERVALS): renamed from RE_INTERVALS.
15539         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
15540         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
15541         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
15542         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
15543         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
15544         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
15545         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
15546         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
15547         RE_UNMATCHED_RIGHT_PAREN_ORD.
15548         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
15549         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
15550         (REG_DEBUG): renamed from RE_DEBUG.
15551         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
15552         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
15553         unusual, since we can't clash with the POSIX REG_ICASE.
15554         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
15555         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
15556         (REG_NO_SUB): renamed from RE_NO_SUB.
15557         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
15558         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
15559         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
15560         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
15561         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
15562         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
15563         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
15564         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
15565         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
15566         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
15567         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
15568         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
15569         RE_SYNTAX_POSIX_MINIMAL_BASIC.
15570         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
15571         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
15572         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
15573         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
15574         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
15575         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
15576         (REG_FIXED): Renamed from REGS_FIXED.
15577         (REG_NREGS): Renamed from RE_NREGS.
15578
15579         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
15580         of other REG_* macros, since POSIX says the user is allowed to
15581         #undef these macros selectively.
15582
15583         (reg_errcode_t): Update comment stating what other tables need
15584         to be consistent.
15585
15586         Rename the following enum values to obey POSIX requirements.
15587         The old names are still visible as macros.
15588         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
15589         is not defined, since GNU is supposed to be a superset of POSIX as
15590         much as possible, and since we want reg_errcode_t to be a signed
15591         type for implementation consistency.
15592         (_REG_NOERROR): Renamed from REG_NOERROR.
15593         (_REG_NOMATCH): Renamed from REG_NOMATCH.
15594         (_REG_BADPAT): Renamed from REG_BADPAT.
15595         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
15596         (_REG_ECTYPE): Renamed from REG_ECTYPE.
15597         (_REG_EESCAPE): Renamed from REG_EESCAPE.
15598         (_REG_ESUBREG): Renamed from REG_ESUBREG.
15599         (_REG_EBRACK): Renamed from REG_EBRACK.
15600         (_REG_EPAREN): Renamed from REG_EPAREN.
15601         (_REG_EBRACE): Renamed from REG_EBRACE.
15602         (_REG_BADBR): Renamed from REG_BADBR.
15603         (_REG_ERANGE): Renamed from REG_ERANGE.
15604         (_REG_ESPACE): Renamed from REG_ESPACE.
15605         (_REG_BADRPT): Renamed from REG_BADRPT.
15606         (_REG_EEND): Renamed from REG_EEND.
15607         (_REG_ESIZE): Renamed from REG_ESIZE.
15608         (_REG_ERPAREN): Renamed from REG_ERPAREN.
15609         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
15610         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
15611         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
15612         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
15613
15614         (_REG_RE_NAME, _REG_RM_NAME): New macros.
15615         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
15616         changed.  But support the old name if the new one is not defined
15617         and if _REGEX_SOURCE.
15618
15619         Change the following member names in struct re_pattern_buffer.
15620         The old names are still supported if !_REGEX_SOURCE.
15621         The new names are always supported, regardless of _REGEX_SOURCE.
15622         (re_buffer): Renamed from buffer.
15623         (re_allocated): Renamed from allocated.
15624         (re_used): Renamed from used.
15625         (re_syntax): Renamed from syntax.
15626         (re_fastmap): Renamed from fastmap.
15627         (re_translate): Renamed from translate.
15628         (re_can_be_null): Renamed from can_be_null.
15629         (re_regs_allocated): Renamed from regs_allocated.
15630         (re_fastmap_accurate): Renamed from fastmap_accurate.
15631         (re_no_sub): Renamed from no_sub.
15632         (re_not_bol): Renamed from not_bol.
15633         (re_not_eol): Renamed from not_eol.
15634         (re_newline_anchor): Renamed from newline_anchor.
15635
15636         Change the following member names in struct re_registers.
15637         The old names are still supported if !_REGEX_SOURCE.
15638         The new names are always supported, regardless of _REGEX_SOURCE.
15639         (rm_num_regs): Renamed from num_regs.
15640         (rm_start): Renamed from start.
15641         (rm_end): Renamed from end.
15642
15643         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
15644         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
15645         Prepend __ to parameter names.
15646
15647         Undo yesterday's changes.
15648
15649 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
15650
15651         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
15652         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
15653         lib/regex.c.
15654
15655 2005-08-24  Jim Meyering  <jim@meyering.net>
15656
15657         Sync from coreutils.
15658         * m4/fcntl-safer.m4: New file.
15659
15660         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
15661         and object files for this module.
15662
15663 2005-08-24  Jim Meyering  <jim@meyering.net>
15664
15665         Sync from coreutils.
15666         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
15667
15668 2005-08-24  Jim Meyering  <jim@meyering.net>
15669
15670         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
15671         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
15672
15673 2005-08-24  Jim Meyering  <jim@meyering.net>
15674
15675         * modules/fcntl-safer: New module.
15676         * modules/fts (Depends-on): Add fcntl-safer.
15677         * MODULES.html.sh (File descriptor based Input/Output):
15678         Add fcntl-safer.
15679
15680 2005-08-24  Bruno Haible  <bruno@clisp.org>
15681
15682         Support for unit test modules.
15683         * modules/README: Mention tests modules.
15684         * modules/TEMPLATE-TESTS: New file.
15685         * gnulib-tool: New options --extract-tests-module, --with-tests and
15686         --tests-base (unused for the moment).
15687         (testsbase, inctests): New variables.
15688         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
15689         (func_verify_module): Exclude TEMPLATE-TESTS.
15690         (func_verify_nontests_module, func_verify_tests_module): New functions.
15691         (func_get_dependencies): Add implicit dependency for tests modules.
15692         (func_get_tests_module): New function.
15693         (func_modules_transitive_closure): When --with-tests was specified,
15694         include the unit tests as well, unless explicitly avoided.
15695         (func_emit_lib_Makefile_am): Ignore the tests modules here.
15696         (func_emit_tests_Makefile_am): New function.
15697         (func_create_testdir): When --with-tests was specified, emit a
15698         tests/ directory.
15699         * MODULES.html.sh (Future developments): Update.
15700
15701 2005-08-24  Bruno Haible  <bruno@clisp.org>
15702
15703         * modules/tls-tests: New file.
15704         * tests/test-tls.c: New file, from GNU gettext.
15705
15706 2005-08-24  Bruno Haible  <bruno@clisp.org>
15707
15708         * modules/lock-tests: New file.
15709         * tests/test-lock.c: New file, from GNU gettext.
15710
15711 2005-08-24  Bruno Haible  <bruno@clisp.org>
15712
15713         * lib/lock.h: Add multiple inclusion guard.
15714         * lib/tls.h: Add multiple inclusion guard.
15715
15716 2005-08-24  Bruno Haible  <bruno@clisp.org>
15717
15718         * gnulib-tool: Add support for the --aux-dir option to
15719         --create-testdir, --create-megatestdir, --test, --megatest.
15720         (func_create_testdir, func_create_megatestdir): Optionally emit a
15721         AC_CONFIG_AUX_DIR directive.
15722         (create-testdir, create-megatestdir, test, megatest): Provide a
15723         default value for $auxdir.
15724
15725 2005-08-24  Bruno Haible  <bruno@clisp.org>
15726
15727         * gnulib-tool (import): Use compound statement instead of subshell
15728         where possible.
15729
15730 2005-08-24  Bruno Haible  <bruno@clisp.org>
15731
15732         * gnulib-tool (import): Change --aux-dir default to "build-aux".
15733
15734 2005-08-24  Bruno Haible  <bruno@clisp.org>
15735
15736         * gnulib-tool (func_version): Update.
15737
15738 2005-08-24  Bruno Haible  <bruno@clisp.org>
15739
15740         * gnulib-tool (func_import, func_create_testdir,
15741         func_create_megatestdir): Quote all autoconf macro arguments.
15742
15743 2005-08-24  Bruno Haible  <bruno@clisp.org>
15744
15745         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
15746         option --force, because --force causes the aclocal.m4 of each
15747         subdirectory to be newer than the corresponding config.h.in.
15748
15749 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
15750
15751         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
15752         All contents moved to gl_REGEX.
15753         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
15754         assume that it does.
15755
15756 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
15757
15758         * lib/regex.h (REG_NOSYS)
15759         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
15760         Define, since POSIX requires it as of 2001.
15761         (_REG_ENOSYS)
15762         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
15763         New private symbol, used to keep the enum signed in all cases.
15764         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
15765         Youngman in
15766         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
15767
15768         * lib/regex_internal.c (re_string_skip_chars, register_state):
15769         (calc_state_hash):
15770         Remove forward decls; no longer needed now that we use prototypes.
15771         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
15772         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
15773         (clean_state_log_if_needed): Likewise.
15774
15775 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
15776
15777         * config/srclist.txt: Add glibc bugs 1231-1233.
15778
15779 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
15780
15781         Fix problems reported by Sam Steingold in
15782         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
15783         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
15784         assumed that reg_errcode_t is a signed type, which is not
15785         necessarily true if _XOPEN_SOURCE is not defined.
15786         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
15787         since some compilers warn about it otherwise.
15788
15789 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
15790
15791         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
15792         (init_word_char, create_initial_state, duplicate_node_closure):
15793         (fetch_token, peek_token_bracket, build_range_exp):
15794         (build_collating_symbol): Remove forward decls; no longer needed
15795         now that we use prototypes.
15796
15797         * lib/regcomp.c:
15798         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
15799         (re_compile_fastmap_iter, regcomp, regerror, regfree):
15800         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
15801         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
15802         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
15803         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
15804         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
15805         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
15806         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
15807         (build_range_exp, build_collating_symbol, parse_bracket_exp):
15808         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
15809         (build_charclass, build_charclass_op, fetch_number, create_tree):
15810         (create_token_tree, mark_opt_subexp, duplicate_tree):
15811         Use prototypes rather than old-style definitions.
15812
15813         * lib/regex_internal.c:
15814         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
15815         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
15816         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
15817         (re_string_reconstruct, re_string_peek_byte_case):
15818         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
15819         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
15820         (re_node_set_init_copy, re_node_set_add_intersect):
15821         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
15822         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
15823         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
15824         (re_acquire_state, re_acquire_state_context, register_state):
15825         (create_ci_newstate, create_cd_newstate, free_state):
15826         Likewise.
15827         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
15828         re_search_2):
15829         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
15830         (re_search_internal, prune_impossible_nodes):
15831         (acquire_init_state_context, check_matching, static):
15832         (check_halt_node_context, check_halt_state_context, proceed_next_node):
15833         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
15834         (update_regs, sift_states_backward, build_sifted_states):
15835         (clean_state_log_if_needed, merge_state_array):
15836         (update_cur_sifted_state, add_epsilon_src_nodes):
15837         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
15838         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
15839         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
15840         (find_recover_state, check_subexp_matching_top, transit_state_mb):
15841         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
15842         (check_arrival, check_arrival_add_next_nodes):
15843         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
15844         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
15845         (check_node_accept_bytes, check_node_accept, extend_buffers):
15846         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
15847         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
15848         (sift_ctx_init):
15849         Likewise.
15850
15851         * lib/regex_internal.h:
15852         (re_string_allocate, re_string_construct, re_string_reconstruct):
15853         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
15854         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
15855         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
15856         (re_string_context_at, re_string_peek_byte_case):
15857         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
15858         is defined, since we now use prototypes always.
15859
15860         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
15861         C89 or better.  All uses removed.
15862
15863 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
15864
15865         * config/srclist.txt: Add glibc bugs 1220-1227.
15866
15867 2005-08-20  Jim Meyering  <jim@meyering.net>
15868
15869         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
15870         of unused local, dfa.
15871
15872 2005-08-20  Bruno Haible  <bruno@clisp.org>
15873
15874         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
15875
15876 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15877
15878         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
15879         (re_node_set_insert_last, re_dfa_add_node):
15880         Rename local variables to avoid GCC shadowing warnings.
15881
15882 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15883
15884         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
15885         [defined lint]: Suppress bogus uninitialized-variable warnings.
15886
15887         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
15888         and let the caller return REG_ESPACE if out of space.  This
15889         removes an uninitialied-variable warning with GCC 4.0.1, and also
15890         avoids taking the address of a local variable.  All callers
15891         changed.
15892
15893 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15894
15895         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
15896         $LIBCSRC/posix/regexec.c.
15897         Add glibc bug 1217 for regcomp.c.
15898
15899 2005-08-19  Jim Meyering  <jim@meyering.net>
15900
15901         * lib/regexec.c (proceed_next_node): Redo local variables to
15902         avoid GCC shadowing warnings.
15903
15904 2005-08-18  Bruno Haible  <bruno@clisp.org>
15905
15906         * lib/strstr.c (strstr): Fix return value in multibyte case.
15907         * lib/strcasestr.c (strcasestr): Likewise.
15908
15909 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
15910
15911         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
15912
15913 2005-08-17  Jim Meyering  <jim@meyering.net>
15914
15915         Make the %s format (seconds since the epoch) work for a negative
15916         number and when used with a zero-padded field width, e.g. %015s.
15917
15918         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
15919         label so that it precedes the code to set `digits'.  Otherwise,
15920         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
15921         print `00-22'.  Now, it prints `-0022', as it should.
15922
15923 2005-08-17  Bruno Haible  <bruno@clisp.org>
15924
15925         * modules/strstr (Files): Add m4/mbrtowc.m4.
15926         (Depends-on): Add mbuiter.
15927
15928 2005-08-17  Bruno Haible  <bruno@clisp.org>
15929
15930         * modules/strcasestr: New file.
15931         * MODULES.html.sh (String handling, based on ANSI C 89): Add
15932         strcasestr.
15933
15934 2005-08-17  Bruno Haible  <bruno@clisp.org>
15935
15936         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
15937
15938 2005-08-17  Bruno Haible  <bruno@clisp.org>
15939
15940         * modules/mbuiter: New file.
15941         * MODULES.html.sh (Extended multibyte and wide character utilities):
15942         Add mbuiter.
15943
15944 2005-08-17  Bruno Haible  <bruno@clisp.org>
15945
15946         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
15947         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
15948
15949 2005-08-17  Bruno Haible  <bruno@clisp.org>
15950
15951         * m4/strcasestr.m4: New file.
15952
15953 2005-08-17  Bruno Haible  <bruno@clisp.org>
15954
15955         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
15956         * lib/strstr.c: Completely rewritten, with multibyte locale support.
15957
15958 2005-08-17  Bruno Haible  <bruno@clisp.org>
15959
15960         * lib/strcasestr.h: New file.
15961         * lib/strcasestr.c: New file.
15962
15963 2005-08-17  Bruno Haible  <bruno@clisp.org>
15964
15965         * lib/strcasecmp.c: Use mbuiter.h.
15966
15967 2005-08-17  Bruno Haible  <bruno@clisp.org>
15968
15969         * lib/mbuiter.h: New file.
15970
15971 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
15972
15973         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
15974         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
15975         and gl_GETOPT are both invoked via different paths (as happens
15976         with GNU tar CVS because it uses both argp and getopt), the former
15977         wins.
15978
15979 2005-08-16  Bruno Haible  <bruno@clisp.org>
15980
15981         * modules/tls: New file.
15982         * MODULES.html.sh (Multithreading): Add tls.
15983
15984 2005-08-16  Bruno Haible  <bruno@clisp.org>
15985
15986         * modules/strnlen1: New file.
15987         * MODULES.html.sh (String handling): Add strnlen1.
15988
15989 2005-08-16  Bruno Haible  <bruno@clisp.org>
15990
15991         * modules/strcase (Files): Add m4/mbrtowc.m4.
15992         (Depends-on): Add strnlen1, mbchar.
15993
15994 2005-08-16  Bruno Haible  <bruno@clisp.org>
15995
15996         * modules/mbiter: New file.
15997         * MODULES.html.sh (Extended multibyte and wide character utilities):
15998         Add mbiter.
15999
16000 2005-08-16  Bruno Haible  <bruno@clisp.org>
16001
16002         * modules/mbfile: New file.
16003         * MODULES.html.sh (Extended multibyte and wide character utilities):
16004         Add mbfile.
16005
16006 2005-08-16  Bruno Haible  <bruno@clisp.org>
16007
16008         * modules/mbchar: New file.
16009         * MODULES.html.sh (Extended multibyte and wide character utilities):
16010         New section.
16011
16012 2005-08-16  Bruno Haible  <bruno@clisp.org>
16013
16014         * m4/tls.m4: New file, from GNU gettext.
16015
16016 2005-08-16  Bruno Haible  <bruno@clisp.org>
16017
16018         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
16019         always.
16020         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
16021
16022 2005-08-16  Bruno Haible  <bruno@clisp.org>
16023
16024         * m4/mbiter.m4: New file.
16025
16026 2005-08-16  Bruno Haible  <bruno@clisp.org>
16027
16028         * m4/mbfile.m4: New file.
16029
16030 2005-08-16  Bruno Haible  <bruno@clisp.org>
16031
16032         * m4/mbchar.m4: New file.
16033
16034 2005-08-16  Bruno Haible  <bruno@clisp.org>
16035
16036         * lib/tls.h: New file, from GNU gettext.
16037         * lib/tls.c: New file, from GNU gettext.
16038
16039 2005-08-16  Bruno Haible  <bruno@clisp.org>
16040
16041         * lib/strnlen1.h: New file.
16042         * lib/strnlen1.c: New file.
16043
16044 2005-08-16  Bruno Haible  <bruno@clisp.org>
16045
16046         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
16047         (mbi_init): Update.
16048         (mbi_avail, mbi_advance): Let the iteration end before the terminating
16049         NUL byte, not after it.
16050
16051 2005-08-16  Bruno Haible  <bruno@clisp.org>
16052
16053         * lib/strcase.h (strcasecmp): Add note in comments.
16054         * lib/strncasecmp.c: Use code from strcasecmp.c.
16055         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
16056         (strcasecmp): Work correctly in multibyte locales.
16057
16058 2005-08-16  Bruno Haible  <bruno@clisp.org>
16059
16060         * lib/mbiter.h: New file.
16061
16062 2005-08-16  Bruno Haible  <bruno@clisp.org>
16063
16064         * lib/mbfile.h: New file.
16065
16066 2005-08-16  Bruno Haible  <bruno@clisp.org>
16067
16068         * lib/mbchar.h: New file.
16069         * lib/mbchar.c: New file.
16070
16071 2005-08-16  Bruno Haible  <bruno@clisp.org>
16072
16073         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
16074         the valid ones. Makes the comparison operations transitive:
16075         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
16076         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
16077
16078 2005-08-15  Simon Josefsson  <jas@extundo.com>
16079
16080         * modules/ssize_t (License): Change to 'unlimited'.
16081
16082         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
16083
16084 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
16085
16086         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
16087         Add comments for each pending glibc patch.
16088
16089 2005-08-15  Bruno Haible  <bruno@clisp.org>
16090
16091         * lib/regex.h (__restrict_arr): Don't define to __restrict if
16092         __cplusplus is defined.
16093
16094 2005-08-14  Jim Meyering  <jim@meyering.net>
16095
16096         Sync from coreutils.
16097
16098         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
16099         Use the hash-table-based cycle-detection code not just when
16100         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
16101         Reported by James Youngman in
16102         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
16103         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
16104         FTS_TIGHT_CYCLE_CHECK.
16105         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
16106         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
16107         once again.
16108         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
16109         * lib/fts.c (fd_safer): Remove decl.
16110         Include fcntl--.h rather than unistd-safer.h
16111         (fts_safe_changedir): Don't call fd_safer; no longer needed
16112         now that we include fcntl--.h.
16113
16114 2005-08-12  Simon Josefsson  <jas@extundo.com>
16115
16116         * modules/getndelim2: Use ssize_t module.
16117         * modules/getnline: Likewise.
16118         * modules/safe-read: Likewise.
16119         * modules/xreadlink: Likewise.
16120
16121         * modules/ssize_t: New file.
16122
16123 2005-08-12  Simon Josefsson  <jas@extundo.com>
16124
16125         * m4/readline.m4: Look for termcap, curses or ncurses if required.
16126
16127 2005-08-12  Simon Josefsson  <jas@extundo.com>
16128
16129         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16130         ssize_t.
16131
16132 2005-08-12  Simon Josefsson  <jas@extundo.com>
16133
16134         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
16135         readline, getdelim and check_version.
16136         (Support for systems lacking ISO C 99: Sizes of integer types):
16137         Add size_max.
16138
16139 2005-08-12  Bruno Haible  <bruno@clisp.org>
16140
16141         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
16142
16143 2005-08-11  Simon Josefsson  <jas@extundo.com>
16144
16145         * modules/readline: New file.
16146
16147         * modules/strnlen (Files): Add strnlen.h.
16148
16149 2005-08-11  Simon Josefsson  <jas@extundo.com>
16150
16151         * m4/readline.m4: New file.
16152
16153 2005-08-11  Simon Josefsson  <jas@extundo.com>
16154
16155         * lib/readline.h, readline.c: New file.
16156
16157 2005-08-11  Simon Josefsson  <jas@extundo.com>
16158
16159         * doc/gnulib.texi (Initial import, Finishing touches): Mention
16160         gl_AVOID.
16161
16162 2005-08-11  Bruno Haible  <bruno@clisp.org>
16163
16164         * lib/strnlen.h (strnlen): Change parameter name to match comment.
16165
16166 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
16167
16168         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
16169
16170 2005-08-10  Simon Josefsson  <jas@extundo.com>
16171
16172         * tests/test-iconvme.c: New file.
16173
16174 2005-08-10  Simon Josefsson  <jas@extundo.com>
16175
16176         * m4/strnlen.m4: New file.
16177
16178         * m4/strndup.m4: Don't check for strnlen declaration, done in
16179         strnlen.m4.
16180
16181 2005-08-10  Simon Josefsson  <jas@extundo.com>
16182
16183         * lib/strndup.c: Use strnlen.h.
16184
16185         * lib/strnlen.h: New file.
16186
16187 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
16188
16189         * README: Typos.
16190
16191 2005-08-02  Simon Josefsson  <jas@extundo.com>
16192
16193         * modules/readline: New file.
16194
16195 2005-08-02  Simon Josefsson  <jas@extundo.com>
16196
16197         * modules/getdelim: New file.
16198
16199         * modules/getline: Rewrite, don't use getndelim2.
16200
16201 2005-08-02  Simon Josefsson  <jas@extundo.com>
16202
16203         * m4/getline.m4: Separate out getdelim stuff into separate module.
16204
16205         * m4/getdelim.m4: New file.
16206
16207 2005-08-02  Simon Josefsson  <jas@extundo.com>
16208
16209         * lib/getline.h, getline.c: Rewrite.
16210
16211         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
16212
16213 2005-07-31  Bruno Haible  <bruno@clisp.org>
16214
16215         * lib/lock.h (gl_lock_initializer): New macro.
16216         (gl_lock_define_initialized): Use it.
16217         (gl_rwlock_initializer): New macro.
16218         (gl_rwlock_define_initialized): Use it.
16219         (gl_recursive_lock_initializer): New macro.
16220         (gl_recursive_lock_define_initialized): Use it.
16221
16222 2005-07-30  Karl Berry  <karl@gnu.org>
16223
16224         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
16225         Report from Ben Pfaff, regarding getopt.
16226
16227 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
16228
16229         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
16230         normal way.
16231         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
16232         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
16233         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
16234         (gl_GETOPT): Use the new macros.  Most of the implementation
16235         is moved to the new macros.  This is for programs like Emacs
16236         that don't want all the functionality of gl_GETOPT.
16237
16238 2005-07-26  Bruno Haible  <bruno@clisp.org>
16239
16240         * m4/lock.m4: Update from GNU gettext.
16241
16242 2005-07-26  Bruno Haible  <bruno@clisp.org>
16243
16244         * lib/lock.h: Update from GNU gettext.
16245         * lib/lock.c: Update from GNU gettext.
16246
16247 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
16248
16249         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
16250         obsolescent AC_TRY_RUN.  Include the default includes files, for
16251         'exit'.
16252
16253 2005-07-24  Bruno Haible  <bruno@clisp.org>
16254
16255         * modules/visibility: New file.
16256         * MODULES.html.sh (Misc): Add visibility.
16257
16258 2005-07-24  Bruno Haible  <bruno@clisp.org>
16259
16260         * m4/visibility.m4: New file.
16261
16262 2005-07-24  Bruno Haible  <bruno@clisp.org>
16263
16264         * doc/visibility.texi: New file.
16265
16266 2005-07-22  Bruno Haible  <bruno@clisp.org>
16267
16268         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
16269         $(ALLOCA_H), redundant through BUILT_SOURCES.
16270         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
16271         redundant through BUILT_SOURCES.
16272         * modules/byteswap (Makefile.am): Remove explicit dependency on
16273         $(BYTESWAP_H), redundant through BUILT_SOURCES.
16274         * modules/fnmatch (Makefile.am): Remove explicit dependency on
16275         $(FNMATCH_H), redundant through BUILT_SOURCES.
16276         * modules/getopt (Makefile.am): Remove explicit dependency on
16277         $(GETOPT_H), redundant through BUILT_SOURCES.
16278         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
16279         redundant through BUILT_SOURCES.
16280         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
16281         redundant through BUILT_SOURCES.
16282         * modules/stdbool (Makefile.am): Remove explicit dependency on
16283         $(STDBOOL_H), redundant through BUILT_SOURCES.
16284         * modules/stdint (Makefile.am): Remove explicit dependency on
16285         $(STDINT_H), redundant through BUILT_SOURCES.
16286         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
16287         Remove explicit dependency on $(SYSEXITS_H).
16288         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
16289
16290 2005-07-18  Simon Josefsson  <jas@extundo.com>
16291
16292         * lib/check-version.c (check_version): Accept identical versions too.
16293
16294 2005-07-18  Bruno Haible  <bruno@clisp.org>
16295
16296         * modules/lock: New file.
16297         * MODULES.html.sh (Multithreading): New section.
16298
16299 2005-07-18  Bruno Haible  <bruno@clisp.org>
16300
16301         * m4/lock.m4: New file, from GNU gettext.
16302
16303 2005-07-18  Bruno Haible  <bruno@clisp.org>
16304
16305         * lib/lock.h: New file, from GNU gettext.
16306         * lib/lock.c: New file, from GNU gettext.
16307
16308 2005-07-18  Bruno Haible  <bruno@clisp.org>
16309
16310         * lib/lock.h (gl_once_t): New type.
16311         (gl_once_define, gl_once): New macros.
16312         * lib/lock.c (fresh_once): New variable.
16313         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
16314         functions.
16315
16316 2005-07-16  Simon Josefsson  <jas@extundo.com>
16317
16318         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
16319         workaround, suggested by Bruno.
16320
16321 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
16322
16323         * modules/xalloc (Depends-on): Add xalloc-die.
16324         * modules/xvasprintf (Depends-on): Add xalloc-die.
16325
16326 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
16327
16328         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
16329         with a minor change.
16330
16331 2005-07-15  Bruno Haible  <bruno@clisp.org>
16332
16333         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
16334         When using lib/poll.c, define poll as rpl_poll.
16335
16336 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
16337
16338         * modules/argp (Depends-on): Remove unlocked-io.
16339
16340 2005-07-14  Derek Price  <derek@ximbiot.com>
16341
16342         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
16343         for glob symlink bug.
16344
16345 2005-07-14  Bruno Haible  <bruno@clisp.org>
16346
16347         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
16348         Instead, test for *_unlocked function declarations directly.
16349
16350 2005-07-11  Simon Josefsson  <jas@extundo.com>
16351
16352         * modules/size_max: New file.
16353
16354         * modules/xsize: Depend on size_max module for size_max.m4.
16355
16356 2005-07-11  Simon Josefsson  <jas@extundo.com>
16357
16358         * lib/size_max.h: New file.
16359
16360 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
16361
16362         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
16363         copyright symbol and the year.
16364         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
16365         (version_etc_va): Use parameterized copyright notice.
16366         Reword to conform to the current GNU coding standards.
16367
16368 2005-07-11  Karl Berry  <karl@gnu.org>
16369
16370         * doc/gnulib.texi (Quoting): new node.
16371         (Initial import): more info, from Patrice.
16372
16373 2005-07-11  Bruno Haible  <bruno@clisp.org>
16374
16375         * gnulib-tool (func_usage): Document option --avoid.
16376         (Command line options): Handle --avoid.
16377         (func_acceptable): New function.
16378         (func_modules_transitive_closure): Use it.
16379
16380 2005-07-11  Bruno Haible  <bruno@clisp.org>
16381
16382         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
16383         Reported by Jim Meyering.
16384
16385 2005-07-10  Bruno Haible  <bruno@clisp.org>
16386
16387         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
16388         Needed when size_t is smaller than 'unsigned int'.
16389         Reported by Paul Eggert.
16390
16391 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16392
16393         * modules/argp (Depends-on): Add unlocked-io
16394
16395 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16396
16397         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
16398         block of defines.
16399
16400 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
16401
16402         * config/srclist.txt: Comment out regcomp.c, since we have a porting
16403         fix now.
16404
16405 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
16406         and Paul Eggert  <eggert@cs.ucla.edu>
16407
16408         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
16409         in wint_t, not wchar_t.  Remove now-unnecessary cast.
16410
16411 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16412
16413         * modules/regex (Files): Add lib/regex_internal.c,
16414         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
16415         (Depends-on): Add extensions.
16416         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
16417
16418 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16419
16420         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
16421         pathconf.
16422         * m4/same.m4 (gl_SAME): Likewise.
16423         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
16424
16425         * m4/regex.m4: Adjust to new libc regex implementation.
16426         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
16427         all the .c and .h parts of (the new) regex.
16428         Quote the m4 stuff better.
16429         Check for RE_ICASE bug of old gnulib.
16430         Check for REG_STARTEND of recent libc.
16431         Rename local variables from jm_* to gl_*.
16432         Quote operand of "test -f".
16433         Say "recent enough" version of libc, not "version 2".
16434         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
16435         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
16436         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
16437         Remove check for btowc, isascii.
16438         Require AM_LANGINFO_CODESET.
16439
16440 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16441
16442         * lib/regex.c, regex.h: Sync from libc.
16443         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
16444         * lib/regexec.c:
16445         New files, synced from libc, except that regex_internal.h
16446         currently has a small porting fix.
16447
16448 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16449
16450         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
16451         regex_internal.c, regexec.c.
16452         Add regex_internal.h too, but as a comment, since the libc version
16453         is currently broken in gnulib mode.
16454
16455 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
16456
16457         Support programs like Emacs that use gnulib but not gettext.
16458         * MODULES.html.sh (Internationalization functions): Add gettext-h.
16459         * modules/gettext-h: New file.
16460         * modules/gettext (Files): Remove lib/gettext.h.
16461         (Depends-on): Add gettext-h.
16462         (Makefile.am): Remove lib_SOURCES.
16463         * modules/argmatch, modules/c-stack, modules/closeout:
16464         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
16465         * modules/execute, modules/file-type, modules/getaddrinfo:
16466         * modules/getopt, modules/human, modules/javacomp:
16467         * modules/javaexec, modules/mkdir-p, modules/obstack:
16468         * modules/openat, modules/pagealign_alloc, modules/pipe:
16469         * modules/quotearg, modules/regex, modules/rpmatch:
16470         * modules/unicodeio, modules/userspec, modules/version-etc:
16471         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
16472         * modules/xsetenv:
16473         Depend on gettext-h, not gettext.
16474
16475 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
16476
16477         * gnulib-tool (func_import): Add support for 'public domain' license.
16478         * modules/alloca, modules/atexit, modules/memmove:
16479         Now public domain, not GPL.
16480         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
16481         * modules/realloc, modules/strerror, modules/strtod:
16482         Now LGPL, not GPL.
16483
16484 2005-07-05  Bruno Haible  <bruno@clisp.org>
16485
16486         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
16487         autoconf CVS. Needed for mingw.
16488
16489 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
16490
16491         Remove the dependency of the strftime module on the tzset module.
16492         * modules/strftime (Depends-on): Remove dependency on tzset.
16493
16494 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
16495
16496         Remove the dependency of the strftime module on the tzset module.
16497         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
16498         gl_FUNC_TZSET_CLOBBER.
16499
16500 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
16501
16502         Remove the dependency of the strftime module on the tzset module.
16503         * lib/strftime.c (my_strftime)
16504         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
16505         Copy the input structure, to work around some of the bug with
16506         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
16507         Solaris releases, you should also use the tzset module, but we won't
16508         require it as a dependency any more since we don't want LGPLed code
16509         to depend on GPLed code.
16510
16511 2005-07-02  Jim Meyering  <jim@meyering.net>
16512
16513         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
16514         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
16515         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
16516         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
16517
16518 2005-07-02  Jim Meyering  <jim@meyering.net>
16519
16520         * lib/backupfile.c (backup_args): Change a `0' to NULL.
16521
16522 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
16523
16524         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
16525         declares only 'struct timespec;' (!).
16526
16527 2005-07-01  Jim Meyering  <jim@meyering.net>
16528
16529         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
16530         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
16531         * lib/save-cwd.c, tempname.c:
16532         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
16533         and don't include <sys/file.h>).
16534
16535 2005-06-29  Jim Meyering  <jim@meyering.net>
16536
16537         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
16538         type name.  Use the variable name instead.
16539         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
16540         Likewise.
16541
16542 2005-06-28  Simon Josefsson  <jas@extundo.com>
16543
16544         * modules/check-version (Files): Add check-version.m4.
16545
16546 2005-06-28  Simon Josefsson  <jas@extundo.com>
16547
16548         * m4/check-version.m4: New file, suggested by Jim Meyering
16549         <jim@meyering.net>.
16550
16551 2005-06-28  Simon Josefsson  <jas@extundo.com>
16552
16553         * lib/check-version.h, lib/check-version.c: New files.
16554
16555 2005-06-28  Simon Josefsson  <jas@extundo.com>
16556
16557         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
16558         collision with global variable.  Better indentation.  Don't
16559         increment buffer pointer beyond buffer end.  Based on comments
16560         from Paul Eggert <eggert@cs.ucla.edu>.
16561
16562         * lib/base64.h: Indent.
16563
16564 2005-06-28  Simon Josefsson  <jas@extundo.com>
16565
16566         * doc/gnulib.texi (Library version handling): New section.
16567
16568 2005-06-28  Jim Meyering  <jim@meyering.net>
16569
16570         * check-module (find_included_lib_files): Hard-code another
16571         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
16572         but modules/fts-lgpl (correctly) does not list those files.
16573
16574         * modules/canonicalize (Files): Add lib/pathmax.h.
16575
16576 2005-06-25  Simon Josefsson  <jas@extundo.com>
16577
16578         * modules/check-version: New file.
16579
16580 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
16581
16582         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
16583         initializer of struct addrinfo, as an indication that we don't
16584         care how many members the structure has.
16585
16586 2005-06-24  Derek Price  <derek@ximbiot.com>
16587         and Bruno Haible  <bruno@clisp.org>
16588
16589         Remove stat module & update lstat.
16590         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
16591         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
16592         * m4/stat.m4: Remove this file.
16593
16594 2005-06-24  Derek Price  <derek@ximbiot.com>
16595         and Bruno Haible  <bruno@clisp.org>
16596
16597         Remove stat module & update lstat.
16598         * lib/stat.c: Remove this file...
16599         (slash_aware_lstat): ...moving this content and its support...
16600         * lib/lstat.c (rpl_lstat): ...into here.
16601         * lib/lstat.h: New file.
16602
16603 2005-06-24  Derek Price  <derek@ximbiot.com>
16604         and Bruno Haible  <bruno@clisp.org>
16605
16606         Remove stat module & update lstat.
16607         * config/srclist.txt (libc sources): Remove stat.
16608
16609 2005-06-24  Derek Price  <derek@ximbiot.com>
16610         and Bruno Haible  <bruno@clisp.org>
16611
16612         Remove stat module & update lstat.
16613         * MODULES.html.sh (stat): Remove.
16614         * MODULES.html: Regenerated.
16615         * modules/lstat (Description): Correct function name.
16616         (Files): Add "lstat.h".
16617         (Depends-on): Remove stat, add xalloc, stat-macros.
16618         * modules/stat: Remove this file.
16619         (Include): Add "lstat.h", remove <sys/stat.h>.
16620
16621 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
16622
16623         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
16624         (ranged_convert): Don't save conversion in a temporary struct.
16625         This causes a warning with GCC 4.0.0, and anyway in the typical
16626         case it's not worth the extra 100 bytes or so of code.
16627         (ranged_convert, __mktime_internal): When calling a function via a
16628         pointer P, use P () rather than (*P) (), as we now assume C89 or
16629         better.
16630
16631 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16632
16633         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
16634         "who -r" failed to give output.  Problem reported by Tim Waugh.
16635
16636         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
16637         (xcalloc): Use it to avoid needless tests.
16638         Problem reported by Jim Meyering.
16639
16640 2005-06-20  Derek Price  <derek@ximbiot.com>
16641
16642         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
16643         unnecessary for Autoconfs > 2.59c.
16644
16645 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16646
16647         * lib/argp.h (__option_is_short): Check upper limit of
16648         __key. Isprint() requires its argument to have the value
16649         of an unsigned char or EOF.
16650
16651 2005-06-16  Jim Meyering  <jim@meyering.net>
16652
16653         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
16654         when either N or S is zero.
16655
16656 2005-06-16  Derek Price  <derek@ximbiot.com>
16657
16658         * m4/bison.m4: Declare YACC & YFLAGS precious.
16659
16660 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
16661
16662         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
16663         multibyte string or pattern, fall back on unibyte matching.
16664         Problem reported by James Youngman.
16665
16666 2005-06-08  Bruno Haible  <bruno@clisp.org>
16667
16668         * modules/csharpcomp: New file.
16669         * MODULES.html.sh (C#): Add csharpcomp.
16670
16671 2005-06-08  Bruno Haible  <bruno@clisp.org>
16672
16673         * m4/csharpcomp.m4: New file, from GNU gettext.
16674
16675 2005-06-08  Bruno Haible  <bruno@clisp.org>
16676
16677         * lib/csharpcomp.h: New file, from GNU gettext.
16678         * lib/csharpcomp.c: New file, from GNU gettext.
16679         * lib/csharpcomp.sh.in: New file, from GNU gettext.
16680
16681 2005-06-08  Bruno Haible  <bruno@clisp.org>
16682
16683         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
16684         warning on mingw.
16685
16686 2005-06-07  Derek Price  <derek@ximbiot.com>
16687
16688         Sync from CVS.
16689         * lib/glob_.h: Indent nested #ifdef.
16690
16691 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
16692
16693         Sync from coreutils.
16694         Use "file name" when talking about file names, instead of "filename"
16695         or "path", as per the GNU coding standards.
16696         * lib/mkdir-p.c: Renamed from makepath.c.
16697         (make_dir_parents): Renamed from make_path.  All callers changed.
16698         * lib/mkdir-p.h: Likewise.  All includers changed.
16699         * lib/filenamecat.c: Renamed from path-concat.c.
16700         (file_name_concat): Renamed from path_concat.  All callers changed.
16701         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
16702         * lib/filenamecat.h: Likewise.  All includers changed.
16703         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
16704         in comments or local variable names.
16705         * lib/basename.c: Likewise.
16706         * lib/canonicalize.c, canonicalize.h: Likewise.
16707         * lib/dirname.c, dirname.h: Likewise.
16708         * lib/euidaccess.c: Likewise.
16709         * lib/exclude.c: Likewise
16710         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
16711         * lib/fsusage.c, fsuage.h: Likewise.
16712         * lib/fts.c, fts_.h: Likewise.
16713         * lib/getcwd.c: Likewise.
16714         * lib/getloadavg.c: Likewise.
16715         * lib/mkstemp.c: Likewise.
16716         * lib/mountlist.c, mountlist.h: Likewise.
16717         * lib/openat.c, openat.h: Likewise.
16718         * lib/readlink-stub.c: Likewise.
16719         * lib/readutmp.c, readutmp.h: Likewise.
16720         * lib/rename.c: Likewise.
16721         * lib/rmdir.c: Likewise.
16722         * lib/same.c: Likewise.
16723         * lib/savedir.c: Likewise.
16724         * lib/stripslash.c: Likewise.
16725         * lib/tempname.c: Likewise.
16726         * lib/xreadlink.c: Likewise.
16727         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
16728         All uses changed.
16729         * lib/exclude.h: Likewise.
16730
16731         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
16732         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
16733         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
16734         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
16735         * lib/pathmax.h: Include <limits.h> unconditionally, since other
16736         files have been getting away with it for years (MORE/BSD 4.3
16737         is extinct now).
16738         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
16739         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
16740
16741         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
16742         Define to 256, not 255, as per modern POSIX.
16743
16744 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
16745
16746         Sync from coreutils.
16747         Use "file name" when talking about file names, instead of "filename"
16748         or "path", as per the GNU coding standards.
16749         * MODULES.html.sh: mkdir-p renamed from makepath.
16750         filenamecat renamed from path-concat.
16751         * modules/filenamecat: Renamed from modules/path-concat.
16752         (Files): filenamecat.h and filenamecat.c renamed from
16753         path-concat.h and path-concat.c.
16754         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
16755         (Include): filenamecat.h, not path-concat.h.
16756         * modules/mkdir-p: Renamed from modules/makepath.
16757         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
16758         makepath.c.
16759         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
16760         (Include): mkdir-p.h, not makepath.h.
16761
16762 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
16763
16764         Sync from coreutils.
16765         * m4/mkdir-p.m4: Renamed from makepath.m4.
16766         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
16767         Rename files from makepath.c to mkdir-p.c, and from
16768         makepath.h to mkdir-p.h.
16769         * m4/filenamecat.m4: Renamed from path-concat.m4.
16770         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
16771         Rename files from path-concat.c to filenamecat.c,
16772         and from path-concat.h to filenamecat.h.
16773         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
16774         "file name" in local variables or comments.
16775         * m4/rename.m4: Likewise.
16776
16777 2005-06-01  Bruno Haible  <bruno@clisp.org>
16778
16779         * modules/csharpexec: New file.
16780         * MODULES.html.sh (C#): New section.
16781
16782 2005-06-01  Bruno Haible  <bruno@clisp.org>
16783
16784         * m4/csharp.m4: New file, from GNU gettext.
16785         * m4/csharpexec.m4: New file, from GNU gettext.
16786
16787 2005-06-01  Bruno Haible  <bruno@clisp.org>
16788
16789         * lib/csharpexec.h: New file, from GNU gettext.
16790         * lib/csharpexec.c: New file, from GNU gettext.
16791         * lib/csharpexec.sh.in: New file, from GNU gettext.
16792
16793 2005-05-31  Derek Price  <derek@ximbiot.com>
16794             Paul Eggert  <eggert@cs.ucla.edu>
16795
16796         Sync from cvs.
16797         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
16798
16799 2005-05-31  Derek Price  <derek@ximbiot.com>
16800             Paul Eggert  <eggert@cs.ucla.edu>
16801
16802         Sync from cvs.
16803         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
16804
16805 2005-05-29  Derek Price  <derek@ximbiot.com>
16806
16807         * config/srclist.txt (glob_.h, glob.c): Add these files.
16808
16809 2005-05-29  Derek Price  <derek@ximbiot.com>
16810
16811         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
16812         * modules/glob: New file.
16813         * modules/getlogin_r: Add link to POSIX spec in description.
16814
16815 2005-05-29  Derek Price  <derek@ximbiot.com>
16816             Paul Eggert  <eggert@cs.ucla.edu>
16817
16818         * m4/glob.m4: New file.
16819
16820 2005-05-29  Derek Price  <derek@ximbiot.com>
16821             Paul Eggert  <eggert@cs.ucla.edu>
16822
16823         * lib/glob_.h, lib/glob.c: New files.
16824
16825 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
16826
16827         * modules/fts (Files): Remove m4/inttypes-pri.m4.
16828         * modules/fts-lgpl (Depends-on): Remove gettext.
16829
16830 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
16831
16832         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
16833         and don't require gt_INTTYPES_PRI.
16834
16835 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
16836
16837         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
16838
16839         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
16840         the configuration hassle isn't worth it.
16841         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
16842         (LONGEST_MODIFIER, PRIuMAX): Remove.
16843
16844 2005-05-27  Bruno Haible  <bruno@clisp.org>
16845
16846         * lib/getlogin_r.h: Remove second include of <stddef.h>.
16847
16848 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
16849
16850         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
16851         _POSIX_PTHREAD_SEMANTICS for Solaris.
16852
16853 2005-05-25  Derek Price  <derek@ximbiot.com>
16854
16855         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
16856
16857 2005-05-25  Derek Price  <derek@ximbiot.com>
16858             Paul Eggert  <eggert@cs.ucla.edu>
16859
16860         * modules/getlogin_r, m4/getlogin_r.m4: New files.
16861         * lib/getlogin_r.c, getlogin_r.h: New files.
16862
16863 2005-05-25  Bruno Haible  <bruno@clisp.org>
16864             Derek Price  <derek@ximbiot.com>
16865
16866         * lib/getlogin_r.h: Simplify API documentation.
16867
16868 2005-05-23  Derek Price  <derek@ximbiot.com>
16869
16870         * modules/minmax (Files): Add m4/minmax.m4.
16871         (configure.ac): Add gl_MINMAX.
16872
16873 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
16874
16875         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
16876         so that unistd-safer.h (GPL'ed code) need not be included.
16877
16878 2005-05-22  Bruno Haible  <bruno@clisp.org>
16879
16880         * m4/minmax.m4: New file.
16881         Based on a patch by Derek Price <derek@ximbiot.com>.
16882
16883 2005-05-22  Bruno Haible  <bruno@clisp.org>
16884
16885         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
16886         (INT64_MIN): Fix definition.
16887         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
16888
16889         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
16890         NEED_SIGNED_INT_TYPES.
16891
16892         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
16893         HAVE_SYSTEM_INTTYPES.
16894
16895 2005-05-22  Bruno Haible  <bruno@clisp.org>
16896
16897         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
16898         Also include <sys/param.h> if it defines MIN, MAX.
16899         Based on a patch by Derek Price <derek@ximbiot.com>.
16900
16901 2005-05-21  Jim Meyering  <jim@meyering.net>
16902
16903         * modules/fts (Files): Add m4/inttypes-pri.m4.
16904         (Depends-on): Add lstat and remove gettext.  Alphabetize.
16905
16906 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16907
16908         New fts module.
16909         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
16910         (setup_dir, free_dir): New functions.
16911         (enter_dir, leave_dir): Define trivial
16912         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
16913         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
16914         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
16915         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
16916         Move to fts-cycle.c.
16917         (fts_open): Use setup_dir.
16918         (fts_close): Use free_dir.
16919         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
16920         This adds a label and some gotos, but the alternatives were messier.
16921         Check for memory allocation failure when entering a dir.
16922         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
16923         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
16924         (FTS): New member fts_cycle, that is a union that contains the
16925         old active_dir_ht and cycle_state.  All uses changed to mention
16926         fts_cycle.ht and fts_cycle.state.
16927         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
16928         fts.c, with the following changes:
16929         (setup_dir, free_dir): New functions.
16930         (enter_dir): Now returns bool.  Return true if successful, false
16931         if memory exhausted.  All callers changed.
16932         Do not bother partly cleaning up on
16933         memory allocation failure; that is free_dir's job.
16934         However, free ad if hash_insert fails, to avoid memory leak.
16935         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
16936         fts->fts_options to see which union member to use.
16937
16938 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16939
16940         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
16941         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
16942
16943 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16944
16945         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
16946
16947 2005-05-20  Jim Meyering  <jim@meyering.net>
16948
16949         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
16950         Now a macro, to pacify GCC.
16951
16952 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
16953
16954         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
16955         of -1.
16956
16957 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
16958
16959         * lib/chown.c (rpl_chown): Return -1 on failure.
16960
16961 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
16962
16963         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
16964         Don't check for stddef.h.
16965         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
16966         don't use its results.
16967         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
16968         since we include them unconditionally.  Don't require
16969         AM_STDBOOL_H, since stdbool is a prerequisite.
16970         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
16971         since we assume C89 or better.
16972         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
16973         as we don't use their results.
16974         Don't check for fchdir, memmove, memset, strrchr, as we use
16975         them unconditionally.
16976         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
16977         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
16978
16979 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
16980
16981         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
16982         Include <stddef.h> unconditionally, since we assume C89 now.
16983         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
16984         * lib/fts.c: Include fts_.h first, to check interface.
16985         Do not include intprops.h; no longer needed.
16986         Include cycle-check.h and hash.h, since fts_.h no longer does.
16987         Remove unnecessary casts of closedir to void.
16988         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
16989         decide whether to decrement nlinks.
16990         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
16991         (FTS): Use struct hash_table * instead of Hash_table, so that
16992         we no longer need to include hash.h here.
16993
16994 2005-05-18  Jim Meyering  <jim@meyering.net>
16995
16996         * modules/dirfd (License): Change to LGPL.  Most of the code
16997         is already in the public domain.
16998
16999 2005-05-18  Jim Meyering  <jim@meyering.net>
17000
17001         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
17002         Reported by Yoann Vandoorselaere.
17003
17004 2005-05-17  Jim Meyering  <jim@meyering.net>
17005
17006         * m4/fts.m4: New file, from coreutils.
17007
17008 2005-05-17  Jim Meyering  <jim@meyering.net>
17009
17010         * lib/fts.c, lib/fts_.h: New files, from coreutils.
17011
17012 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
17013
17014         Sync from coreutils.
17015         * m4/unlinkdir.m4: New file.
17016
17017 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
17018
17019         Sync from coreutils.
17020         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
17021         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
17022         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
17023         White space changes only.
17024         * lib/makepath.c (make_path): Port to hosts where leading "//" is
17025         special.
17026         * lib/yesno.c: Include getline.h, not ctype.h.
17027         (yesno): Don't remove leading white space; POSIX doesn't allow it.
17028         Use getline to remove arbitrary restriction on response length.
17029
17030 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
17031
17032         * config/srclist-update: Spell out "Street" in FSF postal
17033         mail address; this is the style the FSF seems to prefer.
17034
17035         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
17036         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
17037         this updates FSF postal mail address.
17038
17039         Sync from coreutils.
17040         * modules/unlinkdir: New file.
17041         * modules/yesno (Depends-on): Add getline.
17042         * MODULES.html.sh (File system functions): Add unlinkdir.
17043
17044 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17045
17046         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
17047         lib/strsep.h:
17048         Change the initial comment to refer to GPL, not LGPL.
17049         gnulib-tool will change it to LGPL as needed.
17050
17051         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
17052         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
17053         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
17054         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
17055         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
17056         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
17057         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
17058         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
17059         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
17060         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
17061         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
17062         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
17063         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
17064         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
17065         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
17066         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
17067         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
17068         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
17069         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
17070         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
17071         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
17072         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
17073         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
17074         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
17075         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
17076         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
17077         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
17078         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
17079         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
17080         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
17081         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
17082         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
17083         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
17084         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
17085         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
17086         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
17087         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
17088         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
17089         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
17090         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
17091         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
17092         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
17093         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
17094         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
17095         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
17096         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
17097         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
17098         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
17099         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
17100         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
17101         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
17102         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
17103         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
17104         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
17105         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
17106         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
17107         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
17108         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
17109         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
17110         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
17111         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
17112         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
17113         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
17114         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
17115         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
17116         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
17117         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
17118         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
17119         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
17120         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
17121         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
17122         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
17123         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
17124         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
17125         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
17126         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
17127         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
17128         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
17129         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
17130         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
17131         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
17132         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
17133         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
17134         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
17135         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
17136         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
17137         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
17138         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
17139         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
17140         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
17141         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
17142         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
17143         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
17144         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
17145         lib/yesno.c, lib/yesno.h:
17146         Update FSF postal mail address.
17147
17148 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17149
17150         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
17151         tests/test-memmem.c, tests/test-stpncpy.c:
17152         Update FSF postal mail address.
17153
17154 2005-05-13  Bruno Haible  <bruno@clisp.org>
17155
17156         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
17157         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
17158         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
17159         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
17160         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
17161         Add support for 64-bit integers in the MSVC compiler.
17162
17163 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17164
17165         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
17166
17167 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
17168
17169         * gnulib-tool (func_import): Sort and uniquify recommended includes.
17170
17171 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
17172
17173         * doc/getdate.texi (General date syntax): Don't say that date
17174         date --iso-8601=ns generates acceptable dates; it doesn't yet.
17175         Problem reported by Nic Ferrier.
17176
17177 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
17178
17179         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
17180         specified in ai_socktype. Fix invalid ai_protocol
17181         check. ai_protocol is usually set to 0 or depending on
17182         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
17183         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
17184         ai_socktype / ai_protocol in the returned addrinfo structure.
17185
17186 2005-05-10  Simon Josefsson  <jas@extundo.com>
17187
17188         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
17189         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
17190
17191 2005-05-10  Karl Berry  <karl@gnu.org>
17192
17193         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
17194         (from http://www.gnu.org/licenses).
17195         * doc/COPYING.LIB: also rename to COPYING.LESSER.
17196         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
17197         fdl.texi suffices.
17198
17199 2005-05-10  Karl Berry  <karl@gnu.org>
17200
17201         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
17202         (COPYING.DOC): remove.
17203
17204         * config/srclist-update: new FSF address.
17205
17206 2005-05-10  Derek Price  <derek@ximbiot.com>
17207
17208         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
17209         possible.
17210
17211 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
17212             Bruno Haible  <bruno@clisp.org>
17213
17214         * modules/inet_ntop: New file.
17215         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17216         inet_ntop.
17217
17218 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
17219             Bruno Haible  <bruno@clisp.org>
17220
17221         * m4/inet_ntop.m4: New file.
17222
17223 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
17224             Bruno Haible  <bruno@clisp.org>
17225
17226         * lib/inet_ntop.h: New file.
17227         * lib/inet_ntop.c: New file, from glibc with modifications.
17228
17229 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
17230
17231         * modules/time_r (License): Change to LGPL.
17232         * modules/extensions (License): Change to LGPL.  Actually,
17233         the license is more permissive than that, but currently gnulib-tool
17234         doesn't know how to handle more-permissive licenses.
17235
17236         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
17237         Problem reported by Dave Love.
17238
17239 2005-05-08  Jim Meyering  <jim@meyering.net>
17240
17241         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
17242         blank.
17243
17244 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
17245
17246         * modules/argmatch (Depends-on): Add stdbool.
17247         * modules/backupfile (Depends-on): Likewise.
17248         * modules/chdir-long (Depends-on): Likewise.
17249         * modules/closeout (Depends-on): Likewise.
17250         * modules/cycle-check (Depends-on): Likewise.
17251         * modules/dirname (Depends-on): Likewise.
17252         * modules/fnmatch (Depends-on): Likewise.
17253         * modules/fsusage (Depends-on): Likewise.
17254         * modules/fwriteerror (Depends-on): Likewise.
17255         * modules/getcwd (Depends-on): Likewise.
17256         * modules/getloadavg (Depends-on): Likewise.
17257         * modules/hard-locale (Depends-on): Likewise.
17258         * modules/makepath (Depends-on): Likewise.
17259         * modules/mountlist (Depends-on): Likewise.
17260         * modules/nanosleep (Depends-on): Likewise.
17261         * modules/posixtm (Depends-on): Likewise.
17262         * modules/quotearg (Depends-on): Likewise.
17263         * modules/readtokens (Depends-on): Likewise.
17264         * modules/readtokens0 (Depends-on): Likewise.
17265         * modules/readutmp (Depends-on): Likewise.
17266         * modules/save-cwd (Depends-on): Likewise.
17267         * modules/strftime (Depends-on): Likewise.
17268         * modules/userspec (Depends-on): Likewise.
17269         * modules/utimecmp (Depends-on): Likewise.
17270         * modules/xgetcwd (Depends-on): Likewise.
17271         * modules/xnanosleep (Depends-on): Likewise.
17272         * modules/xstrtod (Depends-on): Likewise.
17273         * modules/yesno (Depends-on): Likewise.
17274
17275 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
17276
17277         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
17278         needless checks.
17279
17280 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17281
17282         Merge from coreutils.  Among other things,
17283         add bulletproofing for cases where stdin, stdout, or stderr are closed.
17284         * lib/fd-safer.c: New file.
17285         * lib/fcntl-safer.h, open-safer.c: Remove.
17286         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
17287         * lib/dup-safer.c: Include unistd-safer.h first.
17288         Don't include errno.h.
17289         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
17290         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
17291         * lib/file-type.c: Rely on file-type.h change.
17292         * lib/getloadavg.c: Include unistd-safer.h.
17293         (getloadavg): Use safer open.
17294         * lib/getusershell.c: Include "stdio-safer.h".
17295         (getusershell): Use safer fopen.
17296         * lib/long-options.c (long_options): Use NULL rather than 0.
17297         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
17298         'free'.
17299         * lib/modechange.c: Likewise.
17300         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
17301         (MODE_DONE): New constant.
17302         (struct mode_change): Remove 'next' member.
17303         (make_node_op_equals): New function; like the old one of the
17304         same name, except it allocates an array.
17305         (mode_compile, mode_create_from_ref): Use it.
17306         (mode_compile): Allocate result as an array, not a linked list.
17307         Parse octal string ourself, so that we catch mistakes like "+0".
17308         (mode_adjust): Arg is an array, not a linked list.
17309         * lib/modechange.c: Include stat-macros.h, xalloc.h.
17310         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
17311         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
17312         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
17313         Remove.  This is now stat-macros.h's job.
17314         (talloc): Remove.  All callers replaced by xalloc, so that
17315         our invokers don't have to worry about reporting memory failures.
17316         (make_node_op_equals): Remove.
17317         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
17318         New constants.
17319         (struct mode_change): Moved here from modechange.h.
17320         (mode_append_entry): Remove.
17321         (mode_compile): Remove MASKED_OPS arg, since it encouraged
17322         apps to have incorrect behavior.  Use simpler algorithm for head
17323         and tail.  Don't futz with umask; that's now the job of mode_adjust.
17324         Detect more invalid usages rather than having somewhat-random behavior.
17325         Don't insert an "a=" action, as that leads to incorrect behavior.
17326         (mode_compile, mode_create_from_ref): Return NULL on error instead
17327         of an enum, since now there's only one way to have an error.  All
17328         callers changed.
17329         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
17330         at the correct time.  Simplify calculation of "+u" and its ilk.
17331         Don't mishandle "+X".
17332         (mode_free): Remove "register" and localize decls.
17333         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
17334         (struct mode_change): Move to modechange.c; callers don't
17335         need to see this stuff.
17336         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
17337         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
17338         (mode_change, mode_adjust): Reflect the new signatures noted above.
17339         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
17340         that might redefine system include files.
17341         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
17342         (my_usleep): Use NULL rather than (void *) 0.
17343         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
17344         Use siginterrupt to specify that system calls should be interrupted.
17345         (rpl_nanosleep): Move initialization of suspended closer to call of
17346         my_usleep.
17347         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
17348         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
17349         (desirable_utmp_entry): New function.
17350         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
17351         using x2nrealloc, to simplify logic.
17352         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
17353         size calculation.  Do not assume utmp file is a regular file.
17354         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
17355         (READ_UTMP_CHECK_PIDS): New constant.
17356         * lib/save-cwd.c: Include unistd-safer.h.
17357         (save_cwd): Use fd_safer.
17358         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
17359         [!_LIBC] Include "stat-macros.h" instead.
17360         * lib/unistd-safer.h (fd_safer): New decl.
17361
17362 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17363
17364         * modules/getloadavg (Depends-on): Add unistd-safer.
17365         * modules/getusershell (Depends-on): Add stdio-safer.
17366         * modules/lstat (Depends-on): Remove xalloc.
17367         * modules/mkstemp (Depends-on): Add stat-macros.
17368         * modules/modechange (Depends-on): Remove xstrtol.
17369         Add stat-macros, xalloc.
17370         * modules/save-cwd (Depends-on): Add unistd-safer.
17371         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
17372         * modules/unistd-safer (Files): Add lib/fd-safer.c
17373         (Makefile.am): Remove lib_SOURCES.
17374
17375         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
17376         Remove fcntl-safer; unistd-safer supersedes it.
17377
17378 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17379
17380         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
17381         AC_HEADER_STAT.
17382         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
17383         (gl_PREREQ_CHOWN): Remove.
17384         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
17385         it.  Don't require AC_HEADER_STAT.
17386         (gl_PREREQ_LSTAT): Remove.
17387         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
17388         Don't require AC_HEADER_STAT.
17389         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
17390         (gl_PREREQ_RMDIR): Remove.
17391         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
17392         mention stat-macros.h or AC_HEADER_STAT, since we'll make
17393         the stat-macros module a prerequisite.
17394         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
17395         * m4/filemode.m4 (gl_FILEMODE): Likewise.
17396         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
17397         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
17398         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
17399         variable names.
17400         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
17401         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
17402         variable prefixes.
17403         * m4/fcntl-safer.m4: Remove.
17404         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
17405         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
17406         Invoke gl_PREREQ_FD_SAFER.
17407         (gl_PREREQ_FD_SAFER): New macro.
17408         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
17409         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
17410         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
17411         Remove duplicate call to AC_LIBOBJ(readutmp).
17412         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
17413
17414         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
17415         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
17416
17417 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17418
17419         * MODULES.html.sh (Misc): Add byteswap.
17420
17421 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17422
17423         * modules/getcwd (Depends-on): Add extensions.
17424         * modules/openat (Depends-on): Likewise.
17425
17426 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17427
17428         * modules/byteswap: New file.
17429
17430 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17431
17432         * m4/byteswap.m4: New file.
17433
17434 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17435
17436         * lib/byteswap_.h: New file.
17437
17438 2005-04-25  Karl Berry  <karl@gnu.org>
17439
17440         * m4/gettext.m4: Update from GNU gettext 0.14.4.
17441
17442 2005-04-25  Albert Chin  <china@thewrittenword.com>
17443
17444         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
17445         Toolkit C bug.
17446
17447 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
17448
17449         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
17450         (func_ln_if_changed) Remove forcibly for no error message
17451         in case file does not exist.
17452
17453 2005-04-19  Simon Josefsson  <jas@extundo.com>
17454
17455         * gnulib-tool (Options): Make --symlink mean --symbolic.
17456
17457 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
17458
17459         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
17460
17461 2005-04-16  Simon Josefsson  <jas@extundo.com>
17462
17463         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
17464
17465 2005-04-15  Simon Josefsson  <jas@extundo.com>
17466
17467         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
17468
17469 2005-04-15  Simon Josefsson  <jas@extundo.com>
17470
17471         * gnulib-tool: Rename --symlink to --symbolic.
17472
17473 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
17474
17475         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
17476         symbolic links to files instead of copying/moving.  Add --aux-dir,
17477         specifying directory relative --dir where auxiliary build tools
17478         are placed.
17479
17480 2005-04-14  Bruno Haible  <bruno@clisp.org>
17481
17482         * modules/allocsa (License): Change to LGPL.
17483         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
17484
17485 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
17486
17487         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
17488         that "UTC +1 second" continues to work.  Problem reported
17489         by Dmitry V. Levin.
17490         (relunit_snumber): New rule.
17491         (relunit): Use it.
17492
17493 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
17494
17495         * lib/getdate.y (universal_time_zone_table): New constant.
17496         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
17497         universal_time_zone_table.
17498         (lookup_zone): Prefer universal_time_zone_table to
17499         local_time_zone_table, so that "GMT" time stamps are allowed in
17500         London during the summer.  Problem reported by Ian Abbott.
17501
17502 2005-04-12  Jim Meyering  <jim@meyering.net>
17503
17504         * lib/human.c (humblock): Set *options even when returning due to
17505         xstrtoumax conversion failure.  Thanks to a used-uninitialized
17506         warning from gcc-4.
17507
17508 2005-04-09  Jim Meyering  <jim@meyering.net>
17509
17510         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
17511         -Wuninitialized: initialize tm0.tm_year.
17512
17513 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
17514
17515         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
17516         count, since there's no maximum.  All uses changed.
17517         Add member dsts_seen.
17518         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
17519         not being INT_MAX.
17520         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
17521         Use pc_rels_seen to decide whther a date is absolute.
17522
17523         * lib/getdate.y (number): Don't overwrite year.
17524         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
17525         check.
17526
17527 2005-04-02  Simon Josefsson  <jas@extundo.com>
17528
17529         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
17530         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
17531
17532 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
17533
17534         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
17535         where no absolute path name can be longer than PATH_MAX.
17536
17537 2005-03-27  Jim Meyering  <jim@meyering.net>
17538
17539         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
17540
17541 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
17542
17543         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
17544         "one's complement" -> "ones' complement" in comment, as per Knuth.
17545         "value of type" -> "type or expression" in comment.
17546         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
17547
17548 2005-03-26  Jim Meyering  <jim@meyering.net>
17549
17550         Comment nits.
17551         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
17552         Correct typos: s/or/of/.
17553
17554 2005-03-26  Jim Meyering  <jim@meyering.net>
17555
17556         * modules/check-include-files: Move to ../ and rename to...
17557         * check-module: ...this.
17558
17559 2005-03-25  Jim Meyering  <jim@meyering.net>
17560
17561         * modules/xvasprintf (Files): Add xalloc.h.
17562
17563 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
17564
17565         * modules/gettext (Files): config/config.rpath ->
17566         build-aux/config.rpath
17567         * modules/iconv (Files): Likewise.
17568         Problem reported by Oskar Liljeblad.
17569
17570 2005-03-23  Jim Meyering  <jim@meyering.net>
17571
17572         * modules/check-include-files: New script to check for
17573         missing dependencies, multiple includes, etc.
17574
17575         * modules/c-strtold (Depends-on): Add xalloc.
17576         * modules/c-strtod (Depends-on): Add xalloc.
17577         * modules/hash (Depends-on): Add xalloc.
17578         (Files): Remove lib/xalloc.h.
17579
17580         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
17581         * modules/userspec (Files): Add lib/inttostr.h.
17582
17583 2005-03-23  Jim Meyering  <jim@meyering.net>
17584
17585         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
17586
17587 2005-03-22  Jim Meyering  <jim@meyering.net>
17588
17589         * modules/stat-macros: New module.
17590         * modules/canonicalize, modules/euidaccess, modules/file-type,
17591         * modules/filemode, modules/lchown, modules/makepath,
17592         * modules/rmdir, modules/stat: Depend on new stat-macros module
17593         rather than listing lib/stat-macros.h manually.
17594         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
17595
17596 2005-03-22  Jim Meyering  <jim@meyering.net>
17597
17598         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
17599
17600 2005-03-22  Bruno Haible  <bruno@clisp.org>
17601
17602         * config/srclist.txt: Replace target directory 'config' with
17603         'build-aux'.
17604         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
17605         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
17606         ../build-aux/.
17607
17608 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
17609
17610         * modules/chdir-long (Depends-on): Add mempcpy.
17611
17612         * modules/acl, modules/backupfile, modules/c-strtod,
17613         modules/c-strtold, modules/canon-host, modules/canonicalize,
17614         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
17615         modules/exclude, modules/exitfail, modules/file-type,
17616         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
17617         modules/getdate, modules/getline, modules/getpagesize,
17618         modules/getpass, modules/getugroups, modules/group-member,
17619         modules/hard-locale, modules/hash, modules/human, modules/idcache,
17620         modules/inttostr, modules/long-options, modules/makepath,
17621         modules/md5, modules/memcasecmp, modules/memcoll,
17622         modules/modechange, modules/mountlist, modules/path-concat,
17623         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
17624         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
17625         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
17626         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
17627         modules/strftime, modules/strndup, modules/strverscmp,
17628         modules/timespec, modules/unlocked-io, modules/userspec,
17629         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
17630         modules/yesno:
17631         Remove lib_SOURCES line from Makefile.am section, as this is now
17632         done automatically by the corresponding Autoconf macro.
17633
17634 2005-03-21  Jim Meyering  <jim@meyering.net>
17635
17636         Changes imported from coreutils.
17637
17638         * lib/cycle-check.c: Don't include xalloc.h.
17639
17640         * lib/path-concat.c: Don't include assert.h.
17641         (path_concat): Remove assertion that would have triggered
17642         for ABASE starting with more than one slash.
17643         Reported by Andreas Schwab.
17644
17645         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
17646         properly when ABASE is an absolute file name.
17647         Correct the description of this function.
17648         Include <assert.h>.
17649         Add an assertion and a test driver.
17650         This fixes a bug introduced on 2004-07-02.
17651         Andreas Schwab reported the resulting failure of cp --parents:
17652         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
17653
17654 2005-03-21  Jim Meyering  <jim@meyering.net>
17655
17656         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
17657         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
17658
17659 2005-03-21  Jim Meyering  <jim@meyering.net>
17660         and  Paul Eggert  <eggert@cs.ucla.edu>
17661
17662         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
17663         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
17664         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
17665         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
17666         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
17667         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
17668         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
17669         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
17670         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
17671         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
17672         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
17673         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
17674         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
17675         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
17676         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
17677         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
17678         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
17679         for these modules.
17680
17681 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
17682
17683         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
17684         (which shouldn't happen), generate nothing instead of returning 0
17685         immediately, so that nstrftime (NULL, ...) doesn't return 0.
17686
17687 2005-03-16  Bruno Haible  <bruno@clisp.org>
17688
17689         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
17690         HAVE_LONGLONG_64BIT.
17691
17692 2005-03-16  Bruno Haible  <bruno@clisp.org>
17693
17694         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
17695         HAVE_LONGLONG_64BIT.
17696
17697 2005-03-16  Bruno Haible  <bruno@clisp.org>
17698
17699         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
17700         HAVE_LONGLONG_64BIT.
17701
17702 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
17703
17704         * lib/strftime.c (my_strftime): Prepend space to format so that we can
17705         reliably distinguish strftime failure from empty output on POSIX
17706         hosts.
17707
17708 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
17709
17710         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
17711         (iconv_string): Don't guess a size-zero buffer, as that might cause
17712         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
17713         result would be 'too large', where 'too large' is (heuristically)
17714         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
17715         overflow concerns.  This will prevent some unwanted malloc failures
17716         when the inputs are very large.
17717
17718 2005-03-15  Karl Berry  <karl@gnu.org>
17719
17720         * config/srclist.txt (config.rpath): from gettext.
17721         * config/config.rpath: update.
17722
17723 2005-03-15  Bruno Haible  <bruno@clisp.org>
17724
17725         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
17726         to 'negate'.
17727
17728         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
17729         variable.
17730
17731         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
17732         results.
17733
17734 2005-03-14  Simon Josefsson  <jas@extundo.com>
17735
17736         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
17737         <fx@gnu.org>.
17738
17739 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
17740
17741         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
17742         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
17743         intprops.h.
17744         * lib/strtol.c: Likewise.
17745
17746 2005-03-14  Jim Meyering  <jim@meyering.net>
17747
17748         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
17749         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
17750         to be nonzero so that we (and caller) can detect the difference
17751         between a valid zero-length expansion and an error return, even
17752         when the underlying strftime fails before writing anything into
17753         that location.
17754
17755 2005-03-14  Bruno Haible  <bruno@clisp.org>
17756
17757         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
17758         Update from GNU gettext 0.14.3.
17759
17760 2005-03-10  Jim Meyering  <jim@meyering.net>
17761
17762         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
17763
17764 2005-03-10  Jim Meyering  <jim@meyering.net>
17765
17766         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
17767         so that this module works on systems without fchdir.
17768
17769 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
17770
17771         Factor int-properties macros into a single file, except for
17772         glibc-related files.
17773         * lib/intprops.h: New file.
17774         * lib/getloadavg.c: Include it instead of limits.h.
17775         (INT_STRLEN_BOUND): Remove.
17776         * lib/human.c: Include intprops.h.
17777         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
17778         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
17779         302/1000.
17780         * lib/inttostr.h: Include intprops.h instead of limits.h.
17781         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
17782         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
17783         for consistency with intprops.h.
17784         (time_t_is_integer, twos_complement_arithmetic): Use them.
17785         * lib/sig2str.h: Include <signal.h>, intprops.h.
17786         (INT_STRLEN_BOUND): Remove.
17787         * lib/strftime.c (TYPE_SIGNED): Remove.
17788         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
17789         * lib/strtol.c: Adjust comments to match intprops.h.
17790         * lib/userspec.c: Include intprops.h.
17791         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
17792         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
17793         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
17794         instead of rolling our own expressions.
17795         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
17796
17797         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
17798         instead of int.
17799         (my_strftime): Do not mishandle years close to INT_MAX, by doing
17800         the right thing even if adding 1900 would overflow.  Similarly
17801         for tm_mon + 1 and tm_yday + 1.
17802         Make %Y always equivalent to %C%y, and similarly for %G and %g.
17803         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
17804         (DO_SIGNED_NUMBER): New macro.
17805         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
17806
17807 2005-03-07  Bruno Haible  <bruno@clisp.org>
17808
17809         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
17810
17811 2005-03-07  Bruno Haible  <bruno@clisp.org>
17812
17813         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
17814
17815 2005-03-04  Derek R. Price  <derek@ximbiot.com>
17816
17817         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
17818         (func_import): Only replace files via --import when they have actually
17819         changed.
17820
17821 2005-03-03  Derek R. Price  <derek@ximbiot.com>
17822
17823         * m4/mmap-anon.m4: New file.
17824         * m4/pagealign_alloc.m4: New file.
17825
17826 2005-03-03  Derek R. Price  <derek@ximbiot.com>
17827             Bruno Haible  <bruno@clisp.org>
17828
17829         * modules/pagealign_alloc: New file.
17830         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
17831
17832 2005-03-03  Derek R. Price  <derek@ximbiot.com>
17833             Bruno Haible  <bruno@clisp.org>
17834
17835         * lib/pagealign_alloc.h: New file.
17836         * lib/pagealign_alloc.c: New file.
17837
17838 2005-03-03  Bruno Haible  <bruno@clisp.org>
17839
17840         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
17841         Use an all-permissive copyright notice, recommended by RMS.
17842
17843 2005-03-02  Bruno Haible  <bruno@clisp.org>
17844
17845         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
17846         of AIX, the replacement has to be done only after <string.h> is
17847         included, therefore not in config.h. stpncpy.h does the replacement,
17848         and stpncpy.c uses it.
17849
17850 2005-03-02  Bruno Haible  <bruno@clisp.org>
17851
17852         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
17853         stpncpy.c uses it.
17854
17855 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
17856
17857         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
17858         The workaround isn't strictly needed for POSIX conformance, and
17859         it's too much of a pain to configure and maintain.  We'll ask
17860         people to fix their kernels instead.
17861         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
17862         (NANOSLEEP_BUG_WORKAROUND): Remove.
17863         (xnanosleep): Remove the workaround.
17864
17865 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
17866
17867         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
17868         Reported by Derek Price.
17869         (Include): Add "timespec.h".
17870
17871         * modules/xnanosleep (Depends-on): Remove gethrxtime.
17872
17873 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
17874
17875         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
17876         to detect nanosleep bug.
17877
17878 2005-03-01  Bruno Haible  <bruno@clisp.org>
17879
17880         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
17881
17882 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
17883
17884         * modules/gethrxtime: New file.
17885         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
17886         (Depends-on): Add gethrxtime.
17887         (configure.ac): Add gl_XNANOSLEEP.
17888         (Makefile.am): Remove lib_SOURCES line.
17889
17890 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
17891
17892         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
17893         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
17894
17895 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
17896
17897         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
17898         * lib/timespec.h (gettime): Return void, since it always
17899         succeeds now.  All uses changed.
17900         * lib/gettime.c (gettime) Likewise.
17901         [HAVE_NANOTIME]: Prefer nanotime.
17902         Assume gettimeofday succeeds, as POSIX requires.
17903         Assime time () succeeds, since other code already does.
17904         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
17905         (timespec_subtract): Remove.
17906         (NANOSLEEP_BUG_WORKAROUND): New constant.
17907         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
17908         things considerably.  Use it only on GNU/Linux hosts, since the
17909         workaround shouldn't be needed elsewhere.
17910
17911 2005-02-24  Bruno Haible  <bruno@clisp.org>
17912
17913         * modules/gettext (Files): Add m4/glibc2.m4.
17914
17915 2005-02-24  Bruno Haible  <bruno@clisp.org>
17916
17917         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
17918         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
17919         * m4/progtest.m4:
17920         Update from GNU gettext 0.14.2.
17921         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
17922
17923 2005-02-24  Bruno Haible  <bruno@clisp.org>
17924
17925         * lib/localcharset.c: Update from GNU gettext 0.14.2.
17926         * lib/config.charset: Update from GNU gettext 0.14.2.
17927
17928 2005-02-24  Bruno Haible  <bruno@clisp.org>
17929
17930         * lib/gettext.h: Update from GNU gettext 0.14.2.
17931
17932 2005-02-23  Simon Josefsson  <jas@extundo.com>
17933
17934         * m4/iconvme.m4: New file.
17935
17936 2005-02-23  Jim Meyering  <jim@meyering.net>
17937
17938         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
17939         change.
17940         Thanks to Bruno Haible for catching it.
17941
17942 2005-02-22  Simon Josefsson  <jas@extundo.com>
17943
17944         * modules/iconvme: New file.
17945
17946         * MODULES.html.sh: Add iconvme.
17947
17948 2005-02-22  Simon Josefsson  <jas@extundo.com>
17949
17950         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
17951
17952 2005-02-22  Simon Josefsson  <jas@extundo.com>
17953
17954         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
17955
17956 2005-02-22  Jim Meyering  <jim@meyering.net>
17957
17958         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
17959         s/ifndef/ifdef/.
17960
17961 2005-02-20  Neil Conway  <neilc@samurai.com>
17962
17963         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
17964         returned by OSX/Darwin if the specified buffer is not large
17965         enough for the hostname.
17966
17967 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17968
17969         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
17970         pass it to _help, otherwise the latter coredumps trying to
17971         dereference state.root_argp.
17972
17973 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
17974
17975         * modules/chdir-long (Depends-on): Add memrchr.
17976         * modules/memrchr (Files): Add lib/memrchr.h.
17977         (Include): "memrchr.h".
17978
17979 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
17980
17981         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
17982
17983 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
17984
17985         * lib/memrchr.h: New file.
17986         * lib/chdir-long.c: Include it.
17987         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
17988         Don't bother including stddef.h.
17989
17990 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
17991
17992         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
17993         inclusion.
17994         Include <sys/types.h>, for dev_t.
17995         (ME_DUMMY, ME_REMOTE): Move from here....
17996         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
17997         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
17998         Dmitry V. Levin.
17999         Include mountlist.h first, to test the interface.
18000
18001 2005-01-29  Bruno Haible  <bruno@clisp.org>
18002
18003         * lib/progname.c (program_name): Initialize.
18004         Needed when linking statically on MacOS X.
18005
18006 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
18007
18008         Sync from coreutils.
18009         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
18010         (Depends-on): Add c-strtod.
18011         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
18012
18013 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
18014
18015         Sync from coreutils.
18016         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
18017
18018         Remove files that are specific to coreutils.
18019         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
18020
18021 2005-01-28  Bruno Haible  <bruno@clisp.org>
18022
18023         * modules/javacomp: New file.
18024         * MODULES.html.sh (Java): Add javacomp.
18025
18026 2005-01-28  Bruno Haible  <bruno@clisp.org>
18027
18028         * m4/javacomp.m4: New file, from GNU gettext.
18029
18030 2005-01-28  Bruno Haible  <bruno@clisp.org>
18031
18032         * lib/javacomp.sh.in: New file, from GNU gettext.
18033         * lib/javacomp.h: New file, from GNU gettext.
18034         * lib/javacomp.c: New file, from GNU gettext.
18035
18036 2005-01-26  Simon Josefsson  <jas@extundo.com>
18037
18038         * lib/gai_strerror.c: Use GPL in header.
18039
18040 2005-01-26  Bruno Haible  <bruno@clisp.org>
18041
18042         * modules/javaexec: New file.
18043         * MODULES.html.sh (Java): Add javaexec.
18044
18045 2005-01-26  Bruno Haible  <bruno@clisp.org>
18046
18047         * m4/javaexec.m4: New file, from GNU gettext.
18048
18049 2005-01-26  Bruno Haible  <bruno@clisp.org>
18050
18051         * lib/javaexec.sh.in: New file, from GNU gettext.
18052         * lib/javaexec.h: New file, from GNU gettext.
18053         * lib/javaexec.c: New file, from GNU gettext.
18054
18055 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18056
18057         * modules/lchown (Depends-on): Remove lchown.h
18058
18059 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18060
18061         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
18062         must be defined if the header file was not found, in order
18063         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
18064
18065 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18066
18067         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
18068         initializers for struct pentry_state.
18069         (__argp_error): Check return value of __asprintf
18070         (__argp_failure): Translate error message
18071
18072         * lib/argp-parse.c: Removed braces around the expansion of N_()
18073
18074 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
18075
18076         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
18077         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
18078         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
18079         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
18080         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
18081         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
18082         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
18083         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
18084         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
18085         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
18086         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
18087         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
18088         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
18089         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
18090         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
18091         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
18092         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
18093         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
18094         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
18095         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
18096         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
18097         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
18098         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
18099         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
18100         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
18101         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
18102         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
18103         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
18104         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
18105         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
18106         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
18107         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
18108         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
18109         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
18110         xstrtol.m4, xstrtoumax.m4, yesno.m4:
18111         Use an all-permissive copyright notice, recommended by RMS.
18112
18113 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
18114
18115         * modules/chdir-long (Depends-on): Remove mempcpy.
18116
18117 2005-01-21  Jim Meyering  <jim@meyering.net>
18118
18119         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
18120         same value as for Solaris 9.
18121
18122         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
18123         component length.  This included changing the parameter to be
18124         of type `char *' rather than `char const *'.
18125         * lib/chdir-long.h (chdir_long): Update prototype.
18126
18127         * lib/openat.c (fdopendir, fstatat): New functions.
18128         * lib/openat.h: Include headers required for use of DIR and struct
18129         stat.
18130         [AT_SYMLINK_NOFOLLOW]: Define.
18131         (fdopendir, fstatat): Add prototypes.
18132
18133 2005-01-21  Bruno Haible  <bruno@clisp.org>
18134
18135         * modules/classpath: New file.
18136         * MODULES.html.sh (Java): Add classpath.
18137
18138 2005-01-21  Bruno Haible  <bruno@clisp.org>
18139
18140         * lib/classpath.h: New file, from GNU gettext.
18141         * lib/classpath.c: New file, from GNU gettext.
18142
18143 2005-01-20  Simon Josefsson  <jas@extundo.com>
18144
18145         * modules/version-etc-fsf: New file.
18146
18147 2005-01-20  Simon Josefsson  <jas@extundo.com>
18148
18149         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
18150         * lib/version-etc.c: Remove version_etc_copyright.
18151         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
18152         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
18153
18154 2005-01-20  Simon Josefsson  <jas@extundo.com>
18155
18156         * lib/base64.h (isbase64): Add.
18157
18158         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
18159         using a unsigned prototype, don't inline.
18160         (base64_decode): Use it.
18161
18162 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
18163
18164         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
18165         it.
18166
18167 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
18168
18169         * lib/save-cwd.c (save_cwd): Remove code to support the case
18170         where fchdir is missing or flaky.
18171
18172 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
18173
18174         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
18175
18176 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
18177
18178         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
18179         AC_LIBSOURCES now does this.
18180         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
18181         with new ullong_max module.
18182
18183 2005-01-19  Bruno Haible  <bruno@clisp.org>
18184
18185         * modules/sh-quote: New file.
18186         * MODULES.html.sh (Executing programs): Add sh-quote.
18187
18188 2005-01-19  Bruno Haible  <bruno@clisp.org>
18189
18190         * lib/sh-quote.h: New file, from GNU gettext.
18191         * lib/sh-quote.c: New file, from GNU gettext.
18192
18193 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
18194
18195         Merge from coreutils.
18196         * m4/ullong_max.m4: New file.
18197         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
18198         (gl_MACROS): Assume localeconv exists.
18199
18200 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
18201
18202         Merge changes from coreutils, as described below in several
18203         changelogs dated today.
18204
18205         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
18206         (O_DIRECTORY): Remove; not needed here, since "." must be
18207         a directory.  All uses removed.
18208         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
18209         universal on Suns, and we also need to test for IRIX.
18210         Revamp code to use 'if' rather than '#if'.
18211         Avoid unnecessary comparison of cwd->desc to 0.
18212
18213         * lib/utimens.c (futimens): Robustify the previous patch, by checking
18214         for known valid error numbers rather than observed invalid ones.
18215
18216 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
18217
18218         * modules/ullong_max: New file.
18219
18220         * modules/chdir-long, modules/openat: New files.
18221         * modules/save-cwd (Depends-on): Depend on chdir-long.
18222         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
18223
18224 2005-01-18  Jim Meyering  <jim@meyering.net>
18225
18226         Merge from coreutils.
18227         * m4/chdir-long.m4, m4/openat.m4: New files.
18228         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
18229         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
18230         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
18231         is sane and DOES follow symlinks.  Besides, testing 20 different
18232         systems found no broken chown implementations.
18233         Prompted by a change in rsync's copy of this macro.
18234         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
18235
18236         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
18237
18238         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
18239         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
18240         NULL-means-set-to-current-time semantics.
18241         Remove temporary file immediately, rather than waiting
18242         for configure's at-exit trap code to do it.
18243
18244 2005-01-18  Jim Meyering  <jim@meyering.net>
18245
18246         * lib/version-etc.c (version_etc_copyright): Update copyright date.
18247
18248         * lib/utimens.c (futimens): Account for the fact that futimes
18249         can also fail with errno == ENOSYS or errno == ENOENT.
18250         Patch from Dmitry V. Levin.
18251
18252         Change the name of the robust chdir function from chdir to chdir_long.
18253         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
18254         (restore_cwd): Use chdir_long, not chdir.
18255         * lib/chdir-long.c: Renamed from chdir.c.
18256         * lib/chdir-long.h: Renamed from chdir.h.
18257         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
18258         Hurd.
18259
18260 2005-01-18  Bruno Haible  <bruno@clisp.org>
18261
18262         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
18263         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
18264         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
18265         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
18266         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
18267         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
18268         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
18269         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
18270         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
18271         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
18272         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
18273         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
18274         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
18275         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
18276         Use an all-permissive copyright notice, recommended by RMS.
18277
18278 2005-01-18  Bob Proulx  <bob@proulx.com>
18279
18280         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
18281         simplify offsetof() macro construct to avoid compile failure with
18282         native HP-UX 11.0 ANSI C compiler.
18283
18284 2005-01-17  Bruno Haible  <bruno@clisp.org>
18285
18286         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
18287         redundant because stpncpy.m4 takes care of it.
18288
18289 2005-01-17  Bruno Haible  <bruno@clisp.org>
18290
18291         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
18292
18293 2005-01-17  Bruno Haible  <bruno@clisp.org>
18294
18295         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
18296         used.
18297
18298 2005-01-17  Bruno Haible  <bruno@clisp.org>
18299
18300         * lib/fwriteerror.h (fwriteerror): Change specification to include
18301         fclose.
18302         * lib/fwriteerror.c: Include <stdbool.h>.
18303         (fwriteerror): At the end, close the file stream. Record whether
18304         stdout was already closed.
18305
18306 2005-01-17  Bruno Haible  <bruno@clisp.org>
18307
18308         * lib/execute.c (environ): Declare if needed.
18309         * lib/pipe.c (environ): Likewise.
18310         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
18311
18312 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18313
18314         * modules/argp: Depend on vsnprintf
18315
18316 2005-01-10  Jim Meyering  <jim@meyering.net>
18317
18318         * modules/closeout (Depends-on): Add atexit.
18319
18320 2005-01-06  Bruno Haible  <bruno@clisp.org>
18321
18322         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
18323
18324 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
18325
18326         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
18327         definitions to be after all include files, to avoid collisions.
18328         Problem reported by Bob Proulx.
18329
18330 2005-01-04  Jim Meyering  <jim@meyering.net>
18331
18332         Changes imported from coreutils.
18333         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
18334         as the mkstemp template, use a temporary directory and an
18335         8.3-friendly template to avoid trouble on systems like DJGPP.
18336         Reported by Juan M. Guerrero via Stepan Kasal.
18337         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
18338         close. Remove the temporary directory right away, rather than waiting
18339         for configure's at-exit trap code to do it.
18340         Suggestion from Stepan Kasal.
18341
18342 2005-01-01  Simon Josefsson  <jas@extundo.com>
18343
18344         * gnulib-tool: Print #include directives when --import'ing.
18345
18346 2004-12-28  Simon Josefsson  <jas@extundo.com>
18347
18348         * tests/test-base64.c: Include required header files.  Remove
18349         unused variables.
18350
18351 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
18352
18353         * modules/error (Depends-on): Remove gettext.
18354
18355 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
18356
18357         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
18358         not needed.  This removes a dependency on the gettext module.
18359         [defined _LIBC]: Do not include <libintl.h>; not needed.
18360
18361 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
18362
18363         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
18364         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
18365
18366 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
18367
18368         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
18369         HAVE_DECL_STRTOLD.
18370
18371 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
18372
18373         * modules/getdate (Depends-on): Remove alloca-opt.
18374
18375 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
18376
18377         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
18378
18379 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
18380
18381         * lib/argp-parse.c: Include <stddef.h>.
18382         (alignof, alignto): New macros.
18383         (parser_init): Don't assume that void * is aligned sufficiently
18384         for struct option.
18385
18386         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
18387         need to extend the stack.
18388         (YYINITDEPTH): New macro, so that the initial stack isn't overly
18389         large.
18390
18391 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18392
18393         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
18394
18395 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
18396
18397         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
18398         (2004-10-24) change.  Apparently this was a false alarm.
18399
18400         * modules/getdate: Depend on alloca-opt, not alloca.
18401
18402 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
18403
18404         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
18405         Remove now-obsolete comment about AIX.
18406         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
18407         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
18408         (YYMAXDEPTH): New macro.
18409
18410 2004-12-18  Simon Josefsson  <jas@extundo.com>
18411
18412         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
18413
18414 2004-12-18  Bruno Haible  <bruno@clisp.org>
18415
18416         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
18417
18418 2004-12-18  Bruno Haible  <bruno@clisp.org>
18419
18420         * lib/fatal-signal.c (fatal_signals): Make non-const.
18421         (init_fatal_signals): New function.
18422         (uninstall_handlers, install_handlers): Ignore signals that were set to
18423         SIG_IGN.
18424         (at_fatal_signal): Call init_fatal_signals.
18425         (init_fatal_signal_set): Likewise. Ignore signals that were set to
18426         SIG_IGN.
18427         Reported by Paul Eggert.
18428
18429 2004-12-18  Bruno Haible  <bruno@clisp.org>
18430
18431         * doc/alloca.texi: New file.
18432         * doc/alloca-opt.texi: New file.
18433
18434 2004-12-17  Jim Meyering  <jim@meyering.net>
18435
18436         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
18437         Otherwise, install-sh could exit with improper exit status when
18438         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
18439
18440 2004-12-16  Simon Josefsson  <jas@extundo.com>
18441
18442         * tests/test-base64.c: Add license.
18443
18444 2004-12-15  Stepan Kasal  <address@hidden>
18445
18446         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
18447
18448 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
18449
18450         * modules/getcwd (Files): Add m4/d-ino.m4.
18451         Suggested by Mark D. Baushke.
18452
18453 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
18454
18455         * lib/getdate.y (textint): New member "negative".
18456         (time_zone_hhmm): New function.
18457         Expect 14 shift-reduce conflicts, not 13.
18458         (o_colon_minutes): New rule.
18459         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
18460         (yylex): Set the "negative" member of signed numbers.
18461
18462 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
18463
18464         * doc/getdate.texi (Time of day items, Time zone items):
18465         Describe new formats +00:00, UTC+00:00.
18466
18467 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
18468
18469         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
18470         spurious "-l"s.  Problem reported by Stepan Kasal.
18471
18472 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
18473
18474         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
18475         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
18476
18477 2004-12-04  Simon Josefsson  <jas@extundo.com>
18478
18479         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
18480         Vandoorselaere <yoann@prelude-ids.org>.
18481
18482 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
18483
18484         Changes imported from coreutils.
18485         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
18486         exist.
18487         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
18488
18489 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
18490
18491         Changes imported from coreutils.
18492         * lib/hard-locale.c: Assume <locale.h> exists.
18493         Include "strdup.h".
18494         (GLIBC_VERSION): New macro.
18495         (hard_locale): Assume setlocale exists.
18496         Rewrite to avoid #ifdef.
18497         Use strdup rather than malloc + strcpy.
18498         * lib/human.c: Assume <locale.h> exists.
18499         (human_readable): Assume localeconv exists.
18500
18501 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
18502
18503         * modules/hard-locale (Depends-on): Add strdup.
18504
18505 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
18506
18507         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
18508         convert T2, not T.  (Imported from libc.)
18509
18510 2004-11-30  Simon Josefsson  <jas@extundo.com>
18511
18512         * modules/restrict (License): Change to LGPL.
18513
18514 2004-11-30  Simon Josefsson  <jas@extundo.com>
18515
18516         * m4/restrict.m4: Add copyright and copying conditions.
18517
18518 2004-11-30  Simon Josefsson  <jas@extundo.com>
18519
18520         * m4/base64.m4: New file.
18521
18522 2004-11-30  Simon Josefsson  <jas@extundo.com>
18523
18524         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
18525         base64.
18526
18527         * tests/test-base64.c: New file.
18528
18529         * modules/base64: New file.
18530
18531 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
18532
18533         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
18534         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
18535
18536         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
18537
18538 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
18539
18540         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
18541         (__getcwd.c): Don't restore errno; glibc doesn't.
18542         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
18543         first, falling back to our code only if its results look suspicious.
18544         Ensure that the resulting buffer is only as large as necessary.
18545
18546         * lib/readutmp.c: Include readutmp.h first.
18547         Include <errno.h>, since readutmp.h no longer does that.
18548         * lib/readutmp.h: Don't include <errno.h>,
18549         <sys/param.h>, <time.h>; not needed to establish interface.
18550         (errno): Remove decl.
18551         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
18552         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
18553         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
18554
18555 2004-11-28  Simon Josefsson  <jas@extundo.com>
18556
18557         * lib/base64.h, base64.c: New file.
18558
18559 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
18560
18561         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
18562
18563 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
18564
18565         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
18566         (Depends-on): Remove pathmax, same.  Add mempcpy.
18567         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
18568         (Makefile.am): Append getcwd.h to lib_SOURCES.
18569         (Include): Add getcwd.h.
18570         (Maintainer): Change from Jim Meyering to "all, glibc",
18571         since getdate now uses intended-for-glibc code.
18572         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
18573         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
18574
18575 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
18576
18577         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
18578         HP's ANSI C compiler.
18579         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
18580         Declaring int functions causes warnings on some modern systems and
18581         shouldn't be needed to compile on ancient ones.
18582         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
18583         defined.
18584
18585         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
18586         with the following changes.
18587         (__set_errno): Parenthesize properly.
18588         Include <stdbool.h>.
18589         (MIN, MAX, MATCHING_INO): New macros.
18590         (__getcwd): Define with prototype, not K&R form.
18591         Use heuristics to allocate default buffer on stack if possible.
18592         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
18593         behavior, and to avoid the PATH_MAX limit when computing
18594         ../../../../...
18595         Use MATCHING_INO to compare inode number to file.
18596         Check for arithmetic overflow in size calculations.
18597         Fix bug in reallocation of dot array that caused getcwd to fail
18598         on directories nested deeper than 75.
18599         Be more careful about saving errno on error.
18600         Do not use realloc; use only free+malloc, as this is a bit
18601         more flexible and avoids a needless copy operation.
18602         Do not inspect st_dev and st_ino for symbolic links; POSIX
18603         doesn't specify the latter.
18604         Check for closedir errors.
18605         Avoid needless casts.
18606         Use "#ifdef weak_alias" around weak_alias, to be like other
18607         glibc code.
18608         The following changes to getcwd.c have effect only when used in
18609         gnulib; they have no effect inside glibc proper.
18610         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
18611         as alloca isn't used.
18612         (alloca, __alloca): Likewise.
18613         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
18614         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
18615         unconditionally, as gnulib assumes C89 or better.
18616         Do not include <sys/param.h>.
18617         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
18618         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
18619         better.
18620         (NULL) [!defined NULL]: Remove; we assume C89 or better.
18621         Include <dirent.h> in a way that is compatible with modern Autoconf.
18622         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
18623         New macros, if not already defined.
18624         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
18625         Use "_LIBC", not "defined _LIBC", for consistency.
18626         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
18627         a mempcpy module.
18628         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
18629         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
18630         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
18631         credit only to Jim Meyering and adjust the copyright dates.
18632         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
18633         <stdlib.h>, <unistd.h>, "pathmax.h".
18634         Instead, include "xgetcwd.h" (first) and "getcwd.h".
18635         (INITIAL_BUFFER_SIZE): Remove.
18636         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
18637
18638 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
18639
18640         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
18641         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
18642         Use the _ONCE methods, for efficiency.
18643         Check for fcntl.h.  In test program, include <errno.h>
18644         and <fcntl.h> if available.  Remove old K&R cruft from
18645         test program.  Check for common errors in GNU/Linux,
18646         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
18647         don't do AC_LIBOBJ, as that's getcwd.m4's job.
18648         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
18649         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
18650         name accordingly.
18651         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
18652         accommodate new getcwd.c.
18653         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
18654         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
18655         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
18656         that's all we need now.
18657
18658 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18659
18660         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
18661         argp-parse.c depends on getopt internals, that means we should
18662         always use our getopt, to be on the safe side.
18663         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
18664         order not to spoil the result of an eventual previous invocation
18665         of gl_GETOPT_SUBSTITUTE.
18666
18667 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18668
18669         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
18670         redefinition warnings. To avoid them, include the defines
18671         in `#if !defined __need_getopt ... #endif'. The only place
18672         where __getopt_argv_const is used is in definitions
18673         of getopt_long and getopt_long_only below, which are as well
18674         protected by `#ifndef __need_getopt'.
18675         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
18676         __need_getopt after including <stdio.h> and <unistd.h> These
18677         headers might have defined it.
18678
18679 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
18680
18681         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
18682
18683 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
18684
18685         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
18686         (futimens): New function, which uses futimes if available.
18687         (futimens, utimens): Support timespec==NULL, with same semantics
18688         as utime and utimens.
18689         * lib/utimens.h (futimens): New decl.
18690
18691 2004-11-23  Jim Meyering  <jim@meyering.net>
18692
18693         * lib/getopt_.h: Remove trailing blanks.
18694
18695 2004-11-23  Jim Meyering  <jim@meyering.net>
18696
18697         * lib/__fpending.c: Add comment.
18698
18699 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
18700
18701         * modules/canonicalize (Depends-on): Add xreadlink.
18702         Problem reported by James Youngman.
18703
18704 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
18705
18706         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
18707         New macros.
18708         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
18709         optopt): Use them instead of invoking ## directly; otherwise, the
18710         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
18711
18712 2004-11-19  Bruno Haible  <bruno@clisp.org>
18713
18714         * lib/strtok_r.c: Move comments from here...
18715         * lib/strtok_r.h: ... to here.
18716
18717 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
18718
18719         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
18720         implementations that mishandle size_t overflow.
18721
18722 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
18723
18724         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
18725         might fail.  Problem reported by Yoann Vandoorselaere.
18726         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
18727         implementations that mishandle size_t overflow.
18728
18729 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
18730
18731         * modules/canon-host (Depends-on): Add strdup.
18732
18733 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
18734
18735         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
18736
18737 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
18738
18739         * lib/canon-host.c: Include "strdup.h".
18740         (canon_host): Use getaddrinfo if available, so that IPv6 works.
18741         Use strdup instead of malloc/strcpy to duplicate strings.
18742
18743         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
18744         (human_space_before_unit): New constant.
18745         * lib/human.c (human_readable): Support it.
18746
18747         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
18748         (xgetcwd): Set errno correctly when failing.
18749         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
18750         the failure is actually due to a PATH_MAX problem.
18751
18752         Further getopt changes to make it more likely that glibc will
18753         buy the changes back.
18754         * lib/getopt.c (POSIXLY_CORRECT): New constant.
18755         (getopt): Use it, so to preserve glibc semantic
18756         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
18757         when compiling for libc.
18758         * lib/getopt_.h (__getopt_argv_const): Bring it back.
18759         (getopt_long, getopt_long_only): Use it.
18760
18761         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
18762         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
18763         (getopt): Argv is now char * const *, as per standard.
18764         (_getopt_internal_r, _getopt_internal): Argv is now char **,
18765         not char *__getopt_argv_const *.
18766         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
18767         _getopt_long_only_r): Likewise.
18768         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
18769         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
18770         _getopt_long_r, _getopt_long_only_r): Likewise.
18771         * lib/getopt_.h (__getopt_argv_const): Remove.
18772         (getopt): Argv is now char * const *, as per standard.
18773
18774         * lib/getdate.y (tORDINAL): New token.
18775         (day, relunit): Allow it for relative times.
18776         (relative_time_table): Use tORDINAL for ordinals.
18777
18778 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
18779
18780         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
18781         Document that "second" isn't allowed as an ordinal number.
18782
18783 2004-11-16  Jim Meyering  <jim@meyering.net>
18784
18785         * modules/closeout (Depends-on): Add fpending.
18786
18787 2004-11-15  Jim Meyering  <jim@meyering.net>
18788
18789         * lib/closeout.c: Include "__fpending.h" once again.
18790         Include <stdbool.h>.
18791         (close_stdout): Don't fail just because stdout was closed initially,
18792         since some programs don't write to stdout in the normal course of
18793         operation (other than --version and --help), and we don't want this
18794         function to make e.g. `touch file >&-' fail.
18795         But do fail if it was closed and someone has tried to write to it.
18796         E.g., `printf foo >&-' must fail.
18797
18798 2004-11-13  Jim Meyering  <jim@meyering.net>
18799
18800         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
18801
18802 2004-11-12  Simon Josefsson  <jas@extundo.com>
18803
18804         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
18805         small doc fix is still pending.
18806
18807 2004-11-11  Simon Josefsson  <jas@extundo.com>
18808
18809         * modules/strtok_r: New file.
18810
18811         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18812         strtok_r.
18813
18814 2004-11-11  Simon Josefsson  <jas@extundo.com>
18815
18816         * m4/strtok_r.m4: New file.
18817
18818         * m4/getopt.m4: Replace opterr.
18819
18820 2004-11-11  Simon Josefsson  <jas@extundo.com>
18821
18822         * lib/strtok_r.h, strtok_r.c: New file.
18823
18824 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
18825
18826         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
18827         of replacing opterr, getopt, etc.  This should handle the
18828         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
18829
18830 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
18831
18832         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
18833         we can stop lying to compilers about the constness of argv when we
18834         are compiled outside glibc.
18835         (getopt, getopt_long, getopt_long_only): Use it.
18836         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
18837         _getopt_internal, getopt): Likewise.
18838         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
18839         _getopt_long_only_r): Likewise.
18840         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
18841         _getopt_long_r, _getopt_long_only_r): Likewise.
18842
18843         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
18844         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
18845         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
18846         the other external symbols.
18847         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
18848         declaration, since the above renaming now works around collisions.
18849
18850 2004-11-11  Jim Meyering  <jim@meyering.net>
18851
18852         * lib/linebreak.c: Remove trailing blanks.
18853         * lib/alloca_.h: Likewise.
18854         * lib/acosl.c: Likewise.
18855         * lib/euidaccess.c: Likewise.
18856         * lib/allocsa.h: Likewise.
18857
18858 2004-11-10  Simon Josefsson  <jas@extundo.com>
18859
18860         * m4/getaddrinfo.m4: New file.
18861
18862 2004-11-10  Simon Josefsson  <jas@extundo.com>
18863
18864         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
18865
18866 2004-11-10  Simon Josefsson  <jas@extundo.com>
18867
18868         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18869         getaddrinfo.
18870
18871         * modules/getaddrinfo: New file.
18872
18873 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
18874
18875         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
18876
18877 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
18878
18879         * lib/mktime.c (SHR): New macro, which is a portable
18880         substitute for >> that should work even on Crays.
18881         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
18882         Problem reported by Mark D. Baushke in
18883         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
18884         * lib/getdate.y (SHR): Likewise.
18885         (tm_diff): Use it.
18886         * lib/strftime.c (SHR): Likewise.
18887         (tm_diff): Use it.
18888         * lib/quotearg.c (struct quoting_options): Use unsigned int for
18889         quote_these_too, so that right shifts are well defined.  All uses
18890         changed.
18891
18892 2004-11-10  Jim Meyering  <jim@meyering.net>
18893
18894         Ensure that no close failure goes unreported.
18895         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
18896         return early when it seems there's nothing to flush.
18897         Don't include __fpending.h.
18898
18899 2004-11-10  Jim Meyering  <jim@meyering.net>
18900
18901         * modules/closeout (Depends-on): Remove fpending.
18902
18903 2004-11-10  Jim Meyering  <jim@meyering.net>
18904
18905         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
18906
18907 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
18908
18909         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
18910         gl_FUNC_STRFTIME.
18911         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
18912         and AC_REQUIRE when possible, to avoid duplicate checks.
18913         Check for <wchar.h>.
18914
18915 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
18916
18917         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
18918
18919 2004-11-09  Bruno Haible  <bruno@clisp.org>
18920
18921         * m4/sockpfaf.m4: New file.
18922
18923 2004-11-05  Bruno Haible  <bruno@clisp.org>
18924
18925         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
18926         Reported by Mark D. Baushke <mdb@cvshome.org>.
18927
18928 2004-11-04  Bruno Haible  <bruno@clisp.org>
18929
18930         2004-09-11  Bruno Haible  <bruno@clisp.org>
18931                 * allocsa.valgrind: New file.
18932         2004-02-06  Bruno Haible  <bruno@clisp.org>
18933                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
18934                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
18935                 Reported by Christopher Seip <chris.seip@hp.com>.
18936
18937 2004-11-04  Bruno Haible  <bruno@clisp.org>
18938
18939         * modules/allocsa (Files): Add lib/allocsa.valgrind.
18940         (Makefile.am): Distribute it.
18941
18942 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
18943
18944         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
18945         with errno == ERANGE if the buffer is too small.
18946         Problem reported by Mark D. Baushke.
18947
18948 2004-11-03  Albert Chin  <china@thewrittenword.com>
18949             Paul Eggert  <eggert@cs.ucla.edu>
18950
18951         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
18952         equivalent, substitute $ac_type for equivalent type rather than
18953         blindly using uint32_t *always* which won't work if uint32_t is not
18954         available.  Define _UINT32_T to work around typedef of uint32_t if
18955         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
18956         2.5.1.
18957
18958 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
18959
18960         * m4/jm-macros.m4: Sync from coreutils.
18961         (gl_MACROS): Check for mbrlen, for pathchk.
18962         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
18963
18964 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
18965
18966         * lib/xreadlink.c (MAXSIZE): New macro.
18967         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
18968         size does not exceed MAXSIZE.  Avoid cast.
18969         As suggested by Mark D. Baushke in
18970         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
18971         if readlink fails with buffer size just under MAXSIZE, try again
18972         with MAXSIZE.
18973
18974 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
18975
18976         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
18977
18978 2004-11-02  Derek R. Price  <derek@ximbiot.com>
18979         and  Paul Eggert  <eggert@cs.ucla.edu>
18980
18981         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
18982         (get_date): Overparenthesize to avoid GCC warning.
18983
18984 2004-11-02  Bruno Haible  <bruno@clisp.org>
18985
18986         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
18987         returns void.
18988
18989 2004-11-02  Bruno Haible  <bruno@clisp.org>
18990
18991         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
18992         function returns void.
18993
18994 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
18995
18996         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
18997         fflush_unlocked, flockfile, funlockfile, funlockfile,
18998         fputs_unlocked, putc_unlocked.
18999
19000 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
19001
19002         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
19003         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
19004         already declared.
19005
19006 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
19007
19008         * modules/getdate (Files): Add doc/getdate.texi.
19009         (Depends-on): Add setenv, xalloc.
19010
19011 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
19012
19013         * lib/getdate.y: Add support for TZ="foo" within a date string.
19014         Fix some bugs near time_t boundaries.  Reject dates with
19015         out-of-range components, e.g., "Sept 31".
19016         Include <stdlib.h>, "setenv.h", "xalloc.h".
19017         (ISDIGIT_LOCALE): Remove; unused.
19018         Note that the TZ and time functions used here are not reentrant.
19019         (mktime_ok, get_tz): New functions.
19020         (TZBUFSIZE): New constant.
19021         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
19022         This requires that we sometimes generate our own TZ="XXX..." setting.
19023
19024 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
19025
19026         * doc/getdate.texi: New file, from coreutils with modifications for
19027         the new TZ parsing.
19028
19029 2004-10-27  Derek R. Price  <derek@ximbiot.com>
19030
19031         * lib/mktime.c (not_equal_tm): Remove redundant check.
19032
19033 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
19034
19035         * modules/regex (lib_SOURCES): Add regex.c.
19036         Reported by James Youngman in
19037         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
19038
19039 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
19040
19041         * lib/getdate.y: Use Bison 1.875 features, and some minor
19042         code cleanups.  This change does not affect semantics.
19043         Don't include <stdlib.h>; no longer needed.
19044         Don't include unlocked-io.h; only the "#if TEST" code uses
19045         stdio, and performance isn't crucial there.
19046         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
19047         Bison 1.875 features as described below.
19048         All uses of "PC." replaced by "pc->".
19049         (YYSTYPE): Add a forward declaration.
19050         (yylex, yyerror): Use full prototypes in forward decls.
19051         Use "%pure-parser" rather than obsolescent "%pure_parser".
19052         Use %parse-param and %lex-param instead of obsolescent
19053         YYPARSE_PARAM and YYLEX_PARAM.
19054         (meridian_table, month_and_day_table, time_units_table,
19055         relative_time_table, time_zone_table, military_table,
19056         lookup_zone, lookup_word, get_date):
19057         Use NULL instead of 0 where appropriate.
19058         (to_hour): Avoid abort (), to avoid a dependency on
19059         stdlib.h.
19060         (yyerror, yylex): Now accepts parser_control * arg.
19061         (main) [TEST]: Use '\0' rather than 0 for char.
19062
19063 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
19064
19065         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
19066
19067 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
19068
19069         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
19070         It's now the caller's responsibility to handle the case where
19071         !HAVE_GETPAGESIZE && !defined getpagesize.
19072
19073         * lib/mktime.c (leapyear): Arg is long int, not int.
19074
19075 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
19076
19077         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
19078
19079 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
19080
19081         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
19082         missing.  Problem reported by James Youngman.
19083
19084 2004-10-16  Simon Josefsson  <jas@extundo.com>
19085
19086         * gnulib-tool: Fix comments.  Fix parse problem.
19087         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
19088
19089 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
19090
19091         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
19092         implementation of getopt_long.  Problem reported by Alexander Taler in:
19093         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
19094
19095 2004-10-15  Bruno Haible  <bruno@clisp.org>
19096
19097         * gnulib-tool: Untabify. Initialize supplied_libname.
19098         (func_usage): More homogenous output.
19099         (func_modules_transitive_closure, func_modules_to_filelist,
19100         func_emit_lib_Makefile_am): New functions.
19101         (func_import): New function, extracted from big case statement. Use
19102         func_get_license, func_modules_transitive_closure,
19103         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
19104         opt_lgpl. Don't use test -a, as it's not portable.
19105         (func_create_testdir): Use func_modules_transitive_closure,
19106         func_modules_to_filelist, func_emit_lib_Makefile_am.
19107
19108 2004-10-15  Bruno Haible  <bruno@clisp.org>
19109
19110         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
19111
19112 2004-10-15  Bruno Haible  <bruno@clisp.org>
19113
19114         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
19115         the portions belonging to each module.
19116         Suggested by Derek Robert Price <derek@ximbiot.com>.
19117
19118 2004-10-12  Simon Josefsson  <jas@extundo.com>
19119
19120         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
19121         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
19122         to real functions.
19123
19124 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19125
19126         * modules/vsnprintf: New file.
19127
19128 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19129
19130         * m4/vsnprintf.m4: New file.
19131
19132 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19133
19134         * lib/vsnprintf.h: New file.
19135         * lib/vsnprintf.c: New file.
19136
19137 2004-10-11  Bruno Haible  <bruno@clisp.org>
19138
19139         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
19140         vsnprintf.
19141
19142 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
19143
19144         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
19145
19146 2004-10-07  Bruno Haible  <bruno@clisp.org>
19147
19148         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
19149         fits into the provided buffer.
19150
19151 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
19152
19153         * lib/diacrit.c, diacrit.h: Add GPL notice.
19154
19155         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
19156         notice.
19157         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
19158         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
19159         This avoids a potential constant-folding bug.
19160
19161 2004-10-05  Bruno Haible  <bruno@clisp.org>
19162
19163         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
19164         for the declaration of strsep.
19165
19166 2004-10-05  Bruno Haible  <bruno@clisp.org>
19167
19168         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
19169
19170 2004-10-04  Simon Josefsson  <jas@extundo.com>
19171
19172         * modules/memmem: New file.
19173         * tests/test-memmem.c: New file.
19174         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
19175
19176 2004-10-04  Simon Josefsson  <jas@extundo.com>
19177
19178         * m4/memmem.m4: New file.
19179
19180 2004-10-04  Simon Josefsson  <jas@extundo.com>
19181
19182         * lib/memmem.h: New file.
19183         * lib/memmem.c: New file, taken from glibc.
19184
19185 2004-10-04  Simon Josefsson  <jas@extundo.com>
19186
19187         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
19188         '#ifdef USE_UNLOCKED_IO'.
19189
19190 2004-10-04  Simon Josefsson  <jas@extundo.com>
19191
19192         * config/srclist.txt: Add memmem from glibc.
19193
19194 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
19195
19196         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
19197
19198         * modules/argmatch, modules/argp, modules/closeout, modules/error,
19199         modules/exclude, modules/getdate, modules/getline,
19200         modules/getndelim2, modules/getpass, modules/getpass-gnu,
19201         modules/getusershell, modules/linebuffer, modules/md5,
19202         modules/mountlist, modules/posixtm, modules/readtokens,
19203         modules/readutmp, modules/regex, modules/sha1,
19204         modules/version-etc, modules/yesno:
19205         Remove dependency on unlocked-io.
19206
19207 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
19208
19209         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
19210
19211         * m4/unlocked-io.m4: Add copyright notice.
19212         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
19213
19214 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
19215
19216         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
19217         * lib/xmalloc.c (xmemdup): Likewise.
19218         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
19219         XFREE): Remove these long-obsolescent macros.
19220         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
19221         * lib/xstrdup.c: Remove.
19222
19223         * lib/regex.c (re_comp): Cast gettext return value to char *,
19224         Problem reported by Martin Neitzel via Mark D. Baushke.
19225
19226 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
19227
19228         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
19229         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
19230         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
19231         regex.c, sha1.c, version-etc.c, yesno.c:
19232         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
19233         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
19234         the includer's responsibility.
19235
19236         Sync from coreutils.
19237
19238         * lib/modechange.c (mode_compile): Don't decrement a pointer that
19239         points to the start of a string, as the C Standard says the
19240         resulting behavior is undefined.
19241
19242         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
19243         simple -> simple_backups, numbered_existing ->
19244         numbered_existing_backups, numbered -> numbered_backups
19245         to avoid shadowing problems.  All uses changed.
19246         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
19247         * lib/backupfile.c (check_extension, numbered_backup):
19248         Rename locals to avoid shadowing 'basename'.
19249         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
19250         once.
19251
19252         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
19253         * lib/.cvsignore: Add getopt.h.
19254
19255 2004-10-04  Bruno Haible  <bruno@clisp.org>
19256
19257         * modules/README: New file.
19258         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
19259         not a module.
19260
19261 2004-10-02  Jim Meyering  <jim@meyering.net>
19262
19263         * lib/dirfd.h, getpagesize.h: Add copyright notice.
19264
19265 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19266
19267         * modules/strsep: New file.
19268
19269 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19270
19271         * m4/strsep.m4: New file.
19272
19273 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19274
19275         * lib/strsep.h: New file.
19276         * lib/strsep.c: New file.
19277
19278 2004-10-01  Simon Josefsson  <jas@extundo.com>
19279
19280         * lib/snprintf.c (snprintf): Handle size==0.
19281
19282 2004-10-01  Simon Josefsson  <jas@extundo.com>
19283             Bruno Haible  <bruno@clisp.org>
19284
19285         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
19286         (snprintf): Declare 'args'.
19287
19288 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
19289
19290         * lib/snprintf.c: Remove comments as to why each header is needed.
19291
19292 2004-10-01  Bruno Haible  <bruno@clisp.org>
19293
19294         * MODULES.html.sh: Add strsep.
19295
19296 2004-09-30  Simon Josefsson  <jas@extundo.com>
19297
19298         * modules/snprintf: New file.
19299
19300 2004-09-30  Simon Josefsson  <jas@extundo.com>
19301
19302         * m4/snprintf.m4: New file.
19303
19304 2004-09-30  Simon Josefsson  <jas@extundo.com>
19305
19306         * lib/snprintf.h, lib/snprintf.c: New files.
19307
19308 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19309
19310         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
19311         (hol_entry_help): Never translate an empty string.
19312         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
19313         * lib/argp.h (OPTION_NO_TRANS): New option.
19314
19315 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
19316
19317         * modules/argp (Maintainer): Replace Simon Josefsson
19318         by Sergey Poznyakoff.
19319
19320 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
19321
19322         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
19323         changes merged back into glibc.
19324
19325 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
19326
19327         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
19328
19329 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
19330
19331         * lib/xvasprintf.c: Include xalloc.h.
19332         (xvasprintf): Use xalloc_die, not xmalloc_die.
19333
19334 2004-09-29  Bruno Haible  <bruno@clisp.org>
19335
19336         * modules/alloca-opt: New file, derived from modules/alloca.
19337         * modules/allocsa: Depend on alloca-opt instead of alloca.
19338         * modules/setenv: Likewise.
19339         * modules/vasnprintf: Likewise.
19340         * MODULES.html.sh: Add alloca-opt.
19341
19342 2004-09-28  Simon Josefsson  <jas@extundo.com>
19343
19344         * gnulib-tool: New parameter --lgpl, to asseert that modules are
19345         LGPL, and to replace license template from GPL to LGPL.
19346
19347 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
19348
19349         * modules/dummy: Change license to LGPL.
19350
19351 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
19352
19353         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
19354
19355 2004-09-24  Simon Josefsson  <jas@extundo.com>
19356
19357         * modules/minmax (License): Change from GPL to LGPL.
19358
19359 2004-09-23  Simon Josefsson  <jas@extundo.com>
19360
19361         * gnulib-tool (--import): Typo.
19362
19363 2004-09-23  Simon Josefsson  <jas@extundo.com>
19364
19365         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
19366
19367 2004-09-22  Bruno Haible  <bruno@clisp.org>
19368
19369         * modules/*: Add 'License' field.
19370         * gnulib-tool: Accept --extract-license option.
19371         (func_get_license): New function.
19372
19373 2004-09-21  Bruno Haible  <bruno@clisp.org>
19374
19375         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
19376         Reported by Simon Josefsson.
19377
19378 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
19379
19380         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
19381         gl_AC_TYPE_LONG_LONG.
19382
19383 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
19384
19385         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
19386
19387 2004-09-18  Simon Josefsson  <jas@extundo.com>
19388         and  Paul Eggert  <eggert@cs.ucla.edu>
19389
19390         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
19391         calls with autoreconf.  Define GL_LIB.
19392
19393 2004-09-14  Karl Berry  <karl@gnu.org>
19394
19395         * config/srclist.txt: unsync setenv.c, sigh.
19396
19397 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
19398
19399         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
19400         Problem reported by Bruno Haible in:
19401         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
19402
19403 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
19404
19405         * config/srclist.txt: Comment out argp-pvh.c.
19406
19407 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
19408
19409         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
19410         in case some system header has #define'd it.  Problem reported by
19411         Soeren D. Schulze in
19412         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
19413
19414 2004-09-09  Karl Berry  <karl@gnu.org>
19415
19416         * regex.[ch]: delete from the root.  These were supposed to be
19417                 synced with emacs cvs, but this has not happened for about
19418                 a year, and anyway nothing else uses emacs regex.[ch].
19419                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
19420                 lib/regex[.ch] is untouched.
19421
19422 2004-09-09  Bruno Haible  <bruno@clisp.org>
19423
19424         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
19425
19426 2004-09-09  Bruno Haible  <bruno@clisp.org>
19427
19428         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
19429         modifications.
19430         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
19431
19432 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
19433
19434         * modules/xvasprintf: New file.
19435         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
19436
19437 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
19438
19439         * lib/xvasprintf.h: New file.
19440         * lib/xvasprintf.c: New file.
19441         * lib/xasprintf.c: New file.
19442
19443 2004-09-08  Bruno Haible  <bruno@clisp.org>
19444
19445         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
19446
19447 2004-09-08  Bruno Haible  <bruno@clisp.org>
19448
19449         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
19450         length is > INT_MAX.
19451         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
19452         more.
19453
19454 2004-09-08  Bruno Haible  <bruno@clisp.org>
19455
19456         * lib/stdint_.h: New file, taken from GNU clisp.
19457
19458 2004-09-08  Bruno Haible  <bruno@clisp.org>
19459             Oskar Liljeblad  <oskar@osk.mine.nu>
19460
19461         * modules/stdint: New file.
19462         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
19463
19464 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19465
19466         Import from coreutils.
19467         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
19468         strings on unbounded length.  alloca's performance benefits aren't
19469         that important here.
19470         (V_STRDUP): Remove.
19471         (parse_with_separator): New function, with most of the internals
19472         of the old parse_user_spec.  Allow user to omit both user and group,
19473         for compatibility with FreeBSD.
19474         Clone only the user name, not the entire spec.
19475         Do not set *uid, *gid unless entirely successful.
19476         Avoid memory leak in some failing cases.
19477         Fix regression for USER.GROUP reported by Dmitry V. Levin in
19478         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
19479         (parse_user_spec): Rewrite to use parse_with_separator.
19480
19481 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19482
19483         * modules/userspec: Don't depend on alloca.
19484
19485 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19486
19487         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
19488
19489 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
19490
19491         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
19492         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
19493         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
19494
19495 2004-08-16  Simon Josefsson  <jas@extundo.com>
19496
19497         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
19498         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
19499         Add --dry-run for --import.
19500         Let user provided command line parameters override configure.ac
19501         settings.
19502
19503 2004-08-12  Simon Josefsson  <jas@extundo.com>
19504
19505         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
19506         as discussed with Paul Eggert in threads rooted at
19507         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
19508         and
19509         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
19510         Before, the test was empty, and relied on ELIDE_CODE in source
19511         code.)
19512         (gl_PREREQ_GETOPT): New macro.
19513         (gl_GETOPT): Use them.
19514
19515 2004-08-12  Simon Josefsson  <jas@extundo.com>
19516
19517         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
19518         * lib/getopt_.h: Renamed from getopt.h.
19519
19520 2004-08-12  Simon Josefsson  <jas@extundo.com>
19521
19522         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
19523         Change default library name from libfoo to libgnu.
19524         Now, if you have a configure.ac that says:
19525                 gl_SOURCE_BASE(gl)
19526                 gl_M4_BASE(gl/m4)
19527                 gl_MODULES(error getopt etcetera)
19528                 gl_INIT
19529         you can import all you need by running:
19530                 ../gnulib/gnulib-tool --import
19531
19532         * modules/getopt (Files): Rename getopt.h to getopt_.h.
19533         (Makefile.am): Rewrite, use logic from argz.
19534         (Include): Use <getopt.h> instead of "getopt.h".
19535
19536 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
19537
19538         * modules/argp (Files): Add m4/unlocked-io.m4.
19539         (Depends-on): Add extensions.
19540
19541 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
19542
19543         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
19544         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
19545         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
19546         Check for program_invocation_name, program_invocation_short_name,
19547         flockfile, funlockfile, features.h, _getopt_long_only_r.
19548
19549 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
19550
19551         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
19552         its complicated substitute.
19553         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
19554         and program_invocation_name.
19555         (__argp_basename) [!_LIBC]: Remove; the only use was
19556         replaced by its body.
19557         (__argp_short_program_name): Change condition from
19558         !defined __argp_short_program_name to
19559         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
19560         to match argp-namefrob.h.
19561         (__argp_failure): Don't assume strerror_r returns char *.
19562         * lib/argp-parse.c (N_): Define unconditionally.
19563         (argp_default_options): Fill out initializers with 0 to avoid
19564         gcc warnings.
19565
19566 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
19567
19568         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
19569         getopt1.c.
19570
19571 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
19572
19573         Merge from coreutils.
19574
19575         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
19576
19577         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
19578         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
19579
19580 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
19581
19582         Merge from coreutils.
19583
19584         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
19585         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
19586         for Reliant Unix 5.43.
19587
19588         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
19589         (union fooround): Use uintmax_t, not long int.
19590         The rest is a merge from libc:
19591         [defined _LIBC]: Include <shlib-compat.h>.
19592         (_obstack) [defined _LIBC]: Remove after 2.3.4.
19593
19594         * lib/settime.c (settime): Recode to avoid warning with
19595         Sun Forte C 6U2.
19596
19597         * lib/strverscmp.c: Convert to UTF-8.
19598
19599 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
19600
19601         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
19602         m4/uintmax_t.m4.
19603
19604 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
19605
19606         * modules/xalloc-die: New file.
19607         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
19608
19609         * modules/md5 (Files): Add m4/uint32_t.m4.
19610         * modules/sha1: Renamed from modules/sha.
19611         (Files):
19612         Rename lib/sha.h to lib/sha1.h.
19613         Rename lib/sha.c to lib/sha1.c.
19614         Rename m4/sha.m4 to m4/sha1.m4.
19615         (lib_SOURCES): Likewise.
19616         (configure.ac): Rename gl_SHA to gl_SHA1.
19617         (Include): sha.h -> sha1.h.
19618
19619 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
19620
19621         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
19622         * m4/sha1.m4: Renamed from sha.m4.
19623         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
19624
19625 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
19626
19627         * lib/obstack.h (obstack_empty_p):
19628         Don't assume that chunk->contents is suitably aligned.
19629         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
19630         Likewise. Problem reported by Benno in
19631         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
19632
19633         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
19634         readable.  This could be improved further but it'd take some work.
19635
19636 2004-08-08  Simon Josefsson  <jas@extundo.com>
19637
19638         * modules/xgethostname (Depends-on): Remove exit and error (not
19639         used).
19640
19641         * modules/getpass-gnu: Add getpass.h.
19642         (Depends-on): Add stdbool.
19643         * modules/getpass: Add getpass.h.
19644
19645 2004-08-08  Simon Josefsson  <jas@extundo.com>
19646
19647         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
19648         Check getpass declaration.
19649
19650 2004-08-08  Simon Josefsson  <jas@extundo.com>
19651
19652         * lib/xgethostname.c: Don't include error.h (not used).
19653
19654         * lib/getpass.h: Add.
19655         * lib/getpass.c: Include getpass.h first.
19656
19657 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
19658
19659         * lib/xalloc-die.c: New file.
19660         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
19661         All uses removed.
19662         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
19663         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
19664         xalloc-die.c.
19665         (_, N_, xalloc_die): Move to xalloc-die.c.
19666         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
19667         so that we needn't mess with xalloc_msg_memory_exhausted.
19668
19669         * lib/sha1.h: Renamed from sha.h.
19670         (SHA1_H): Renamed from _SHA_H.
19671         (sha1_ctx): Renamed from sha_ctx.
19672         (sha1_init_ctx): Renamed from sha_init_ctx.
19673         (sha1_process_block): Renamed from sha_process_block.
19674         (sha1_process_bytes): Renamed from sha_process_bytes.
19675         (sha1_finish_ctx): Renamed from sha_finish_ctx.
19676         (sha1_read_ctx): Renamed from sha_read_ctx.
19677         (sha1_stream): Renamed from sha_stream.
19678         (sha1_buffer): Renamed from sha_buffer.
19679         * lib/sha1.c: Likewise; renamed from sha.c.
19680         Do not include <sys/types.h>.
19681         Include <stddef.h> rather than <stdlib.h>.
19682
19683 2004-08-08  Bruno Haible  <bruno@clisp.org>
19684
19685         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
19686         FILESYSTEM_PREFIX_LEN.
19687         * lib/progreloc.c: Likewise.
19688         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
19689
19690 2004-08-06  Simon Josefsson  <jas@extundo.com>
19691
19692         * modules/progname (Depends-on): Don't depend on stdbool.
19693
19694 2004-08-06  Simon Josefsson  <jas@extundo.com>
19695
19696         * modules/getsubopt: New file.
19697         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19698         getsubopt.
19699
19700 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
19701
19702         More merge from coreutils.
19703
19704         * m4/utimens.m4, m4/utimecmp.m4: New files.
19705         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
19706         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
19707         prereq.m4, sha.m4: Import changes from coreutils.
19708
19709 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
19710
19711         More merge from coreutils.
19712         * modules/raise, modules/readtokens0, modules/utimens:
19713         * modules/utimecmp, module/xnanosleep: New files.
19714         * modules/strftime: Add lib/strftime.h.
19715         Change include from <time.h> to "strftime.h".
19716         * modules/yesno: Add lib/yesno.h.
19717         * modules/backupfile: Remove lib/addext.c.
19718         * modules/euidaccess: Add stat-macros.h.
19719         * modules/canonicalize, modules/euidaccess,
19720         modules/filemode, modules/lchown, modules/makepath,
19721         modules/rmdir, modules/stat: Likewise.
19722
19723 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
19724
19725         Merge from tar.
19726         * lib/argp-help.c (make_hol, hol_append): Don't assume that
19727         SIZE_MAX is a valid preprocessor constant.
19728         (__argp_basename): Change from "#ifndef _LIBC"
19729         to "#ifndef __argp_short_program_name", so that
19730         we don't compile these functions for tar.
19731
19732         More merges from coreutils.
19733         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
19734         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
19735         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
19736         * lib/addext.c: Remove; no longer needed.
19737         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
19738         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
19739         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
19740         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
19741         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
19742         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
19743         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
19744         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
19745         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
19746         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
19747         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
19748         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
19749         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
19750         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
19751         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
19752         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
19753         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
19754         Import changes from coreutils.
19755
19756 2004-08-05  Simon Josefsson  <jas@extundo.com>
19757
19758         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
19759
19760 2004-08-05  Simon Josefsson  <jas@extundo.com>
19761
19762         * m4/getsubopt.m4: New file.
19763
19764 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
19765
19766         Merge from coreutils.
19767
19768         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
19769         * m4/getcwd-path-max.m4: New files.
19770
19771         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
19772         FILESYSTEM_PREFIX_LEN ->
19773         FILE_SYSTEM_PREFIX_LEN.
19774         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
19775         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
19776         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
19777         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
19778
19779         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
19780         prerequisite modules now handle the DOS stuff.
19781         Don't check for unistd.h.
19782
19783 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
19784
19785         Merge from coreutils.
19786
19787         * lib/.gdb-history: Remove; this doesn't belong here.
19788
19789         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
19790         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
19791         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
19792         * lib/getcwd.c: New files.
19793
19794         * lib/dirname.h: Include <stdbool.h>.
19795         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
19796         for consistency with POSIX terminology.  All uses changed.
19797         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
19798         (strip_trailing_slashes): Use bool for booleans.
19799         * lib/stripslash.c (strip_trailing_slashes): Likewise.
19800
19801         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
19802         sometimes returns a positive errno value even when it succeeds.
19803         (print_errno_message) [!LIBC]: Fall back on strerror if
19804         __strerror_r fails.
19805
19806         * lib/path-concat.c (mempcpy): Don't define if a system header defines
19807         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
19808         (longest_relative_suffix): New function.
19809         (path_concat): Use it.  Assume first argument is not NULL.
19810         Port to DOS.  Omit redundant separators.
19811         Report an error instead of returning NULL.
19812         Use mempcpy instead of memcpy.
19813         (xpath_concat): Remove: not declared or used.
19814
19815         * lib/same.h: Include <stdbool.h>
19816         (same_name): Return bool, not int.
19817         * lib/same.c (same_name): Likewise.
19818         (errno): Don't declare; we assume C89 or better now.
19819
19820         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
19821         if not already defined.
19822
19823         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
19824         * lib/dup-safer.c (errno): Likewise.
19825
19826 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
19827
19828         Merge from coreutils.
19829         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
19830         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
19831         * modules/path-concat: Don't depend on strdup.
19832
19833 2004-08-03  Simon Josefsson  <jas@extundo.com>
19834
19835         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
19836         * lib/progname.h: Don't include stdbool.h.
19837
19838 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
19839
19840         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
19841         * MODULES.html.sh (func_all_modules): Remove fatal.
19842
19843 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
19844
19845         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
19846
19847 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
19848
19849         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
19850         working.
19851
19852 2004-08-02  Simon Josefsson  <jas@extundo.com>
19853
19854         * lib/getsubopt.h: New file, with comments from Bruno Haible.
19855         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
19856         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
19857
19858 2004-08-01  Simon Josefsson  <jas@extundo.com>
19859
19860         * lib/xgetdomainname.c: Include stdlib.h, for free().
19861
19862 2004-07-19  Bruno Haible  <bruno@clisp.org>
19863
19864         * MODULES.html.sh (func_all_modules): Add dummy.
19865
19866 2004-07-16  Simon Josefsson  <jas@extundo.com>
19867
19868         * modules/dummy: New file.
19869
19870 2004-07-16  Simon Josefsson  <jas@extundo.com>
19871
19872         * lib/dummy.c: New file.
19873
19874 2004-07-16  Bruno Haible  <bruno@clisp.org>
19875
19876         * lib/backupfile.h: Add extern "C" for C++.
19877         * lib/closeout.h: Likewise.
19878         * lib/copy-file.h: Likewise.
19879         * lib/findprog.h: Likewise.
19880         * lib/full-write.h: Likewise.
19881         * lib/pathname.h: Likewise.
19882         * lib/progname.h: Likewise.
19883         * lib/stpcpy.h: Likewise.
19884         * lib/stpncpy.h: Likewise.
19885         * lib/strcase.h: Likewise.
19886         * lib/strstr.h: Likewise.
19887         * lib/xalloc.h: Likewise.
19888
19889         * lib/mbswidth.h: Add extern "C" for C++.
19890         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
19891
19892 2004-07-13  Robert Millan  <robertmh@gnu.org>
19893
19894         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
19895
19896 2004-07-09  Simon Josefsson  <jas@extundo.com>
19897
19898         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
19899         failed without this.)
19900
19901 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
19902
19903         * modules/chown (Files): Add lib/fchown-stub.c, since
19904         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
19905
19906 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
19907
19908         * lib/fchown-stub.c: New file.
19909
19910 2004-06-24  Jim Meyering  <jim@meyering.net>
19911
19912         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
19913
19914 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19915
19916         * modules/argz: Omit "#include".
19917
19918         * MODULES.html.sh (func_all_modules): Add calloc, to match
19919         2004-06-01 addition of calloc module.
19920
19921 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19922
19923         * m4/argz.m4: New file, which is autoupdated from libtool.
19924
19925 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19926
19927         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
19928         libtool.
19929
19930 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19931
19932         * config/srclist-update: Don't insist on "USA." before the
19933         close-comment, as libtool omits the period and puts the */ on a
19934         separate line.
19935         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
19936         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
19937
19938 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
19939
19940         * modules/argz: New file.
19941         * MODULES.html.sh (func_all_modules): Add argz.
19942
19943 2004-06-12  Jim Meyering  <jim@meyering.net>
19944         and  Paul Eggert  <eggert@cs.ucla.edu>
19945
19946         * modules/hash (Files): Add lib/xalloc.h.
19947         * modules/pipe (Depends-on): Add wait-process.
19948         * modules/stat (Depends-on): Add xalloc.
19949         * modules/userspec (Files): Add lib/userspec.h.
19950         * modules/xstrto
19951
19952         Upgrade from gettext-0.13.
19953         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
19954         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
19955         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
19956
19957 2004-06-10  Jim Meyering  <jim@meyering.net>
19958
19959         * lib/calloc.c: New file.
19960
19961 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
19962
19963         * lib/getdate.y (yylex): Allow space between sign and number.
19964         Problem reported by Dan Jacobson.
19965
19966 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
19967
19968         Merge from coreutils CVS.
19969
19970         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
19971         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
19972         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
19973         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
19974         xstrtol.m4: Fix copyright date and/or serial number.
19975
19976         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
19977         See if we need an fchown replacement.
19978         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
19979         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
19980         and use the replacement function if we detect either defect.
19981
19982         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
19983         gl_UTIMECMP.
19984
19985 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
19986         and  Jim Meyering  <jim@meyering.net>
19987
19988         Merge from coreutils CVS.
19989
19990         * lib/stat-macros.h: New file, with contents from file-type.h
19991         and coreutils' system.h.
19992         * lib/file-type.c: Include "stat-macros.h".
19993         * lib/file-type.h (file_type): Move all macro definitions to new file,
19994         stat-macros.h.
19995
19996         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
19997         Wrap old code with this conditional.
19998         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
19999         function that does not dereference symlinks.
20000         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
20001
20002         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
20003         dependency problems.
20004         (xreadlink): Accept new arg SIZE, for efficiency.
20005         All decls and uses changed.
20006         * lib/xreadlink.h: Include <stddef.h>, for size_t.
20007
20008         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
20009         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
20010
20011         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
20012         sysexits.h.
20013
20014 2004-06-01  Jim Meyering  <jim@meyering.net>
20015
20016         * m4/calloc.m4: New file.
20017
20018 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
20019
20020         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
20021         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
20022         Also, fix a typo in a diagnostic.
20023
20024 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
20025
20026         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
20027         or AC_FUNC_REALLOC.
20028
20029 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
20030
20031         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
20032         macros to be defined.
20033         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
20034         the allocator returns NULL because the requested size is zero.
20035
20036 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20037
20038         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
20039         var.  Add comment explaining why libc still defines it.  This
20040         merges the following patch from glibc:
20041         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
20042
20043 2004-05-20  Andreas Schwab  <schwab@suse.de>
20044
20045         * m4/free.m4: Replace free if it not known to work, not the other
20046         way round.
20047
20048 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
20049
20050         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
20051         present in glibc since revision 1.1 of this file.
20052         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
20053         obstack_alignment_mask, obstack_alloc, obstack_base,
20054         obstack_blank, obstack_blank_fast, obstack_chunk_size,
20055         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
20056         obstack_grow0, obstack_init, obstack_int_grow,
20057         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
20058         obstack_next_free, obstack_object_size, obstack_ptr_grow,
20059         obstack_ptr_grow_fast, obstack_room): Remove declarations of
20060         nonexistent functions.
20061
20062 2004-05-18  Karl Berry  <karl@gnu.org>
20063
20064         * config/srclist.txt: break link for vasnprintf.c.
20065
20066 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
20067
20068         Port obstack to the AS/400, where pointers are 16 bytes wide and
20069         you cannot cast an integer to a valid pointer.  This patch is
20070         currently waiting to be integrated into glibc; see
20071         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
20072
20073         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
20074         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
20075         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
20076         (struct obstack): temp member is now a union of a pointer and
20077         an integer, instead of an integer.  All integer uses changed.
20078         This does not affect the physical layout of struct obstack,
20079         except on hosts (like the AS/400) where the size or alignment of
20080         void * is greater than that of ptrdiff_t.
20081         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
20082         __STDC__)]: Store temporary in pointer member of union, not
20083         integer member.
20084         * lib/obstack.c: Include <stddef.h>, for offsetof.
20085         (struct fooalign): Remove; it doesn't need a name.
20086         (union fooround): Change double to long double, and add void *.
20087         (DEFAULT_ALIGNMENT): Use offsetof to compute.
20088         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
20089         not a macro.  Hence the values are always int; so remove all
20090         casts-to-int in uses.
20091
20092 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
20093
20094         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
20095         we can get this patch merged into glibc.
20096
20097 2004-05-17  Derek R. Price  <derek@ximbiot.com>
20098             Paul Eggert  <eggert@cs.ucla.edu>
20099
20100         * m4/argp: Depend on alloca.
20101
20102 2004-05-17  Derek R. Price  <derek@ximbiot.com>
20103             Paul Eggert  <eggert@cs.ucla.edu>
20104
20105         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
20106         freecoding.
20107
20108 2004-05-17  Bruno Haible  <bruno@clisp.org>
20109
20110         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
20111         precision that consists of a '.' followed by an empty digit string.
20112         Patch by Tor Lillqvist <tml@iki.fi>.
20113
20114 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
20115
20116         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
20117         for backward compatibility with older code.  We need our own
20118         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
20119         it under some other name, and our alloca.h will define it.
20120
20121 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
20122             Derek Price  <derek@ximbiot.com>
20123
20124         * lib/alloca.c: Include <alloca.h>, to get our interface.
20125         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
20126         include <alloca.h> first.  Use C89 prototype for alloca; this
20127         requires including <stddef.h> for size_t.  Use extern "C" if C++.
20128         Use #elif for simplicity, since we can assume C89 now.
20129         Don't try to source the system alloca.h since it will not be found
20130         and to prevent recursively including its replacement.
20131         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
20132         * lib/regex.c: Likewise.
20133
20134 2004-05-16  Derek Price  <derek@ximbiot.com>
20135             Paul Eggert  <eggert@cs.ucla.edu>
20136
20137         getline cleanup.  This changes the getndelim2 API: both order of
20138         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
20139         no delimiter).
20140
20141         * lib/getline.c: Don't include stddef.h or stdio.h, since our
20142         interface does that.
20143         (getline): Always use getdelim, so that we don't have two
20144         copies of this code.
20145         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
20146         if available.
20147         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
20148         (GETNDELIM2_MAXIMUM): New macro.
20149         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
20150         instead of the old practice of delim2==0.  All callers changed.
20151         Return -1 on overflow, instead of returning junk.
20152         Do not set *linesize unless allocation succeeds.
20153         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
20154         that we include sys/types.h.
20155         * lib/getnline.h: Likewise.
20156         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
20157         (getndelim2): Reorder arguments.
20158         * lib/getnline.c (getnline, getndelim):
20159         Don't discard the NMAX argument.
20160         (getnline): Invoke getndelim, to avoid code duplication.
20161         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
20162         of (size_t) -1 by callers of the getnline family.
20163
20164 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20165
20166         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
20167         Check for gettimeofday.
20168         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
20169         Check for settimeofday, stime.
20170
20171 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20172
20173         * lib/nanosleep.c (suspended): Change its type from int to
20174         sig_atomic_t volatile.
20175         (first_call): Make it private to rpl_nanosleep, and have it
20176         be zero initially as that's a bit faster.
20177         (my_usleep): Round up fractional times instead of truncating them,
20178         as this is the usual meaning for 'sleep'.
20179
20180         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
20181         doesn't work.
20182         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
20183         (ENOSYS): Define if not defined.
20184         (settime): Fall back on stime if it exists and settimeofday fails.
20185         But don't bother with fallbacks if a method fails with errno == EPERM.
20186
20187 2004-05-11  Jim Meyering  <jim@meyering.net>
20188
20189         Prior to this change, the save_cwd caller required read access to the
20190         current directory on most systems (ones with the fchdir function).
20191
20192         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
20193         fails, try write-only, and finally, resort to using xgetcwd.
20194
20195 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
20196
20197         * lib/obstack.c, obstack.h: Import changes from libc.
20198
20199 2004-04-28  Bruno Haible  <bruno@clisp.org>
20200
20201         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
20202         also implicitly appends .exe to executables.
20203         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
20204         accepts Windows pathnames.
20205         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
20206         Treat Cygwin like Windows, since it now accepts Windows pathnames.
20207         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
20208         Treat Cygwin like Windows, since it now accepts Windows pathnames.
20209         Reported by Derek Robert Price <derek@ximbiot.com>.
20210
20211 2004-04-21  Karl Berry  <karl@gnu.org>
20212
20213         * config/srclist.txt (localcharset.c): break sync.
20214
20215 2004-04-20  Paul Eggert  <eggert@twinsun.com>
20216
20217         * m4/host-os.m4: Add a copyright notice.
20218
20219 2004-04-20  Jim Meyering  <jim@meyering.net>
20220
20221         Change UTILS_ to gl_ in AC_DEFINE'd names.
20222         Change utils_- and jm_-prefixed variables, too.
20223         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
20224         UTILS_FUNC_MKDIR_TRAILING_SLASH.
20225         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
20226
20227         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
20228         Don't emit trailing blanks.
20229         Also rename jm_-prefixed variables to have gl_ prefix.
20230
20231         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
20232         Also rename jm_-prefixed variables to have gl_ prefix.
20233
20234         * m4/jm-macros.m4: Reflect the renamings.
20235         * m4/prereq.m4: Likewise.
20236
20237 2004-04-20  Jim Meyering  <jim@meyering.net>
20238
20239         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
20240         memory.
20241
20242 2004-04-20  Jim Meyering  <jim@meyering.net>
20243             Bruno Haible  <bruno@clisp.org>
20244
20245         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
20246         memory when realloc fails.
20247
20248 2004-04-19  Jim Meyering  <jim@meyering.net>
20249
20250         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
20251         now that readutmp.c may call `free (0)'.
20252
20253 2004-04-19  Bruno Haible  <bruno@clisp.org>
20254
20255         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
20256         * m4/inttypes_h.m4: Likewise.
20257         * m4/stdint_h.m4: Likewise.
20258         * m4/intmax_t.m4: Likewise.
20259         * m4/uintmax_t.m4: Likewise.
20260
20261 2004-04-18  Jim Meyering  <jim@meyering.net>
20262
20263         * m4/prereq.m4: Don't forbid jm_ prefix.
20264
20265         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
20266         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
20267         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
20268         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
20269         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
20270         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
20271         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
20272         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
20273         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
20274         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
20275         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
20276         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
20277         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
20278         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
20279         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
20280         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
20281         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
20282         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
20283         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
20284
20285 2004-04-18  Jim Meyering  <jim@meyering.net>
20286
20287         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
20288         failure, don't leak memory and do call END_UTMP_ENT.
20289
20290 2004-04-16  Jim Meyering  <jim@meyering.net>
20291
20292         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
20293         coreutils' stat program.
20294         (gl_PREREQ): Don't require jm_PREREQ_STAT.
20295
20296 2004-04-11  Paul Eggert  <eggert@twinsun.com>
20297
20298         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
20299         C89.
20300         (CHAR_BIT): Remove, since we assume C89.
20301         Include <stdint.h> if available, as per current Autoconf CVS advice.
20302
20303 2004-03-31  Jim Meyering  <jim@meyering.net>
20304
20305         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
20306         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
20307         * m4/xalloc.m4: Likewise.
20308
20309 2004-03-30  Paul Eggert  <eggert@twinsun.com>
20310
20311         Merge from coreutils.
20312
20313         * m4/inttostr.m4: New file.
20314         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
20315         Require AM_STDBOOL_H and gl_TIMESPEC instead.
20316         Require gl_CLOCK_TIME.
20317         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
20318
20319 2004-03-30  Paul Eggert  <eggert@twinsun.com>
20320
20321         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
20322         not bool, to be more consistent with Unix conventions.
20323         Suggested by Bruno Haible.
20324
20325         Merge from coreutils.
20326
20327         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
20328         * lib/umaxtostr.c: New files.
20329
20330         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
20331         the usual <time.h> dance.
20332         (get_date): Change signature to support fractional time stamps.
20333         All callers changed.
20334         * lib/getdate.y: Include "getdate.h" first, as we can now
20335         assume C89 and don't need to worry about 'const'.
20336         Similarly, include "unlocked-io.h" near start, not in middle.
20337         Include <limits.h>.
20338         (textint.value): Use long int rather than int.
20339         (textint.digits): Use size_t rather than int.
20340         (BILLION, LOG10_BILLION): New constants.
20341         (parser_control): New member rel_ns.  Members day_ordinal,
20342         time_zone, month, day, hour, minutes, rel_year, rel_month,
20343         rel_day, rel_hour, rel_minutes, rel_seconds
20344         are now long int, not int.  Member seconds is now struct timespec,
20345         not int.  New member timespec_seen.  Members dates_seen, days_seen,
20346         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
20347         not int.
20348         (%union.intval): Now long int, not int.
20349         New member timespec.
20350         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
20351         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
20352         (spec): Now is a timespec or an item list.
20353         (timespec, items): New nonterminals.
20354         (time, rel, relunit, number, get_date):
20355         Add support for fractional seconds.
20356         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
20357         (gmtime, localtime, mktime): Remove decls; not needed with C89.
20358         (to_hour): First arg is now long int, not int.
20359         (to_year): Returns long int, not int.
20360         Don't treat year -70 like 70.
20361         (tm_diff): Returns long int, not int.
20362         (lookup_word): Use bool instead of int when appropriate.
20363         (yylex): Use size_t for count, not int.
20364         Detect overflow when parsing large integer constants.
20365         Add support for fractions.
20366         (get_date): Make pointers 'const' if possible.
20367         Use more-portable code to detect integer overflow.
20368         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
20369         Don't use ctime; it's not reliable if the year has >4 digits.
20370
20371         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
20372         This is for compatibility with BSD.
20373
20374         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
20375         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
20376         From coreutils' system.h.
20377
20378         * lib/userspec.c: Don't include "posixver.h".
20379         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
20380         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
20381         compatible extension.  Simplify code by removing a boolean int
20382         that was always nonzero if a string was nonnull.
20383
20384 2004-03-30  Jim Meyering  <jim@meyering.net>
20385
20386         Merge from coreutils.
20387
20388         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
20389         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
20390         on some systems one must include <grp.h> before it.
20391         Reported by Christian Krackowizer.
20392
20393 2004-03-30  Jim Meyering  <jim@meyering.net>
20394
20395         Merge from coreutils.
20396
20397         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
20398
20399         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
20400         an empty input stream.
20401
20402         * lib/readtokens.c: Include <stdbool.h>.
20403         (readtoken): Use `size_t' rather than int/long.
20404         All callers adjusted.
20405         Use `bool' rather than `int' where appropriate.
20406         Use memset rather than an explicit loop.
20407         Use x2nrealloc rather than xrealloc.
20408         Allow the use of `\0' as a delimiter.
20409         (readtokens): Likewise.
20410         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
20411
20412 2004-03-30  Jim Meyering  <jim@meyering.net>
20413
20414         * m4/realloc.m4: Remove file, since now it does no more than
20415         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
20416         the `configure.ac' section of module/realloc.
20417         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
20418
20419 2004-03-30  Bruno Haible  <bruno@clisp.org>
20420
20421         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
20422         nonnull.
20423
20424 2004-03-29  Paul Eggert  <eggert@twinsun.com>
20425
20426         Merge changes to getloadavg.c from coreutils and Emacs.
20427
20428         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
20429         Define to an expression, not to the empty string.
20430         Include cloexec.h and xalloc.h.
20431         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
20432         Use set_cloexec_flag rather than rolling our own.
20433         * lib/cloexec.c, lib/cloexec.h: New files.
20434
20435 2004-03-29  Paul Eggert  <eggert@twinsun.com>
20436
20437         * m4/cloexec.m4: New file.
20438
20439 2004-03-18  Paul Eggert  <eggert@twinsun.com>
20440
20441         * lib/getopt.h: Sync with libc CVS.
20442
20443 2004-03-18  Paul Eggert  <eggert@twinsun.com>
20444             Bruno Haible  <bruno@clisp.org>
20445
20446         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
20447         mbswidth.
20448
20449 2004-03-18  Paul Eggert  <eggert@twinsun.com>
20450             Bruno Haible  <bruno@clisp.org>
20451
20452         * lib/mbswidth.h: Include <wchar.h> only if
20453         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
20454         <wchar.h>.
20455         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
20456
20457 2004-03-09  Paul Eggert  <eggert@twinsun.com>
20458
20459         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
20460         Sync with libc CVS.
20461         * lib/getopt_int.h: New file, also synced from libc.
20462
20463 2004-03-09  Paul Eggert  <eggert@twinsun.com>
20464
20465         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
20466         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
20467         Bring back getopt.c, getopt.h, getopt1.c.
20468
20469 2004-03-07  Paul Eggert  <eggert@twinsun.com>
20470
20471         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
20472         All uses changed.  Check for sa_sigaction member; this fixes
20473         a bug first reported by Jason Andrade in
20474         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
20475
20476 2004-03-07  Paul Eggert  <eggert@twinsun.com>
20477
20478         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
20479         '#if' expressions.  Unlike the code it replaces, it does not
20480         depend on (defined _SC_PAGESIZE).  However, it does depend on
20481         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
20482         first reported by Jason Andrade in
20483         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
20484
20485 2004-02-25  Simon Josefsson  <jas@extundo.com>
20486
20487         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
20488
20489 2004-02-25  Simon Josefsson  <jas@extundo.com>
20490
20491         * lib/strdup.h: New file.
20492         * lib/strdup.c: Include it.
20493         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
20494         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
20495
20496 2004-02-23  Karl Berry  <karl@gnu.org>
20497
20498         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
20499         (from fencepost.gnu.org:/gd/gnuorg).
20500
20501 2004-02-23  Karl Berry  <karl@gnu.org>
20502
20503         * config/srclistvars.sh (GNUORG) [karl]: redefine.
20504         * config/srclist.txt: add maintain/standards documents.
20505
20506 2004-02-18  Bruno Haible  <bruno@clisp.org>
20507
20508         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
20509         Reported by Derek Robert Price <derek@ximbiot.com>.
20510
20511 2004-02-16  Karl Berry  <karl@gnu.org>
20512
20513         * config/mkinstalldirs, install-sh: update from automake.
20514
20515 2004-02-06  Karl Berry  <karl@gnu.org>
20516
20517         * m4/po.m4: update from gettext 0.14.1.
20518
20519 2004-02-06  Karl Berry  <karl@gnu.org>
20520
20521         * lib/config.charset: update from gettext 0.14.1.
20522
20523 2004-02-05  Paul Eggert  <eggert@twinsun.com>
20524
20525         Add comments and code, prompted by suggestions from Bruno Haible
20526         for sh-quote.
20527         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
20528         describing the enum quoting_style values.
20529         * lib/quotearg.c (quotearg_alloc): New function.
20530         (quotearg_buffer_restyled): Treat lone { and } as special.
20531         Treat = as special.  Work around bug with older shells
20532         that "see" a '\' that is really the 2nd byte of a multibyte char.
20533         Quote empty string with shell_quoting_style.
20534
20535 2004-02-03  Bruno Haible  <bruno@clisp.org>
20536
20537         * m4/pipe.m4: New file, from GNU gettext.
20538
20539 2004-02-03  Bruno Haible  <bruno@clisp.org>
20540
20541         * lib/pipe.h: New file, from GNU gettext.
20542         * lib/pipe.c: New file, from GNU gettext.
20543
20544 2004-01-27  Bruno Haible  <bruno@clisp.org>
20545
20546         * m4/execute.m4: New file, from GNU gettext.
20547
20548 2004-01-27  Bruno Haible  <bruno@clisp.org>
20549
20550         * lib/execute.h: New file, from GNU gettext.
20551         * lib/execute.c: New file, from GNU gettext.
20552         * lib/w32spawn.h: New file, from GNU gettext.
20553
20554 2004-01-24  Paul Eggert  <eggert@twinsun.com>
20555
20556         Merge from diffutils.
20557
20558         * lib/file-type.c (file_type): Add typed memory objects.
20559         * lib/file-type.h (S_TYPEISTMO): New macro.
20560
20561         * lib/c-stack.h (c_stack_action): Remove argv argument.
20562         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
20563         (die): Don't calculate message unless segv_action returns.
20564         (get_stack_location, min_address_from_argv, max_address_from_argv,
20565         volatile stack_base, volatile_stack_size): Remove.
20566         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
20567         that every segmentation violation is a stack overflow.  (Ouch!)
20568         See Debian bug 136249 (still outstanding) for more info about why
20569         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
20570
20571 2004-01-24  Paul Eggert  <eggert@twinsun.com>
20572
20573         Exit-status fix from coreutils.
20574
20575         Use exit_failure consistently in place of EXIT_FAILURE,
20576         so that program exit statuses are consistent on failure.
20577
20578         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
20579         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
20580         * lib/argmatch.h: Comment fix to match the above.
20581         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
20582         Now a macro referring to exit_failure, instead of a separate
20583         variable.  Include "exitfail.h" to get it.
20584         * lib/xstrtol.h: Include "exitfail.h".
20585         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
20586
20587         * lib/long-options.c (parse_long_options): Use prototype
20588         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
20589         for clarity.
20590
20591 2004-01-21  Jim Meyering  <jim@meyering.net>
20592
20593         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
20594         so as not to conflict with a different-sized __mktime_internal
20595         function in GNU libc.
20596         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
20597         Problem building statically-linked `ls' reported by Michael Brunnbauer.
20598
20599 2004-01-20  Karl Berry  <karl@gnu.org>
20600
20601         * config/config.guess: update from config.
20602
20603         * config/srclistvars.sh: GNUWWWLICENSES for karl.
20604
20605 2004-01-20  Bruno Haible  <bruno@clisp.org>
20606
20607         Safer stack allocation.
20608         * lib/setenv.c: Include allocsa.h.
20609         (alloca): Remove fallback definition.
20610         (freea): Remove macro.
20611         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
20612         instead of freea.
20613
20614 2004-01-20  Bruno Haible  <bruno@clisp.org>
20615
20616         * m4/eealloc.m4: New file, from GNU gettext.
20617
20618 2004-01-20  Bruno Haible  <bruno@clisp.org>
20619
20620         * m4/allocsa.m4: New file, from GNU gettext.
20621
20622 2004-01-20  Bruno Haible  <bruno@clisp.org>
20623
20624         * lib/xallocsa.h: New file, from GNU gettext.
20625         * lib/xallocsa.c: New file, from GNU gettext.
20626
20627 2004-01-20  Bruno Haible  <bruno@clisp.org>
20628
20629         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
20630
20631 2004-01-20  Bruno Haible  <bruno@clisp.org>
20632
20633         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
20634         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
20635         specially.
20636
20637 2004-01-20  Bruno Haible  <bruno@clisp.org>
20638
20639         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
20640         patch.
20641
20642 2004-01-20  Bruno Haible  <bruno@clisp.org>
20643
20644         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
20645
20646 2004-01-20  Bruno Haible  <bruno@clisp.org>
20647
20648         * lib/eealloc.h: New file.
20649
20650 2004-01-20  Bruno Haible  <bruno@clisp.org>
20651
20652         * lib/binary-io.h: Avoid warnings on Cygwin.
20653
20654 2004-01-20  Bruno Haible  <bruno@clisp.org>
20655
20656         * lib/allocsa.h: New file, from GNU gettext.
20657         * lib/allocsa.c: New file, from GNU gettext.
20658
20659 2004-01-18  Karl Berry  <karl@gnu.org>
20660
20661         * doc/gpl.texi, doc/lgpl.texi: new files.
20662
20663 2004-01-18  Karl Berry  <karl@gnu.org>
20664
20665         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
20666         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
20667
20668 2004-01-15  Paul Eggert  <eggert@twinsun.com>
20669
20670         Merge from coreutils.
20671
20672         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
20673         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
20674         (gl_DEFAULT_POSIX2_VERSION): Move
20675         the documentation from 'configure' into 'config.hin',
20676         so that 'configure --help' isn't burdened by it and
20677         we don't have to worry about its formatting there.
20678         Reword the documentation so that it's more succinct
20679         and can be run together into a single paragraph.
20680         * m4/same.m4 (gl_SAME): Check for pathconf.
20681
20682 2004-01-15  Paul Eggert  <eggert@twinsun.com>
20683
20684         Merge from coreutils.
20685
20686         * lib/posixver.c: Include posixver.h.
20687
20688         * lib/same.c: Include <stdbool.h>, <limits.h>.
20689         (_POSIX_NAME_MAX): Define if not defined.
20690         (MIN): New macro.
20691         (same_name): If file names are silently truncated, report
20692         that the file names are the same if they are the same after
20693         the silent truncation.
20694
20695         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
20696         conversion function.
20697         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
20698         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
20699         longer needed.
20700
20701 2004-01-15  Jim Meyering  <jim@meyering.net>
20702
20703         Merge from coreutils.
20704
20705         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
20706         if no library is required.
20707         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
20708         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
20709         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
20710         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
20711         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
20712         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
20713         value, $ac_cv_search_crypt, if it's "none required".
20714         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
20715         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
20716         not gl_FUNC_GETLOADAVG.
20717         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
20718         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
20719
20720 2004-01-15  Jim Meyering  <jim@meyering.net>
20721
20722         Merge from coreutils.
20723
20724         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
20725         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
20726         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
20727
20728         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
20729         optional configure-time default.
20730
20731         * lib/version-etc.c (version_etc_copyright): Update copyright date.
20732
20733         * lib/xreadlink.c (xreadlink): Correct outdated comment.
20734
20735 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
20736
20737         Merge from coreutils.
20738
20739         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
20740         value, $ac_cv_search_nanosleep, if it's "none required".
20741
20742 2004-01-14  Paul Eggert  <eggert@twinsun.com>
20743
20744         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
20745         with like-named macro in fnmatch.c.
20746         (EXT): Use an internal constant instead.
20747
20748         Merge fnmatch patches from glibc.
20749         * lib/fnmatch.c (mbsinit): Remove define.
20750         Add libc_hidden_ver (__fnmatch, fnmatch).
20751         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
20752         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
20753
20754 2004-01-14  Karl Berry  <karl@gnu.org>
20755
20756         * config/install-sh: update from automake.
20757
20758 2004-01-13  Karl Berry  <karl@gnu.org>
20759
20760         * config/install-sh: update from automake.
20761
20762 2004-01-09  Karl Berry  <karl@gnu.org>
20763
20764         * config/install-sh: update from automake.
20765
20766 2004-01-05  Karl Berry  <karl@gnu.org>
20767
20768         * config/config.{sub,guess}: update from config.
20769
20770 2003-12-31  Karl Berry  <karl@gnu.org>
20771
20772         * config/depcomp: update from automake.
20773
20774 2003-12-14  Karl Berry  <karl@gnu.org>
20775
20776         * lib/config.charset: update from gettext-runtime.
20777
20778 2003-12-03  Paul Eggert  <eggert@twinsun.com>
20779
20780         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
20781         Bug reported by Alfred M. Szmidt.
20782
20783 2003-12-03  Bruno Haible  <bruno@clisp.org>
20784
20785         * m4/gettext.m4: Upgrade from gettext-0.13.
20786         * m4/po.m4: Upgrade from gettext-0.13.
20787         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
20788         * m4/intmax.m4: New file, from gettext-0.13.
20789         * m4/printf-posix.m4: New file, from gettext-0.13.
20790
20791 2003-11-29  Karl Berry  <karl@gnu.org>
20792
20793         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
20794
20795 2003-11-25  Paul Eggert  <eggert@twinsun.com>
20796             Bruno Haible  <bruno@clisp.org>
20797
20798         * lib/printf-parse.h: Don't include sys/types.h.
20799         (ARG_NONE): New macro.
20800         (char_directive): Change type of *arg_index fields to size_t.
20801         * lib/printf-parse.c: Don't include sys/types.h.
20802         (SSIZE_MAX): Remove macro.
20803         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
20804         Remove unnecessary overflow check.
20805         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
20806         fields.
20807
20808 2003-11-25  Bruno Haible  <bruno@clisp.org>
20809
20810         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
20811
20812 2003-11-25  Bruno Haible  <bruno@clisp.org>
20813
20814         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
20815         gt_TYPE_SSIZE_T.
20816
20817 2003-11-24  Paul Eggert  <eggert@twinsun.com>
20818
20819         * modules/alloca: Remove dependency on xalloc.
20820
20821 2003-11-24  Paul Eggert  <eggert@twinsun.com>
20822
20823         * lib/alloca.c: Remove dependency on xalloc module.
20824         (xalloc_die): Remove.
20825         (memory_full) [!defined emacs]: New macro.
20826         [!defined emacs]: Don't include xalloc.h.
20827         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
20828         address arithmetic overflows.  Change datatypes a bit to avoid
20829         unnecessary casts.
20830
20831 2003-11-22  Jim Meyering  <jim@meyering.net>
20832
20833         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
20834         s/size/size_t/.
20835
20836 2003-11-21  Karl Berry  <karl@gnu.org>
20837
20838         * config/config.{sub,guess}: update from config.
20839
20840 2003-11-18  Karl Berry  <karl@gnu.org>
20841
20842         * config/config.{sub,guess}: update from config.
20843
20844         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
20845
20846 2003-11-17  Paul Eggert  <eggert@twinsun.com>
20847
20848         * README: Mention that S+T cannot overflow if S is the size of
20849         an existing object and T is sufficiently small.
20850
20851 2003-11-17  Jim Meyering  <jim@meyering.net>
20852
20853         On systems without utime and without a utimes function capable of
20854         dealing with a NULL struct utimbuf* argument, this utime replacement
20855         could -- in unusual circumstances -- leak a file descriptor.
20856         * lib/utime.c: Include <unistd.h> and <errno.h>.
20857         (utime_null): Be sure to close `fd' and to preserve errno.
20858         Reported by Geoff Collyer via Arnold Robbins.
20859
20860 2003-11-17  Bruno Haible  <bruno@clisp.org>
20861
20862         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
20863         (Depends-on): Add xsize.
20864
20865 2003-11-17  Bruno Haible  <bruno@clisp.org>
20866
20867         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
20868
20869 2003-11-17  Bruno Haible  <bruno@clisp.org>
20870
20871         * lib/vasnprintf.c (alloca): Remove fallback definition.
20872         (freea): Remove definition.
20873         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
20874         Reported by Paul Eggert.
20875
20876 2003-11-16  Paul Eggert  <eggert@twinsun.com>
20877             Bruno Haible  <bruno@clisp.org>
20878
20879         Protect against address arithmetic overflow.
20880         * lib/printf-args.h: Include stddef.h.
20881         (arguments): Change type of field 'count' to size_t.
20882         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
20883         'unsigned int' where appropriate.
20884         * lib/printf-parse.h: Include sys/types.h.
20885         (char_directive): Change type of *arg_index fields to ssize_t.
20886         (char_directives): Change type of fields 'count', max_*_length to
20887         size_t.
20888         * lib/printf-parse.c: Include sys/types.h and xsize.h.
20889         (SSIZE_MAX): Define fallback value.
20890         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
20891         instead of 'int' where appropriate. Check a_allocated, d_allocated
20892         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
20893         * lib/vasnprintf.c: Include xsize.h.
20894         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
20895         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
20896         overflow. Avoid wraparound when converting a width or precision from
20897         decimal to binary.
20898
20899 2003-11-16  Bruno Haible  <bruno@clisp.org>
20900
20901         Update from GNU gettext.
20902         * lib/printf-parse.c: Generalize to it can be compiled for wide
20903         strings.
20904         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
20905         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
20906         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
20907         SNPRINTF): New macros.
20908         Don't include <alloca.h> if the file is used inside libintl.
20909         (local_wcslen): New function, for Solaris 2.5.1.
20910         (VASNPRINTF): Use it instead of wcslen.
20911
20912 2003-11-16  Bruno Haible  <bruno@clisp.org>
20913
20914         * lib/xsize.h (xmax): New function.
20915         (xsum, xsum3, xsum4): Declare as "pure" functions.
20916
20917 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20918
20919         * modules/xalloc (Files): Undo latest change, since xalloc.h
20920         no longer needs SIZE_MAX or PTRDIFF_MAX.
20921
20922 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20923
20924         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
20925         gl_PTRDIFF_MAX.
20926
20927 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20928
20929         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
20930         "return", to pacify some unknown compiler.  Problem reported
20931         by Joerg Schilling.
20932
20933 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20934
20935         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
20936         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
20937         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
20938         heuristic is just as accurate as far as we know, and it removes a
20939         dependency on size_max.m4 and ptrdiff_max.m4.
20940
20941 2003-11-11  Bruno Haible  <bruno@clisp.org>
20942
20943         * modules/xsize (Files): Add m4/size_max.m4.
20944         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
20945
20946 2003-11-11  Bruno Haible  <bruno@clisp.org>
20947
20948         * m4/size_max.m4: New file.
20949         * m4/ptrdiff_max.m4: New file.
20950         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
20951         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
20952         (gl_XALLOC): Invoke it.
20953
20954 2003-11-11  Bruno Haible  <bruno@clisp.org>
20955
20956         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
20957         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
20958         defined.
20959
20960 2003-11-10  Paul Eggert  <eggert@twinsun.com>
20961
20962         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
20963         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
20964         rejected some allocations of exactly SIZE_MAX - 2 bytes.
20965         From Bruno Haible.
20966         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
20967         not (size_t) -1, since it's defined here.
20968
20969 2003-11-09  Karl Berry  <karl@gnu.org>
20970
20971         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
20972
20973 2003-11-06  Paul Eggert  <eggert@twinsun.com>
20974
20975         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
20976         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
20977         Reject sizes of exactly SIZE_MAX bytes.
20978         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
20979         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
20980
20981 2003-11-05  Bruno Haible  <bruno@clisp.org>
20982
20983         * lib/xsize.h: Include limits.h, to avoid a possible collision with
20984         SIZE_MAX defined in <limits.h> on Solaris.
20985
20986 2003-11-04  Jim Meyering  <jim@meyering.net>
20987
20988         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
20989         variable names, rather than @VAR@.
20990         * modules/poll: Likewise.
20991
20992 2003-11-04  Bruno Haible  <bruno@clisp.org>
20993
20994         * modules/xsize: New file.
20995         * modules/linebreak: Depend on xsize.
20996         * MODULES.html.sh (func_all_modules): Add xsize.
20997
20998 2003-11-04  Bruno Haible  <bruno@clisp.org>
20999
21000         * m4/xsize.m4: New file.
21001
21002 2003-11-04  Bruno Haible  <bruno@clisp.org>
21003
21004         * lib/xsize.h: New file.
21005         * lib/linebreak.c: Include xsize.h.
21006         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
21007         argument for overflow.
21008         Suggested by Paul Eggert.
21009
21010 2003-11-03  Karl Berry  <karl@gnu.org>
21011
21012         * config/config.{guess,sub}: update from config.
21013
21014 2003-11-03  Jim Meyering  <jim@meyering.net>
21015
21016         * modules/userspec (lib_SOURCES): Add userspec.h.
21017         (Include): Add "userspec.h".
21018         Improve description.
21019
21020 2003-11-03  Jim Meyering  <jim@meyering.net>
21021
21022         * lib/userspec.c: Include "userspec.h".
21023         * lib/userspec.h: New file.
21024
21025 2003-11-03  Bruno Haible  <bruno@clisp.org>
21026
21027         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
21028
21029 2003-11-03  Bruno Haible  <bruno@clisp.org>
21030
21031         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
21032         available, to avoid (extremely rare) race condition.
21033         Suggested by Paul Eggert.
21034
21035 2003-11-02  Karl Berry  <karl@gnu.org>
21036
21037         * config/srclist.txt (vasprintf.c): sync broken, sigh.
21038
21039 2003-10-31  Paul Eggert  <eggert@twinsun.com>
21040
21041         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
21042         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
21043         (read_filesystem_list): Set and use me_type_malloced.
21044         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
21045         whatever the type happens to be), for brevity and consistency.
21046         Check for size calculation overflow on Alphas running OSF/1.
21047
21048 2003-10-31  Jim Meyering  <jim@meyering.net>
21049
21050         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
21051
21052         * lib/linebuffer.c: Include <string.h> for declaration of memset.
21053
21054 2003-10-30  Paul Eggert  <eggert@twinsun.com>
21055             Bruno Haible  <bruno@clisp.org>
21056
21057         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
21058         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
21059
21060 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
21061
21062         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
21063         netbsd*-gnu*.  Suggested by Robert Millan.
21064
21065 2003-10-29  Paul Eggert  <eggert@twinsun.com>
21066
21067         * modules/group-member: Depend on stdbool.
21068
21069 2003-10-29  Paul Eggert  <eggert@twinsun.com>
21070
21071         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
21072
21073 2003-10-29  Paul Eggert  <eggert@twinsun.com>
21074
21075         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
21076         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
21077         after the 'gnu' in these cases.  This fixes some bugs in the
21078         previous change, and is based on suggestions by Robert Millan.
21079
21080 2003-10-29  Paul Eggert  <eggert@twinsun.com>
21081
21082         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
21083         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
21084         no longer needed.
21085         * lib/quotearg.c (quotearg_n_options): Use it.
21086         * lib/group-member.c: Include <stdbool.h>.
21087         (free_group_info): Arg is now const *; don't free arg.
21088         (get_group_info): Now returns bool and accepts struct group_info *,
21089         rather than returning a malloc'ed struct group_info *.
21090         All uses changed.  Check for overflow in internal size calculation.
21091
21092         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
21093         rather than xmalloc/xrealloc.
21094         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
21095         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
21096         conformance bug: the old code used a pointer after freeing the
21097         storage that it addressed.
21098         * lib/hash.c (hash_initialize): Simplify the code by using
21099         xalloc_oversized rather than doing it by hand.
21100         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
21101         the buffer preserved.  Use free and xmalloc instead.
21102         * lib/quotearg.c (quotearg_n_options): Likewise.
21103         Use a simpler test for size overflow.  Don't use xalloc_oversized
21104         because unsigned int might be wider than size_t (!); this suggests
21105         that we should switch from unsigned int to size_t for slot numbers.
21106
21107 2003-10-28  Paul Eggert  <eggert@twinsun.com>
21108
21109         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
21110         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
21111         NetBSD kernels.  Requested by Richard Stallman.
21112
21113 2003-10-27  Paul Eggert  <eggert@twinsun.com>
21114
21115         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
21116         to allocate the returned structure.  Do not allocate a subarray,
21117         as x2nrealloc will do that.
21118         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
21119         instead of xnrealloc.
21120         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
21121
21122 2003-10-27  Bruno Haible  <bruno@clisp.org>
21123
21124         * lib/stdbool_.h: Better support for BeOS.
21125
21126 2003-10-26  Paul Eggert  <eggert@twinsun.com>
21127
21128         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
21129         now uses inline.
21130
21131 2003-10-26  Paul Eggert  <eggert@twinsun.com>
21132
21133         * lib/xalloc.h (xalloc_oversized): New static inline function, for
21134         callers that want to do their own size-overflow checking.  Include
21135         <stdbool.h>, since xalloc_oversized returns bool.
21136         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
21137         to use xalloc_oversized.
21138
21139         Add two functions x2realloc, x2nrealloc, for programs that grow
21140         arrays dynamically by doubling their sizes.
21141         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
21142         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
21143         New functions.
21144
21145         Port to C99 semantics for 'inline' of external functions.
21146         Bug reported by Bruno Haible.
21147         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
21148         with the old contents of xnmalloc.
21149         (xnmalloc, xmalloc): Use it.
21150         (xnrealloc_inline): New static inline function,
21151         with the old contents of xnrealloc.
21152         (xnrealloc, xrealloc): Use it.
21153
21154         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
21155         that.
21156
21157 2003-10-26  Karl Berry  <karl@gnu.org>
21158
21159         * config/srclist.txt (COPYING.DOC): no longer available from
21160         /gd/gnuorg; don't know where the ultimate source is.
21161
21162 2003-10-25  Paul Eggert  <eggert@twinsun.com>
21163
21164         Fix several address-calculation bugs in the hash modules,
21165         plus some minor code cleanup.
21166
21167         * lib/hash.h: Include <stdbool.h>, for bool.
21168         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
21169         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
21170         hash_get_n_entries, hash_get_max_bucket_length,
21171         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
21172         hash_rehash): Use size_t rather than unsigned.
21173         * lib/hash.c (struct hash_table, hash_get_n_buckets,
21174         hash_get_n_buckets_used, hash_get_n_entries,
21175         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
21176         hash_get_entries, hash_do_for_each, hash_string, is_prime,
21177         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
21178         Likewise.
21179         (SIZE_MAX): Define if not defined.
21180         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
21181         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
21182         hash_print):
21183         Use const * when possible.
21184         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
21185         (check_tuning): Fix bug: if tuning parameters were very close to
21186         0 or 1, rounding errors could have caused subscript violations.
21187         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
21188         (hash_initialize): Add 'fail:' label
21189         to free table and return NULL, and use it to simplify code.
21190         Use calloc rather than clearing the storage ourself.
21191         (hash_initialize, hash_rehash): Check for arithmetic overflow in
21192         buffer size calculations.
21193         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
21194         Include <stddef.h>, for size_t.
21195         * lib/hash-pjw.c (hash_pjw): Likewise.
21196         Switch to method described by Bruno Haible.
21197         Include <limits.h>, for CHAR_BIT.
21198         (SIZE_BITS): New macro.
21199
21200 2003-10-23  Paul Eggert  <eggert@twinsun.com>
21201
21202         * m4/getline.m4 (AM_FUNC_GETLINE):
21203         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
21204         hosts.  Problem reported by Derek Robert Price in
21205         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
21206         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
21207         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
21208
21209 2003-10-21  Paul Eggert  <eggert@twinsun.com>
21210
21211         * lib/getndelim2.c (getndelim2): When size calculation overflows,
21212         ceiling the allocation at NMAX bytes rather than silently
21213         discarding input bytes before NMAX is reached.  This makes
21214         a difference only if NMAX exceeds SIZE_MAX / 2.
21215
21216         * lib/obstack.c: Merge from glibc.
21217         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
21218         Add libc_hidden_def (_obstack_newchunk).
21219         (_obstack_free) [! defined _LIBC]: Remove.
21220         [defined _LIBC]: Make a strong alias from obstack_free, rather than
21221         a clone of the function body.
21222         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
21223         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
21224
21225         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
21226         glibc.
21227         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
21228         arg to memcpy.
21229
21230         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
21231         (obstack_ptr_grow_fast, obstack_int_grow_fast):
21232         Don't use lvalue casts, as GCC plans to remove support for them
21233         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
21234         was also present in the non-GCC version, indicating that this
21235         code had always been buggy and had never been widely used.
21236         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
21237         Use the fast variant of each macro, rather than copying the
21238         definiens of the fast variant; that way, we'll be more likely to
21239         catch future bugs in the fast variants.
21240
21241 2003-10-20  Bruno Haible  <bruno@clisp.org>
21242
21243         * modules/wait-process: New file.
21244         * MODULES.html.sh (func_all_modules): Add wait-process.
21245
21246 2003-10-20  Bruno Haible  <bruno@clisp.org>
21247
21248         * m4/wait-process.m4: New file.
21249
21250 2003-10-20  Bruno Haible  <bruno@clisp.org>
21251
21252         * lib/wait-process.h: New file, from GNU gettext.
21253         * lib/wait-process.c: New file, from GNU gettext.
21254
21255 2003-10-19  Jim Meyering  <jim@meyering.net>
21256
21257         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
21258         HPUX 10.20.
21259
21260 2003-10-18  Karl Berry  <karl@gnu.org>
21261
21262         * config/config.guess: update from config.
21263
21264 2003-10-16  Paul Eggert  <eggert@twinsun.com>
21265
21266         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
21267         (getgroups): First arg is int, not size_t.
21268         Don't let 'free' mangle errno.
21269
21270 2003-10-16  Paul Eggert  <eggert@twinsun.com>
21271
21272         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
21273
21274 2003-10-16  Karl Berry  <karl@gnu.org>
21275
21276         * config/config.{guess,sub}: update from config.
21277
21278 2003-10-16  Jim Meyering  <jim@meyering.net>
21279
21280         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
21281         memcpy.
21282
21283 2003-10-15  Paul Eggert  <eggert@twinsun.com>
21284
21285         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
21286         (SIZE_MAX): Remove.
21287         (new_exclude, add_exclude_file): Initial size no longer needs to
21288         be a power of 2.
21289         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
21290         our own address arithmetic overflow checking.
21291
21292         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
21293         (fnmatch): Do not alloca more than 2000 wide characters;
21294         instead, use malloc for large buffers.
21295         Check for address arithmetic overflow, and return -1
21296         with errno set to ENOMEM in that case.
21297         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
21298         (NEW_PATTERN): Do not alloca more than 8000 bytes;
21299         instead, return -1.  Check for address arithmetic overflow.
21300
21301 2003-10-14  Paul Eggert  <eggert@twinsun.com>
21302
21303         Handle invalid suffixes and overflow independently, so that
21304         callers can treat them independently as needed.  Fix some bugs in
21305         suffix handling, e.g., "100k@" was not diagnosed as an invalid
21306         suffix for a human-readable blocksize.  The major caller-visible
21307         change is the addition of a new
21308         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
21309         that both overflow and suffix chars were found.
21310
21311         * lib/human.c (humblock): Don't check separately for invalid suffix
21312         char; that is xstrtoumax's job (now that its bug is fixed).
21313         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
21314         INTMAX_MAX]: New macros.
21315         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
21316         TYPE_MAXIMUM): New macros.
21317         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
21318         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
21319         if overflow occurs, as it's what __strtol does and it's more useful
21320         in practice.
21321         (__xstrtol): If __strtol reports some error other than ERANGE,
21322         reflect it to the caller as LONGINT_INVALID.  If it reports
21323         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
21324         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
21325         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
21326         value.
21327         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
21328         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
21329         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
21330         [defined UINTMAX_MAX]: New macros.
21331
21332 2003-10-14  Bruno Haible  <bruno@clisp.org>
21333
21334         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
21335
21336 2003-10-14  Bruno Haible  <bruno@clisp.org>
21337
21338         * m4/sig_atomic_t: New file, from GNU gettext.
21339         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
21340
21341 2003-10-14  Bruno Haible  <bruno@clisp.org>
21342
21343         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
21344         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
21345         Also use volatile where needed.
21346
21347 2003-10-12  Paul Eggert  <eggert@twinsun.com>
21348
21349         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
21350         Change maintainer from Bruno Haible to 'all'.
21351
21352 2003-10-12  Paul Eggert  <eggert@twinsun.com>
21353
21354         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
21355
21356 2003-10-12  Paul Eggert  <eggert@twinsun.com>
21357
21358         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
21359         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
21360         and define in terms of the other primitives.
21361         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
21362         (SIZE_MAX): Define if not already defined.
21363         (array_size_overflow): New function.
21364         (xalloc_die): Abort instead of exiting if 'error' returns.
21365         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
21366         (xmalloc, xrealloc): Use them.
21367         (xcalloc): Check for address arithmetic overflow.
21368         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
21369         a bit faster than strcpy.
21370
21371 2003-10-10  Simon Josefsson  <jas@extundo.com>
21372
21373         * modules/argp (Depends-on): Add restrict and strcase.
21374
21375 2003-10-10  Simon Josefsson  <jas@extundo.com>
21376
21377         * m4/argp.m4: Add AC_C_INLINE.
21378
21379 2003-10-08  Paul Eggert  <eggert@twinsun.com>
21380
21381         Merge getpass from libc, plus a few fixes.
21382
21383         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
21384         Include <stdbool.h>.
21385         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
21386         __fsetlocking to empty.
21387         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
21388         do include <bits/libc-lock.h>.
21389         Do not include <fcntl.h>; not needed.
21390         [_LIBC]: Include <wchar.h>.
21391         (NOTCANCEL_MODE): New macro.
21392         (flockfile, funlockfile) [_LIBC]: New macros.
21393         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
21394         [!_LIBC]: New macros.
21395         (call_fclose): New function.
21396         (getpass): Use it.  Save tty stream separately; this simplifies the
21397         code and makes it more reliable if stdin happens to equal stdout.
21398         Invoke __fsetlocking on tty.
21399         Handle thread cancellation if needed.
21400         Namespace cleanup (use __tcgetattr, __getline).
21401         Use bool for Booleans.
21402         [USE_IN_LIBIO]: Handle wide streams.
21403         [!_LIBC]: Unconditionally do the fseek, since we don't know what
21404         stream might go where.
21405
21406         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
21407         doesn't have to include <stdio.h> before us.
21408         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
21409         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
21410         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
21411         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
21412         if not declared, so that we can use getpass.c code from libc without
21413         rewriting it.
21414         (flockfile, ftrylockfile, funlockfile): New macros.
21415
21416 2003-10-08  Paul Eggert  <eggert@twinsun.com>
21417
21418         * modules/getpass: Depend on stdbool.
21419
21420 2003-10-08  Paul Eggert  <eggert@twinsun.com>
21421
21422         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
21423
21424 2003-10-07  Karl Berry  <karl@gnu.org>
21425
21426         * config/config.{guess,sub}: update from config.
21427
21428 2003-10-06  Jim Meyering  <jim@meyering.net>
21429             Bruno Haible  <bruno@clisp.org>
21430
21431         This lets translators provide better translations for the
21432         "Written by ..." part of --version output.
21433         * lib/version-etc.h: Include stdarg.h.
21434         (version_etc_copyright): Declare as readonly.
21435         (version_etc): Make this function variadic with a NULL-terminated list
21436         of author name strings.
21437         (version_etc_va): New declaration.
21438         * lib/version-etc.c: Include stdarg.h, stdlib.h.
21439         (version_etc_copyright): Declare as readonly.
21440         (version_etc_va): New function. Provide a different translatable string
21441         for each possible number of authors < 10. Abbreviate when there are 10
21442         authors or more.
21443         (version_etc): Make this function variadic. Call version_etc_va.
21444         Suggestion from Gary V. Vaughan.
21445
21446         * lib/long-options.h (parse_long_options): Change prototype: the
21447         authors string is moved to the end and becomes variadic.
21448         * lib/long-options.c: Include stdarg.h.
21449         (parse_long_options): Make this function variadic, too.
21450         Call version_etc_va, not version_etc.
21451
21452 2003-10-06  Bruno Haible  <bruno@clisp.org>
21453
21454         * modules/version-etc-2: Remove file.
21455         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
21456
21457 2003-10-06  Bruno Haible  <bruno@clisp.org>
21458
21459         * modules/fatal-signal: New file.
21460         * MODULES.html.sh (func_all_modules): Add fatal-signal.
21461
21462 2003-10-06  Bruno Haible  <bruno@clisp.org>
21463
21464         * m4/fatal-signal.m4: New file.
21465         * m4/signalblocking.m4: New file, from GNU gettext.
21466
21467 2003-10-06  Bruno Haible  <bruno@clisp.org>
21468
21469         * lib/version-etc-2.h: Remove file.
21470         * lib/version-etc-2.c: Remove file.
21471
21472 2003-10-06  Bruno Haible  <bruno@clisp.org>
21473
21474         * lib/fatal-signal.h: New file, from GNU gettext.
21475         * lib/fatal-signal.c: New file, from GNU gettext.
21476
21477 2003-10-05  Paul Eggert  <eggert@twinsun.com>
21478
21479         * README: Rework advice for preventing empty .o files.
21480         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
21481         not <sys/types.h>.
21482
21483 2003-10-04  Karl Berry  <karl@gnu.org>
21484
21485         * lib/argp*: update from libc.
21486
21487 2003-10-04  Karl Berry  <karl@gnu.org>
21488
21489         * config/config.{guess,sub}: update from config.
21490
21491 2003-10-02  Bruno Haible  <bruno@clisp.org>
21492
21493         * modules/lchown (Include): Add lchown.h.
21494         * modules/time_r (Include): Use "..." syntax.
21495         * modules/xgetdomainname (Include): Add xgetdomainname.h.
21496
21497 2003-10-01  Simon Josefsson  <jas@extundo.com>
21498
21499         * MODULES.html.sh (func_all_modules): Move gethostname from section
21500         'based on' to section 'lacking' POSIX:2001.
21501
21502 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
21503
21504         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
21505         to output mode on the same stream.
21506
21507 2003-09-29  Paul Eggert  <eggert@twinsun.com>
21508
21509         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
21510         Fix arg typo in previous patch.
21511
21512 2003-09-28  Jim Meyering  <jim@meyering.net>
21513
21514         * lib/error.c: Correct cpp indentation.
21515
21516 2003-09-27  Paul Eggert  <eggert@twinsun.com>
21517
21518         * modules/free: New file.
21519
21520 2003-09-27  Paul Eggert  <eggert@twinsun.com>
21521
21522         * m4/free.m4: New file.
21523
21524 2003-09-27  Paul Eggert  <eggert@twinsun.com>
21525
21526         * lib/minmax.h (MIN, MAX)
21527         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
21528         Omit the special code that used __typeof__, since we worry that
21529         it could be more trouble than it's worth.  See:
21530         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
21531         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
21532
21533         * lib/free.c: New file.
21534
21535 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
21536
21537         Trivial fixes to Makefile.am parts of module listings.
21538         * modules/strstr: Append strstr.h to lib_SOURCES.
21539         * modules/strcase: Likewise, for strcase.h.
21540
21541 2003-09-27  Karl Berry  <karl@gnu.org>
21542
21543         * config/mkinstalldirs: update from automake.
21544
21545 2003-09-26  Paul Eggert  <eggert@twinsun.com>
21546
21547         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
21548         (error_tail): Do not loop, reallocating temporary buffer, since
21549         the output cannot contain more wide characters than the input
21550         contains bytes, the size must be big enough already.  This avoids
21551         one potential size overflow calculation.  Check for size overflow
21552         when calculating temporary buffer size.  Free temporary buffer
21553         when done, if it was allocated with malloc; this plugs a memory
21554         leak.  Remove casts from void * to pointers, that are no longer
21555         needed now that we're assuming C89 or better.
21556
21557         Merge error changes from glibc.
21558
21559         * lib/error.c, error.h: Update copyright notice header to match glibc.
21560         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
21561         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
21562         Disable cancellation while printing error.
21563         * lib/error.h: Prepend __ to parameter names.
21564
21565 2003-09-26  Jim Meyering  <jim@meyering.net>
21566
21567         * lib/error.c (error_tail): Move some declarations
21568         into inner scope where the local variables are used.
21569
21570 2003-09-26  Bruno Haible  <bruno@clisp.org>
21571
21572         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
21573         stpncpy().
21574         Don't define stpncpy through config.h; it's now done through stpncpy.h.
21575
21576 2003-09-26  Bruno Haible  <bruno@clisp.org>
21577
21578         * lib/stpncpy.h (gnu_stpncpy): New declaration.
21579         (stpncpy): Define as alias for gnu_stpncpy.
21580         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
21581
21582 2003-09-25  Simon Josefsson  <jas@extundo.com>
21583
21584         * lib/xgetdomainname.h: New file.
21585         * lib/xgetdomainname.c: New file.
21586
21587 2003-09-25  Simon Josefsson  <jas@extundo.com>
21588             Bruno Haible  <bruno@clisp.org>
21589
21590         * modules/getdomainname: New file.
21591         * modules/xgetdomainname: New file.
21592         * MODULES.html.sh (func_all_modules): Add getdomainname,
21593         xgetdomainname.
21594
21595 2003-09-25  Simon Josefsson  <jas@extundo.com>
21596             Bruno Haible  <bruno@clisp.org>
21597
21598         * m4/getdomainname.m4: New file.
21599
21600 2003-09-25  Simon Josefsson  <jas@extundo.com>
21601             Bruno Haible  <bruno@clisp.org>
21602
21603         * lib/getdomainname.h: New file.
21604         * lib/getdomainname.c: New file.
21605
21606 2003-09-25  Karl Berry  <karl@gnu.org>
21607
21608         * lib/argp-fmtstream.c, argp-help.c: update from libc.
21609
21610 2003-09-25  Karl Berry  <karl@gnu.org>
21611
21612         * config/install-sh: update from automake.
21613
21614 2003-09-25  Bruno Haible  <bruno@clisp.org>
21615
21616         * modules/version-etc-2: New file, from modules/version-etc with
21617         modifications.
21618         * MODULES.html.sh (func_all_modules): Add version-etc-2.
21619
21620 2003-09-25  Bruno Haible  <bruno@clisp.org>
21621
21622         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
21623         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
21624
21625 2003-09-24  Simon Josefsson  <jas@extundo.com>
21626
21627         * modules/xgethostname: Add xgethostname.h.
21628
21629 2003-09-24  Paul Eggert  <eggert@twinsun.com>
21630
21631         * lib/linebuffer.c (freebuffer): Don't free the argument, just
21632         the buffer associated with the argument.  Bug reported by
21633         Simon Josefsson.
21634
21635 2003-09-24  Paul Eggert  <eggert@twinsun.com>
21636
21637         * README: Document assumptions that 'int' is at least 32 bits
21638         wide, that integer arithmetic is 2's complement without overflow,
21639         that there are no holes in integer values, that adding sizes of
21640         two nonoverlapping objects can't overflow, and that all-bits-zero
21641         yields scalar zero.  Fix spelling and capitalization typos.
21642
21643 2003-09-19  Karl Berry  <karl@gnu.org>
21644
21645         * lib/argp.h: update from libc.
21646
21647 2003-09-17  Paul Eggert  <eggert@twinsun.com>
21648
21649         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
21650         to avoid spurious warnings like "AC_RUN_IFELSE was called before
21651         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
21652
21653 2003-09-17  Paul Eggert  <eggert@twinsun.com>
21654
21655         * gnulib-tool: Use "test -h", not "test -L", for portability
21656         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
21657         (tags_regexp): Remove, since \| doesn't conform to POSIX.
21658         (sed_extract_prog): Issue s commands one-by-one, rather than
21659         using \| in one s command.
21660
21661 2003-09-16  Paul Eggert  <eggert@twinsun.com>
21662
21663         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
21664         input error, instead of returning NULL the next time we are called
21665         (and therefore losing track of errno).
21666
21667 2003-09-16  Bruno Haible  <bruno@clisp.org>
21668
21669         * gnulib-tool (func_create_testdir): Warn about duplicated
21670         dependencies.
21671
21672 2003-09-15  Paul Eggert  <eggert@twinsun.com>
21673
21674         * modules/argmatch, modules/fatal, modules/obstack,
21675         modules/xalloc, modules/xgethostname: Sort dependencies by
21676         importance, not alphabetically.
21677
21678 2003-09-15  Paul Eggert  <eggert@twinsun.com>
21679
21680         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
21681         fails, so that the caller gets the proper errno.
21682
21683         * lib/readutmp.c (read_utmp): Likewise.
21684         Check for fstat error.  Close stream and free storage
21685         when failing.
21686
21687 2003-09-14  Karl Berry  <karl@gnu.org>
21688
21689         * config/srclist.txt (strdup.c): disable for c89 changes.
21690
21691 2003-09-14  Jim Meyering  <jim@meyering.net>
21692
21693         * lib/getloadavg.c: Correct cpp indentation.
21694         * lib/strdup.c: Likewise.
21695         * lib/vasnprintf.c: Likewise.
21696
21697 2003-09-14  Bruno Haible  <bruno@clisp.org>
21698
21699         * modules/fwriteerror: New file.
21700         * MODULES.html.sh (func_all_modules): Add fwriteerror.
21701
21702 2003-09-14  Bruno Haible  <bruno@clisp.org>
21703
21704         * lib/fwriteerror.h: New file.
21705         * lib/fwriteerror.c: New file.
21706
21707 2003-09-12  Paul Eggert  <eggert@twinsun.com>
21708
21709         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
21710         modules/xgethostname, modules/xalloc: Depend on exit.
21711
21712 2003-09-12  Paul Eggert  <eggert@twinsun.com>
21713
21714         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
21715
21716         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
21717         and AC_MINIX, too, so that their extensions are available.
21718
21719         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
21720         This macro has been superseded by gl_BACKUPFILE.
21721
21722         More patches to assume C89 or better.
21723
21724         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
21725
21726         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
21727         unconditionally.
21728         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
21729         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
21730         Include <string.h>, <stdlib.h> unconditionally.
21731         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
21732         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
21733         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
21734         headers or for string.h.
21735         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
21736         or strtoul.
21737
21738         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
21739         headers.
21740         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
21741         * m4/userspec.m4 (gl_USERSPEC): Likewise.
21742         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
21743         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
21744         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
21745         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
21746         memcpy, memset.
21747         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
21748         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
21749         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
21750         strtol.
21751         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
21752         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
21753         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
21754         strtoul.
21755
21756 2003-09-12  Paul Eggert  <eggert@twinsun.com>
21757
21758         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
21759         * lib/obstack.c [!defined _LIBC]: Likewise.
21760         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
21761         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
21762         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
21763
21764         More changes to assume C89 or better.
21765
21766         * lib/error.c (error_tail): Assume vprintf.
21767
21768         * lib/argmatch.c (getenv): Remove decl.
21769         * lib/progreloc.c (get_full_program_name): Define via prototype.
21770         * lib/setenv.c (clearenv): Likewise.
21771         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
21772         needed.
21773         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
21774         (malloc, memcpy): Remove decls.
21775         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
21776         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
21777         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
21778         (memcpy): Remove macro.
21779         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
21780         (__P): Remove.  All uses removed.
21781         (PTR): Remove.  All uses changed to void *.
21782         (CHAR_BIT, NULL): Remove.
21783         (spaces, zeros, memset_space, memset_zero)
21784         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
21785         Remove.
21786         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
21787         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
21788         Define with prototype.
21789         Remove now-unnecessary prototype decl.
21790         (extra_args_spec): Assume ANSI C.  All uses changed.
21791         (extra_args_spec_iso): Remove.
21792         (my_strftime, emacs_strftimeu): Define via prototype.
21793         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
21794         unconditionally.
21795         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
21796         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
21797         (strtoul, strtol): Remove decls.
21798         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
21799         LONG_MAX): Remove.
21800         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
21801         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
21802         (LOCALE_PARAM_PROTO): New macro.
21803         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
21804         (INTERNAL (strtol), strtol): Define with a prototype.
21805         (PARAMS): Remove.  All uses removed.
21806         * lib/tempname.c: Include <string.h> unconditionally.
21807         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
21808         * lib/xgethostname.c (main): Define with a prototype.
21809         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
21810         Include <stdlib.h> unconditionally.
21811         (calloc, malloc, realloc, free): Remove decls.
21812         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
21813         Include <stdlib.h> unconditionally.  Sort include file names.
21814         (strtod): Remove.
21815         (xstrtod): Define with a prototype.
21816         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
21817         (strtol, strtoul): Remove decls.
21818
21819 2003-09-11  Paul Eggert  <eggert@twinsun.com>
21820
21821         More patches to assume C89 or better.
21822         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
21823         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
21824         string.h, memchr, STDC_HEADERS.
21825
21826 2003-09-11  Paul Eggert  <eggert@twinsun.com>
21827
21828         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
21829         Include <stdlib.h>, <string.h> unconditionally.
21830         Remove now-unnecessary cast to char *.
21831         * lib/strnlen.c: Include <string.h> unconditionally.
21832         * lib/yesno.c (yesno): Define with a prototype.
21833
21834 2003-09-11  Bruno Haible  <bruno@clisp.org>
21835
21836         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
21837
21838 2003-09-10  Jim Meyering  <jim@meyering.net>
21839
21840         * lib/error.c: Correct indentation of cpp directives.
21841
21842 2003-09-10  Bruno Haible  <bruno@clisp.org>
21843
21844         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
21845         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
21846         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
21847         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
21848         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
21849         <stdlib.h> and <string.h> checks.
21850         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
21851         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
21852
21853 2003-09-10  Bruno Haible  <bruno@clisp.org>
21854
21855         * lib/strcspn.c: Include <string.h> unconditionally.
21856         * lib/strpbrk.c: Include <string.h> unconditionally.
21857         * lib/strstr.c: Include <string.h> unconditionally.
21858         * lib/unicodeio.c: Include <string.h> unconditionally.
21859         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
21860         * lib/unsetenv.c: Likewise.
21861         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
21862         * lib/yesno.c: Include <stdlib.h> unconditionally.
21863         (rpmatch): Add prototype.
21864
21865 2003-09-09  Paul Eggert  <eggert@twinsun.com>
21866
21867         More patches to assume C89 or better.
21868         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
21869         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
21870         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
21871         or for string.h.
21872         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
21873         stdlib.h.
21874         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
21875         C headers.
21876         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
21877         string.h.
21878         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
21879         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
21880         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
21881         or for string.h.
21882         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
21883         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
21884         C headers.
21885         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
21886         memcpy.
21887         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
21888         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
21889         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
21890         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
21891         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
21892         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
21893         string.h, free.
21894         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
21895         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
21896         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
21897         C headers, or for string.h.
21898         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
21899         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
21900         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
21901         headers, memory.h, stdlib.h, string.h, strings.h.
21902         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
21903         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
21904         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
21905         strchr.
21906         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
21907         headers, memory.h, string.h.
21908         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
21909         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
21910         free.
21911         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
21912         headers.
21913         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
21914         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
21915         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
21916         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
21917         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
21918
21919 2003-09-09  Paul Eggert  <eggert@twinsun.com>
21920
21921         More K&R removal.
21922
21923         * lib/acosl.c (main): Use a prototype.
21924         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
21925         tanl.c: Likewise.
21926
21927         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
21928
21929         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
21930         (getopt, etopt_long, getopt_long_only, _getopt_internal)
21931         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
21932         with a prototype.
21933         * lib/getopt.c (const): Remove macro.
21934         Include <string.h> unconditionally.
21935         (my_index): Remove; all uses changed to strchr.
21936         (strlen): Remove decl.
21937         (exchange): Remove forward decl; no longer needed.
21938         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
21939         Define with prototype.
21940         * lib/getopt1.c (const): Remove macro.
21941         (getopt_long, getopt_long_only, main): Define with prototype.
21942
21943         * lib/getugroups.c: Include <string.h> unconditionally.
21944
21945         * lib/getusershell.c: Include <stdlib.h> unconditionally.
21946         (getusershell, setusershell, endusershell, readname, main):
21947         Define with prototypes.
21948
21949         * lib/group-member.c: Include group-member.h first.
21950         Include <stdlib.h> unconditionally.
21951
21952         * lib/hard-locale.c: Include hard-locale.h first.
21953         Include <stdlib.h>, <string.h> unconditionally.
21954
21955         * lib/hash.c (free, malloc): Remove decls.
21956         Include <stdlib.h> unconditionally.
21957
21958         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
21959         (getenv): Do not declare.
21960
21961         * lib/idcache.c: Include <string.h> unconditionally.
21962
21963         * lib/long-options.c: Include long-options.h first, to test interface.
21964         Include <stdlib.h> unconditionally.
21965
21966         * lib/makepath.c: Include makepath.h first, to test interface.
21967         Include <stdlib.h> and <string.h> unconditionally.
21968
21969         * lib/linebuffer.c: Include <stdlib.h>.
21970         (free): Remove decl.
21971
21972         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
21973         stddef.h. rpl_malloc returns void *, not char *.
21974         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
21975         prototype.
21976
21977         * lib/md5.h: Include <limits.h> unconditionally.
21978         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
21979         (__P): Remove; all uses removed.
21980         * lib/md5.c: Include "md5.h" first.
21981         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
21982         md5_buffer, md5_process_bytes, md5_process_block):
21983         Define with prototypes.
21984         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
21985         * lib/sha.c: Include "sha.h" first.
21986         Include <stdlib.h>, <string.h> unconditionally.
21987
21988         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
21989         * lib/memcmp.c (__ptr_t): Likewise.
21990         * lib/memrchr.c (__ptr_t): Likewise.
21991         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
21992         Include <string.h> unconditionally.
21993         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
21994         * lib/memchr.c: Include <stdlib.h> unconditionally.
21995         * lib/memchr.c (LONG_MAX): Remove.
21996         * lib/memrchr.c (LONG_MAX): Likewise.
21997         * lib/memchr.c (__memchr): Define via a prototype.
21998         * lib/memrchr.c (__memrchr): Likewise.
21999         * lib/memcmp.c (__P): Remove, and remove all uses.
22000         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
22001         Remove forward decls; no longer needed.
22002         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
22003         Use types required by C89 in prototype.
22004
22005         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
22006         * lib/savedir.c: Likewise.
22007         * lib/mkdir.c (free): Remove decl.
22008         * lib/rmdir.c (rmdir): Define with a prototype.
22009         * lib/savedir.c: Include savedir.h first, to test interface.
22010
22011         * lib/mktime.c (STDC_HEADERS): Remove.
22012         Include <stdlib.h>, <string.h> unconditionally.
22013
22014         * lib/modechange.c: Include <stdlib.h> unconditionally.
22015         (malloc): Remove decl.
22016
22017         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
22018         (free): Remove decl.
22019
22020         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
22021         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
22022         (This type really should be intptr_t, but that's a C99ism.)
22023         (_obstack_memcpy): Remove: all uses changed to memcpy.
22024         Include <string.h> unconditionally.
22025         (struct obstack): Assume __STDC__ for types of members
22026         chunkfun, freefun, extra_arg.
22027         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
22028         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
22029         obstack_begin, obstack_specify_allocation,
22030         obstack_specify_allocation_with_arg, obstack_chunkfun,
22031         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
22032         Remove unprototyped decls and the macros that use them.
22033         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
22034         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
22035         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
22036         (defined __STDC__ && __STDC__)]:
22037         Remove nonprototyped code.
22038         Include <stdlib.h> unconditionally.
22039         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
22040         _obstack_allocated_p, _obstack_free, obstack_free,
22041         _obstack_memory_used, print_and_abort):
22042         Define using prototypes.
22043         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
22044         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
22045         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
22046         obstack_next_free, obstack_object_size, obstack_room) [0]:
22047         Remove unused, unprototyped code.
22048
22049         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
22050
22051         * lib/physmem.c (physmem_total, physmem_available, main): Define
22052         with prototypes.
22053
22054         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
22055         (main): Define with a prototype.
22056
22057         * lib/posixver.c (getenv): Remove decl.
22058
22059         * lib/putenv.c (malloc): Returns void *, not char *.
22060         Include <string.h> unconditionally.
22061         (strchr, memcpy, NULL): Do not define.
22062
22063         * lib/readtokens.c: Include readtokens.h first, to test interface.
22064         Include <stdlib.h>, <string.h> unconditionally.
22065         (init_tokenbuffer): Define with a prototype.
22066
22067         * lib/regex.c (PARAMS): Remove.  All uses removed.
22068         All uses of _RE_ARGS removed, too.
22069         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
22070         unconditionally.
22071         (bzero): Assume memset exists.
22072         (memcmp, memcpy, NULL): Remove.
22073         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
22074         char, or assignments to local vars of type signed char.
22075         (init_syntax_once, PREFIX(extract_number_and_incr),
22076         PREFIX(print_partial_compiled_pattern),
22077         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
22078         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
22079         PREFIX(regex_grow_registers), PREFIX(regex_compile),
22080         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
22081         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
22082         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
22083         wcs_compile_range, byte_compile_range, truncate_wchar,
22084         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
22085         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
22086         count_mbs_length, wcs_re_match_2_internal,
22087         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
22088         PREFIX(alt_match_null_string_p),
22089         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
22090         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
22091         regfree, PREFIX(extract_number)): Define with prototype.  Remove
22092         now-unnecessary declaration, if any.
22093         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
22094         regcomp, regexec):
22095         Remove now-unnecessary casts among pointer types.
22096         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
22097
22098         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
22099         (free): Remove decl.
22100
22101         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
22102
22103         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
22104         (free): Remove decl.
22105
22106         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
22107         * lib/xgetcwd.c: Likewise.
22108
22109         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
22110         (free): Remove decl.
22111
22112         * lib/strchrnul.c (strchrnul): Define with a prototype.
22113         Fix bug: c_in was not converted to char before searching.
22114
22115         The following changes are not K&R related:
22116
22117         * lib/group-member.h: Include <sys/types.h>, so that this file is
22118         self-contained.
22119         * lib/makepath.h: Likewise.
22120
22121         * lib/getusershell.c (readname, default_index, line_size, readname):
22122         Use size_t, not int, for sizes.
22123         (readname): If the size overflows, report an error instead of
22124         looping forever.
22125
22126 2003-09-09  Paul Eggert  <eggert@twinsun.com>
22127
22128         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
22129         libc.
22130
22131 2003-09-09  Paul Eggert  <eggert@twinsun.com>
22132
22133         * README: New section: portability guidelines.
22134
22135 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
22136
22137         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
22138         C89 spec.
22139
22140 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
22141
22142         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
22143
22144 2003-09-08  Paul Eggert  <eggert@twinsun.com>
22145
22146         Assume C89 or better; remove K&R cruft.
22147         A few of these changes were first proposed by Derek Robert Price
22148         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
22149
22150         * lib/addext.c: Include <string.h> unconditionally.
22151         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
22152         Don't declare getenv or malloc.
22153
22154         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
22155         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
22156         (NULL): Remove.
22157         (find_stack_direction, alloca): Use prototypes.
22158
22159         * lib/atexit.c (atexit): Define using a prototype.
22160
22161         * lib/basename.c, dirname.c, stripslash.c:
22162         Include <string.h> unconditionally.
22163
22164         * lib/bcopy.c: Include <stddef.h>.
22165         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
22166
22167         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
22168
22169         * lib/error.h (error, error_at_line, error_print_progname)
22170         [! (defined (__STDC__) && __STDC__)]: Remove decls.
22171         * lib/error.c: Include error.h first, to check interface.
22172         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
22173         (VA_START): Remove; all uses changeed to va_start.
22174         (exit, strerror): Remove decls.
22175         (error_print_progname): Prototype uncondionally.
22176         Don't include <errno.h>; no longer needed.
22177         (private_strerror): Remove.
22178         (error_tail): Always define.
22179         (error, error_at_line): Assume C89 or better; always use prototypes.
22180         * lib/fatal.c: Include "fatal.h" first, to test interface.
22181         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
22182         (VA_START): Remove; all uses changed to va_start.
22183         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
22184         this case.
22185         (exit): Remove decl.
22186         (fatal): Prototype unconditionally.  Assume va_start works.
22187         Abort at end, to pacify gcc.
22188
22189         * lib/euidaccess.c (main): Define with a prototype.
22190
22191         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
22192
22193         * lib/exitfail.c: Include <stdlib.h> unconditionally.
22194
22195         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
22196         prototypes.
22197         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
22198         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
22199         (getenv): Remove decl.
22200         (fnmatch): Define using a prototype.
22201         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
22202         (FCT): Define using a prototype.
22203
22204         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
22205
22206         * lib/gethostname.c: Include <stddef.h>.
22207         (gethostname): Define with prototype.  Length is size_t, not int.
22208
22209 2003-09-08  Paul Eggert  <eggert@twinsun.com>
22210
22211         Assume C89 or better; remove K&R cruft.
22212         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
22213         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
22214         string.h, getenv, malloc.
22215         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
22216         headers.
22217         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
22218         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
22219         do not check for strerror.
22220         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
22221         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
22222         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
22223         do not check for doprnt or vprintf.
22224         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
22225         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
22226
22227 2003-09-08  Paul Eggert  <eggert@twinsun.com>
22228
22229         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
22230         getversion.c should have been removed then, but was accidentally
22231         preserved.
22232
22233         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
22234         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
22235
22236 2003-09-08  Karl Berry  <karl@gnu.org>
22237
22238         * config/config.sub, config.guess, srclistvars.sh: update from savannah
22239                 config, forget about prep.
22240
22241         * config/depcomp, missing: update from automake.
22242
22243 2003-09-07  Paul Eggert  <eggert@twinsun.com>
22244
22245         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
22246         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
22247
22248 2003-09-07  Paul Eggert  <eggert@twinsun.com>
22249
22250         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
22251         copy_tm_result.  Bug reported by Simon Josefsson in
22252         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
22253
22254 2003-09-06  Paul Eggert  <eggert@twinsun.com>
22255
22256         * m4/time_r.m4: New file.
22257         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
22258         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
22259         is. Check for timegm declaration.
22260         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
22261         Do not check for gmtime_r.
22262         Replace mktime if __mktime_internal does not exist and if mktime
22263         hasn't been replaced already.
22264
22265 2003-09-06  Paul Eggert  <eggert@twinsun.com>
22266
22267         * lib/time_r.c, lib/time_r.h: New files.
22268
22269         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
22270         __localtime_r.
22271         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
22272         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
22273
22274         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
22275         __gmtime_r.
22276         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
22277         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
22278         Include <time_r.h>.
22279
22280         * lib/timegm.c: Switch to glibc implementation, with the following
22281         changes:
22282         [defined HAVE_CONFIG_H]: Include <config.h>.
22283         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
22284         (__mktime_internal) [!defined _LIBC]: New decl.
22285         (__gmtime_r) [!defined _LIBC]: New macro and function.
22286         (timegm): Use a prototype, since gnulib assumes C89.
22287         Do not bother declaring tmp to be const, as it's not really usefu.
22288         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
22289         (timegm): Declare only if HAVE_DECL_TIMEGM.
22290
22291 2003-09-06  Paul Eggert  <eggert@twinsun.com>
22292
22293         * MODULES.html.sh (func_all_modules): Add time_r.
22294         * modules/time_r: New file.
22295         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
22296         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
22297
22298 2003-09-03  Paul Eggert  <eggert@twinsun.com>
22299
22300         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
22301         Bug reported by Lute Kamstra in
22302         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
22303
22304         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
22305         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
22306         course with correspondingly smaller numbers for tomorrow and
22307         yesterday.  From Tadayoshi Funaba.  Originally installed into
22308         sh-utils on 1999-08-07, but the patch got lost (I guess during the
22309         coreutils merge?).
22310
22311 2003-08-31  Simon Josefsson  <jas@extundo.com>
22312
22313         * modules/timegm: New file.
22314         * MODULES.html.sh (func_all_modules): Add timegm.
22315
22316 2003-08-31  Simon Josefsson  <jas@extundo.com>
22317
22318         * m4/timegm.m4: New file.
22319
22320 2003-08-31  Simon Josefsson  <jas@extundo.com>
22321
22322         * lib/timegm.h: New file.
22323         * lib/timegm.c: New file.  Based on
22324         wget-1.8.2/src/http.c:mktime_from_utc.
22325
22326 2003-08-31  Karl Berry  <karl@gnu.org>
22327
22328         * lib/argp.h: update from libc.
22329
22330 2003-08-28  Bruno Haible  <bruno@clisp.org>
22331
22332         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
22333         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
22334         followed by '#define fnmatch fnmatch_posix' gives an error.
22335
22336 2003-08-28  Bruno Haible  <bruno@clisp.org>
22337
22338         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
22339         warning on QNX, which defines O_BINARY to 000000.
22340
22341 2003-08-27  Jim Meyering  <jim@meyering.net>
22342
22343         * m4/mkstemp.m4: Require that the system mkstemp be able to create
22344         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
22345         would fail after 32.  Reported by Danny Levinson.  Details here:
22346         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
22347
22348 2003-08-24  Bruno Haible  <bruno@clisp.org>
22349
22350         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
22351         MSVC7 <stdio.h> is included later.
22352
22353 2003-08-22  Simon Josefsson  <jas@extundo.com>
22354
22355         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
22356
22357 2003-08-20  Karl Berry  <karl@gnu.org>
22358
22359         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
22360
22361 2003-08-20  Bruno Haible  <bruno@clisp.org>
22362
22363         * modules/progname: New file.
22364         * MODULES.html.sh (func_all_modules): Add progname.
22365
22366 2003-08-20  Bruno Haible  <bruno@clisp.org>
22367
22368         * lib/progname.h: New file, from GNU gettext.
22369         * lib/progname.c: New file, from GNU gettext.
22370         * lib/progreloc.c: New file, from GNU gettext.
22371
22372 2003-08-19  Jim Meyering  <jim@meyering.net>
22373
22374         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
22375         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
22376
22377 2003-08-19  Bruno Haible  <bruno@clisp.org>
22378
22379         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
22380         more.
22381
22382 2003-08-19  Bruno Haible  <bruno@clisp.org>
22383
22384         * lib/xstrdup.c: Assume <string.h> exists.
22385
22386 2003-08-18  Paul Eggert  <eggert@twinsun.com>
22387
22388         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
22389         in makefile rules.
22390
22391 2003-08-18  Jim Meyering  <jim@meyering.net>
22392
22393         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
22394         * m4/lib-ld.m4: Likewise.
22395
22396 2003-08-18  Jim Meyering  <jim@meyering.net>
22397
22398         * lib/setenv.h: Indent nested cpp directive.
22399         * lib/vasnprintf.c: Remove trailing blanks.
22400
22401 2003-08-17  Simon Josefsson  <jas@extundo.com>
22402
22403         * modules/xstrndup: New file.
22404         * MODULES.html.sh (func_all_modules): Add xstrndup.
22405
22406 2003-08-17  Simon Josefsson  <jas@extundo.com>
22407
22408         * modules/argp: Fix autoconf macro name. Add more dependencies.
22409
22410 2003-08-17  Simon Josefsson  <jas@extundo.com>
22411
22412         * m4/xstrndup.m4: New file.
22413
22414 2003-08-17  Simon Josefsson  <jas@extundo.com>
22415
22416         * m4/argp.m4: New file.
22417
22418 2003-08-17  Simon Josefsson  <jas@extundo.com>
22419             Bruno Haible  <bruno@clisp.org>
22420
22421         * lib/xstrndup.h: New file.
22422         * lib/xstrndup.c: New file.
22423
22424 2003-08-17  Bruno Haible  <bruno@clisp.org>
22425
22426         * modules/strndup (Files, Include): Add lib/strndup.h.
22427
22428 2003-08-17  Bruno Haible  <bruno@clisp.org>
22429
22430         * modules/euidaccess (Files): Add lib/euidaccess.h.
22431
22432 2003-08-17  Bruno Haible  <bruno@clisp.org>
22433
22434         * lib/strndup.h: New file.
22435
22436 2003-08-17  Bruno Haible  <bruno@clisp.org>
22437
22438         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
22439         like AC_GNU_SOURCE.
22440         * modules/extensions (configure.ac): Comment out the invocation of
22441         gl_USE_SYSTEM_EXTENSIONS.
22442
22443 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22444
22445         Merges from coreutils, etc.
22446         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
22447         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
22448         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
22449         fixing a typo.
22450         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
22451         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
22452
22453 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22454
22455         Document merge from coreutils.
22456         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
22457         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
22458         * modules/utime: Add m4/utimes-null.m4.
22459
22460 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22461
22462         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
22463         space, undoing this 2003-08-12 change:
22464         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
22465
22466 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22467
22468         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
22469         strtoul.c from libc, undoing this 2003-08-12 change:
22470         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
22471
22472 2003-08-16  Jim Meyering  <jim@meyering.net>
22473
22474         Merges from coreutils.
22475         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
22476         prefix.  Adjust cache variables similarly.  Create 500 rather than
22477         just 300 files, to exercise bug on Darwin6.5, too.
22478         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
22479         $missing_dir.
22480         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
22481         AM_SYS_POSIX_TERMIOS.
22482         Reported by mkc@mathdogs.com.
22483         Also change use of $am_cv_sys_posix_termios
22484         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
22485         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
22486         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
22487         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
22488         in /proc/mounts until it finds one with matching device number.  This
22489         is unnecessary when the FILE argument *is* a mount point.  No stat call
22490         is necessary in that case.  So, disable the statvfs-testing code on
22491         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
22492         as RedHat bug# 84846.
22493         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
22494         to 1MB, so as not to render systems with no stack size limit (e.g.,
22495         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
22496         Include <unistd.h>.  On some systems,
22497         it is required for the definition of _SC_PAGESIZE.
22498
22499 2003-08-16  Jim Meyering  <jim@meyering.net>
22500
22501         Merge from coreutils.
22502         * lib/xstrtoimax.c: #else #if -> #elif.
22503         * lib/xstrtoumax.c: Likewise.
22504
22505 2003-08-16  Jim Meyering  <jim@meyering.net>
22506
22507         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
22508         * m4/utimes.m4: Removed.
22509         * m4/utimes-null.m4: Renamed from utimes.m4.
22510
22511         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
22512         to 1MB, so as not to render systems with no stack size limit (e.g.,
22513         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
22514         Include <unistd.h>.  On some systems,
22515         it is required for the definition of _SC_PAGESIZE.
22516
22517 2003-08-16  Jim Meyering  <jim@meyering.net>
22518         and Paul Eggert  <eggert@cs.ucla.edu>
22519
22520         Merges from coreutils, etc.
22521
22522         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
22523         using the latest version from cvs.  This avoids problems with #line
22524         directives using a vendor (Sun) compiler.
22525         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
22526         Don't set GETGROUPS_LIB here; now it's
22527         done via getgroups.m4's wrapper function.
22528         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
22529         rather than just in sh-util/configure.in, so that the
22530         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
22531         same.
22532         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
22533         AC_FUNC_GETLOADAVG where to find getloadavg.c.
22534         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
22535         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
22536         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
22537         Remove code that is now done by the newly-required macros.
22538         Append $(EXEEXT) to DF_PROG.
22539         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
22540         Do not invoke or require the following here,
22541         since prereq.m4 or some gnulib .m4 now does this for us:
22542         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
22543         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
22544         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
22545         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
22546         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
22547         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
22548         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
22549         AC_FUNC_OBSTACK.
22550         Do not replace the following functions, as this is now the job
22551         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
22552         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
22553         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
22554         atexit getpass, strdup, getpagesize.
22555         Replace 'raise'.
22556         Do not check for the following functions, as this is now the job
22557         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
22558         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
22559         setregid.
22560         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
22561         Check for sys/sysctl.h.
22562         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
22563         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
22564         of checking for ssize_t ourselves.
22565
22566         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
22567         Require every macro that gnulib/modules/* suggests for us.
22568         (jm_PREREQ_ADDEXT): New macro.
22569         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
22570         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
22571
22572         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
22573         (gl_PHYSMEM): Use it.
22574         Also check for `table' function.
22575         Check for new headers and functions.
22576         Add check for sys/sysmp.h.
22577         With suggestions from Kaveh Ghazi.
22578         Ignore headers that are present but cannot be compiled.  This
22579         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
22580         C 5.4.
22581
22582 2003-08-15  Paul Eggert  <eggert@twinsun.com>
22583
22584         Document merge from coreutils.
22585         * modules/userspec: Depend on posixver.
22586         * modules/strftime: Depend on tzset.
22587
22588 2003-08-15  Paul Eggert  <eggert@twinsun.com>
22589
22590         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
22591         rather than tab, after '#' in shell-script copyright notices.
22592         Suggested by Bruno Haible.
22593
22594 2003-08-15  Paul Eggert  <eggert@twinsun.com>
22595
22596         * config/srclist-update: Use three spaces, rather than tab, after '#'
22597         in shell-script copyright notices.  Suggested by Bruno Haible.
22598         Remove unnecessary parenthesization in regular expression.
22599
22600 2003-08-15  Jim Meyering  <jim@meyering.net>
22601
22602         Merge from coreutils.
22603         * lib/xgethostname.c: Include <stdlib.h>.
22604         (xghostname): Don't exit for anything other than memory-related
22605         failure; just return NULL.
22606         * lib/userspec.c: Include "posixver.h".
22607         (parse_user_spec): Accept `.' as a separator only
22608         in pre-POSIX-200112 mode.
22609         * lib/strtoimax.c: Use #elif rather than #else #if.
22610         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
22611         Remove function, now that we can rely on a working tzset function.
22612         [!_LIBC]: Ensure that the required autoconf test has been run.
22613         [!defined _NL_CURRENT && HAVE_STRFTIME]:
22614         Use underlying_strftime for %r.
22615         * lib/sha.c: Merge in some clean-up and optimization changes from
22616         glibc.
22617         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
22618         Ensure that it is a multiple of 64.
22619         Rearrange loop exit tests so as to avoid performing an
22620         additional fread after encountering an error or EOF.
22621         * lib/realloc.c: Update copyright date.
22622
22623 2003-08-15  Jim Meyering  <jim@meyering.net>
22624         and Paul Eggert  <eggert@twinsun.com>
22625
22626         Merge from coreutils.
22627         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
22628         member but strut utmpx does not.  Needed for AIX 4.3.3.
22629         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
22630
22631 2003-08-15  Jim Meyering  <jim@meyering.net>
22632         and Paul Eggert  <eggert@cs.ucla.edu>
22633
22634         Merges from coreutils, etc.
22635         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
22636         Require gl_FUNC_TZSET_CLOBBER.
22637         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
22638         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
22639         members.
22640
22641 2003-08-14  Paul Eggert  <eggert@twinsun.com>
22642
22643         Help the merge from coreutils.
22644         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
22645         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
22646         * m4/tzset.m4: Use it too.
22647
22648 2003-08-14  Paul Eggert  <eggert@twinsun.com>
22649
22650         * modules/tzset: New file.
22651
22652 2003-08-14  Jim Meyering  <jim@meyering.net>
22653
22654         Merges from coreutils.
22655         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
22656         variable names, rather than @FNMATCH_H@.
22657         * modules/alloca: Likewise for $(ALLOCA_H).
22658
22659         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
22660         the three copies of the literal target, `fnmatch.h'.
22661         * modules/alloca (alloca.h): Likewise.
22662
22663 2003-08-14  Jim Meyering  <jim@meyering.net>
22664
22665         Merge from coreutils.
22666         * m4/tzset.m4: New file.
22667         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
22668         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
22669         otherwise, AIX 5.1 systems would end up using the latter.
22670         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
22671         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
22672         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
22673         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
22674
22675 2003-08-14  Jim Meyering  <jim@meyering.net>
22676
22677         Merge from coreutils.
22678         * lib/obstack.h: Whitespace changes.
22679         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
22680         and xcalloc return values.
22681         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
22682         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
22683         hang on OSF/1 5.1 for DIR on both local and remote file systems.
22684         Reported by (and fix confirmed by) Nelson H. F. Beebe.
22685         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
22686         error from mntctl.
22687         Use mntctl's return value to drive the entry-processing loop, since
22688         we can't rely on the value of the vmt_length member in the last
22689         entry.  On some systems doing so could result in exhausting
22690         virtual memory.  Based in part on a patch from Mike Jetzer.
22691
22692 2003-08-14  Jim Meyering  <jim@meyering.net>
22693         and Paul Eggert  <eggert@twinsun.com>
22694
22695         Merges from coreutils, plus other fixes.
22696         * lib/physmem.c: Merge in portability changes from gcc/libiberty
22697         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
22698         for credits and details.  Thanks to Kaveh Ghazi for helping
22699         to keep these files in sync.
22700         (ARRAY_SIZE): Define it.
22701         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
22702         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
22703         (memcasecmp): Don't assume size_t fits in unsigned int.
22704         Remove casts and duplicate code.
22705         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
22706         (memcpy): Remove definition.
22707         Merge in some clean-up and optimization changes from glibc.
22708         [BLOCKSIZE]: Move definition to top of file.
22709         Ensure that it is a multiple of 64.
22710         Rearrange loop exit tests so as to avoid performing an
22711         additional fread after encountering an error or EOF.
22712         * lib/md5.h (md5_uintptr): Define.
22713         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
22714         return to the initial working directory.  Preserve errno
22715         for caller.
22716         * lib/idcache.c: Include "xalloc.h".
22717         (xmalloc, xrealloc): Remove decls.
22718         (getuser): Remove casts no longer required in C89.
22719         * lib/human.c: Include stdio.h, for sprintf.
22720         * lib/group-member.c: Include "xalloc.h".
22721         (xmalloc, xrealloc): Remove decls.
22722         (get_group_info): Remove casts no longer required in C89.
22723         * lib/getusershell.c (readname): Remove casts no longer required in
22724         C89.
22725         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
22726         * lib/getline.c: Whitespace fix, from coreutils.
22727
22728 2003-08-13  Paul Eggert  <eggert@twinsun.com>
22729
22730         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
22731         Check for isascii.
22732
22733         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
22734         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
22735         Undo previous (whitespace-only) change.
22736
22737 2003-08-13  Paul Eggert  <eggert@twinsun.com>
22738
22739         * lib/exclude.c: Include <ctype.h>
22740         (IN_CTYPE_DOMAIN): New macro.
22741         (is_space): New fn.
22742         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
22743         and empty lines.
22744
22745         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
22746         Undo previous (whitespace-only) change.
22747
22748 2003-08-13  Paul Eggert  <eggert@twinsun.com>
22749
22750         * config/srclist-update: Change update back to the old behavior,
22751         leaving whitespace alone.  Use one 'sed' command rather than a
22752         pipeline.
22753         (fixlicense): Now a variable, not a function.
22754         (remove_trailing_blanks): Remove.
22755         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
22756         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
22757         Undo previous (whitespace-only) change.
22758
22759 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22760
22761         Merge from coreutils.
22762         * modules/euidaccess: Add lib_SOURCES, include for new
22763         file euidaccess.h
22764
22765 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22766
22767         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
22768         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
22769         Normalize leading white space and remove trailing white space.
22770
22771         Merge from coreutils
22772         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
22773
22774         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
22775         0.12.1.  These files are now being upgraded automatically by
22776         ../config/srclist-update.
22777
22778 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22779
22780         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
22781         Normalize leading white space and remove trailing white space.
22782         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
22783         notice, as per ../config/srclist-update.
22784
22785         Merge from coreutils.
22786         * lib/euidaccess.h: New file.
22787         * lib/euidaccess.c: Include it.
22788         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
22789         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
22790         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
22791
22792 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22793
22794         * config/srclist-update: Add copyright notice.
22795         (remove_id_lines, remove_trailing_blanks): New constants.
22796         (fixfile): Use them to normalize spacing a bit in copied files.
22797         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
22798         Normalize leading white space and remove trailing white space.
22799
22800         * config/texinfo.tex: Sync with texinfo.
22801
22802         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
22803         strtoul.c from libc, to merge coreutils whitespace changes.
22804
22805         * config/srclist.txt: Get the following m4 files from gettext:
22806         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
22807         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
22808         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
22809         wint_t.m4.
22810
22811 2003-08-12  Karl Berry  <karl@gnu.org>
22812
22813         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
22814         been made.
22815
22816 2003-08-11  Paul Eggert  <eggert@twinsun.com>
22817
22818         * modules/gnu-source, m4/gnu-source.m4:
22819         Remove; we're assuming Autoconf 2.54 or later now.
22820         Suggested by Bruno Haible.
22821         * MODULES.html.sh (func_all_modules): Remove gnu-source.
22822
22823 2003-08-11  Bruno Haible  <bruno@clisp.org>
22824
22825         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
22826
22827 2003-08-11  Bruno Haible  <bruno@clisp.org>
22828
22829         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
22830         (vasnprintf): Use it instead of wcslen.
22831
22832 2003-08-11  Bruno Haible  <bruno@clisp.org>
22833
22834         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
22835         value to ensure that _Bool promotes to int. Use #define for _Bool when
22836         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
22837
22838 2003-08-10  Karl Berry  <karl@gnu.org>
22839
22840         * lib/regex.h: update from libc (whitespace fix).
22841
22842 2003-08-09  Paul Eggert  <eggert@twinsun.com>
22843
22844         Merge some files from coreutils.  These changes were
22845         originally made by Jim Meyering.
22846         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
22847         many older Unixes require this.
22848         * lib/alloca.c (alloca): Remove cast to argument of free;
22849         no longer needed in C89.
22850         * lib/alloca_.h, regex.h: Fix white space to match
22851         what GNU indent does.
22852
22853 2003-08-09  Paul Eggert  <eggert@twinsun.com>
22854
22855         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
22856         apparently Emacs's Unicode mode got confused before my 2003-08-05
22857         checkin.
22858
22859 2003-08-08  Paul Eggert  <eggert@twinsun.com>
22860
22861         * m4/extensions.m4: New file.
22862         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
22863         Require gl_USE_SYSTEM_EXTENSIONS.
22864         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
22865         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
22866
22867 2003-08-08  Paul Eggert  <eggert@twinsun.com>
22868
22869         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
22870         * modules/extensions, modules/gnu-source: New files.
22871         * modules/timespec, modules/unlocked-io: Depend on extensions.
22872
22873 2003-08-07  Paul Eggert  <eggert@twinsun.com>
22874
22875         * modules/restrict: New file.
22876         * MODULES.html.sh (func_all_modules): Add restrict.
22877         * modules/regex: Depend on restrict.
22878
22879 2003-08-07  Paul Eggert  <eggert@twinsun.com>
22880
22881         * m4/restrict.m4: New file.
22882         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
22883
22884 2003-08-07  Bruno Haible  <bruno@clisp.org>
22885
22886         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
22887         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
22888
22889 2003-08-07  Bruno Haible  <bruno@clisp.org>
22890
22891         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
22892         makes the module 'getndelim2' compatible with the module 'getline'.
22893
22894 2003-08-05  Paul Eggert  <eggert@twinsun.com>
22895
22896         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
22897         byte with "\201" to avoid glitches when editing that source file
22898         with multi-gnome-terminal.
22899
22900 2003-08-05  Paul Eggert  <eggert@twinsun.com>
22901
22902         * lib/bumpalloc.h: Remove.
22903
22904 2003-08-05  Paul Eggert  <eggert@twinsun.com>
22905
22906         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
22907         * modules/bumpalloc: Remove.
22908
22909 2003-08-04  Paul Eggert  <eggert@twinsun.com>
22910
22911         * lib/getloadavg.c: Change copyright notice and spacing to conform to
22912         GNU coding style.
22913
22914         Merge from coreutils.
22915         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
22916         1. From glibc.
22917         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
22918         from Karl Berry, implemented by Jim Meyering.
22919         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
22920         from Dmitry V. Levin.
22921         Remove anachronistic cast of xrealloc.
22922         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
22923         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
22924         type. Otherwise, it wouldn't compile with at least /bin/cc on
22925         ymp-cray-unicos9.0.2.X.
22926         Combine two mostly-identical uses of alloca into one.
22927         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
22928
22929 2003-08-04  Dave Love  <d.love@dl.ac.uk>
22930
22931         [From Emacs.]
22932
22933         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
22934         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
22935         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
22936         obsolete NLIST_NAME_UNION.
22937         [__GNU__]: Undef BSD and FSCALE.
22938         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
22939
22940 2003-08-03  Paul Eggert  <eggert@twinsun.com>
22941
22942         * lib/stdbool_.h (_Bool): Make it signed char, instead of
22943         an enum type, so that it's guaranteed to promote to int.  See:
22944         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
22945
22946 2003-08-03  Karl Berry  <karl@gnu.org>
22947
22948         * config/depcomp: update from automake.
22949
22950 2003-07-31  Paul Eggert  <eggert@twinsun.com>
22951
22952         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
22953         (strerror): Don't assume that a printable int fits in 14 bytes.
22954
22955 2003-07-31  Bruno Haible  <bruno@clisp.org>
22956
22957         * modules/getpass-gnu: New file.
22958         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
22959
22960 2003-07-31  Bruno Haible  <bruno@clisp.org>
22961
22962         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
22963
22964 2003-07-24  Karl Berry  <karl@gnu.org>
22965
22966         * config/missing: update from automake.
22967
22968 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
22969             Bruno Haible  <bruno@clisp.org>
22970
22971         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
22972         * lib/getline.c (getline, getdelim): Likewise.
22973         Remove _GNU_SOURCE define; now it's defined in config.h through
22974         m4/getline.m4.
22975
22976 2003-07-23  Karl Berry  <karl@gnu.org>
22977
22978         * config/config.sub: update from prep.
22979
22980 2003-07-22  Paul Eggert  <eggert@twinsun.com>
22981
22982         * modules/xalloc (Depends-on): Add exitfail.
22983         * modules/xmemcoll: Likewise.
22984
22985 2003-07-22  Paul Eggert  <eggert@twinsun.com>
22986
22987         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
22988         over-parenthesization in macros.
22989
22990         Sync with coreutils.
22991
22992         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
22993         required by C99.
22994
22995         Use `exit_failure' for xalloc and xmemcoll instead of their own
22996         private exit-failure variables.
22997         * lib/xalloc.h (xalloc_exit_failure): Remove.
22998         * lib/xmalloc.c: Likewise.  Include exitfail.h.
22999         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
23000         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
23001         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
23002         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
23003
23004 2003-07-20  Jim Meyering  <jim@meyering.net>
23005
23006         * modules/closeout (Depends-on): Add exitfail.
23007         Suggestion from Bruno Haible.
23008
23009 2003-07-19  Karl Berry  <karl@gnu.org>
23010
23011         * config/config.sub: update from prep.
23012
23013 2003-07-18  Paul Eggert  <eggert@twinsun.com>
23014
23015         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
23016         Remove.
23017         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
23018         to test that it can stand by itself.  Include "exitfail.h".
23019         Clients should set exit_failure instead.
23020         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
23021
23022 2003-07-18  Bruno Haible  <bruno@clisp.org>
23023
23024         * modules/getndelim2: New file.
23025         * modules/getline: Share files with module getndelim2.
23026         * modules/getnline: Depend on getndelim2 instead of sharing files with
23027         it. Add getnline.c to lib_SOURCES.
23028         * MODULES.html.sh (func_all_modules): Add getndelim2.
23029
23030 2003-07-18  Bruno Haible  <bruno@clisp.org>
23031
23032         * m4/getndelim2.m4: New file.
23033         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
23034         invoke gl_PREREQ_GETNDELIM2.
23035         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
23036         gl_PREREQ_GETNDELIM2.
23037         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
23038         gl_GETNDELIM2.
23039
23040 2003-07-18  Bruno Haible  <bruno@clisp.org>
23041
23042         * lib/getndelim2.h: New file.
23043         * lib/getndelim2.c: Make into a module of its own. Include config.h,
23044         getndelim2.h.
23045         (getndelim2): Make non-static. Change return type to ssize_t.
23046         * lib/getline.h: Change argument names.
23047         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
23048         * lib/getnline.c: Include getndelim2.h.
23049
23050 2003-07-18  Andreas Schwab  <schwab@suse.de>
23051
23052         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
23053
23054 2003-07-17  Karl Berry  <karl@gnu.org>
23055
23056         * config/config.sub: update from prep.
23057
23058 2003-07-17  Bruno Haible  <bruno@clisp.org>
23059
23060         * modules/getnline: New file.
23061         * modules/getline: Add lib/getndelim2.c to source file list.
23062         * MODULES.html.sh (func_all_modules): Add getnline.
23063
23064 2003-07-17  Bruno Haible  <bruno@clisp.org>
23065
23066         * m4/getnline.m4: New file.
23067
23068 2003-07-17  Bruno Haible  <bruno@clisp.org>
23069
23070         * m4/Makefile.am.in: Remove file.
23071         * m4/Makefile.am: Remove file.
23072         * m4/Makefile.in: Remove file.
23073
23074 2003-07-17  Bruno Haible  <bruno@clisp.org>
23075
23076         * lib/getnline.h: New file.
23077         * lib/getnline.c: New file.
23078         * lib/getndelim2.c: New file, extracted from getline.c.
23079         (getndelim2): Renamed from getdelim2, with added nmax argument.
23080         * lib/getline.c: Include getndelim2.c.
23081         (getdelim2): Moved out to getndelim2.c.
23082         (getline, getdelim): Update.
23083
23084 2003-07-17  Bruno Haible  <bruno@clisp.org>
23085
23086         * lib/Makefile.am: Remove file.
23087         * lib/Makefile.in: Remove file.
23088
23089 2003-07-17  Bruno Haible  <bruno@clisp.org>
23090
23091         * configure.in: Remove file.
23092         * Makefile.in: Remove file.
23093
23094 2003-07-17  Bruno Haible  <bruno@clisp.org>
23095
23096         * MODULES.html.sh: Put the </BODY> right before </HTML>.
23097
23098 2003-07-16  Karl Berry  <karl@gnu.org>
23099
23100         * config/srclist-update: was running fixlicense twice, which caused
23101                 texinfo.tex to be nullified for some reason.  Simplify,
23102                 $gplsrc is no longer needed as far as I can see?
23103
23104 2003-07-16  Jim Meyering  <jim@meyering.net>
23105
23106         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
23107
23108 2003-07-15  Paul Eggert  <eggert@twinsun.com>
23109
23110         * config/srclist.txt: Get the following files from gettext-runtime/intl
23111         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
23112         ref-del.sin.  From Bruno Haible.
23113         * config/srclist-update (fixfile): Change grep pattern again, since the
23114         previous fix didn't work (there was another trailing $).  Use
23115         '[$]' to escape the $s.
23116
23117 2003-07-15  Karl Berry  <karl@gnu.org>
23118
23119         * lib/vasnprintf.c: update from gettext.
23120
23121 2003-07-15  Karl Berry  <karl@gnu.org>
23122
23123         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
23124         gets expanded when surrounded by '$'.
23125
23126 2003-07-15  Jim Meyering  <jim@meyering.net>
23127
23128         * modules/save-cwd: Don't depend on error.  From Derek Price.
23129
23130 2003-07-15  Jim Meyering  <jim@meyering.net>
23131
23132         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
23133
23134 2003-07-14  Simon Josefsson  <jas@extundo.com>
23135
23136         * modules/mempcpy: New file.
23137         * MODULES.html.sh (func_all_modules): Add mempcpy.
23138
23139 2003-07-14  Simon Josefsson  <jas@extundo.com>
23140
23141         * m4/mempcpy.m4: New file.
23142
23143 2003-07-14  Simon Josefsson  <jas@extundo.com>
23144
23145         * lib/mempcpy.h: New file.
23146         * lib/mempcpy.c: New file.
23147
23148 2003-07-14  Paul Eggert  <eggert@twinsun.com>
23149
23150         * modules/getdate, modules/posixtm: Depend on mktime.
23151
23152 2003-07-14  Paul Eggert  <eggert@twinsun.com>
23153
23154         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
23155         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
23156         unicodeio.c, unicodeio.h, unlocked-io.h:
23157         Switch from LGPL to GPL.
23158
23159 2003-07-14  Paul Eggert  <eggert@twinsun.com>
23160
23161         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
23162         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
23163         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
23164         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
23165         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
23166         updated automatically by ../config/srclist-update.  This changes
23167         their license from LPGL to GPL.
23168
23169 2003-07-14  Paul Eggert  <eggert@twinsun.com>
23170
23171         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
23172         assumed to refer to the root of the most recent stable gettext version.
23173         * config/srclistvars.sh: Add defaults for eggert.
23174         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
23175         Match "This program" as well as "The program".  This is needed
23176         for gettext.
23177
23178 2003-07-14  Jim Meyering  <jim@meyering.net>
23179
23180         Don't emit diagnostics.  Let callers do that.
23181         * lib/save-cwd.c: Don't include "error.h".
23182         (save_cwd): Don't call error.  Ensure that errno is valid
23183         when returning nonzero.
23184
23185         * lib/save-cwd.h (restore_cwd): Update prototype.
23186         * lib/save-cwd.c (restore_cwd): Remove two parameters.
23187         Simplify.  Don't call error upon failure.  Let callers do that.
23188         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
23189         when auditing is enabled.  But don't bother updating the #if.
23190
23191 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
23192
23193         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
23194         it breaks C++ compilation.
23195         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
23196
23197 2003-07-10  Simon Josefsson  <jas@extundo.com>
23198
23199         * modules/strchrnul (Makefile.am): Add strchrnul.h.
23200
23201 2003-07-10  Jim Meyering  <jim@meyering.net>
23202
23203         * m4/clock_time.m4: Remove trailing blank.
23204         * m4/intmax_t.m4: Likewise.
23205
23206 2003-07-10  Jim Meyering  <jim@meyering.net>
23207
23208         * lib/vasnprintf.c: Remove trailing blanks.
23209         Make cpp indentation consistent.
23210
23211 2003-07-09  Paul Eggert  <eggert@twinsun.com>
23212
23213         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
23214         posixver.c, strftime.c, strnlen.c, strverscmp.c:
23215         Switch from LGPL to GPL.
23216
23217 2003-07-09  Paul Eggert  <eggert@twinsun.com>
23218
23219         * config/srclist.txt: Sort sublists.  Add
23220         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
23221         that differ from gnulib for one reason or another; we'd like this list
23222         to be smaller but for now let's document what we have.
23223
23224 2003-07-08  Paul Eggert  <eggert@twinsun.com>
23225
23226         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
23227         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
23228         and sweeter "eval x=$x".
23229         * config/srclist.txt: Get lib/argp* from glibc.
23230
23231 2003-07-07  Paul Eggert  <eggert@twinsun.com>
23232
23233         * lib/mktime.c: Fix some boundary cases and remove need for floating
23234         point.
23235
23236         Issue a compile-time diagnostic if time_t is floating point, or if
23237         two's complement arithmetic is not in effect, or if arithmetic
23238         right shift does not propagate the sign.  These assumptions were
23239         all in the original code but they weren't checked.
23240
23241         (TIME_T_MIDPOINT, verify): New macros.
23242         (__isleap): Remove; it has integer overflow problems.
23243         (leapyear): New function, without those problems.
23244         (ydhms_tm_diff): Remove; splitting into two parts.
23245         (ydhms_diff): New function, containing the arithmetic part of
23246         the old ydhms_tm_diff function.  Issue a compile-time
23247         diagnostic if we are not using C99 integer division.
23248         Avoid casts when possible.
23249         (guess_time_tm): New function, containing the checking part of
23250         the old ydhms_tm_diff function.  Return the new value, rather than
23251         the difference between it and the old.  Accept a new argument T
23252         so that *T specifies the old value.  Check for overflow in the result.
23253
23254         (__mktime_internal): Use a time_t offset, not a long int offset.
23255         This undoes the 2003-06-04 change, which is no longer needed now
23256         that we have better overflow checking.
23257         (localtime_offset): Likewise.
23258
23259         (__mktime_internal): Avoid harmful overflow on hosts where time_t
23260         and long are 64-bit but int is only 32-bit.
23261         (ydhms_diff): Use long int to store year1 and yday1.
23262         Issue a compile-time diagnostic if long int is not wide enough.
23263
23264         (__mktime_internal): Use long int to store adjusted year and yday.
23265         Use plain C rather than preprocessor commands, if that doesn't
23266         affect efficiency.
23267         Check for overflow (and try to repair) after each probe
23268         rather than checking only at the very end.  This avoids some bugs
23269         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
23270         does not equal GMT offset at maximum time).
23271         Use integer to check for overflow rather than floating point; this
23272         is more portable to non-IEEE hosts, and is a tad faster.
23273         When we detect that we are oscillating between two values,
23274         don't check whether tm_isdst has the requested value, since
23275         we already know the answer.  When tm_isdst has the wrong value,
23276         use a different heuristic to find the right one, based on the
23277         extreme values actually observed in practice in tz2003a,
23278         rather than the (overly optimistic) "previous 3 calendar quarters".
23279
23280         (not_equal_tm, print_tm, check_result): Use "const T" rather than
23281         "T const" to accommodate glibc style.
23282         (check_result): Use less-confusing report format.  "long" -> "long int.
23283         (main): Likewise.
23284         Don't loop if the iteration overflows time_t.
23285         Allow a negative step in the iteration.
23286
23287 2003-07-06  Karl Berry  <karl@gnu.org>
23288
23289         * config/depcomp: update from automake.
23290         * config/config.sub: update from prep.
23291
23292 2003-07-03  Karl Berry  <karl@gnu.org>
23293
23294         * config/config.guess: update from prep.
23295
23296 2003-07-01  Paul Eggert  <eggert@twinsun.com>
23297
23298         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
23299         xreadlink.c now includes it unconditionally.
23300
23301 2003-07-01  Paul Eggert  <eggert@twinsun.com>
23302
23303         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
23304         having it depend on HAVE_SYS_TYPES_H.
23305
23306 2003-07-01  Bruno Haible  <bruno@clisp.org>
23307
23308         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
23309         <sys/types.h> should be sufficient.
23310         Reported by Paul Eggert.
23311
23312 2003-06-26  Karl Berry  <karl@gnu.org>
23313
23314         * config/depcomp: update from automake.
23315
23316 2003-06-26  Bruno Haible  <bruno@clisp.org>
23317
23318         * modules/human: Depend on module stdbool.
23319
23320 2003-06-25  Bruno Haible  <bruno@clisp.org>
23321
23322         * modules/readlink: New file.
23323         * modules/xreadlink: Depend on it.
23324         * MODULES.html.sh (func_all_modules): Add readlink.
23325
23326 2003-06-25  Bruno Haible  <bruno@clisp.org>
23327
23328         * m4/readlink.m4: New file.
23329
23330 2003-06-25  Bruno Haible  <bruno@clisp.org>
23331
23332         * lib/readlink.c: New file.
23333
23334 2003-06-22  Karl Berry  <karl@gnu.org>
23335
23336         * config/srclist.txt: update mkinstalldirs from automake.
23337         * config/mkinstalldirs: update.
23338
23339 2003-06-22  Bruno Haible  <bruno@clisp.org>
23340
23341         Portability to mingw32.
23342         * m4/ssize_t.m4: New file, from GNU gettext.
23343         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
23344         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
23345
23346 2003-06-22  Bruno Haible  <bruno@clisp.org>
23347
23348         * modules/safe-read: Add m4/ssize_t.m4.
23349         * modules/xreadlink: Add m4/ssize_t.m4.
23350
23351 2003-06-20  Bruno Haible  <bruno@clisp.org>
23352
23353         Assume C89, so PARAMS isn't needed.
23354         * lib/unicodeio.h (PARAMS): Remove.
23355         * lib/unicodeio.c: Don't use PARAMS.
23356
23357 2003-06-18  Karl Berry  <karl@gnu.org>
23358
23359         * config/config.{guess,sub}: update from prep.
23360
23361 2003-06-18  Jim Meyering  <jim@meyering.net>
23362
23363         Merge changes from coreutils.
23364         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
23365         Remove explicit declarations of xmalloc and realloc.
23366         Include xalloc.h.
23367         (read_utmp): Remove anachronistic cast of xmalloc.
23368
23369 2003-06-17  Paul Eggert  <eggert@twinsun.com>
23370
23371         Assume C89, so PARAMS isn't needed.
23372         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
23373         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
23374         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
23375         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
23376         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
23377         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
23378         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
23379         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
23380         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
23381         lib/xstrtod.h, lib/xstrtol.h: Likewise.
23382         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
23383         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
23384         no longer needed. Anyway, config.h should always be included before any
23385         other file.
23386
23387 2003-06-11  Simon Josefsson  <jas@extundo.com>
23388
23389         * modules/sysexits: New file.
23390         * MODULES.html.sh (func_all_modules): Add sysexits.
23391
23392 2003-06-11  Simon Josefsson  <jas@extundo.com>
23393
23394         * lib/sysexit_.h: New file.
23395
23396 2003-06-11  Derek Price  <derek@ximbiot.com>
23397
23398         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
23399         necessary.
23400
23401 2003-06-11  Bruno Haible  <bruno@clisp.org>
23402
23403         * m4/sysexits.m4: New file.
23404
23405 2003-06-10  Simon Josefsson  <jas@extundo.com>
23406
23407         * lib/argp.h: New file, from glibc.
23408         * lib/argp-ba.c: New file, from glibc.
23409         * lib/argp-eexst.c: New file, from glibc.
23410         * lib/argp-fmtstream.c: New file, from glibc.
23411         * lib/argp-fmtstream.h: New file, from glibc.
23412         * lib/argp-fs-xinl.c: New file, from glibc.
23413         * lib/argp-help.c: New file, from glibc.
23414         * lib/argp-namefrob.h: New file, from glibc.
23415         * lib/argp-parse.c: New file, from glibc.
23416         * lib/argp-pv.c: New file, from glibc.
23417         * lib/argp-pvh.c: New file, from glibc.
23418         * lib/argp-xinl.c: New file, from glibc.
23419
23420 2003-06-10  Simon Josefsson  <jas@extundo.com>
23421
23422         * modules/strchrnul: New file.
23423
23424 2003-06-10  Simon Josefsson  <jas@extundo.com>
23425
23426         * modules/argp: New file.
23427
23428 2003-06-10  Simon Josefsson  <jas@extundo.com>
23429
23430         * m4/strchrnul.m4: New file.
23431
23432 2003-06-10  Simon Josefsson  <jas@extundo.com>
23433
23434         * lib/strchrnul.h: New file.
23435         * lib/strchrnul.c: New file.
23436
23437 2003-06-10  Bruno Haible  <bruno@clisp.org>
23438
23439         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
23440
23441 2003-06-07  Karl Berry  <karl@gnu.org>
23442
23443         * config/config.{guess,sub}: update from prep.
23444
23445 2003-06-07  Jim Meyering  <jim@meyering.net>
23446
23447         * modules/strtod: Use $(...) notation, not @...@ for
23448         AC_REPLACE'd variables.
23449         * modules/localcharset: Likewise.
23450
23451 2003-06-07  Jim Meyering  <jim@meyering.net>
23452
23453         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
23454         in place of my name in the copyright comment.
23455         Remove definition and uses of __P.
23456
23457         From coreutils.
23458         * lib/stat.c: Don't declare xmalloc explicitly.
23459         Instead, include "xalloc.h".
23460         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
23461         xrealloc, and xcalloc return values.
23462         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
23463         Improve comment.
23464         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
23465
23466 2003-06-07  Bruno Haible  <bruno@clisp.org>
23467
23468         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
23469         avoid AC_CONFIG_LINKS.
23470         * modules/fnmatch (Makefile.am): Use explicit creation rule for
23471         fnmatch.h, to avoid AC_CONFIG_LINKS.
23472         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
23473
23474 2003-06-07  Bruno Haible  <bruno@clisp.org>
23475
23476         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
23477         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
23478         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
23479         directory.
23480         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
23481         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
23482         directory.
23483
23484 2003-06-06  Jim Meyering  <jim@meyering.net>
23485
23486         Merge from coreutils.
23487         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
23488         Consolidate declarations and initializations of *_base* locals.
23489
23490         Merge from coreutils.
23491         This avoids a core dump on systems without GNU putenv,
23492         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
23493         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
23494         (unsetenv): New static function, from GNU libc.
23495         (rpl_putenv): Use it.
23496
23497         * lib/modechange.c: Remove trailing blanks.
23498
23499         Merge from coreutils.
23500         * lib/fsusage.c: Remove declaration of statfs.
23501         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
23502
23503         * lib/posixtm.c: Include <stdbool.h> unconditionally.
23504
23505 2003-06-06  Jim Meyering  <jim@meyering.net>
23506
23507         * lib/stdbool_.h: Renamed from stdbool.h.in.
23508
23509 2003-06-06  Jim Meyering  <jim@meyering.net>
23510             Bruno Haible  <bruno@clisp.org>
23511
23512         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
23513         Adjust Makefile.am snippet not to redirect directly to target.
23514         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
23515
23516 2003-06-05  Paul Eggert  <eggert@twinsun.com>
23517
23518         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
23519         mismatch, look in future quarters as well as past.  This fixes a
23520         bug when processing fall-backwards gaps immediately after a long
23521         period of daylight-saving time.
23522
23523         * lib/mktime.c: Assume freestanding C89 or better.
23524         (HAVE_LIMITS_H): Remove.  Assume it's 1.
23525         (__P): Remove; not used.
23526         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
23527         (mktime, not_equal_tm, print_tm, check_result,
23528         main): Use prototypes.  Use const * where appropriate.
23529         (main): Fix typo in testing code that uncovered by above changes.
23530         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
23531
23532 2003-06-04  Paul Eggert  <eggert@twinsun.com>
23533
23534         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
23535         locale.h, localeconv.  This merges changes from coreutils.
23536
23537         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
23538         It can be removed after the next Autoconf is released.
23539         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
23540         needed.
23541
23542 2003-06-04  Paul Eggert  <eggert@twinsun.com>
23543
23544         * lib/mktime.c: Fix Debian bug 177940
23545         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
23546         (localtime_offset): Now long int, not time_t, because we want it
23547         to be guaranteed to be signed.  All uses changed.
23548         (__mktime_internal): If overflow would occur when adding offset,
23549         don't add it.
23550
23551         Merge 'human' changes from coreutils.  Rewrite to support
23552         locale-specific notations like thousands separators.
23553         * lib/human.c: Simplify authorship notice.
23554         Include human.h immediately after config.h.
23555         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
23556         <limits.h>: Do not include, since human.h does.
23557         (SIZE_MAX, UINTMAX_MAX): New macros.
23558         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
23559         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
23560         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
23561         (power_letter): Renamed from suffixes.
23562         (generate_suffix_backwards): Remove.
23563         (adjust_value): Now takes int style (because of human.h changes)
23564         and long double value (for greater precision on some platforms).
23565         (group_number): New function.
23566         (human_readable): Use it.  Use integer options, not enum.
23567         Put the options before the sizes in the arg list.
23568         Support all the new options.
23569         The old human_readable function has been removed;
23570         use inttostr.h instead.
23571         (human_readable, default_block_size, humblock):
23572         Use uintmax_t, not int, for block sizes.
23573         (human_readable_inexact, block_size_types): Remove.
23574         (block_size_opts): New constant.
23575         (human_options): Renamed from human_block_size, with new signature
23576         that allows block sizes up to UINTMAX_MAX.  All callers changed.
23577         * lib/human.h: Add copyright and authorship notice.
23578         Include <limits.h> and <stdbool.h> unconditionally.
23579         (PARAMS): Remove.  All uses removed.
23580         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
23581         (enum human_inexact_style): Remove tag; now a nameless enum.
23582         (human_floor, human_ceiling, human_round_to_even): Now have
23583         values 2, 0, 1 rather than -1, 1, 0.
23584         (human_group_digits, human_suppress_point_zero, human_autoscale,
23585         human_base_1024, human_SI, human_B): New constants.
23586         (human_readable_inexact, human_block_size): Remove.
23587         (human_readable): Size args are now uintmax_t, not int.
23588         (human_options): New decl.
23589
23590         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
23591         unnecessary now that we assume C89 or better.  This change
23592         imported from coreutils.
23593
23594         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
23595         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
23596         in the 2003-05-30 sync from glibc.
23597
23598         .h files should stand alone, but we shouldn't include <sys/types.h>
23599         if we can get away with just <stddef.h>.
23600
23601         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
23602         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
23603         rather than <sys/types.h>, as we merely need size_t.
23604         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
23605         to get size_t.
23606         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
23607         Include <stdio.h>, to get FILE.
23608         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
23609         memcasecmp.h has included <stddef.h> and all we need is size_t.
23610         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
23611         our interface, instead of including <sys/types.h>
23612
23613 2003-06-04  Paul Eggert  <eggert@twinsun.com>
23614
23615         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
23616         now, as glibc mktime is buggy on non-glibc systems.
23617
23618 2003-06-03  Karl Berry  <karl@gnu.org>
23619
23620         * config/config.sub: update from prep.
23621
23622 2003-06-02  Paul Eggert  <eggert@twinsun.com>
23623
23624         [from coreutils]
23625         Fix some minor time-related bugs with POSIX time arguments.
23626         Some valid time stamps were being rejected (notably -1, and
23627         time stamps before 1900 on 64-bit hosts).  And some invalid
23628         time stamps were being accepted, e.g. September 31.
23629
23630         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
23631         that we can return (time_t) -1 successfully.
23632         * lib/posixtm.c: Likewise.
23633         [HAVE_STDBOOL_H]: Include <stdbool.h>.
23634         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
23635         (t): Remove static var.
23636         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
23637         of static var.  All uses changed.
23638         (year): Do not reject years before 1900; they can occur with
23639         64-bit time_t.
23640         (posix_time_parse): Do not check for out-of-range components;
23641         that is now the caller's responsibility, since our checks were
23642         only approximations.
23643         (posixtime): Use mktime to check for out-of-range components,
23644         since it knows them exactly.
23645         If mktime returns (time_t) -1, check whether an error actually occurred
23646         by invoking localtime on -1.
23647         (main) [TEST_POSIXTIME]: Check for input data errors, and report
23648         posixtime failures better.
23649         Improve the test data (in comments only).
23650
23651 2003-06-02  Karl Berry  <karl@gnu.org>
23652
23653         * config/mkinstalldirs (version): new variable.
23654         (--version): new option.
23655         (usage): improve message.
23656
23657 2003-05-30  Karl Berry  <karl@gnu.org>
23658
23659         * lib/mktime.c: update from libc.
23660
23661 2003-05-30  Bruno Haible  <bruno@clisp.org>
23662
23663         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
23664         * config/config.rpath: Upgrade to gettext-0.12.1.
23665
23666 2003-05-30  Bruno Haible  <bruno@clisp.org>
23667
23668         * m4/gettext.m4: Upgrade to gettext-0.12.1.
23669         * m4/nls.m4: New file, from gettext-0.12.1.
23670         * m4/po.m4: New file, from gettext-0.12.1.
23671         * m4/progtest.m4: Upgrade to gettext-0.12.1.
23672
23673 2003-05-30  Bruno Haible  <bruno@clisp.org>
23674
23675         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
23676         * lib/localcharset.h: Likewise.
23677         * lib/localcharset.c: Likewise.
23678
23679 2003-05-29  Karl Berry  <karl@gnu.org>
23680
23681         * config/config.rpath: update from gettext.
23682
23683 2003-05-28  Paul Eggert  <eggert@twinsun.com>
23684
23685         Assume the headers required for C89 freestanding compilers.
23686         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
23687         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
23688         * m4/human.m4 (gl_HUMAN): Likewise.
23689         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
23690         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
23691         * m4/userspec.m4 (gl_USERSPEC): Likewise.
23692         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
23693         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
23694         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
23695
23696 2003-05-28  Paul Eggert  <eggert@twinsun.com>
23697
23698         Assume the headers required for C89 freestanding compilers.
23699         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
23700         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
23701         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
23702         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
23703         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
23704         define, since <limits.h> is guaranteed to do that.
23705         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
23706         * lib/exclude.c: Include <stdbool.h> unconditionally.
23707         * lib/tempname.c: Include <stddef.h> unconditionally.
23708         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
23709         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
23710         <stddef.h> does that.
23711         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
23712         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
23713         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
23714         needed.
23715         * lib/xstrtol.c: Likewise.
23716         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
23717         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
23718
23719         * lib/addext.c (addext): Use assignment rather than cast, to avoid
23720         warnings on some platforms.
23721
23722         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
23723         arbitrarily.
23724
23725 2003-05-26  Jim Meyering  <jim@meyering.net>
23726
23727         Merge in a change from coreutils:
23728         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
23729         that is guaranteed to be `no'.  Use `no_such_member' to indicate
23730         that condition, rather than `-1' which is slightly misleading.
23731         Change the name of the cache variable to have the gl_ prefix.
23732         Prompted by a patch from Richard Dawe for DJGPP.
23733
23734 2003-05-24  Karl Berry  <karl@gnu.org>
23735
23736         * config/config.guess: update from prep.
23737
23738 2003-05-22  Karl Berry  <karl@gnu.org>
23739
23740         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
23741
23742 2003-05-20  Karl Berry  <karl@gnu.org>
23743
23744         * config/config.guess: update from prep.
23745
23746 2003-05-18  Karl Berry  <karl@gnu.org>
23747
23748         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
23749         might actually be set by the user.
23750
23751         * config/depcomp, install-sh, mdate-sh: update from automake.
23752
23753 2003-05-17  Bruno Haible  <bruno@clisp.org>
23754
23755         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
23756         invalid expansion for AC_EGREP_CPP.
23757         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
23758         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
23759         Suggested by Akim Demaille <akim@epita.fr> in
23760         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
23761
23762 2003-05-12  Jim Meyering  <jim@meyering.net>
23763
23764         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
23765         the space-padded-by-default conversion specifiers, %e, %k, %l.
23766
23767 2003-05-12  Bruno Haible  <bruno@clisp.org>
23768
23769         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
23770         the string is longer than 4 KB.
23771
23772 2003-05-11  Karl Berry  <karl@gnu.org>
23773
23774         * config/config.{guess,sub}: update from prep.
23775
23776 2003-05-09  Bruno Haible  <bruno@clisp.org>
23777
23778         * modules/error: Add m4/strerror_r.m4 to file list.
23779
23780 2003-05-03  Bruno Haible  <bruno@clisp.org>
23781
23782         Upgrade to Unicode-4.0.
23783         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
23784         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
23785         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
23786         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
23787         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
23788         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
23789         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
23790         Change width of U+E0100..U+E01EF from 1 to 0.
23791
23792 2003-04-25  Jim Meyering  <jim@meyering.net>
23793
23794         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
23795         of type size_t, not int.
23796
23797 2003-04-25  Bruno Haible  <bruno@clisp.org>
23798
23799         * lib/copy-file.c: Include <stddef.h>, for size_t.
23800
23801 2003-04-21  Paul Eggert  <eggert@twinsun.com>
23802
23803         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
23804         code which expansion is under static control.  Patch imported from
23805         Akim Demaille's patch to Bison; see
23806         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
23807
23808 2003-04-14  Bruno Haible  <bruno@clisp.org>
23809
23810         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
23811
23812 2003-04-11  Jim Meyering  <jim@meyering.net>
23813
23814         Merge changes from Coreutils.
23815
23816         2003-03-22  Jim Meyering  <jim@meyering.net>
23817
23818         * lib/strftime.c (widen): Cast alloca return value to proper type.
23819
23820         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
23821
23822         From GNU libc.
23823         * lib/strftime.c (my_strftime): Handle very large width
23824         specifications for numeric values correctly.  Improve checks for
23825         overflow.
23826
23827         2003-01-19  Jim Meyering  <jim@meyering.net>
23828
23829         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
23830         definitions.
23831         (nl_get_alt_digit) [! defined my_strftime]: Define.
23832         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
23833         _nl_get_alt_digit and _nl_get_walt_digit.
23834
23835         * lib/strftime.c (my_strftime): Merge in locale-related changes from
23836         libc. These changes have no effect outside of _LIBC.
23837
23838 2003-04-10  Bruno Haible  <bruno@clisp.org>
23839
23840         * modules/findprog: New file.
23841         * MODULES.html.sh (func_all_modules): Add it.
23842
23843 2003-04-10  Bruno Haible  <bruno@clisp.org>
23844
23845         * m4/findprog.m4: New file.
23846         * m4/eaccess.m4: New file.
23847
23848 2003-04-10  Bruno Haible  <bruno@clisp.org>
23849
23850         * lib/findprog.h: New file, from GNU gettext.
23851         * lib/findprog.c: New file, from GNU gettext.
23852
23853 2003-04-05  Jim Meyering  <jim@meyering.net>
23854
23855         Merge changes from Coreutils.
23856
23857         * lib/exclude.h (PARAMS): Remove definition and uses.
23858         * lib/exclude.c: Remove uses of `PARAMS'.
23859
23860         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
23861         Add test-cases for DOS filenames. Declare program_name.
23862         (main): Set up program_name.  Patch by Rich Dawe.
23863
23864         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
23865         error from mntctl.
23866         Use mntctl's return value to drive the entry-processing loop, since
23867         we can't rely on the value of the vmt_length member in the last
23868         entry.  On some systems doing so could result in exhausting
23869         virtual memory.  Based in part on a patch from Mike Jetzer.
23870
23871 2003-04-04  Bruno Haible  <bruno@clisp.org>
23872
23873         * modules/linebreak: New file.
23874         * MODULES.html.sh (func_all_modules): Add it.
23875
23876 2003-04-04  Bruno Haible  <bruno@clisp.org>
23877
23878         * m4/linebreak.m4: New file.
23879
23880 2003-04-04  Bruno Haible  <bruno@clisp.org>
23881
23882         * lib/linebreak.h: New file, from GNU gettext.
23883         * lib/linebreak.c: New file, from GNU gettext with slight
23884         modifications.
23885         * lib/lbrkprop.h: New file, from GNU gettext.
23886
23887 2003-04-03  Bruno Haible  <bruno@clisp.org>
23888
23889         * modules/utf8-ucs4: New file.
23890         * modules/utf16-ucs4: New file.
23891         * modules/ucs4-utf8: New file.
23892         * modules/ucs4-utf16: New file.
23893         * MODULES.html.sh (func_all_modules): Add them.
23894
23895 2003-04-03  Bruno Haible  <bruno@clisp.org>
23896
23897         * m4/utf-ucs4.m4: New file.
23898         * m4/ucs4-utf.m4: New file.
23899
23900 2003-04-03  Bruno Haible  <bruno@clisp.org>
23901
23902         * lib/utf8-ucs4.h: New file, from GNU gettext.
23903         * lib/utf16-ucs4.h: New file, from GNU gettext.
23904         * lib/ucs4-utf8.h: New file, from GNU gettext.
23905         * lib/ucs4-utf16.h: New file, from GNU gettext.
23906
23907 2003-04-02  Bruno Haible  <bruno@clisp.org>
23908
23909         * modules/binary-io: New file.
23910         * MODULES.html.sh (func_all_modules): Add it.
23911
23912 2003-04-02  Bruno Haible  <bruno@clisp.org>
23913
23914         * lib/binary-io.h: New file, from GNU gettext.
23915
23916 2003-04-01  Bruno Haible  <bruno@clisp.org>
23917
23918         * modules/pathname: New file.
23919         * MODULES.html.sh (func_all_modules): Add it.
23920
23921 2003-04-01  Bruno Haible  <bruno@clisp.org>
23922
23923         * lib/pathname.h: New file, from GNU gettext.
23924         * lib/concatpath.c: New file, from GNU gettext.
23925
23926 2003-03-30  Bruno Haible  <bruno@clisp.org>
23927
23928         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
23929
23930 2003-03-30  Bruno Haible  <bruno@clisp.org>
23931
23932         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
23933         function chown() doesn't exist.
23934
23935 2003-03-28  Bruno Haible  <bruno@clisp.org>
23936
23937         * modules/copy-file: New file.
23938         * MODULES.html.sh (func_all_modules): Add it.
23939
23940 2003-03-28  Bruno Haible  <bruno@clisp.org>
23941
23942         * m4/copy-file.m4: New file.
23943
23944 2003-03-28  Bruno Haible  <bruno@clisp.org>
23945
23946         * lib/copy-file.h: New file, from GNU gettext.
23947         * lib/copy-file.c: New file, from GNU gettext.
23948
23949 2003-03-18  Jim Meyering  <jim@meyering.net>
23950
23951         * lib/quote.c (quote_n): Fix typo in comment.
23952
23953 2003-03-18  Bruno Haible  <bruno@clisp.org>
23954
23955         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
23956         checking.
23957         * m4/onceonly_2_57.m4: Likewise.
23958
23959 2003-03-17  Bruno Haible  <bruno@clisp.org>
23960
23961         * m4/onceonly.m4: Require autoconf 2.54 or newer.
23962         (m4_quote): Remove macro.
23963         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
23964
23965 2003-03-14  Jim Meyering  <jim@meyering.net>
23966
23967         Merge changes from Coreutils.
23968         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
23969         to be const, in order to avoid warnings.
23970         (obstack_room): Likewise.
23971         (obstack_empty_p): Likewise.
23972
23973 2003-03-14  Bruno Haible  <bruno@clisp.org>
23974
23975         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
23976         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
23977
23978 2003-03-13  Paul Eggert  <eggert@twinsun.com>
23979
23980         Merge changes from Bison.
23981         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
23982         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
23983         when compiling Bison 1.875's `bitset bset = obstack_alloc
23984         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
23985         * lib/hash.c: Include <stdbool.h> unconditionally.
23986
23987 2003-03-13  Paul Eggert  <eggert@twinsun.com>
23988
23989         * m4/onceonly.m4 (m4_quote): New macro.
23990         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
23991         Quote AC_FOREACH variable-expansions properly.
23992
23993 2003-03-13  Paul Eggert  <eggert@twinsun.com>
23994
23995         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
23996
23997 2003-03-09  Paul Eggert  <eggert@twinsun.com>
23998
23999         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
24000         Reported by Bruce Becker; see:
24001         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
24002
24003 2003-03-03  Paul Eggert  <eggert@twinsun.com>
24004             Bruno Haible  <bruno@clisp.org>
24005
24006         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
24007         Reported by John Hughes, see
24008         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
24009
24010 2003-02-20  Bruno Haible  <bruno@clisp.org>
24011
24012         * MODULES.html.sh (func_all_modules): Add poll.
24013
24014 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
24015
24016         * modules/poll: New file.
24017
24018 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
24019
24020         * lib/poll_.h: New file.
24021         * lib/poll.c: New file.
24022
24023 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
24024
24025         * m4/poll.m4: New file.
24026
24027 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
24028
24029         * modules/mathl: New file.
24030
24031 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
24032
24033         * lib/mathl.h: New file.
24034         * lib/acosl.c: New file.
24035         * lib/asinl.c: New file.
24036         * lib/atanl.c: New file.
24037         * lib/ceill.c: New file.
24038         * lib/cosl.c: New file.
24039         * lib/expl.c: New file.
24040         * lib/floorl.c: New file.
24041         * lib/frexpl.c: New file.
24042         * lib/ldexpl.c: New file.
24043         * lib/logl.c: New file.
24044         * lib/sincosl.c: New file.
24045         * lib/sinl.c: New file.
24046         * lib/sqrtl.c: New file.
24047         * lib/tanl.c: New file.
24048         * lib/trigl.c: New file.
24049         * lib/trigl.h: New file.
24050
24051 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
24052
24053         * m4/mathl.m4: New file.
24054
24055 2003-02-18  Bruno Haible  <bruno@clisp.org>
24056
24057         * MODULES.html.sh (func_all_modules): Add mathl.
24058
24059 2003-02-17  Bruno Haible  <bruno@clisp.org>
24060
24061         * modules/mkdtemp: New module.
24062         * MODULES.html.sh (func_all_modules): Add it.
24063
24064 2003-02-17  Bruno Haible  <bruno@clisp.org>
24065
24066         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
24067
24068 2003-02-17  Bruno Haible  <bruno@clisp.org>
24069
24070         * lib/mkdtemp.h: New file, from GNU gettext.
24071         * lib/mkdtemp.c: New file, from GNU gettext.
24072
24073 2003-02-02  Jim Meyering  <jim@meyering.net>
24074
24075         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
24076         e.g. glibc-2.2.93.
24077
24078 2003-01-31  Bruno Haible  <bruno@clisp.org>
24079
24080         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
24081         'rpl_rename'.
24082         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
24083         'rpl_strnlen'.
24084         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
24085         'rpl_strtod'.
24086         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
24087         'rpl_utime'.
24088
24089 2003-01-31  Bruno Haible  <bruno@clisp.org>
24090
24091         * lib/rename.c: #undef rename before defining rpl_rename.
24092         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
24093
24094 2003-01-30  Bruno Haible  <bruno@clisp.org>
24095
24096         * modules/vasnprintf, modules/vasprintf: New modules.
24097         * MODULES.html.sh (func_all_modules): Add them.
24098
24099 2003-01-30  Bruno Haible  <bruno@clisp.org>
24100
24101         * m4/signed.m4: New file, from GNU gettext.
24102         * m4/longdouble.m4: New file, from GNU gettext.
24103         * m4/wchar_t.m4: New file, from GNU gettext.
24104         * m4/wint_t.m4: New file, from GNU gettext.
24105         * m4/vasnprintf.m4: New file.
24106         * m4/vasprintf.m4: New file.
24107
24108 2003-01-30  Bruno Haible  <bruno@clisp.org>
24109
24110         * lib/printf-args.h: New file, from GNU gettext.
24111         * lib/printf-args.c: New file, from GNU gettext.
24112         * lib/printf-parse.h: New file, from GNU gettext.
24113         * lib/printf-parse.c: New file, from GNU gettext.
24114         * lib/vasnprintf.h: New file, from GNU gettext.
24115         * lib/vasnprintf.c: New file, from GNU gettext.
24116         * lib/asnprintf.c: New file, from GNU gettext.
24117         * lib/vasprintf.h: New file, from GNU gettext with modifications.
24118         * lib/vasprintf.c: New file, from GNU gettext.
24119         * lib/asprintf.c: New file, from GNU gettext.
24120
24121 2003-01-29  Bruno Haible  <bruno@clisp.org>
24122
24123         * modules/stpncpy: New module.
24124         * MODULES.html.sh (func_all_modules): Add it.
24125
24126 2003-01-29  Bruno Haible  <bruno@clisp.org>
24127
24128         * m4/stpncpy.m4: New file.
24129
24130 2003-01-29  Bruno Haible  <bruno@clisp.org>
24131
24132         * lib/stpncpy.h: New file, from GNU gettext with modifications.
24133         * lib/stpncpy.c: New file, from GNU gettext with modifications.
24134
24135 2003-01-28  Bruno Haible  <bruno@clisp.org>
24136
24137         * modules/c-ctype: New module.
24138         * MODULES.html.sh (func_all_modules): Add it.
24139
24140 2003-01-28  Bruno Haible  <bruno@clisp.org>
24141
24142         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
24143         Paul Eggert.
24144         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
24145         Paul Eggert.
24146
24147 2003-01-27  Bruno Haible  <bruno@clisp.org>
24148
24149         * modules/xsetenv: New module.
24150         * MODULES.html.sh (func_all_modules): Add it.
24151
24152 2003-01-27  Bruno Haible  <bruno@clisp.org>
24153
24154         * lib/xsetenv.h: New file, from GNU gettext.
24155         * lib/xsetenv.c: New file, from GNU gettext.
24156
24157 2003-01-23  Jim Meyering  <jim@meyering.net>
24158
24159         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
24160         from working on systems without dirfd (at least Irix and OSF1/Tru64).
24161
24162 2003-01-23  Bruno Haible  <bruno@clisp.org>
24163
24164         * modules/minmax: New module.
24165         * MODULES.html.sh (func_all_modules): Add it.
24166
24167 2003-01-23  Bruno Haible  <bruno@clisp.org>
24168
24169         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
24170         Eggert.
24171
24172 2003-01-22  Bruno Haible  <bruno@clisp.org>
24173
24174         * modules/exit: New module.
24175         * MODULES.html.sh (func_all_modules): Add it.
24176
24177 2003-01-22  Bruno Haible  <bruno@clisp.org>
24178
24179         * lib/exit.h: New file, from GNU gettext.
24180
24181 2003-01-19  Bruno Haible  <bruno@clisp.org>
24182
24183         * gnulib-tool: Recognize option --extract-maintainer.
24184         (func_get_maintainer): New function.
24185         * modules/*: Add Maintainer entry.
24186
24187 2003-01-16  Jim Meyering  <jim@meyering.net>
24188
24189         * m4/regex.m4: The `regex' struct is both input and output.
24190         Initialize it before each use.  Patch by Tim Waugh.
24191
24192 2003-01-16  Bruno Haible  <bruno@clisp.org>
24193
24194         * MODULES.html.sh: Add a table of contents. Add the module name as
24195         leftmost column. Add hyperlinks.
24196
24197 2003-01-15  Bruno Haible  <bruno@clisp.org>
24198
24199         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
24200
24201 2003-01-15  Bruno Haible  <bruno@clisp.org>
24202
24203         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
24204         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
24205         suffix.
24206
24207 2003-01-15  Bruno Haible  <bruno@clisp.org>
24208
24209         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
24210
24211 2003-01-15  Bruno Haible  <bruno@clisp.org>
24212
24213         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
24214         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
24215
24216 2003-01-14  Jim Meyering  <jim@meyering.net>
24217
24218         * lib/same.c (same_name): Tweak a comment.
24219
24220 2003-01-14  Bruno Haible  <bruno@clisp.org>
24221
24222         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
24223         when a string comparison is sufficient.
24224
24225 2003-01-14  Bruno Haible  <bruno@clisp.org>
24226
24227         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
24228         'unsigned int'.
24229
24230 2003-01-14  Bruno Haible  <bruno@clisp.org>
24231
24232         * lib/hash-pjw.c: Add comment about low quality of this function.
24233
24234 2003-01-13  Bruno Haible  <bruno@clisp.org>
24235
24236         * modules/stpcpy: Distribute lib/stpcpy.h.
24237         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
24238
24239 2003-01-13  Bruno Haible  <bruno@clisp.org>
24240
24241         * modules/*: Add a description.
24242         * modules/strpbrk: Fix Makefile.am snippet.
24243         * modules/strtoimax: Fix dependencies.
24244         * modules/strtoumax: Likewise.
24245
24246 2003-01-13  Bruno Haible  <bruno@clisp.org>
24247
24248         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
24249         * modules/alloca (Makefile.am): All object files depend on alloca.h.
24250         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
24251
24252 2003-01-13  Bruno Haible  <bruno@clisp.org>
24253
24254         * gnulib-tool (func_create_testdir): Store config/* files in the main
24255         directory.
24256         * config.rpath: Move to ...
24257         * config/config.rpath: ... here.
24258         * modules/gettext: Contains config/config.rpath, not config.rpath.
24259         * modules/iconv: Likewise.
24260
24261 2003-01-12  Paul Eggert  <eggert@twinsun.com>
24262
24263         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
24264         to avoid collisions with libcurses and libreadline.
24265
24266         * m4/getstr.m4: Remove.
24267         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
24268
24269 2003-01-12  Paul Eggert  <eggert@twinsun.com>
24270
24271         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
24272         to avoid collisions with libcurses and libreadline.
24273
24274         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
24275         * lib/getstr.h, getstr.c: Remove.
24276         * lib/getline.c: Include "getline.h", to check interface.
24277         Move body of old getstr.c here: this defines MIN_CHUNK and
24278         declares getdelim2, which is renamed from getstr.
24279         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
24280
24281         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
24282         All uses changed.
24283         * lib/linebuffer.h: Likewise.
24284         (readline): Remove backward-compatibility macro.
24285
24286 2003-01-12  Paul Eggert  <eggert@twinsun.com>
24287
24288         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
24289         to avoid collisions with libcurses and libreadline.
24290         * getstr: Remove.
24291         * MODULES.html.sh: Remove getstr.
24292         * modules/getline: Depend on unlocked-io, not getstr.
24293
24294 2003-01-12  Jim Meyering  <jim@meyering.net>
24295
24296         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
24297
24298 2003-01-10  Bruno Haible  <bruno@clisp.org>
24299
24300         * modules/alloca: Change Makefile.am requirements. Simplify Include
24301         requirements. Add lib/alloca_.h to file list.
24302
24303 2003-01-10  Bruno Haible  <bruno@clisp.org>
24304
24305         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
24306
24307 2003-01-10  Bruno Haible  <bruno@clisp.org>
24308
24309         * lib/alloca_.h: New file.
24310         * lib/getdate.y: Unconditionally include alloca.h.
24311         * lib/makepath.c: Likewise.
24312         * lib/setenv.c: Likewise.
24313         * lib/userspec.c: Likewise.
24314
24315 2003-01-09  Karl Berry  <karl@gnu.org>
24316
24317         * MODULES.html.sh: include `dirname $0` in PATH, to find
24318         gnulib-tool.
24319
24320 2003-01-09  Bruno Haible  <bruno@clisp.org>
24321
24322         * modules/stdbool: Change configure.ac, Makefile.am requirements.
24323         Simplify Include requirements. Add lib/stdbool.h.in to file list.
24324
24325 2003-01-09  Bruno Haible  <bruno@clisp.org>
24326
24327         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
24328
24329 2003-01-09  Bruno Haible  <bruno@clisp.org>
24330
24331         * lib/stdbool.h.in: New file.
24332
24333 2003-01-09  Bruno Haible  <bruno@clisp.org>
24334
24335         * gnulib-tool (func_all_modules): Ignore files ending in ~.
24336         * MODULES.html.sh: Likewise.
24337
24338 2003-01-08  Jim Meyering  <jim@meyering.net>
24339
24340         * lib/full-write.c: Undefine and define-away `const' after inclusion
24341         of errno.h, not before.  Suggestion from Bruno Haible.
24342
24343 2003-01-08  Bruno Haible  <bruno@clisp.org>
24344
24345         * modules/full-read: Depend on full-write.
24346
24347 2003-01-08  Bruno Haible  <bruno@clisp.org>
24348
24349         * lib/safe-read.c: Include specification header first, to ensure its
24350         selfcontainedness.
24351         * lib/full-write.c: Likewise.
24352
24353 2003-01-07  Jim Meyering  <jim@meyering.net>
24354
24355         * lib/full-write.c: Rework so that it may serve to define full_read,
24356         too.
24357         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
24358
24359 2003-01-07  Bruno Haible  <bruno@clisp.org>
24360
24361         * lib/strtoimax.c: Include <stdint.h> as an alternative to
24362         <inttypes.h>.
24363         * lib/xstrtol.h: Likewise.
24364         * lib/xstrtoimax.c: Likewise.
24365         * lib/xstrtoumax.c: Likewise.
24366         * lib/human.h: Likewise.
24367
24368         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
24369         on systems that have <inttypes.h> but not <stdint.h>.
24370
24371 2003-01-07  Bruno Haible  <bruno@clisp.org>
24372
24373         * MODULES.html.sh: Add copyright notice.
24374         (missed_files): Omit CVS directory entries.
24375         (func_module): Make it work with sed-3.02.
24376         * MODULES.txt: Remove file.
24377
24378 2003-01-06  Jim Meyering  <jim@meyering.net>
24379
24380         * lib/version-etc.c: Update year in translatable copyright string.
24381
24382 2003-01-03  Karl Berry  <karl@gnu.org>
24383
24384         * config/config.{guess,sub}: update from prep.
24385
24386 2003-01-02  Karl Berry  <karl@gnu.org>
24387
24388         * doc/COPYING.DOC: belatedly updated to 1.2.
24389
24390 2003-01-01  Karl Berry  <karl@gnu.org>
24391
24392         * gnulib-tool (func_verify_module): report module name $module in
24393         error message, not $1.
24394         * gnulib-tool (create-testdir): don't complain if destdir couldn't
24395         be created, only if it doesn't exist.
24396         * gnulib-tool (last_checkin_date): don't expand the $Date here.
24397
24398 2002-12-31  Paul Eggert  <eggert@twinsun.com>
24399
24400         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
24401
24402 2002-12-31  Paul Eggert  <eggert@twinsun.com>
24403
24404         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
24405         memcmp if strcoll doesn't work.
24406
24407 2002-12-31  Bruno Haible  <bruno@clisp.org>
24408
24409         * lib/utime.c (utime_null): No need to call ftruncate if the file was
24410         nonempty.
24411
24412 2002-12-31  Bruno Haible  <bruno@clisp.org>
24413
24414         * lib/memcoll.c (STRCOLL): New macro.
24415         (memcoll): Use it.
24416
24417 2002-12-31  Bruno Haible  <bruno@clisp.org>
24418
24419         * lib/localcharset.h: New file.
24420         * lib/localcharset.c: Include it.
24421         * lib/unicodeio.c: Likewise.
24422
24423 2002-12-31  Bruno Haible  <bruno@clisp.org>
24424
24425         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
24426         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
24427
24428 2002-12-31  Bruno Haible  <bruno@clisp.org>
24429
24430         * lib/getline.h: Include <stddef.h>, for size_t.
24431
24432         * lib/unicodeio.h: Include <stddef.h>, for size_t.
24433         * lib/unicodeio.c: Don't include <stddef.h>.
24434
24435 2002-12-31  Bruno Haible  <bruno@clisp.org>
24436
24437         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
24438         HAVE_TM_ZONE.
24439
24440 2002-12-24  Karl Berry  <karl@gnu.org>
24441
24442         * config/config.guess: update from prep.
24443
24444 2002-12-24  Bruno Haible  <bruno@clisp.org>
24445
24446         General infrasructure.
24447         * m4/README: Rewritten.
24448         * m4/onceonly.m4: New file.
24449         * m4/onceonly_2_57.m4: New file.
24450
24451         Module atexit.
24452         * m4/atexit.m4: New file.
24453
24454         Module strtod.
24455         * m4/strtod.m4: New file.
24456
24457         Module strtol.
24458         * m4/strtol.m4: New file.
24459
24460         Module strtoul.
24461         * m4/strtoul.m4: New file.
24462
24463         Module memchr.
24464         * m4/memchr.m4: New file.
24465
24466         Module memcmp.
24467         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
24468         (jm_FUNC_MEMCMP): Invoke it.
24469
24470         Module memcpy.
24471         * m4/memcpy.m4: New file.
24472
24473         Module memmove.
24474         * m4/memmove.m4: New file.
24475
24476         Module memset.
24477         * m4/memset.m4: New file.
24478
24479         Module strcspn.
24480         * m4/strcspn.m4: New file.
24481
24482         Module strpbrk.
24483         * m4/strpbrk.m4: New file.
24484
24485         Module strstr.
24486         * m4/strstr.m4: New file.
24487
24488         Module strerror.
24489         * m4/strerror.m4: New file.
24490
24491         Module mktime.
24492         * m4/mktime.m4: Renamed from jm-mktime.m4.
24493         (gl_PREREQ_MKTIME): New macro.
24494         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
24495
24496         Module malloc.
24497         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
24498         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
24499         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
24500
24501         Module realloc.
24502         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
24503         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
24504         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
24505
24506         Module strftime.
24507         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
24508         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
24509         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
24510         gl_TM_GMTOFF.
24511         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
24512
24513         Module xalloc.
24514         * m4/xalloc.m4: New file.
24515
24516         Module alloca.
24517         * m4/alloca.m4: New file.
24518
24519         Module putenv.
24520         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
24521         (jm_FUNC_PUTENV): Invoke it.
24522
24523         Module setenv.
24524         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
24525         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
24526         when invoked twice.
24527         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
24528         gt_FUNC_SETENV.
24529
24530         Module memrchr.
24531         * m4/memrchr.m4: New file.
24532
24533         Module stpcpy.
24534         * m4/stpcpy.m4: New file.
24535
24536         Module strcase.
24537         * m4/strcase.m4: New file.
24538
24539         Module strdup.
24540         * m4/strdup.m4: New file.
24541
24542         Module strnlen.
24543         * m4/strnlen.m4: New file.
24544
24545         Module strndup.
24546         * m4/strndup.m4: New file.
24547
24548         Module xstrtod.
24549         * m4/xstrtod.m4: New file.
24550
24551         Module xstrtol.
24552         * m4/xstrtol.m4: New file.
24553
24554         Module getdate.
24555         * m4/getdate.m4: New file.
24556
24557         Module unlocked-io.
24558         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
24559         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
24560         * m4/jm-glibc-io.m4n: Remove file.
24561
24562         Module long-options.
24563         * m4/long-options.m4: New file.
24564
24565         Module md5.
24566         * m4/md5.m4: New file.
24567
24568         Module sha.
24569         * m4/sha.m4: New file.
24570
24571         Module getstr.
24572         * m4/getstr.m4: New file.
24573
24574         Module getline.
24575         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
24576         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
24577         <sys/types.h>, for size_t. Use the function name gnu_getline, not
24578         simply getline. Infoke gl_PREREQ_GETLINE.
24579
24580         Module obstack.
24581         * m4/obstack.m4: New file.
24582
24583         Module hash.
24584         * m4/hash.m4: New file.
24585
24586         Module readtokens.
24587         * m4/readtokens.m4: New file.
24588
24589         Module strverscmp.
24590         * m4/strverscmp.m4: New file.
24591
24592         Module stdbool.
24593         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
24594         OSF/1.
24595
24596         Module strtoll.
24597         * m4/strtoll.m4: New file.
24598
24599         Module strtoull.
24600         * m4/strtoull.m4: New file.
24601
24602         Module strtoimax.
24603         * m4/strtoimax.m4: New file.
24604
24605         Module strtoumax.
24606         * m4/strtoumax.m4: New file.
24607
24608         Module xstrtoimax.
24609         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
24610         jm_AC_PREREQ_XSTRTOIMAX.
24611         Moved the strtol prerequisites to strtol.m4.
24612         Moved the strtoll prerequisites to strtoll.m4.
24613         Moved the strtoimax prerequisites to strtoimax.m4.
24614
24615         Module xstrtoumax.
24616         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
24617         jm_AC_PREREQ_XSTRTOUMAX.
24618         Moved the strtoul prerequisites to strtoul.m4.
24619         Moved the strtoull prerequisites to strtoull.m4.
24620         Moved the strtoumax prerequisites to strtoumax.m4.
24621
24622         Module chown.
24623         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
24624         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
24625
24626         Module dup2.
24627         * m4/dup2.m4: New file.
24628
24629         Module ftruncate.
24630         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
24631         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
24632
24633         Module getgroups.
24634         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
24635         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
24636
24637         Module gettimeofday.
24638         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
24639         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
24640         gl_PREREQ_GETTIMEOFDAY.
24641
24642         Module mkdir.
24643         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
24644         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
24645
24646         Module mkstemp.
24647         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
24648         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
24649         jm_AC_TYPE_UINTMAX_T.
24650         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
24651
24652         Module stat.
24653         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
24654         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
24655
24656         Module lstat.
24657         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
24658         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
24659
24660         Module timespec.
24661         * m4/timespec.m4 (gl_TIMESPEC): New macro.
24662         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
24663         * m4/st_mtim.m4: Indentation.
24664
24665         Module nanosleep.
24666         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
24667         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
24668         gl_PREREQ_NANOSLEEP.
24669
24670         Module regex.
24671         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
24672         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
24673         (gl_REGEX): New macro.
24674
24675         Module rename.
24676         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
24677         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
24678
24679         Module rmdir.
24680         * m4/rmdir.m4: New file.
24681
24682         Module utime.
24683         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
24684         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
24685         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
24686
24687         Module dirname.
24688         * m4/dirname.m4: New file.
24689
24690         Module getopt.
24691         * m4/getopt.m4: New file.
24692
24693         Module unistd-safer.
24694         * m4/unistd-safer.m4: New file.
24695
24696         Module fnmatch.
24697         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
24698         declaration.
24699         (gl_PREREQ_FNMATCH_EXTRA): New macro.
24700         (gl_FUNC_FNMATCH_POSIX): New macro.
24701         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
24702         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
24703         simply fnmatch.
24704
24705         Module exclude.
24706         * m4/exclude.m4: New file.
24707
24708         Module human.
24709         * m4/human.m4: New file.
24710
24711         Module acl.
24712         * m4/acl.m4: Nop.
24713
24714         Module backupfile.
24715         * m4/backupfile.m4: New file.
24716         * m4/d-ino.m4: Indentation.
24717
24718         Module fsusage.
24719         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
24720         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
24721         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
24722
24723         Module dirfd.
24724         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
24725         requirements.
24726
24727         Module euidaccess.
24728         * m4/euidaccess.m4: New file.
24729
24730         Module file-type.
24731         * m4/file-type.m4: New file.
24732
24733         Module fileblocks.
24734         * m4/fileblocks.m4: New file.
24735
24736         Module filemode.
24737         * m4/filemode.m4: New file.
24738
24739         Module isdir.
24740         * m4/isdir.m4: New file.
24741
24742         Module lchown.
24743         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
24744         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
24745
24746         Module makepath.
24747         * m4/makepath.m4: New file.
24748
24749         Module modechange.
24750         * m4/modechange.m4: New file.
24751
24752         Module mountlist.
24753         * m4/mountlist.m4: New file.
24754         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
24755         Indentation.
24756
24757         Module path-concat.
24758         * m4/path-concat.m4: New file.
24759
24760         Module pathmax.
24761         * m4/pathmax.m4: New file.
24762
24763         Module same.
24764         * m4/same.m4: New file.
24765
24766         Module save-cwd.
24767         * m4/save-cwd.m4: New file.
24768
24769         Module savedir.
24770         * m4/savedir.m4: New file.
24771
24772         Module xgetcwd.
24773         * m4/xgetcwd.m4: New file.
24774         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
24775
24776         Module xreadlink.
24777         * m4/xreadlink.m4: New file.
24778
24779         Module safe-read.
24780         * m4/safe-read.m4: New file.
24781
24782         Module safe-write.
24783         * m4/safe-write.m4: New file.
24784
24785         Module closeout.
24786         * m4/closeout.m4: New file.
24787
24788         Module stdio-safer.
24789         * m4/stdio-safer.m4: New file.
24790
24791         Module getpass.
24792         * m4/getpass.m4: New file.
24793
24794         Module getugroups.
24795         * m4/getugroups.m4: New file.
24796
24797         Module group-member.
24798         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
24799         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
24800
24801         Module idcache.
24802         * m4/idcache.m4: New file.
24803
24804         Module userspec.
24805         * m4/userspec.m4: New file.
24806
24807         Module gettime.
24808         * m4/clock_time.m4: New file.
24809         * m4/gettime.m4: New file.
24810
24811         Module settime.
24812         * m4/settime.m4: New file.
24813
24814         Module posixtm.
24815         * m4/posixtm.m4: New file.
24816
24817         Module gethostname.
24818         * m4/gethostname.m4: New file.
24819
24820         Module canon-host.
24821         * m4/canon-host.m4: New file.
24822
24823         Module gettext.
24824         * m4/codeset.m4: New file, from gettext-0.11.5.
24825         * m4/gettext.m4: New file, from gettext-0.11.5.
24826         * m4/glibc21.m4: New file, from gettext-0.11.5.
24827         * m4/iconv.m4: New file, from gettext-0.11.5.
24828         * m4/intdiv0.m4: New file, from gettext-0.11.5.
24829         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
24830         * m4/inttypes.m4: New file, from gettext-0.11.5.
24831         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
24832         * m4/isc-posix.m4: New file, from gettext-0.11.5.
24833         * m4/lcmessage.m4: New file, from gettext-0.11.5.
24834         * m4/lib-ld.m4: New file, from gettext-0.11.5.
24835         * m4/lib-link.m4: New file, from gettext-0.11.5.
24836         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
24837         * m4/progtest.m4: New file, from gettext-0.11.5.
24838         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
24839         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
24840         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
24841
24842         Module localcharset.
24843         * m4/localcharset.m4: New file.
24844
24845         Module hard-locale.
24846         * m4/hard-locale.m4: New file.
24847
24848         Module mbswidth.
24849         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
24850         onceonly macros.
24851         * m4/mbrtowc.m4: Add comment.
24852
24853         Module memcasecmp.
24854         * m4/memcasecmp.m4: New file.
24855
24856         Module memcoll.
24857         * m4/memcoll.m4: New file.
24858
24859         Module unicodeio.
24860         * m4/unicodeio.m4: New file.
24861
24862         Module rpmatch.
24863         * m4/rpmatch.m4: New file.
24864
24865         Module yesno.
24866         * m4/yesno.m4: New file.
24867
24868         Module exitfail.
24869         * m4/exitfail.m4: New file.
24870
24871         Module c-stack.
24872         * m4/c-stack.m4 (gl_C_STACK): New macro.
24873         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
24874
24875         Module error.
24876         * m4/error.m4 (gl_ERROR): New macro.
24877         (jm_PREREQ_ERROR): Use onceonly macros.
24878
24879         Module fatal.
24880         * m4/fatal.m4: New file.
24881
24882         Module getloadavg.
24883         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
24884         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
24885
24886         Module getpagesize.
24887         * m4/getpagesize.m4: New file.
24888
24889         Module getusershell.
24890         * m4/getusershell.m4: New file.
24891
24892         Module physmem.
24893         * m4/physmem.m4: New file.
24894
24895         Module posixver.
24896         * m4/posixver.m4: New file.
24897
24898         Module quotearg.
24899         * m4/quotearg.m4: New file.
24900
24901         Module quote.
24902         * m4/quote.m4: New file.
24903
24904         Module readutmp.
24905         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
24906
24907         Module sig2str.
24908         * m4/sig2str.m4: New file.
24909
24910         Other.
24911         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
24912         ulonglong.m4.
24913         * m4/intmax_t.m4: New file.
24914         * m4/d-type.m4: Indentation.
24915         * m4/jm-macros.m4: Update.
24916         * m4/prereq.m4 (jm_PREREQ): Update.
24917         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
24918         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
24919         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
24920         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
24921         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
24922         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
24923         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
24924         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
24925         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
24926         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
24927         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
24928         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
24929         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
24930         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
24931         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
24932         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
24933         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
24934         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
24935         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
24936
24937 2002-12-24  Bruno Haible  <bruno@clisp.org>
24938
24939         * MODULES.txt: Update according to m4/ changes.
24940
24941         Module gettext.
24942         * config.rpath: New file, from gettext-0.11.5.
24943
24944         * modules/*: New module descriptions.
24945         * gnulib-tool: New file.
24946         * MODULES.html.sh: New file.
24947
24948 2002-12-21  Karl Berry  <karl@gnu.org>
24949
24950         * doc/fdl.texi: update to version 1.2.
24951
24952 2002-12-19  Karl Berry  <karl@gnu.org>
24953
24954         * config/config.guess: update from prep.
24955
24956 2002-12-18  Bruno Haible  <bruno@clisp.org>
24957
24958         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
24959         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
24960
24961 2002-12-17  Bruno Haible  <bruno@clisp.org>
24962
24963         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
24964         stdlib.h, string.h.
24965
24966 2002-12-17  Bruno Haible  <bruno@clisp.org>
24967
24968         * lib/canon-host.c (strdup): Remove unused declaration.
24969
24970         * lib/fsusage.c: Include full_read.h.
24971         (get_fs_usage): Use full_read instead of safe_read.
24972
24973         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
24974
24975 2002-12-12  Karl Berry  <karl@gnu.org>
24976
24977         * config/config.guess: update from prep.
24978
24979 2002-12-11  Bruno Haible  <bruno@clisp.org>
24980
24981         * m4/setenv.m4: New file, from gettext-0.11.5.
24982
24983 2002-12-11  Bruno Haible  <bruno@clisp.org>
24984
24985         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
24986         not unsetenv().
24987         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
24988         modifications:
24989
24990         2002-12-11  Bruno Haible  <bruno@clisp.org>
24991
24992                 * setenv.c (alloca): Fall back to malloc.
24993                 (freea): New macro.
24994                 (setenv): Use freea() to free memory allocated with alloca().
24995
24996         2002-11-13  Bruno Haible  <bruno@clisp.org>
24997
24998                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
24999                 function declarations.
25000                 * unsetenv.c (unsetenv): Likewise.
25001
25002         2002-03-04  Bruno Haible  <bruno@clisp.org>
25003
25004                 Portability to AIX 4.3.3.
25005                 * unsetenv.c: New file, extracted from setenv.c.
25006                 * setenv.c: Move the unsetenv() function to unsetenv.c.
25007
25008         2001-12-20  Bruno Haible  <bruno@clisp.org>
25009
25010                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
25011                 use malloc instead. For SunOS 4.
25012
25013         2001-12-11  Bruno Haible  <bruno@clisp.org>
25014
25015                 * setenv.c: Declare alloca.
25016                 (compar_fn_t): New typedef.
25017                 (KNOWN_VALUE, STORE_VALUE): Use it.
25018
25019         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
25020         setenv.h.
25021
25022 2002-12-10  Paul Eggert  <eggert@twinsun.com>
25023
25024         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
25025         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
25026         Choose values that are less likely to collide with system fnmatch
25027         options.
25028         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
25029         defined (e.g., a pure POSIX system).
25030         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
25031         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
25032
25033 2002-12-06  Paul Eggert  <eggert@twinsun.com>
25034
25035         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
25036         a pain in practice to deal with generated m4 files.  This change
25037         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
25038
25039         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
25040         and jm-glibc-io.m4, as they are no longer a special case.
25041         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
25042         kludge and the auto-generation stuff.  Check only whether the
25043         functions are declared, not whether they exist, since older hosts
25044         that don't declare the functions can't use the optimization anyway.
25045
25046 2002-12-06  Jim Meyering  <jim@meyering.net>
25047
25048         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
25049
25050         Merge in changes from libc's misc/error.c, in preparation
25051         for the merge of gnulib's changes back into libc.
25052
25053         * lib/error.c (_): Define only if not already defined.
25054         Move definition to follow all #include directives.
25055         Include unlocked-io.h only if !_LIBC.
25056         [_LIBC]: Include <libio/libioP.h>.
25057         [USE_IN_LIBIO]: Include <libio/iolibio.h>
25058         (fflush): Tweak definition to use INTUSE.
25059         (putc): Define.
25060
25061 2002-12-05  Paul Eggert  <eggert@twinsun.com>
25062
25063         * lib/alloca.c [defined emacs]: Include "lisp.h".
25064         (xalloc_die) [defined emacs]: New macro.
25065         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
25066         [! defined emacs]: Include <xalloc.h>.
25067         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
25068         (pointer): Typedef to POINTER_TYPE *.
25069         (malloc): Remove decl; we now always use xmalloc.
25070         (alloca): Use old-style definition, since Emacs needs this.
25071         Check for arithmetic overflow when computing combined size.
25072
25073 2002-12-04  Paul Eggert  <eggert@twinsun.com>
25074
25075         Do not generate unlocked-io.h automatically, since it's easier to
25076         maintain it by hand.
25077
25078         * lib/unlocked-io.h: New file, from GNU diffutils,
25079         but with proper copyright notice and attribution.
25080         * lib/gen-uio: Remove.
25081         * lib/Makefile.am: Add copyright notice.
25082         (libfetish_a_SOURCES): Add unlocked-io.h.
25083         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
25084         (DISTCLEANFILES, io_functions): Remove macros.
25085         (EXTRA_DIST): Remove gen_uio.
25086         (unlocked-io.h): Remove rule.
25087
25088 2002-12-04  Jim Meyering  <jim@meyering.net>
25089
25090         Reflect the fact that stat.c and lstat.c are no longer generated.
25091         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
25092         (DISTCLEANFILES): Likewise.
25093         (EXTRA_DIST): Likewise.
25094         (all_local): Don't depend on stat.c or lstat.c.
25095         (stat.c, lstat.c): Remove rules.
25096         (EXTRA_DIST): Remove xstat.in.
25097
25098         * lib/xstat.in: Remove file.  Contents moved into stat.c.
25099         * lib/stat.c: New file.  Contents mostly from xstat.in.
25100         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
25101         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
25102
25103         * lib/safe-read.c: Rework so that it may serve to define safe_write,
25104         too.
25105         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
25106
25107 2002-12-03  Jim Meyering  <jim@meyering.net>
25108
25109         * lib/safe-read.c, safe-write.c: Change variable names and comments,
25110         but not semantics, to minimize the differences between these two files.
25111         (safe_read): Change comment to mention SAFE_READ_ERROR.
25112
25113         * lib/safe-read.c (IS_EINTR): Define.
25114         (safe_read): Use IS_EINTR in place of in-function cpp directives.
25115
25116 2002-12-02  Jim Meyering  <jim@meyering.net>
25117
25118         * lib/safe-read.c (EINTR): Define.
25119         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
25120         (INT_MAX): Provide fallback.
25121         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
25122
25123         * lib/safe-read.h (SAFE_READ_ERROR): Define.
25124
25125 2002-12-02  Bruno Haible  <bruno@clisp.org>
25126
25127         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
25128         Define, taken from safe-read.c.
25129         (INT_MAX): Provide fallback.
25130         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
25131         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
25132
25133         * lib/safe-read.c (EINTR): Remove definition.
25134         (safe_read): Don't use EINTR if it is absent.
25135
25136 2002-12-01  Jim Meyering  <jim@meyering.net>
25137
25138         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
25139         zero.
25140         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
25141
25142 2002-11-27  Paul Eggert  <eggert@twinsun.com>
25143
25144         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
25145         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
25146         with `if (! (value < limit)) abort ();', for readability.
25147
25148 2002-11-26  Karl Berry  <karl@gnu.org>
25149
25150         * lib/strdup.c: copy from libc again, with jim's ok.
25151         * lib/.cppi-disable: re-add strdup.c
25152
25153 2002-11-25  Karl Berry  <karl@gnu.org>
25154
25155         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
25156         instead of "strtol.c".
25157
25158 2002-11-25  Karl Berry  <karl@gnu.org>
25159
25160         * config/install-sh: update from automake for variable quoting, $0 in
25161         error msgs, etc.
25162
25163         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
25164         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
25165         entry.
25166
25167 2002-11-25  Jim Meyering  <jim@meyering.net>
25168
25169         * lib/mktime.c: Sync from libc, now that it has the latest fix.
25170
25171 2002-11-24  Karl Berry  <karl@gnu.org>
25172
25173         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
25174         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
25175
25176 2002-11-24  Jim Meyering  <jim@meyering.net>
25177
25178         Update from coreutils:
25179
25180         * lib/mktime.c: Merge in changes from libc.
25181
25182         Avoid a link-time failure on some Linux systems.
25183         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
25184         (otherwise).
25185         (__mon_yday): Declare with the STATIC attribute.
25186         (__mktime_internal): Likewise.
25187         Based on a report from Greg Schafer.
25188
25189 2002-11-23  Jim Meyering  <jim@meyering.net>
25190
25191         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
25192         Use `unsigned', not `int', as type of index.
25193
25194         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
25195
25196         * lib/fsusage.c: Remove unneeded parentheses around operands of
25197         `defined'.
25198
25199 2002-11-22  Paul Eggert  <eggert@twinsun.com>
25200
25201         * lib/quotearg.h: Allow multiple inclusion by surrounding with
25202         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
25203         so that we can be included first.
25204         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
25205         * lib/quotearg.c: Include quotearg.h immediately after config.h.
25206         No need to include stddef.h or sys/types.h any more.
25207         Surround local include files with "", not "<>".
25208         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
25209         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
25210         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
25211         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
25212         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
25213         (ISPRINT): Remove; no longer needed now that we assume C89.
25214
25215         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
25216         Preserve errno.
25217
25218         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
25219         quotearg_char): Use SIZE_MAX rather than
25220         (size_t) -1 when we are talking about "infinity".
25221
25222         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
25223
25224 2002-11-22  Paul Eggert  <eggert@twinsun.com>
25225
25226         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
25227         hint that one should use `if (! x) abort ();' rather than `assert
25228         (x);', and anyway it's one less thing to worry about configuring.
25229         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
25230         hash_rehash, hash_insert): Use abort rather than assert.
25231
25232 2002-11-22  Bruno Haible  <bruno@clisp.org>
25233
25234         * lib/safe-read.h: Assume C89. Add comments.
25235         (safe_read): Change return type to size_t.
25236         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
25237         byte counts > SSIZE_MAX correctly.
25238         * lib/safe-write.h: New file.
25239         * lib/safe-write.c: New file.
25240         * lib/full-read.h: New file.
25241         * lib/full-read.c: New file.
25242         * lib/full-write.h: Assume C89. Add comments.
25243         * lib/full-write.c: Include safe-write.h.
25244         (full_write): Rewritten to use safe_write.
25245         Suggested by Jim Meyering and Paul Eggert.
25246
25247 2002-11-21  Jim Meyering  <jim@meyering.net>
25248
25249         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
25250
25251         Merge in changes from the coreutils.
25252
25253         2002-09-25  Paul Eggert  <eggert@twinsun.com>
25254         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
25255         <stdint.h>.
25256         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
25257         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
25258         int.  Work more efficiently if X is the same width as uintmax_t.
25259         Do not compare X to -1, to avoid bogus compiler warning.
25260         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
25261         Don't assume that f_frsize and f_bsize are the same type.
25262
25263         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
25264         warning on FreeBSD.
25265
25266         * lib/makepath.c (make_path): Restore umask *before* creating the final
25267         component.
25268         (make_path): Minor reformatting.
25269
25270         * lib/xmalloc.c: Adjust to work with new autoconf macros,
25271         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
25272         HAVE_MALLOC/HAVE_REALLOC.
25273
25274         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
25275         dummy ones.  At least on GNU/Linux systems, `auto' means something
25276         else.
25277         From Michael Stone.
25278
25279 2002-11-21  Bruno Haible  <bruno@clisp.org>
25280
25281         Remove case insensitive option matching.
25282         * lib/argmatch.h (argcasematch): Remove declaration.
25283         (ARGCASEMATCH): Remove macro.
25284         (__xargmatch_internal): Remove case_sensitive argument.
25285         (XARGMATCH): Update.
25286         (XARGCASEMATCH): Remove macro.
25287         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
25288         case_sensitive argument.
25289         (argcasematch): Remove function.
25290         (__xargmatch_internal): Remove case_sensitive argument.
25291         (main): Use XARGMATCH instead of XARGCASEMATCH.
25292
25293         * lib/xmalloc.c: Change compile-time error message. Add comment about
25294         required autoconf version.
25295
25296 2002-11-20  Paul Eggert  <eggert@twinsun.com>
25297
25298         Merge argmatch cleanups from Bison.  Assume C89.
25299
25300         * lib/argmatch.c: Include config.h here, not in argmatch.h.
25301         Include stdlib.h, for EXIT_FAILURE.
25302         Always include <string.h>, since we assume C89.
25303         (EXIT_FAILURE): Remove pre-C89 bug workaround.
25304         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
25305         Include <stddef.h> instead, since it's all we need for size_t.
25306         (PARAMS): Remove.  All uses removed.
25307         (ARRAY_CARDINALITY): Do not bother to #undef.
25308         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
25309         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
25310         Remove unnecessary parentheses.
25311         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
25312         Insert necessary parentheses.
25313         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
25314         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
25315
25316 2002-11-19  Bruno Haible  <bruno@clisp.org>
25317
25318         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
25319         * lib/mbswidth.h: Include <stddef.h>, for size_t.
25320
25321         * lib/mbswidth.h (PARAMS): Remove macro.
25322         (mbswidth, mbsnwidth): Use ANSI C function declarations.
25323         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
25324
25325         * lib/gcd.h (PARAMS): Remove macro.
25326         (gcd): Use ANSI C function declarations.
25327         * lib/gcd.c (gcd): Likewise.
25328
25329 2002-11-15  Bruno Haible  <bruno@clisp.org>
25330
25331         * lib/strcspn.c: Include <stddef.h>.
25332         (strcspn): Use ANSI C function declaration. Change return type to
25333         size_t. Use NULL.
25334         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
25335         (strpbrk): Use NULL.
25336         * lib/strpbrk.h (PARAMS): Remove macro.
25337         (strpbrk): Use ANSI C function declaration.
25338         * lib/strstr.c: Don't include <sys/types.h>.
25339         * lib/strstr.h (PARAMS): Remove macro.
25340         (strstr): Use ANSI C function declarations.
25341
25342 2002-11-14  Karl Berry  <karl@gnu.org>
25343
25344         * config/mkinstalldirs: `do' on separate line, instead of
25345         `for var; do'.
25346
25347 2002-11-06  Bruno Haible  <bruno@clisp.org>
25348
25349         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
25350         * lib/gcd.c (gcd): Likewise.
25351
25352 2002-11-05  Bruno Haible  <bruno@clisp.org>
25353
25354         * lib/gcd.h: New file, from gettext-0.11.5.
25355         * lib/gcd.c: New file, from gettext-0.11.5.
25356
25357 2002-11-05  Bruno Haible  <bruno@clisp.org>
25358
25359         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25360         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25361         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25362         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25363
25364         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
25365         <libintl.h>.
25366         * lib/makepath.c: Include gettext.h instead of <locale.h> and
25367         <libintl.h>.
25368
25369         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
25370         * lib/human.c: Include gettext.h instead of <libintl.h>.
25371         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
25372         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
25373         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
25374         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
25375         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
25376         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
25377         (textdomain): Remove definition.
25378         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
25379
25380         * lib/long-options.c: Remove include of <libintl.h> and definition of
25381         _.
25382         * lib/same.c: Remove include of <libintl.h> and definition of _.
25383
25384 2002-11-04  Owen Taylor  <otaylor@redhat.com>
25385
25386         * lib/config.charset: A few additions for Solaris.
25387
25388 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
25389
25390         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
25391         * lib/localcharset.c (locale_charset): Declare as extern "C".
25392
25393 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
25394
25395         * lib/config.charset: msdos in uk_UA uses CP1125.
25396
25397 2002-11-04  Bruno Haible  <bruno@clisp.org>
25398
25399         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
25400         * lib/strcase.h: New file, from GNU gettext-0.11.5.
25401         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
25402         * lib/strstr.h: New file, from GNU gettext-0.11.5.
25403         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
25404
25405 2002-11-04  Bruno Haible  <bruno@clisp.org>
25406
25407         * lib/localcharset.c (locale_charset): Don't return an empty string.
25408
25409 2002-11-04  Bruno Haible  <bruno@clisp.org>
25410
25411         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
25412         aliases.
25413
25414 2002-11-04  Bruno Haible  <bruno@clisp.org>
25415
25416         * lib/config.charset: Update for newest glibc. Add canonical names
25417         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
25418
25419 2002-11-04  Bruno Haible  <bruno@clisp.org>
25420
25421         * lib/config.charset: Add support for NetBSD.
25422
25423 2002-11-04  Bruno Haible  <bruno@clisp.org>
25424
25425         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
25426
25427 2002-11-01  Bruno Haible  <bruno@clisp.org>
25428
25429         * configure.in: Add AC_CONFIG_AUX_DIR call.
25430         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
25431         test/Makefile.
25432         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
25433
25434 2002-09-28  Karl Berry  <karl@gnu.org>
25435
25436         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
25437         installed automake until the next release, since changes have been
25438         made.
25439
25440 2002-09-25  Karl Berry  <karl@gnu.org>
25441
25442         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
25443         * lib/getopt*: copy from libc/posix.
25444         * lib/gettext.h: copy from gettext.
25445         * lib/.cppi-disable: add strdup.c, gettext.h.
25446
25447 2002-09-25  Karl Berry  <karl@gnu.org>
25448
25449         * config/srclist.txt: enable gettext.h check.
25450         * config/config.{guess,sub}: update from prep.
25451         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
25452                 from automake 1.6.3.
25453         See srclist*.
25454
25455 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
25456
25457         * regex.c (PATFETCH): Remove the translating fetch.
25458         (PATFETCH_RAW): Rename to PATFETCH.
25459         (set_image_of_range): New fun.
25460         (SET_RANGE_TABLE_WORK_AREA): Use it.
25461         (regex_compile): Don't translate the pattern chars so eagerly.
25462         Only do it when inserting an `exactn' bytecode or when handling
25463         a char-range.
25464         (mutually_exclusive_p): Avoid empty statement.
25465
25466 2002-07-06  Jim Meyering  <meyering@lucent.com>
25467
25468         * m4/README: Don't mention Makefile.am.in.
25469         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
25470
25471 2002-07-01  Jim Meyering  <meyering@lucent.com>
25472
25473         * lib/c-stack.c: Include sys/time.h.
25474         From Volker Borchert.
25475
25476 2002-06-26  Paul Eggert  <eggert@twinsun.com>
25477
25478         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
25479
25480 2002-06-26  Paul Eggert  <eggert@twinsun.com>
25481
25482         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
25483         New macro.  Use it uniformly instead of
25484         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
25485         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
25486         reported by Vin Shelton.
25487
25488 2002-06-22  Paul Eggert  <eggert@twinsun.com>
25489
25490         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
25491         Do not assume SA_SIGINFO behavior.
25492         Bug reported by Jim Meyering on NetBSD 1.5.2.
25493
25494 2002-06-22  Jim Meyering  <meyering@lucent.com>
25495
25496         * m4/c-stack.m4: New file, from diffutils-2.8.2.
25497         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
25498
25499         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
25500         now that configure.ac uses AC_GNU_SOURCE.
25501         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
25502         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
25503
25504         Update to latest tools.  Suggestions from Paul Eggert.
25505         * m4/stdbool.m4: New file, from diffutils-2.8.2.
25506         * m4/gnu-source.m4: Update from diffutils-2.8.2.
25507         * m4/fnmatch.m4: Likewise.
25508         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
25509         to AC_HEADER_STDBOOL
25510
25511 2002-06-22  Jim Meyering  <meyering@lucent.com>
25512
25513         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
25514         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
25515
25516 2002-06-22  Jim Meyering  <meyering@lucent.com>
25517
25518         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
25519
25520         * lib/exitfail.c, exitfail.h: Likewise.
25521         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
25522
25523         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
25524         of fnmatch.h.
25525         (EXTRA_DIST): Add fnmatch_loop.c.
25526         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
25527
25528         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
25529         * lib/fnmatch.c: Update from diffutils-2.8.2.
25530         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
25531         * lib/fnmatch.h: Remove file.
25532
25533 2002-06-21  Jim Meyering  <meyering@lucent.com>
25534
25535         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
25536         * m4/mbrtowc.m4: Likewise.
25537
25538         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
25539         * m4/mbswidth.m4: Reflect name change:
25540         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
25541         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
25542
25543         * m4/lib-link.m4: Update from gettext-0.11.2.
25544         * m4/gettext.m4: Likewise.
25545
25546         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
25547         From Alfred M. Szmidt.
25548
25549 2002-06-18  Paul Eggert  <eggert@twinsun.com>
25550
25551         * lib/file-type.h: Report an error if neither S_ISREG nor
25552         S_IFREG is defined, instead of using a test specific to glibc
25553         2.2.  This should be safe, since POSIX requires S_ISREG and
25554         Unix Version 7 had S_IFREG.  We don't need to check for
25555         <sys/types.h> since we don't use any symbols that it defines.
25556
25557 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
25558
25559         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
25560         $@-t, so that each temporary file name is unique and valid in the first
25561         8 characters, for operation under DOS.
25562
25563 2002-06-15  Paul Eggert  <eggert@twinsun.com>
25564
25565         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
25566
25567 2002-06-15  Jim Meyering  <meyering@lucent.com>
25568
25569         Work even with DJGPP 2.03, which lacks support for symlinks.
25570         From Richard Dawe.
25571         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
25572         is defined.
25573         * lib/lchown.c (S_ISLNK): Likewise.
25574
25575 2002-06-15  Jim Meyering  <meyering@lucent.com>
25576
25577         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
25578         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
25579         have been included before this file.
25580
25581 2002-06-14  Jim Meyering  <meyering@lucent.com>
25582
25583         * lib/file-type.h: Use the version from diffutils-2.8.2.
25584         * lib/file-type.c: Likewise.
25585
25586 2002-06-07  Jim Meyering  <meyering@lucent.com>
25587
25588         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
25589         They're needed at least for NetBSD 1.5.2.
25590         ($statxfs_includes): Include those same headers.
25591         ($statxfs_includes): Include sys/vfs.h if available.
25592         ($statxfs_includes): Likewise for sys/statvfs.h.
25593         Check for the following members in both structs statfs and statvfs:
25594         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
25595
25596 2002-06-01  Jim Meyering  <meyering@lucent.com>
25597
25598         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
25599         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
25600
25601 2002-05-28  Jim Meyering  <meyering@lucent.com>
25602
25603         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
25604         Reported by Volker Borchert.
25605
25606 2002-05-27  Jim Meyering  <meyering@lucent.com>
25607
25608         Fix a problem seen only on nonconforming systems whereby ls.c's
25609         use of localtime, and then of gettimeofday would cause trouble:
25610         the localtime call used to initialize rpl_gettimeofday's save
25611         mechanism would clobber ls's current local time information so
25612         that in any long listing the first file would always be listed
25613         with date 1970-01-01.  Analysis by Volker Borchert.
25614
25615         * lib/gettimeofday.c (localtime): Undefine.
25616         (rpl_localtime): New function.
25617
25618 2002-05-27  Jim Meyering  <meyering@lucent.com>
25619
25620         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
25621         localtime.
25622
25623         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
25624         use the replacement function; it wouldn't resolve at link time.
25625         Reported by Volker Borchert.
25626
25627 2002-05-22  Jim Meyering  <meyering@lucent.com>
25628
25629         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
25630         file-type.h.
25631         * lib/file-type.h: New file.
25632         * lib/file-type.c (file_type): New file/function.  Extracted from
25633         diffutils.
25634
25635 2002-04-30  Jim Meyering  <meyering@lucent.com>
25636
25637         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
25638
25639 2002-04-29  Paul Eggert  <eggert@twinsun.com>
25640
25641         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
25642
25643 2002-04-29  Paul Eggert  <eggert@twinsun.com>
25644
25645         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
25646         Do not check for alloca.h (no longer used) or stdbool.h (was never
25647         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
25648
25649 2002-04-29  Paul Eggert  <eggert@twinsun.com>
25650
25651         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
25652
25653 2002-04-29  Jim Meyering  <meyering@lucent.com>
25654
25655         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
25656         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
25657         Use AC_FUNC_STRNLEN here instead.
25658
25659         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
25660         With autoconf-2.53a, it's part of AC_PROG_CC.
25661
25662 2002-04-28  Paul Eggert  <eggert@twinsun.com>
25663
25664         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
25665         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
25666
25667 2002-04-28  Paul Eggert  <eggert@twinsun.com>
25668
25669         * lib/sig2str.h, lib/sig2str.c: New files.
25670         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
25671
25672 2002-04-28  Paul Eggert  <eggert@twinsun.com>
25673
25674         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
25675         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
25676         of 127, since 64 is the largest conceivable number for ancient
25677         nonstandard hosts.
25678         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
25679
25680 2002-04-28  Jim Meyering  <meyering@lucent.com>
25681
25682         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
25683
25684 2002-04-24  Jim Meyering  <meyering@lucent.com>
25685
25686         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
25687         (jm_PREREQ): Use it.
25688
25689         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
25690         mach/mach.h fcntl.h.
25691         Check for this function: setlocale.
25692
25693 2002-04-24  Jim Meyering  <meyering@lucent.com>
25694
25695         * lib/gettext.h: New file, from Gettext.
25696         * lib/Makefile.am (INCLUDES): Remove -I../intl.
25697         (libfetish_a_SOURCES): Add gettext.h.
25698
25699 2002-04-16  Jim Meyering  <meyering@lucent.com>
25700
25701         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
25702         ut_pid, ut_id, ut_exit.
25703
25704 2002-04-16  Jim Meyering  <meyering@lucent.com>
25705
25706         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
25707         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
25708         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
25709
25710 2002-04-12  Jim Meyering  <meyering@lucent.com>
25711
25712         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
25713         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
25714         existence of the getmntinfo function.  Needed for Darwin 5.3.
25715
25716         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
25717         This is necessary at least on Darwin 5.3.
25718
25719         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
25720         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
25721         strnlen.o in the library, and that makes some versions of ranlib
25722         object.
25723
25724 2002-04-12  Jim Meyering  <meyering@lucent.com>
25725
25726         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
25727
25728 2002-04-09  Jim Meyering  <meyering@lucent.com>
25729
25730         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
25731         to be more precise.  Rather than saying we're checking whether the
25732         function `works', say what we're testing.
25733         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
25734         Reported by Bruno Haible.
25735
25736 2002-03-10  Jim Meyering  <meyering@lucent.com>
25737
25738         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
25739         Suggestion from Santiago Vila.
25740
25741 2002-03-08  Jim Meyering  <meyering@lucent.com>
25742
25743         * lib/rename.c: Mention that this wrapper is needed also on
25744         mips-dec-ultrix4.4 systems.
25745
25746 2002-03-02  Jim Meyering  <meyering@lucent.com>
25747
25748         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
25749         not HAVE_CLOCK_SETTIME.
25750
25751 2002-02-27  Paul Eggert  <eggert@twinsun.com>
25752
25753         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
25754         Check for clock_settime.
25755
25756 2002-02-27  Paul Eggert  <eggert@twinsun.com>
25757
25758         * lib/nanosleep.h: Rename to....
25759         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
25760
25761         * lib/gettime.c: New file.
25762         * lib/settime.c: New file.
25763         * lib/stime.c: Remove.
25764
25765         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
25766         timespec.h.  Remove nanosleep.h.
25767
25768 2002-02-25  Paul Eggert  <eggert@twinsun.com>
25769
25770         * m4/acl.m4: New file.
25771         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
25772         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
25773
25774 2002-02-25  Paul Eggert  <eggert@twinsun.com>
25775
25776         * lib/acl.c, lib/acl.h: New files.
25777         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
25778
25779 2002-02-24  Jim Meyering  <meyering@lucent.com>
25780
25781         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
25782         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
25783         cause trouble.  Reported by Nelson Beebe.
25784
25785 2002-02-23  Paul Eggert  <eggert@twinsun.com>
25786
25787         * lib/path-concat.c (xpath_concat): Reorder code to pacify
25788         compilers that don't know that xalloc_die never returns.
25789
25790 2002-02-20  Jim Meyering  <meyering@lucent.com>
25791
25792         * lib/getdate.c: Regenerate using bison-1.33.
25793
25794 2002-02-17  Jim Meyering  <meyering@lucent.com>
25795
25796         * config/config.guess (main): Don't use `head -1'; it's no longer
25797         portable. Use `sed 1q' instead.
25798
25799 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
25800
25801         * m4/codeset.m4: Upgrade to gettext-0.11.
25802         * m4/gettext.m4: Upgrade to gettext-0.11.
25803         * m4/glibc21.m4: Upgrade to gettext-0.11.
25804         * m4/iconv.m4: Upgrade to gettext-0.11.
25805         * m4/isc-posix.m4: Upgrade to gettext-0.11.
25806         * m4/lcmessage.m4: Upgrade to gettext-0.11.
25807         * m4/lib-ld.m4: New file, from gettext-0.11.
25808         * m4/lib-link.m4: New file, from gettext-0.11.
25809         * m4/lib-prefix.m4: New file, from gettext-0.11.
25810         * m4/progtest.m4: Upgrade to gettext-0.11.
25811
25812 2002-02-15  Paul Eggert  <eggert@twinsun.com>
25813
25814         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
25815         (jm_PREREQ): Use it.
25816
25817 2002-02-15  Paul Eggert  <eggert@twinsun.com>
25818
25819         * lib/posixver.c, lib/posixver.h: New files.
25820         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
25821
25822 2002-02-02  Paul Eggert  <eggert@twinsun.com>
25823             Bruno Haible  <bruno@clisp.org>
25824
25825         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
25826         (fwrite_success_callback): New declaration.
25827         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
25828         print_unicode_char. Call failure callback instead of error.
25829         (fwrite_success_callback): New function.
25830         (exit_failure_callback): New function.
25831         (fallback_failure_callback): New function.
25832         (print_unicode_char): Call unicode_to_mb.
25833
25834 2002-01-26  Jim Meyering  <meyering@lucent.com>
25835
25836         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
25837         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
25838
25839 2002-01-26  Jim Meyering  <meyering@lucent.com>
25840
25841         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
25842
25843 2002-01-22  Paul Eggert  <eggert@twinsun.com>
25844
25845         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
25846
25847 2002-01-22  Jim Meyering  <meyering@lucent.com>
25848
25849         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
25850         Otherwise, some versions of automake would omit the rule that makes
25851         Makefile from Makefile.in.
25852
25853 2002-01-21  Paul Eggert  <eggert@twinsun.com>
25854
25855         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
25856         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
25857         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
25858         (memcoll): Set errno to zero if there is no error.
25859
25860         * lib/quotearg.c (quotearg_buffer_restyled):
25861         Fix bug with quoting buffers containing NUL when backslashing escapes.
25862         This bug was exposed by the other changes in this patch.
25863         (quotearg_n_options): New arg ARGSIZE.
25864         All callers changed.
25865         (quoting_options_from_style): New function.
25866         (quotearg_n_style): Use it.
25867         (quotearg_n_style_mem): New function.
25868
25869         * lib/quotearg.h (quotearg_n_style_mem): New function.
25870
25871 2002-01-19  Jim Meyering  <meyering@lucent.com>
25872
25873         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
25874         Remove useless quotes: DF_PROG="df".
25875         * m4/strnlen.m4: New file.
25876
25877 2002-01-16  Paul Eggert  <eggert@twinsun.com>
25878
25879         * lib/backupfile.c (ISDIGIT): Comment fix.
25880         * lib/getdate.y (ISDIGIT): Likewise.
25881         * lib/posixtm.c (ISDIGIT, year): Likewise.
25882         * lib/strverscmp.c (ISDIGIT): Likewise.
25883         * lib/userspec.c (ISDIGIT): Likewise.
25884
25885 2002-01-16  Jim Meyering  <meyering@lucent.com>
25886
25887         * lib/getdate.y: Add three semicolons, each just before a closing
25888         brace. Bison (as of version 1.31) no longer papers over that mistake.
25889
25890 2002-01-05  Jim Meyering  <meyering@lucent.com>
25891
25892         * lib/version-etc.c (version_etc_copyright): Update copyright year.
25893
25894 2001-12-19  Paul Eggert  <eggert@twinsun.com>
25895
25896         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
25897         not silently exit merely because the output buffer happens to
25898         have nothing pending.
25899
25900 2001-12-18  Paul Eggert  <eggert@twinsun.com>
25901
25902         See the big note in ../ChangeLog.
25903         * lib/human.c (suffixes): Prefer K to k for 1024.
25904         (generate_suffix_backwards): New function.
25905         (human_readable_inexact): Use it.
25906         * lib/xstrtol.c (__xstrtol): If there is no number but there
25907         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
25908         Accept 'K' as well as 'k'.
25909
25910 2001-12-15  Jim Meyering  <meyering@lucent.com>
25911
25912         * lib/regex.h (__restrict_arr): Update from libc.
25913
25914         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
25915         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
25916         (STREQ): Define.
25917
25918 2001-12-14  Jim Meyering  <meyering@lucent.com>
25919
25920         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
25921         Suggestion from Bruno Haible.
25922
25923 2001-12-10  Jim Meyering  <meyering@lucent.com>
25924
25925         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
25926         xrealloc, Instead, include "xalloc.h".
25927         (initbuffer): Don't cast xmalloc return value to char*.
25928         (readline): Reword comment.
25929         Don't cast xrealloc return value to char*
25930         Return NULL, not 0.
25931
25932 2001-12-09  Jim Meyering  <meyering@lucent.com>
25933
25934         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
25935         about `signed and unsigned type in conditional expression'.
25936         * lib/posixtm.c (posix_time_parse): Likewise.
25937
25938         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
25939
25940         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
25941         to avoid a pedantic warning.
25942
25943         * lib/getstr.c: Don't include assert.h.
25944         (getstr): Remove warning-evoking assertions.
25945         Return -1 if offset parameter is out of bounds.
25946         Change the type of a local from int to size_t.
25947
25948         * lib/strftime.c (my_strftime_localtime_r): Include this function
25949         definition in the `#if ! HAVE_TM_GMTOFF' block.
25950
25951         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
25952         Include xalloc.h instead.
25953
25954 2001-12-02  Jim Meyering  <meyering@lucent.com>
25955
25956         * lib/tempname.c: Don't declare getenv, thus reverting the change of
25957         2001-11-18.  It's no longer necessary, now that stdlib.h is always
25958         included.
25959
25960         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
25961         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
25962
25963 2001-11-30  Akim Demaille  <akim@epita.fr>
25964
25965         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
25966         before being defined.
25967
25968 2001-11-27  Paul Eggert  <eggert@twinsun.com>
25969
25970         * lib/quotearg.h (quotearg_n, quotearg_n_style):
25971         First arg is int, not unsigned.
25972         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
25973         (SIZE_MAX, UINT_MAX): New macros.
25974         (quotearg_n_options): Abort if N is negative.
25975         Avoid overflow check on hosts where size_t is 64 bits and int
25976         is 32 bits, as overflow is impossible there.
25977         Fix off-by-one typo that caused unnecessary reallocation.
25978
25979 2001-11-27  Jim Meyering  <meyering@lucent.com>
25980
25981         * lib/tempname.c: Merge with version from libc.
25982         * lib/regex.c: Likewise.
25983
25984         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
25985         systems for which STDC_HEADERS is 0, it was not included, resulting in
25986         a warning about an integer-to-pointer conversion problem with getenv.
25987         Reported by Volker Borchert.
25988
25989 2001-11-26  Jim Meyering  <meyering@lucent.com>
25990
25991         * lib/gtod.h: Remove file.
25992         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
25993         * lib/gettimeofday.c: Don't include gtod.h.
25994         (GTOD_init): Remove function.
25995         (rpl_gettimeofday): Do its job here instead, rather than aborting.
25996         Suggestion from Volker Borchert.
25997
25998 2001-11-23  Jim Meyering  <meyering@lucent.com>
25999
26000         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
26001         it.
26002         * lib/hash.c (struct hash_table): Define it here instead.
26003
26004 2001-11-22  Jim Meyering  <meyering@lucent.com>
26005
26006         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
26007
26008 2001-11-20  Jim Meyering  <meyering@lucent.com>
26009
26010         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
26011         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
26012
26013 2001-11-19  Jim Meyering  <meyering@lucent.com>
26014
26015         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
26016         directory.  Use "conftestXXXXXX" as the template.
26017         Suggestion from Paul Eggert.
26018
26019         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
26020         immediately, so the test doesn't mistakenly hit the max-open-files
26021         limit.
26022
26023 2001-11-18  Paul Eggert  <eggert@twinsun.com>
26024
26025         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
26026         (TEMPORARIES): New macro.
26027         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
26028         removes an artificial limitation (e.g. HP-UX 10.20, where
26029         TMP_MAX is 17576).
26030
26031 2001-11-18  Jim Meyering  <meyering@lucent.com>
26032
26033         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
26034
26035 2001-11-18  Jim Meyering  <meyering@lucent.com>
26036
26037         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
26038         on SunOS 4.
26039
26040         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
26041         files will be created before anything else.
26042
26043 2001-11-17  Paul Eggert  <eggert@twinsun.com>
26044
26045         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
26046         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
26047
26048 2001-11-17  Jim Meyering  <meyering@lucent.com>
26049
26050         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
26051         Prompted by a report from Bob Proulx.
26052
26053         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
26054         Instead, require UTILS_FUNC_MKSTEMP.
26055
26056 2001-11-17  Jim Meyering  <meyering@lucent.com>
26057
26058         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
26059         Now, that's done as part of AC_FUNC_STRTOD.
26060
26061 2001-11-17  Jim Meyering  <meyering@lucent.com>
26062
26063         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
26064         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
26065         rather than group writable.  Patch by Juan F. Codagnone.
26066
26067         * lib/readtokens.c: Remove explicit declarations of xmalloc and
26068         xrealloc, Instead, include "xalloc.h".
26069
26070         * lib/mountlist.c: Include unlocked-io.h after all system headers.
26071         Remove explicit declarations of xmalloc, xrealloc,
26072         and xstrdup.  Instead, include "xalloc.h".
26073
26074         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
26075         unlocked-io.h.
26076         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
26077         Likewise.
26078         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
26079
26080         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
26081         Reported by Padraig Brady.
26082
26083         * lib/mkstemp.c: #undef mkstemp.
26084         Include config.h.
26085         (rpl_mkstemp): Rename from mkstemp.
26086         Protoize.
26087
26088 2001-11-16  Jim Meyering  <meyering@lucent.com>
26089
26090         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
26091         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
26092         determine the amount of total physical memory, use pstat_getstatic.
26093         HPUX-11 doesn't define _SC_PHYS_PAGES.
26094         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
26095         If sysconf couldn't be used to determine the amount of available
26096         physical memory, use both pstat_getstatic and pstat_getdynamic.
26097         Based on a patch from Bob Proulx.
26098
26099 2001-11-10  Jim Meyering  <meyering@lucent.com>
26100
26101         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
26102         (jm_PREREQ): Use it.
26103
26104 2001-11-09  Jim Meyering  <meyering@lucent.com>
26105
26106         * m4/jm-macros.m4: Require autoconf-2.52f.
26107         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
26108         Use these AC_-prefixed names, not the AM_-prefixed ones.
26109
26110         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
26111
26112 2001-11-05  Jim Meyering  <meyering@lucent.com>
26113
26114         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
26115
26116 2001-11-04  Jim Meyering  <meyering@lucent.com>
26117
26118         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
26119         $DEFS.
26120
26121 2001-11-03  Jim Meyering  <meyering@lucent.com>
26122
26123         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
26124         of AC_DEFUN.
26125
26126         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
26127         know the name of the variable in the macro definition.
26128
26129 2001-11-03  Jim Meyering  <meyering@lucent.com>
26130
26131         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
26132         in argmatch_to_argument call.
26133
26134         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
26135         argument.
26136
26137         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
26138         e.g., a fault due to an attempt to free a NULL pointer.
26139
26140 2001-11-01  Jim Meyering  <meyering@lucent.com>
26141
26142         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
26143         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
26144
26145 2001-11-01  Jim Meyering  <meyering@lucent.com>
26146
26147         * lib/dirfd.c, lib/dirfd.h: New files.
26148         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
26149
26150         * lib/hash.c (hash_print) [TESTING]: Clean up.
26151
26152 2001-10-22  Paul Eggert  <eggert@twinsun.com>
26153
26154         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
26155         to avoid a warning if -Wall.
26156
26157 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
26158
26159         * README: New file
26160         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
26161         (per RMS's instructions, this is now the canonical source)
26162         * lgpl/, gpl/: New directories.
26163
26164 2001-10-21  Paul Eggert  <eggert@twinsun.com>
26165
26166         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
26167
26168 2001-10-21  Jim Meyering  <meyering@lucent.com>
26169
26170         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
26171         this code would end up calling gettext even in packages built
26172         with --disable-nls.
26173         * lib/getopt.c (_): Likewise.
26174         * lib/regex.c (_): Likewise.
26175
26176 2001-10-20  Paul Eggert  <eggert@twinsun.com>
26177
26178         * m4/error.m4 (jm_PREREQ_ERROR):
26179         Do not invoke AC_CHECK_FUNCS with strerror_r, as
26180         AC_FUNC_STRERROR_R does that.
26181         Check for strerror declaration.
26182
26183         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
26184         are supposed to have them these days.
26185         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
26186         Merge changes from latest Autoconf CVS.
26187         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
26188         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
26189         POSIX decided to standardize on the int flavor of strerror_r.
26190
26191 2001-10-20  Paul Eggert  <eggert@twinsun.com>
26192
26193         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
26194         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
26195         Use strerror_r that is only a macro, even if it is not a function.
26196         (strerror): Check for HAVE_DECL_STRERROR before declaring.
26197         (private_strerror): Use prototypes, not old-style function definition.
26198         (print_errno_message): New function.
26199         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
26200         char*-flavored one.
26201         (error_tail, error, error_at_line): Use it.
26202
26203 2001-10-11  Jim Meyering  <meyering@lucent.com>
26204
26205         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
26206         and quote_n (1, ... to avoid clobbering a buffer.
26207
26208 2001-10-05  Jim Meyering  <meyering@lucent.com>
26209
26210         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
26211         hash-pjw.h.
26212         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
26213         * lib/hash-pjw.h: New file.
26214
26215 2001-09-30  Jim Meyering  <meyering@lucent.com>
26216
26217         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
26218         `struct fsstat' has the `f_fstypename' member.
26219         Use that to define FS_TYPE, which is now used to make
26220         the getfsstat link test tighter.
26221
26222 2001-09-30  Jim Meyering  <meyering@lucent.com>
26223
26224         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
26225         Include <sys/ucred.h>, for Apple Darwin.
26226         Include sys/mount.h and sys/fs_types.h only if available.
26227         (FS_TYPE): Define.
26228         (read_filesystem_list): Use FS_TYPE.
26229
26230 2001-09-29  Paul Eggert  <eggert@twinsun.com>
26231
26232         * lib/exclude.c (excluded_filename): 0 -> false, since it's
26233         a boolean context.
26234
26235 2001-09-29  Jim Meyering  <meyering@lucent.com>
26236
26237         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
26238         [one-argument getmntent function]): Include stdio.h before mntent.h.
26239         SunOS 4.1.x needs it for the declaration of `FILE'.
26240         Patch by Volker Borchert.
26241
26242         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
26243         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
26244         sys/fs_types.h, and make the link-test for getfsstat guard #include
26245         directives with appropriate #if HAVE_*_H tests so that we can
26246         detect getfsstat on Apple Darwin1.3.7 systems.
26247         Reported by Nelson Beebe.
26248         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
26249
26250 2001-09-28  Paul Eggert  <eggert@twinsun.com>
26251
26252         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
26253         #defines strtoimax.  Also treat the other strto* functions
26254         like strtoimax.
26255
26256         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
26257         Check for strtoul and strtoumax,
26258         as those declarations are made even in the signed case.
26259         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
26260         Likewise, for strtol and strtoimax.
26261
26262 2001-09-28  Paul Eggert  <eggert@twinsun.com>
26263
26264         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
26265         #defines strtoimax.  Also treat the other strto* functions
26266         like strtoimax.
26267
26268         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
26269         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
26270         (strtoimax, strtoumax): Do not declare if already defined as a macro.
26271
26272 2001-09-26  Jim Meyering  <meyering@lucent.com>
26273
26274         Most macros in unlocked-io.h had the wrong number of arguments.
26275         * lib/gen-uio: New script.
26276         (USE_UNLOCKED_IO): Define to 1 if not already defined.
26277         * lib/unlocked-io.hin: Remove file.
26278         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
26279         rather than trying to embed it here.
26280         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
26281         Reported by Padraig Brady.
26282
26283 2001-09-25  Volker Borchert  <bt@teknon.de>
26284
26285         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
26286         `result'.
26287
26288 2001-09-24  Jim Meyering  <meyering@lucent.com>
26289
26290         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
26291
26292 2001-09-23  Jim Meyering  <meyering@lucent.com>
26293
26294         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
26295         instead of the mere test for existence of mntent.h.  The latter
26296         would get a false-positive on AIX 3.4 systems.
26297         In the outer getmntent if-block, don't die if neither of the getmntent
26298         tests succeeds.  Instead, just fall through and continue with the
26299         remaining tests.
26300
26301 2001-09-23  Jim Meyering  <meyering@lucent.com>
26302
26303         * lib/mountlist.c: Remove useless parentheses in #if directives.
26304         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
26305         the deprecated MOUNTED symbol is no longer defined in mntent.h.
26306
26307 2001-09-22  Jim Meyering  <meyering@lucent.com>
26308
26309         * m4/gettext.m4: New file.  From gettext.
26310         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
26311         * m4/progtest.m4: Likewise
26312         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
26313         * m4/glibc21.m4: Likewise.
26314
26315         * m4/libintl.m4: Remove.  No longer used.
26316
26317 2001-09-22  Jim Meyering  <meyering@lucent.com>
26318
26319         * lib/localcharset.c: Update from latest gettext.
26320         * lib/config.charset: Likewise.
26321
26322 2001-09-20  Jim Meyering  <meyering@lucent.com>
26323
26324         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
26325         strtoimax.
26326         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
26327         strtoumax.
26328
26329 2001-09-20  Jim Meyering  <meyering@lucent.com>
26330
26331         * lib/xstrtol.c (strtoimax): Guard declaration with
26332         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
26333         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
26334         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
26335         (strtoumax): Likewise, for completeness (it wasn't necessary).
26336
26337 2001-09-17  Paul Eggert  <eggert@twinsun.com>
26338
26339         * lib/strtoimax.c (HAVE_LONG_LONG):
26340         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
26341         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
26342         to work around bug in IBM C compiler.
26343
26344 2001-09-17  Jim Meyering  <meyering@lucent.com>
26345
26346         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
26347         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
26348         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
26349         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
26350         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
26351         whenever the right hand side need not be expanded by the shell.
26352
26353 2001-09-16  Paul Eggert  <eggert@twinsun.com>
26354
26355         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
26356         library.  It's not correct, as some older glibcs are buggy.
26357         fnmatch wasn't fixed until glibc 2.2.
26358
26359         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
26360         special shell magic here.
26361
26362 2001-09-16  Jim Meyering  <meyering@lucent.com>
26363
26364         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
26365         * m4/jm-macros.m4: Require it.
26366
26367 2001-09-16  Jim Meyering  <meyering@lucent.com>
26368
26369         * lib/mkdir.c: New file.
26370
26371 2001-09-15  Jim Meyering  <meyering@lucent.com>
26372
26373         * m4/jm-macros.m4: Check for help2man.
26374
26375 2001-09-11  Jim Meyering  <meyering@lucent.com>
26376
26377         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
26378         The body, by Paul Eggert, was moved here from configure.in.
26379         * m4/jm-macros.m4: Require UTILS_HOST_OS.
26380
26381 2001-09-04  Paul Eggert  <eggert@twinsun.com>
26382
26383         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
26384         (jm_PREREQ): Use it.
26385
26386 2001-09-04  Paul Eggert  <eggert@twinsun.com>
26387
26388         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
26389         Use ssize_t, not int, to store result of readlink.
26390         Check for ssize_t overflow as well as size_t overflow,
26391         as POSIX says the result of readlink is implementation-defined
26392         when ssize_t overflows.
26393         Remove unnecessary cast to char*.
26394         Use free+malloc instead of realloc, as the storage doesn't need
26395         to be preserved and it's clearer and can be more efficient that way.
26396         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
26397         * lib/xreadlink.h (xreadlink): Update prototype.
26398
26399 2001-09-04  Paul Eggert  <eggert@twinsun.com>
26400
26401         * lib/xgetcwd.c: Revert some of the previous change; intead,
26402         fix the HAVE_GETCWD_NULL code to behave more like the
26403         !HAVE_GETCWD_NULL code used to.
26404
26405         Include "xalloc.h".
26406         (xgetcwd): Do not return NULL when memory is exhausted; instead,
26407         invoke xalloc_die.
26408
26409 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26410
26411         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
26412         sys/param.h, as pathmax.h includes them.
26413
26414 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26415
26416         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
26417         (jm_PREREQ_XGETCWD): New macro.
26418
26419         * m4/getcwd.m4: New file.
26420
26421 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26422
26423         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
26424         like the HAVE_GETCWD_NULL code.
26425         Include pathmax.h if not HAVE_GETCWD.
26426         Do not include xalloc.h.
26427         (INITIAL_BUFFER_SIZE): New symbol.
26428         Do not use xmalloc / xrealloc, since the caller is responsible for
26429         handling errors.  Preserve errno around `free' during failure.
26430         Do not overrun buffer when using getwd.
26431
26432 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26433
26434         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
26435         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
26436         getcwd (NULL, 0).
26437
26438 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26439
26440         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
26441         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
26442         spotted by Jim Meyering.
26443
26444 2001-09-03  Jim Meyering  <meyering@lucent.com>
26445
26446         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
26447         failure.
26448
26449 2001-09-02  Jim Meyering  <meyering@lucent.com>
26450
26451         * lib/error.c: Update from GNU libc.
26452
26453 2001-09-01  Jim Meyering  <meyering@lucent.com>
26454
26455         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
26456         Used by df.
26457
26458 2001-09-01  Jim Meyering  <meyering@lucent.com>
26459
26460         * lib/xreadlink.c: New file.
26461         * lib/xreadlink.h: New file.
26462         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
26463         xreadlink.h.
26464
26465         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
26466         doesn't conflict with sparc Solaris 7's definition in
26467         /usr/include/sys/int_types.h.
26468
26469         * lib/exclude.c: Use `""', not `<>' to #include non-system header
26470         files.
26471         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
26472         and strncasecmp as r-values.  Unixware didn't have declarations.
26473
26474 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26475
26476         * lib/xstrtol.h: Add copyright notice.
26477         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
26478         LONGINT_INVALID_SUFFIX_CHAR.
26479
26480 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26481
26482         * lib/xstrtol.c (strtoimax): New decl.
26483
26484 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26485
26486         * lib/xgetcwd.c: Don't include pathmax.h.
26487         Include stdlib.h and unistd.h if available.
26488         Include xalloc.h.
26489         (xmalloc, xstrdup, free): Remove decls.
26490         (xgetcwd): Don't assume sizes fit in unsigned.
26491         Check for overflow when computing sizes.
26492         Simplify reallocation code.
26493
26494 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26495
26496         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
26497         a directory's st_size can have an arbitrary value, so the old
26498         usage could waste an arbitrary amount of memory.  All uses
26499         changed.
26500         * lib/savedir.h: Update prototype.
26501
26502 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26503
26504         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
26505
26506         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
26507         old strtoimax.c.
26508
26509         Also, make the following further changes to make this file's
26510         configuration more similar to that of strtol.c:
26511         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
26512         (strtoumax, uintmax_t, strtoull, strtol): Remove.
26513         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
26514         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
26515         changed to signed values.
26516
26517         And make the following changes as well:
26518         Fix copyright notice, as 1999 was missing.
26519         (verify): New macro.
26520         (strtoimax): Check sizes at compile-time, not run-time.
26521         Prefer strtol to strtoll if both work.
26522         (main): Remove; it was not that useful and was a pain to maintain.
26523
26524         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
26525
26526 2001-08-31  Jim Meyering  <meyering@lucent.com>
26527
26528         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
26529         Use an initial, malloc'd, buffer of length 128 rather than
26530         a statically allocated one of length 1024.
26531
26532 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26533
26534         Simplify code, partly by assuming autoconf 2.52 semantics.
26535
26536         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
26537
26538         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
26539         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
26540         All uses removed.
26541         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
26542         Move AC_REQUIRE to next-to-top level, to avoid confusion.
26543         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
26544         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
26545         jm_AC_HEADER_INTTYPES_H.
26546         * m4/jm-macros.m4 (jm_MACROS): Likewise.
26547
26548         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
26549
26550         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
26551         Quote first arg of AC_DEFUN.
26552         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
26553         since they are needed to parse the include file even if we need
26554         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
26555         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
26556         but with opposite signedness.
26557
26558 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26559
26560         Merge 'exclude' changes from tar 1.13.22.
26561         This fixes one or two unlikely storage allocation overflow bugs,
26562         but doesn't change user-visible behavior otherwise.
26563
26564 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26565
26566         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
26567         (jm_PREREQ_EXCLUDE): New macro.
26568
26569 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26570
26571         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
26572         tm to be declared.
26573
26574 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26575
26576         * lib/hash.c: Remove '2001' from copyright notice.
26577
26578 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26579
26580         * lib/full-write.h: New file.
26581         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
26582         * lib/full-write.c: Correct credits, as cccp.c no longer
26583         exists and anyway it was so heavily changed from the old cccp
26584         code as to be unrecognizable.  Include full-write.h.
26585         (full_write) Return size_t, with short writes meaning failure.
26586         All callers changed.  This fixes a bug with large buffers
26587         on 64-bit hosts.
26588         * lib/utime.c: Include full-write.h.
26589
26590 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26591
26592         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
26593         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
26594         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
26595         Include if available.
26596         (<xalloc.h>): Include
26597         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
26598         (verify): New macro.  Use it to verify that EXCLUDE macros do not
26599         collide with FNM macros.
26600         (struct patopts): New struct.
26601         (struct exclude): Use it, as exclude patterns now come with options.
26602         (new_exclude): Support above changes.
26603         (new_exclude, add_exclude_file):
26604         Initial size must now be a power of two to simplify overflow checking.
26605         (free_exclude, fnmatch_no_wildcards): New function.
26606         (excluded_filename): No longer requires options arg, as the options
26607         are determined by add_exclude.  Now returns bool, not int.
26608         (excluded_filename, add_exclude):
26609         Add support for the fancy new exclusion options.
26610         (add_exclude, add_exclude_file): Now takes int options arg.
26611         Check for arithmetic overflow when computing sizes.
26612         (add_exclude_file): xrealloc might modify errno, so don't
26613         realloc until after errno might be used.
26614
26615         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
26616         New macros.
26617         (free_exclude): New decl.
26618         (add_exclude, add_exclude_file): Now takes int options arg.
26619         (excluded_filename): No longer requires options arg, as the options
26620         are determined by add_exclude.  Now returns bool, not int.
26621
26622 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26623
26624         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
26625
26626 2001-08-27  Jim Meyering  <meyering@lucent.com>
26627
26628         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
26629
26630         * lib/version-etc.c (N_): Remove definition.
26631         Revert most of last change.
26632         Instead, simply don't mark the `Copyright...' string for translation.
26633         Based on advice from Paul Eggert.
26634
26635         * lib/strtoxmax.c: Tweak comment.
26636
26637 2001-08-26  Jim Meyering  <meyering@lucent.com>
26638
26639         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
26640
26641         * m4/xstrtoimax.m4: New file.
26642         * m4/xstrtoumax.m4: Add comments explaining why we
26643         AC_REPLACE_FUNCS(strtol).
26644
26645 2001-08-26  Jim Meyering  <meyering@lucent.com>
26646
26647         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
26648         of copyright with `%s' so translators don't get an untranslated
26649         message in 2002.
26650         (COPYRIGHT_YEAR): Define.
26651         (version_etc): Use fprintf rather than fputs.
26652         Suggestion from Ulrich Drepper.
26653
26654         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
26655
26656         * lib/strtoll.c: New file, from GNU libc.
26657         * lib/xstrtoimax.c: New file.
26658
26659         * lib/xstrtol.h: Add xstrtoimax.
26660         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
26661         * lib/strtoimax.c: New file.  Likewise, but first define
26662         STRTOUXMAX_SIGNED.
26663
26664         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
26665         ...
26666         * lib/strtoxmax.c: ... then renamed to this.
26667
26668 2001-08-18  Paul Eggert  <eggert@twinsun.com>
26669
26670         * m4/inttypes.m4: Add AC_PREREQ(2.13).
26671         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
26672         (jm_AC_TYPE_INTMAX_T): New macro.
26673         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
26674
26675         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
26676
26677         * m4/longlong.m4: Renamed from ulonglong.m4.
26678         * m4/inttypes.m4: Renamed from inttypes_h.m4.
26679         * m4/uintmax_t.m4: Removed.
26680
26681 2001-08-13  Paul Eggert  <eggert@twinsun.com>
26682
26683         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
26684         Port to Solaris 8, where 'sed' requires a space after the 'r'
26685         command, and where sh dislikes "$/".  Clean up the spacing a bit.
26686         Redirect output to $tmp just once.
26687
26688 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
26689
26690         * lib/addext.c (<errno.h>): Include.
26691         (errno): Declare if not defined.
26692         (addext): Work correctly when pathconf returns -1 and leaves
26693         errno alone because there is no limit.  Also, work even if
26694         pathconf returns a value greater than SIZE_MAX.
26695
26696 2001-08-12  Jim Meyering  <meyering@lucent.com>
26697
26698         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
26699         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
26700         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
26701         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
26702         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
26703         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
26704         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
26705         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
26706         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
26707         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
26708         utime.m4, utimes.m4, xstrtoumax.m4:
26709         Quote the first argument in each use of AC_DEFUN.
26710
26711 2001-08-12  Jim Meyering  <meyering@lucent.com>
26712
26713         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
26714         Simply `return getcwd (NULL, 0);'.
26715         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
26716         Use 1300 as initial value for length, not PATH_MAX.
26717
26718         * lib/pathmax.h: Clean up cpp syntax.
26719
26720 2001-08-12  Jim Meyering  <meyering@lucent.com>
26721
26722         * lib/gettimeofday.c: New file.
26723         * lib/gtod.h: New file.
26724         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
26725
26726 2001-08-05  Jim Meyering  <meyering@lucent.com>
26727
26728         * m4/jm-macros.m4: Require autoconf-2.52.
26729
26730 2001-08-04  Jim Meyering  <meyering@lucent.com>
26731
26732         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
26733         stmt, to get in sync with glibc.
26734
26735 2001-08-03  Paul Eggert  <eggert@twinsun.com>
26736
26737         The following changes are from gettext 0.10.39 as maintained by
26738         Bruno Haible.
26739
26740         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
26741         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
26742         with inverted sense.  All uses changed.
26743
26744         * lib/mbswidth.c: Don't include <limits.h>.
26745         Include <stdlib.h> and <string.h> unconditionally.
26746         (iswcntrl, mbsinit, ISCNTRL): New macros.
26747         (mbsnwidth): Use K&R style function declarations.
26748         Don't bother checking for MB_LEN_MAX == 1, since the compiler
26749         can optimize it when MB_CUR_MAX == 1.
26750         The width of control characters is zero, not 1.
26751
26752 2001-08-03  Paul Eggert  <eggert@twinsun.com>
26753
26754         The following changes are from gettext 0.10.39 as maintained by
26755         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
26756
26757         * m4/codeset.m4: Upgrade to serial AM1.
26758         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
26759         all uses changed.  Quote first arg of AC_DEFUN.
26760         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
26761
26762         * m4/iconv.m4: Upgrade to serial AM2.
26763         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
26764         Add --with-libconv-prefix.
26765         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
26766         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
26767         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
26768         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
26769         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
26770
26771         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
26772         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
26773         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
26774         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
26775         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
26776         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
26777         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
26778         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
26779         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
26780
26781         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
26782         string.h any more.
26783
26784         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
26785         not the default value.
26786
26787         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
26788         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
26789         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
26790         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
26791         Also check for iswcntrl, used for wcwidth fallback.
26792         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
26793         to Autoconf 2.13.
26794
26795 2001-08-03  Jim Meyering  <meyering@lucent.com>
26796
26797         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
26798         as it was in the original.  Reported by Paul Eggert.
26799
26800 2001-07-16  Jim Meyering  <meyering@lucent.com>
26801
26802         * m4/gettimeofday.m4: New file.
26803         Prompted by a report from Bernhard Baehr.
26804
26805 2001-07-15  Jim Meyering  <meyering@lucent.com>
26806
26807         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
26808         stuff. Now it's in ../Makefile.cfg.
26809
26810 2001-07-15  Jim Meyering  <meyering@lucent.com>
26811
26812         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
26813         (BUILT_SOURCES): Add unlocked-io.h.
26814         (io_functions): Define.
26815         (unlocked-io.h): New rule.
26816         (DISTCLEANFILES): Add unlocked-io.h.
26817         (all-local): Depend on unlocked-io.h, to ensure it is created.
26818
26819         * lib/unlocked-io.hin: New file
26820
26821         * lib/regex.c: Update from glibc.
26822
26823 2001-07-05  Jim Meyering  <meyering@lucent.com>
26824
26825         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
26826         recommendation.
26827         (libfetish_a_SOURCES): Put all .h files here instead.
26828         Remove a thus-exposed (better checks in automake) duplicate and
26829         two unnecessary .h files.
26830
26831 2001-07-04  Jim Meyering  <meyering@lucent.com>
26832
26833         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
26834         that generates jm-glibc-io.m4 so that it doesn't trigger any make
26835         distcheck failure.
26836
26837 2001-07-02  Jim Meyering  <meyering@lucent.com>
26838
26839         The following changes were prompted by suggestions from Bruno Haible.
26840
26841         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
26842         is now generated.
26843         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
26844         definition of EXTRA_DIST.
26845         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
26846         ensure that the generated file is created/updated whenever the list
26847         of $(unlocked_functions) is changed.
26848         (jm-glibc-io.m4): New rule.
26849         (unlocked-io.h): New rule -- currently unused.
26850
26851 2001-06-24  Jim Meyering  <meyering@lucent.com>
26852
26853         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
26854         unmatched right bracket, rather than kludging it with an extra,
26855         falsely-matching quote in a comment.  Patch by Akim Demaille.
26856
26857 2001-06-11  Jim Meyering  <meyering@lucent.com>
26858
26859         * lib/regex.c: Update from GNU libc.
26860
26861 2001-05-27  Jim Meyering  <meyering@lucent.com>
26862
26863         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
26864         Check for ut_type in struct utmp.
26865
26866 2001-05-27  Jim Meyering  <meyering@lucent.com>
26867
26868         * lib/readutmp.h (UT_TYPE): Define.
26869
26870 2001-05-24  Jim Meyering  <meyering@lucent.com>
26871
26872         * lib/argmatch.c: Include "quote.h".
26873         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
26874         quote function.  Reported by Göran Uddeborg.
26875
26876 2001-05-22  Jim Meyering  <meyering@lucent.com>
26877
26878         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
26879         now that we use the package-supplied version unconditionally.
26880         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
26881
26882 2001-05-21  Jim Meyering  <meyering@lucent.com>
26883
26884         * m4/regex.m4: Change a couple backticks to single quotes to avoid
26885         shell syntax errors.
26886
26887 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
26888
26889         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
26890
26891 2001-05-20  Paul Eggert  <eggert@twinsun.com>
26892
26893         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
26894         Don't bother to check library strftime, since
26895         we'll be using our own my_strftime function anyway.
26896         Define my_strftime instead of strftime.
26897
26898 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
26899
26900         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
26901         which is not yet declared.
26902
26903 2001-05-15  Jim Meyering  <meyering@lucent.com>
26904
26905         * m4/regex.m4: Use proper quoting so brackets appear in the test
26906         program.
26907         Reported by, and with help from, Bruno Haible.
26908
26909 2001-05-13  Jim Meyering  <meyering@lucent.com>
26910
26911         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
26912         undefined.
26913
26914 2001-05-11  Paul Eggert  <eggert@twinsun.com>
26915
26916         dirname code cleanup.  base_name now behaves more compatibly
26917         with POSIX basename when given file names that have trailing
26918         slashes, and similarly for dir_name.  Add new primitives
26919         base_len and dir_len.  Put the directory-name-related decls
26920         into dirname.h.
26921
26922         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
26923         * lib/backupfile.c (base_name): Likewise.
26924         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
26925         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
26926         * lib/makepath.c (strip_trailing_slashes): Likewise.
26927         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
26928         ISSLASH): Likewise.
26929         * lib/rename.c (strip_trailing_slashes): Likewise.
26930         * lib/same.c (base_name): Likewise.
26931         * lib/stripslash.c (ISSLASH): Likewise.
26932
26933         * lib/addext.c: Include <dirname.h> after size_t is defined.
26934         * lib/backupfile.c: Likewise.
26935
26936         * lib/addext.c (addext): Use base_len to trim redundant
26937         trailing slashes instead of doing it ourselves.
26938         But do not trim the last slash if it is not redundant.
26939
26940         * lib/backupfile.c (find_backup_file_name,
26941         max_backup_version): Use base_len instead of rolling it ourselves.
26942         Handle the case of "" and (on DOS) "C:" correctly.
26943
26944         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
26945         needed. Include <string.h>, <dirname.h>.
26946         (base_name): Allow file names ending in slashes, other than names
26947         that are all slashes.  In this case, return the basename followed
26948         by the slashes.  This is more general, and can be used in places
26949         where the original base_name purposely had an assertion failure.
26950         (base_len): New function.
26951
26952         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
26953         Do not include <assert.h>; no longer needed.
26954         Include xalloc.h.
26955         (memrchr): Remove decl.
26956         (dir_name_r): Remove.
26957         (dir_len): Renamed from dirlen.  All callers changed.
26958         Rewrite in terms of base_name, for simplicity and consistency.
26959         (dir_name): Never return NULL.  All callers changed.
26960         Do not include <stdlib.h> in test program; no longer needed.
26961         return 0; is fine for test program.
26962
26963         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
26964         New macros.
26965         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
26966
26967         * lib/path-concat.c (path_concat): Use base_len to compute
26968         base length, not strlen; this means we cannot rely on memcpy
26969         to null-terminate.
26970
26971         * lib/same.c (STREQ): Remove.
26972         (same_name): Handle the case where the basename ends in trailing '/'.
26973
26974         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
26975         a slash was stripped.  Do not strip the last slash after a
26976         file system prefix.
26977
26978 2001-05-11  Paul Eggert  <eggert@twinsun.com>
26979
26980         * lib/Makefile.am (libfetish_a_SOURCES):
26981         Add strftime.c, since we now compile it on all hosts.
26982
26983         * lib/strftime.c (my_strftime):
26984         Define to nstrftime if emacs, but only if my_strftime is not defined.
26985         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
26986         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
26987         Add one more extra argument: a nanoseconds value.
26988         All uses changed.
26989         (ns): New macro.
26990         (my_strftime function): Add %N format.
26991         (emacs_strftimeu): Renamed from emacs_strftime,
26992         with extra ut argument.
26993
26994 2001-05-09  Paul Eggert  <eggert@twinsun.com>
26995
26996         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
26997
26998 2001-04-21  Jim Meyering  <meyering@lucent.com>
26999
27000         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
27001         doesn't interfere.
27002
27003 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
27004
27005         * m4/ftruncate.m4: Check for chsize.
27006         Link with ftruncate.o unconditionally if ftruncate is missing.
27007         This was required when cross-compiling to i586-mingw32msvc.
27008
27009 2001-04-08  Jim Meyering  <meyering@lucent.com>
27010
27011         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
27012         recomputed; that's necessary when the offset spans a DST transition.
27013         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
27014
27015 2001-04-02  Jim Meyering  <meyering@lucent.com>
27016
27017         * lib/regex.h, regex.c: Update from GNU libc.
27018
27019 2001-03-24  Jim Meyering  <meyering@lucent.com>
27020
27021         * m4/jm-macros.m4: Require autoconf-2.49d.
27022
27023 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
27024
27025         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
27026
27027 2001-03-19  Paul Eggert  <eggert@twinsun.com>
27028
27029         * lib/version-etc.c (version_etc_copyright): Update to 2001.
27030
27031 2001-03-17  Jim Meyering  <meyering@lucent.com>
27032
27033         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
27034         now that the version in autoconf is equivalent.
27035         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
27036
27037         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
27038         Suggestion from Akim Demaille.
27039
27040         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
27041         (jm_PREREQ_TEMPNAME): New function.
27042
27043 2001-03-16  Paul Eggert  <eggert@twinsun.com>
27044
27045         * lib/tempname.c (uint64_t): Define to uintmax_t if
27046         not defined, and if UINT64_MAX is not defined.
27047         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
27048         Reported by John David Anglin.
27049
27050 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
27051
27052         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
27053         resolve alias if codeset is empty.
27054         * lib/config.charset (BeOS): Use wildcard syntax.
27055
27056 2001-03-13  Jim Meyering  <meyering@lucent.com>
27057
27058         * lib/path-concat.c (path_concat)
27059         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
27060         concatenating e.g., `C:' and `foo'.
27061         From Bruno Haible.
27062
27063 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
27064
27065         * lib/localcharset.c (locale_charset): Don't use
27066         setlocale(LC_CTYPE,NULL). Don't return NULL.
27067         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
27068
27069 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
27070
27071         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
27072         support for DOS/DJGPP.
27073
27074 2001-03-01  Paul Eggert  <eggert@twinsun.com>
27075
27076         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
27077         lacks mkstemp.  Compile our own tempname.c if we compile our own
27078         mkstemp.c, as mkstemp relies on tempname.
27079
27080 2001-03-01  Jim Meyering  <meyering@lucent.com>
27081
27082         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
27083         AH_VERBATIM really does output its argument verbatim.
27084
27085 2001-02-28  Paul Eggert  <eggert@twinsun.com>
27086
27087         * lib/Makefile.am (libfetish_a_SOURCES):
27088         Add dup-safer.c, fopen-safer.c.
27089         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
27090
27091         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
27092         * lib/unistd-safer.h: New files.
27093
27094 2001-02-25  Paul Eggert  <eggert@twinsun.com>
27095
27096         The mkstemp replacement is taken from glibc 2.2.2, with some
27097         portability fixes for use outside glibc, as follows:
27098
27099         * lib/tempname.c (struct_stat64): New macro.
27100         (direxists, __gen_tempname): Use it.
27101         This avoids a portability problem with Solaris 8.
27102
27103         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
27104         (<stddef.h>, <stdint.h>, <string.h>):
27105         Include only if STDC_HEADERS || _LIBC.
27106         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
27107         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
27108         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
27109         (__set_errno): Define this macro if <errno.h> doesn't.
27110         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
27111         Define these macros if <stdio.h> doesn't.
27112         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
27113         Define these macros if <sys/stat.h>
27114         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
27115         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
27116         __xstat64): Define if not _LIBC.
27117         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
27118         (__gen_tempname): Invoke gettimeofday only if
27119         HAVE_GETTIMEOFDAY || _LIBC;
27120         otherwise, fall back on plain "time".
27121         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
27122
27123         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
27124
27125         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
27126
27127 2001-02-18  Paul Eggert  <eggert@twinsun.com>
27128
27129         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
27130
27131 2001-02-17  Paul Eggert  <eggert@twinsun.com>
27132
27133         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
27134         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
27135         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
27136         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
27137
27138 2001-02-17  Paul Eggert  <eggert@twinsun.com>
27139
27140         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
27141         Remove workaround macros for hosts that have mbrtowc but not
27142         mbstate_t, as we now insist on proper declarations for both
27143         before using mbrtowc.
27144
27145 2001-02-17  Jim Meyering  <meyering@lucent.com>
27146
27147         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
27148         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
27149         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
27150         UnixWare 7.1.1.
27151
27152         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
27153         rather than AC_CACHE_VAL.
27154
27155 2001-02-17  Jim Meyering  <meyering@lucent.com>
27156
27157         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
27158         around included file name.
27159
27160         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
27161
27162         * lib/strftime.c: Update from GNU libc (the only changes were to
27163         comments).
27164
27165 2001-02-17  Jim Meyering  <meyering@lucent.com>
27166
27167         * lib/regex.c: Update from libc.
27168
27169 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
27170
27171         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
27172         clash.
27173
27174 2001-02-16  Paul Eggert  <eggert@twinsun.com>
27175
27176         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
27177         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
27178         Reported by Mark Hounschell via Paul Eggert.
27179
27180 2001-02-07  Jim Meyering  <meyering@lucent.com>
27181
27182         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
27183
27184 2001-02-05  Jim Meyering  <meyering@lucent.com>
27185
27186         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
27187         it includes the patch required for `large file' support with at least
27188         HP-UX's 10.20 /bin/cc.
27189
27190 2001-02-03  Jim Meyering  <meyering@lucent.com>
27191
27192         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
27193         AS_IF, now that it works once again (mysteriously).
27194         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
27195
27196 2001-01-30  Jim Meyering  <meyering@lucent.com>
27197
27198         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
27199         * m4/chown.m4: Rename conftestchown to conftest.chown.
27200         * m4/rename.m4: s/conftestdir/conftest.d1/ and
27201         s/conftestdir2/conftest.d2/.
27202         * m4/utimes.m4: s/conftestdata/conftest.data/
27203         Inspired by Pavel Roskin's change in autoconf.
27204
27205 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
27206
27207         * lib/config.charset: Update for FreeBSD 4.2.
27208
27209 2001-01-27  Jim Meyering  <meyering@lucent.com>
27210
27211         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
27212         a use of AS_IF.
27213         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
27214
27215 2001-01-26  Jim Meyering  <meyering@lucent.com>
27216
27217         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
27218         quotearg.c includes it.
27219
27220 2001-01-26  Jim Meyering  <meyering@lucent.com>
27221
27222         * lib/quotearg.c: Include stddef.h.
27223         * lib/quote.c: Include stddef.h.
27224         Reported by Axel Kittenberger.
27225
27226         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
27227         line in double quotes so that it evokes a better diagnostic.
27228         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
27229         Reported by Axel Kittenberger.
27230
27231 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
27232
27233         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
27234         as if it was a `charset'.
27235
27236 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
27237
27238         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
27239         has const.
27240
27241 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
27242
27243         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
27244         to avoid a warning.  Add back 'const' to inptr.
27245
27246 2001-01-20  Jim Meyering  <meyering@lucent.com>
27247
27248         Be sure that headers are checked before used in code compiled
27249         for the type checks.
27250         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
27251         In place of that, invoke jm_CHECK_ALL_TYPES.
27252         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
27253         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
27254         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
27255         The check for ssize_t was mistakenly run before the test for unistd.h.
27256
27257         The configure-time check for stdbool.h was missing.
27258         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
27259         (jm_PREREQ_HASH): New function.
27260
27261 2001-01-17  Jim Meyering  <meyering@lucent.com>
27262
27263         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
27264         for autoconf-2.49c.
27265         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
27266
27267 2001-01-16  Jim Meyering  <meyering@lucent.com>
27268
27269         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
27270         From Bruno Haible.
27271
27272 2001-01-14  Jim Meyering  <meyering@lucent.com>
27273
27274         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
27275         foo and bar.  Create conftestdir/ in the script, not in the C code.
27276         Remove directories in the script, not in the C code.
27277         Remove conftestdir{,2} before trying to create the directory.
27278         Make the entire configure script fail if the mkdir fails.
27279
27280 2001-01-14  Jim Meyering  <meyering@lucent.com>
27281
27282         * lib/rename.c: New file.  From Volker Borchert.
27283         Include stdlib.h, string.h or strings.h, and xalloc.h.
27284         Use strip_trailing_slashes rather than open-coding it.
27285
27286 2001-01-03  Paul Eggert  <eggert@twinsun.com>
27287
27288         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
27289
27290 2001-01-03  Jim Meyering  <meyering@lucent.com>
27291
27292         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
27293         of local `inptr' to avoid warning with some system declarations of
27294         iconv.
27295
27296 2001-01-02  Volker Borchert  <bt@teknon.de>
27297
27298         * m4/rename.m4: New file.
27299         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
27300
27301 2001-01-01  Jim Meyering  <meyering@lucent.com>
27302
27303         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
27304         even on systems with utmpx.h.  It's necessary for the declaration of
27305         utmp's ut_user member.  Reported by Andreas Jaeger.
27306
27307         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
27308         available. They are required for the declarations of getgrgid and
27309         getpwuid resp.
27310         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
27311         Reported by Andreas Jaeger.
27312
27313 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
27314
27315         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
27316         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
27317         so `make install' also works in VPATH builds.
27318
27319 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
27320
27321         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
27322         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
27323         can be used in subdirectories.
27324
27325 2000-12-29  Paul Eggert  <eggert@twinsun.com>
27326
27327         * lib/modechange.c: Do not assume that mode_t uses the
27328         traditional octal encoding.  E.g. "chmod 1 FOO" should set
27329         the other-execute bit of FOO even if S_IXOTH != 1.
27330
27331         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
27332         WOTH, XOTH, ALLM): New macros.
27333         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
27334          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
27335         Use them.
27336         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
27337         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
27338         (mode_compile):
27339         No need to use uintmax_t; unsigned long is long enough.
27340         Don't bother to get suffix since we don't use it.
27341
27342 2000-12-26  Jim Meyering  <meyering@lucent.com>
27343
27344         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
27345         better with autoheader.
27346
27347 2000-12-24  Jim Meyering  <meyering@lucent.com>
27348
27349         * lib/hash.c (is_prime): Return explicit boolean values.
27350         (hash_get_first): Return NULL to appease Irix5.6's 89.
27351         Reported by Nelson Beebe.
27352
27353 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
27354
27355         * lib/localcharset.c (locale_charset): Add support for Win32.
27356
27357 2000-12-18  Paul Eggert  <eggert@twinsun.com>
27358
27359         * lib/physmem.h, lib/physmem.c: New files.
27360
27361         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
27362         (noinst_HEADERS): Add physmem.h.
27363
27364         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
27365         't' for compatibility with Solaris 8 sort.
27366
27367 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
27368
27369         * lib/config.charset: Add support for BeOS.
27370
27371 2000-12-17  Jim Meyering  <meyering@lucent.com>
27372
27373         * m4/dos.m4 (jm_AC_DOS): New file and macro.
27374         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
27375
27376 2000-12-16  Jim Meyering  <meyering@lucent.com>
27377
27378         This bug had a serious impact on chown: `chown N:M FILE' (for integer
27379         N and M) would have treated it like `chown N:N FILE'.
27380
27381         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
27382
27383 2000-12-16  Jim Meyering  <meyering@lucent.com>
27384
27385         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
27386         SHELLS_FILE to a file name that's useful on djgpp systems.
27387         Include stdlib.h.
27388         (ADDITIONAL_DEFAULT_SHELLS): Define.
27389         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
27390         Based mostly on a patch from Prashant TR.
27391
27392 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
27393
27394         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
27395         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
27396         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
27397
27398 2000-12-08  Andreas Schwab  <schwab@suse.de>
27399
27400         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
27401         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
27402
27403 2000-12-07  Jim Meyering  <meyering@lucent.com>
27404
27405         * lib/stripslash.c (ISSLASH): Define.
27406         (strip_trailing_slashes): Use ISSLASH rather than comparing against
27407         `/'.
27408         From Prashant TR.
27409
27410         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
27411         (dir_name_r): Declare this function as static.
27412         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
27413         manifest itself on a name containing a mix of slashes and
27414         backslashes.
27415         Make this function work with names starting with a DOS-style
27416         drive letter and colon prefix.
27417         (dir_name): Append `.' if necessary.
27418         Based mostly on patches from Prashant TR and Eli Zaretskii.
27419
27420         * lib/dirname.h (dir_name_r): Remove prototype.
27421
27422 2000-12-06  Paul Eggert  <eggert@twinsun.com>
27423
27424         * m4/off_t-format.m4: Remove this file.
27425         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
27426
27427 2000-12-06  Jim Meyering  <meyering@lucent.com>
27428
27429         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
27430         replacement strtoull, we may well need the replacement strtoul, too.
27431         Check for declarations of strtoul and strtoull.
27432         Check for strtol.  Mainly as a cue to cause automake to include
27433         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
27434         Check for limits.h -- strtol.c needs it.
27435
27436 2000-12-05  Jim Meyering  <meyering@lucent.com>
27437
27438         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
27439
27440 2000-12-04  Jim Meyering  <meyering@lucent.com>
27441
27442         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
27443         Also include memory.h, stdlib.h, unistd.h if appropriate.
27444         Reported by Andreas Jaeger (conflicting declaration of malloc).
27445
27446 2000-12-02  Jim Meyering  <meyering@lucent.com>
27447
27448         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
27449         * m4/jm-macros.m4 (jm_MACROS): require it.
27450
27451 2000-12-02  Jim Meyering  <meyering@lucent.com>
27452
27453         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
27454
27455 2000-12-01  Paul Eggert  <eggert@twinsun.com>
27456
27457         * lib/memrchr.c: Include <config.h> before any system include file.
27458
27459 2000-11-30  Jim Meyering  <meyering@lucent.com>
27460
27461         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
27462
27463 2000-11-30  Jim Meyering  <meyering@lucent.com>
27464
27465         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
27466
27467 2000-11-29  Paul Eggert  <eggert@twinsun.com>
27468
27469         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
27470
27471 2000-11-26  Jim Meyering  <meyering@lucent.com>
27472
27473         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
27474
27475 2000-11-22  Paul Eggert  <eggert@twinsun.com>
27476
27477         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
27478         size of (size_t) -1; it's not portable.
27479
27480 2000-11-17  Jim Meyering  <meyering@lucent.com>
27481
27482         * lib/strstr.c: Update from GNU libc.
27483
27484 2000-11-17  Akim Demaille  <akim@epita.fr>
27485
27486         * lib/obstack.h: Formatting changes.
27487         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
27488         prevent type checking.
27489         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
27490         cast the value to (void *): assigning a `foo *' to a `void *'
27491         variable is valid.
27492         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
27493
27494 2000-11-16  Jim Meyering  <meyering@lucent.com>
27495
27496         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
27497
27498 2000-11-11  Jim Meyering  <meyering@lucent.com>
27499
27500         * lib/error.c: Add a couple #includes, merging from GNU libc version.
27501
27502 2000-11-10  Jim Meyering  <meyering@lucent.com>
27503
27504         * lib/obstack.h: Update from GNU libc.
27505         * lib/obstack.c: Likewise.
27506
27507 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
27508
27509         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
27510
27511 2000-11-06  Paul Eggert  <eggert@twinsun.com>
27512
27513         * lib/getusershell.c (setusershell): Use rewind rather than
27514         fseek/fseeko, to avoid configuration hassles with fseeko.
27515         Don't bother opening SHELLS_FILE if shellstream is NULL;
27516         it's not necessary.
27517
27518 2000-11-05  Jim Meyering  <meyering@lucent.com>
27519
27520         * lib/makepath.h (make_dir): Declare.
27521         * lib/makepath.c (make_dir): Remove `static' attribute.
27522         Tweak a comment.
27523
27524 2000-11-04  Jim Meyering  <meyering@lucent.com>
27525
27526         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
27527
27528 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
27529
27530         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
27531         last one in a bucket, advance to the next bucket.
27532
27533 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
27534
27535         * lib/fnmatch.c: Do not comment out all the code if we are using
27536         the GNU C library, because in some cases we are replacing buggy
27537         code in the GNU C library itself.
27538
27539 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
27540
27541         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
27542         (regex_compile): Catch bogus \(\1\).
27543
27544 2000-10-30  Paul Eggert  <eggert@twinsun.com>
27545
27546         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
27547         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
27548         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
27549
27550 2000-10-30  Paul Eggert  <eggert@twinsun.com>
27551
27552         * lib/error.h, getline.h, modechange.h:
27553         Remove "2000" from Copyright line, as the file hasn't been
27554         changed this year other than in the copyright notice.
27555
27556         * lib/xalloc.h: Add "2000" to Copyright line, as this file
27557         was changed this year.
27558
27559 2000-10-29  Jim Meyering  <meyering@lucent.com>
27560
27561         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
27562         renaming.
27563         * m4/ls-mntd-fs.m4: Likewise
27564
27565 2000-10-29  Jim Meyering  <meyering@lucent.com>
27566
27567         * lib/xstat.in: Fix grammar in comment.
27568
27569 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
27570
27571         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
27572         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
27573         doesn't define __restrict_arr.
27574
27575 2000-10-28  Jim Meyering  <meyering@lucent.com>
27576
27577         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
27578         (jm_PREREQ_MEMCHR): New function.
27579
27580 2000-10-28  Jim Meyering  <meyering@lucent.com>
27581
27582         * lib/memchr.c: Update from libc.
27583         Adjust for portability:
27584         [HAVE_STDLIB_H]: Include stdlib.h.
27585         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
27586         Undef __memchr, too.
27587         [!weak_alias]: Define __memchr to memchr.
27588
27589         * lib/regex.c: Update from libc.
27590         * lib/regex.h: Likewise.
27591         * lib/getopt1.c: Likewise.
27592         * lib/memcmp.c: Likewise.
27593
27594         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
27595         Avoid using fseek, when possible -- it's broken by design.
27596         Patch by Ulrich Drepper.
27597
27598 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
27599
27600         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
27601         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
27602         Giving in to popular pressure to shut up the compiler with casts.
27603
27604 2000-10-26  Jim Meyering  <meyering@lucent.com>
27605
27606         * lib/strftime.c: Update from libc.
27607
27608 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
27609
27610         * regex.c: More `unsigned char' -> `re_char' changes.
27611         Also change several `int' into `re_wchar_t'.
27612         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
27613         (PUSH_FAILURE_POINTER): Don't cast any more.
27614         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
27615         We want GCC to complain, since this piece of code makes
27616         re_match non-reentrant, which *should* be fixed.
27617         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
27618         (EXTEND_BUFFER): Use RETALLOC.
27619         (SET_LIST_BIT): Don't cast.
27620         (re_wchar_t): New type.
27621         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
27622         that those two functions will always properly return.
27623         (IMMEDIATE_QUIT_CHECK): Cast to void.
27624         (analyse_first): Use recursion rather than an explicit stack.
27625         (re_compile_fastmap): Can't fail anymore.
27626         (re_search_2): Don't check re_compile_fastmap for failure.
27627         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
27628         Now also sets the new value (passed in a new argument).
27629         (re_match_2_internal): Use it.
27630         Also, use a new var `reg' of type size_t when looping through regs
27631         rather than reuse the inappropriate `mcnt'.
27632
27633 2000-10-25  Jim Meyering  <meyering@lucent.com>
27634
27635         * lib/obstack.c: Update from libc.
27636
27637 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
27638
27639         * regex.c (regex_compile): Change the way of handling a range from
27640         a char less than 256 to a char not less than 256.
27641
27642 2000-10-24  Andrew Innes  <andrewi@gnu.org>
27643
27644         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
27645         NT-Emacs only.
27646         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
27647         so that re_search functions only quit when callers expect them to.
27648
27649 2000-10-23  Jim Meyering  <meyering@lucent.com>
27650
27651         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
27652         wrong.  That set_locale call must not have any side effects.
27653         From Paul Eggert.
27654
27655 2000-10-22  Jim Meyering  <meyering@lucent.com>
27656
27657         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
27658         [CYCLIC]: Remove now-unused definition.
27659
27660         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
27661         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
27662         Suggestion from Ulrich Drepper.
27663
27664 2000-10-21  Jim Meyering  <meyering@lucent.com>
27665
27666         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
27667         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
27668         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
27669
27670 2000-10-21  Jim Meyering  <meyering@lucent.com>
27671
27672         * lib/dirname.c (memrchr): Declare if necessary.
27673         (dir_name): Remove the restriction that there be no
27674         trailing slashes.  Now, this code skips past them, effectively
27675         ignoring them.
27676         [TEST_DIRNAME] (main): New unit tests.
27677
27678         * lib/memrchr.c: New file from GNU libc.
27679         Undef __memrchr, too.
27680         [!weak_alias]: Define __memrchr to memrchr.
27681         Guard weak_alias use with `#ifdef weak_alias'.
27682
27683 2000-10-21  Jim Meyering  <meyering@lucent.com>
27684
27685         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
27686         (dir_name): Use dir_name_r.
27687         * lib/dirname.h (dir_name_r): Declare it.
27688
27689 2000-10-17  Jim Meyering  <meyering@lucent.com>
27690
27691         * lib/quote.h (PARAMS): Define and use.
27692         Reported by Akim Demaille.
27693
27694         * lib/getopt.c: Update from libc.
27695
27696 2000-10-16  Jim Meyering  <meyering@lucent.com>
27697
27698         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
27699         setlocale.
27700         From Jan Fedak.
27701
27702 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
27703
27704         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
27705
27706 2000-09-25  Jim Meyering  <meyering@lucent.com>
27707
27708         * lib/md5.h (rol): Define (from GnuPG).
27709
27710         * lib/sha.c: Give credit (GnuPG) where due.
27711         (M): Use rol rather than open-coding it.
27712         Add a FIXME comment.
27713
27714 2000-09-21  Jim Meyering  <meyering@lucent.com>
27715
27716         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
27717         Reported by Michael Stone.
27718
27719 2000-09-20  Jim Meyering  <meyering@lucent.com>
27720
27721         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
27722         (noinst_HEADERS): Add sha.h.
27723         Based on code from Scott G. Miller and from GnuPG.
27724
27725 2000-09-18  Jim Meyering  <meyering@lucent.com>
27726
27727         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
27728         LIBS. Otherwise, everyone ends up linking with -lelf for some
27729         configurations.
27730         Reported by Mike Stone.
27731
27732 2000-09-15  Jim Meyering  <meyering@lucent.com>
27733
27734         * lib/regex.c: Update from libc.
27735
27736 2000-09-10  Jim Meyering  <meyering@lucent.com>
27737
27738         * lib/getopt.c (_getopt_internal): Update from glibc.
27739
27740 2000-09-09  Jim Meyering  <meyering@lucent.com>
27741
27742         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
27743         think it should be used as a general replacement for isascii.
27744         * lib/fnmatch.c: Likewise.
27745         * lib/mbswidth.c: Likewise
27746         * lib/regex.c: Likewise.
27747
27748         Don't use atoi.
27749         * lib/userspec.c: Include sys/param.h and limits.h.
27750         Include xstrtol.h.
27751         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
27752         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
27753         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
27754         UID, GID.  Check range.
27755
27756 2000-09-06  Jim Meyering  <meyering@lucent.com>
27757
27758         * lib/getopt.c (_getopt_internal): Update from glibc.
27759
27760 2000-08-30  Jim Meyering  <meyering@lucent.com>
27761
27762         * lib/strftime.c: Merge in changes from GNU libc.
27763
27764 2000-08-26  Jim Meyering  <meyering@lucent.com>
27765
27766         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
27767         * m4/fpending.m4: New file.
27768
27769 2000-08-26  Jim Meyering  <meyering@lucent.com>
27770
27771         * lib/closeout.c: Include "__fpending.h".
27772         (close_stdout_status): Return right away if there's nothing to flush.
27773
27774         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
27775         * lib/__fpending.c: New file.
27776         * lib/__fpending.h: New file.
27777
27778 2000-08-20  Jim Meyering  <meyering@lucent.com>
27779
27780         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
27781         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
27782         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
27783
27784 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
27785
27786         Improve fileutils installation on systems where running
27787         programs (like install) can't be unlinked.
27788         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
27789         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
27790
27791 2000-08-07  Paul Eggert  <eggert@twinsun.com>
27792
27793         Standardize on "memory exhausted" instead of "Memory exhausted"
27794         or "virtual memory exhausted".
27795         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
27796         "virtual memory exhausted".
27797         * lib/same.c (same_name): Invoke xalloc_die instead of printing
27798         our own message.
27799         * lib/userspec.c (parse_user_spec): Likewise.
27800         * lib/bumpalloc.h: comment fix
27801         * lib/same.c, userspec.c: Include xalloc.h.
27802
27803         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
27804         not char *const and pointing to a constant array.
27805         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
27806         (xrealloc): Comment fix.
27807
27808         * lib/userspec.c (parse_user_spec):
27809         Don't translate a message until just before returning,
27810         to avoid unnecessary translation.
27811
27812 2000-08-07  Jim Meyering  <meyering@lucent.com>
27813
27814         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
27815         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
27816         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
27817         getgroups.c, gethostname.c, getopt.h, group-member.c,
27818         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
27819         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
27820         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
27821         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
27822         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
27823         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
27824         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
27825         yesno.c: Back out Copyright date changes for each file with no change
27826         this year.  This eases coordination with other programs using the same
27827         source code modules.  From Paul Eggert.
27828
27829 2000-08-06  Paul Eggert  <eggert@twinsun.com>
27830
27831         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
27832         not char, for compatibility with glibc 2.1.3 strftime.c.
27833
27834 2000-08-03  Greg McGary  <greg@mcgary.org>
27835
27836         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
27837         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
27838         (EXTEND_BUFFER): Use them.
27839
27840 2000-08-01  Jim Meyering  <meyering@lucent.com>
27841
27842         * lib/dirname.c (ISSLASH): Define.
27843         (BACKSLASH_IS_PATH_SEPARATOR): Define.
27844         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
27845         both `\' and `/' may be use as path separators.
27846         Based on a patch from Prashant TR.
27847
27848 2000-07-31  Paul Eggert  <eggert@twinsun.com>
27849
27850         * lib/quotearg.c (quotearg_n_options): Don't make the initial
27851         slot vector a constant, since it might get modified.
27852
27853 2000-07-31  Jim Meyering  <meyering@lucent.com>
27854
27855         * lib/xmalloc.c: Use `virtual memory exhausted', not
27856         `Memory exhausted'.
27857         * lib/obstack.c (print_and_abort): Likewise.
27858
27859 2000-07-30  Paul Eggert  <eggert@twinsun.com>
27860
27861         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
27862         buffer, so that the caller can always quote one small
27863         component of a "memory exhausted" message in slot 0.
27864         From a suggestion by Jim Meyering.
27865
27866 2000-07-30  Jim Meyering  <meyering@lucent.com>
27867
27868         * lib/makepath.c (make_path): Quote the other instance, too.
27869
27870         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
27871         (STATIC_BUF_SIZE): Define.
27872         (quotearg_n_options): Use only statically allocated storage when
27873         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
27874         than STATIC_BUF_SIZE.
27875
27876 2000-07-29  Jim Meyering  <meyering@lucent.com>
27877
27878         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
27879         * lib/dirname.c (dir_name): Likewise.
27880
27881         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
27882         `/'.
27883
27884         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
27885         (dir_name): Assert that there are no trailing slashes.
27886
27887 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
27888
27889         * lib/mbswidth.h (mbswidth): Add a flags argument.
27890         (mbswidth): New declaration.
27891         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
27892         * lib/mbswidth.c (mbswidth): Add a flags argument.
27893         (mbsnwidth): New function.
27894
27895 2000-07-24  Jim Meyering  <meyering@lucent.com>
27896
27897         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
27898
27899 2000-07-23  Paul Eggert  <eggert@twinsun.com>
27900
27901         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
27902
27903 2000-07-23  Paul Eggert  <eggert@twinsun.com>
27904
27905         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
27906         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
27907         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
27908         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
27909         invoke multibyte primitives.
27910
27911 2000-07-23  Paul Eggert  <eggert@twinsun.com>
27912
27913         * lib/quotearg.c:
27914         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
27915         so that mbstate_t is always defined.
27916
27917         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
27918         be 1 in at least one GCC installation, and this configuration
27919         error is likely to be common.  Ignoring MB_LEN_MAX hurts
27920         performance on hosts that have mbrtowc but have only unibyte
27921         locales, but I assume these hosts are rare.
27922
27923 2000-07-23  Paul Eggert  <eggert@twinsun.com>
27924
27925         * lib/mbswidth.c (_XOPEN_SOURCE):
27926         Don't define; this causes problems on Solaris 7.
27927         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
27928
27929 2000-07-23  Jim Meyering  <meyering@lucent.com>
27930
27931         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
27932         too: getgrgid, getpwuid, getuid.
27933
27934 2000-07-23  Jim Meyering  <meyering@lucent.com>
27935
27936         * lib/basename.c (base_name): Add an assertion.
27937
27938 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
27939
27940         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
27941         shadow its mbsinit function.
27942
27943 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
27944
27945         * lib/mbswidth.h: New file.
27946         * lib/mbswidth.c: New file.
27947         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
27948         (noinst_HEADERS): Add mbswidth.h.
27949
27950 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
27951
27952         * lib/config.charset: Add support for FreeBSD. Improve support for
27953         HP-UX and IRIX 6.
27954
27955 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
27956
27957         * m4/mbswidth.m4: New file.
27958         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
27959
27960 2000-07-15  Jim Meyering  <meyering@lucent.com>
27961
27962         * lib/makepath.c: Include quote.h.
27963         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
27964         corresponding argument in a `quote (...)' call.
27965         Give better diagnostics.
27966
27967         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
27968         (noinst_HEADERS): Add quote.h.
27969
27970         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
27971         from tar's src/misc.c.
27972         * lib/quote.h: New file.  Prototypes for same.
27973
27974 2000-07-14  Paul Eggert  <eggert@twinsun.com>
27975
27976         From a suggestion by Bruno Haible.
27977         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
27978         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
27979         to decide whether to define the BeOS workaround macro;
27980         this adjusts to the change to AC_MBSTATE_T.
27981
27982 2000-07-14  Jim Meyering  <meyering@lucent.com>
27983
27984         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
27985         jm_AC_TYPE_UINTMAX_T.
27986
27987 2000-07-13  Paul Eggert  <eggert@twinsun.com>
27988
27989         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
27990
27991         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
27992         quotearg_buffer_restyled): Add support for
27993         clocale_quoting_style.  Undo previous change to
27994         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
27995         and "{RIGHT QUOTATION MARK}" msgids.
27996
27997 2000-07-10  Paul Eggert  <eggert@twinsun.com>
27998
27999         From a suggestion by Bruno Haible.
28000         * m4/mbstate_t.m4 (AC_MBSTATE_T):
28001         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
28002         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
28003         and mbstate_t, to a single-part test that simply defines mbstate_t.
28004         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
28005         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
28006
28007 2000-07-10  Jim Meyering  <meyering@lucent.com>
28008
28009         * m4/strerror_r.m4: Mirror the correction made in autoconf.
28010
28011         * m4/gnu-source.m4: Output to confdefs.h directly.
28012         Suggestion from Akim Demaille.
28013
28014 2000-07-09  Paul Eggert  <eggert@twinsun.com>
28015
28016         The old behavior of quoting `like this' doesn't look good with
28017         newer, ISO-style fonts.  See:
28018         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
28019
28020         Instead, quote "like this" by default.  Let the translator
28021         tailor the locale-specific quoting behavior by providing
28022         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
28023
28024         * lib/quotearg.c (N_): New macro.
28025         (gettext_default): New function.
28026         (quotearg_buffer_restyled): Use
28027         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
28028         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
28029
28030 2000-07-09  Jim Meyering  <meyering@lucent.com>
28031
28032         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
28033         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
28034
28035         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
28036         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
28037
28038 2000-07-09  Jim Meyering  <meyering@lucent.com>
28039
28040         * lib/Most files: Update copyright dates to include 2000.
28041
28042 2000-07-08  Jim Meyering  <meyering@lucent.com>
28043
28044         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
28045         if not defined.
28046         (xgethostname): Remove now-unnecessary #ifdef.
28047         Move declaration of `err' into loop where it's used.
28048
28049 2000-07-05  Paul Eggert  <eggert@twinsun.com>
28050         and Bruno Haible  <haible@clisp.cons.org>
28051
28052         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
28053         only if the test for an object-type mbstate_t fails.  This
28054         prevents us from mistakenly reporting that mbstate_t is a
28055         system object type after we "#define mbstate_t int" to work
28056         around its lack.
28057
28058 2000-07-05  Paul Eggert  <eggert@twinsun.com>
28059         and Bruno Haible  <haible@clisp.cons.org>
28060
28061         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
28062
28063 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
28064
28065         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
28066         to strerror_r.
28067         Include <ctype.h> for use of isalpha.
28068
28069 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
28070
28071         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
28072         by allocating a larger buffer. Test the gethostname return value for
28073         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
28074         returns an error and ENAMETOOLONG isn't defined.
28075
28076 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
28077
28078         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
28079         dimension.
28080
28081 2000-07-04  Jim Meyering  <meyering@lucent.com>
28082
28083         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
28084         of the deprecated AC_CHECKING.
28085
28086 2000-07-04  Jim Meyering  <meyering@lucent.com>
28087
28088         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
28089         Reported by Bruno Haible.
28090
28091 2000-07-04  Jim Meyering  <meyering@lucent.com>
28092
28093         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
28094         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
28095         lacks mbrtowc.
28096
28097 2000-07-03  Paul Eggert  <eggert@twinsun.com>
28098
28099         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
28100         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
28101
28102 2000-07-03  Paul Eggert  <eggert@twinsun.com>
28103         and Bruno Haible  <haible@clisp.cons.org>
28104
28105         * lib/quotearg.c (mbrtowc):
28106         Assign to *pwc, and return 1 only if result is nonzero.
28107         (iswprint): Use ISPRINT when substituting our own mbrtowc.
28108
28109 2000-07-03  Jim Meyering  <meyering@lucent.com>
28110
28111         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
28112
28113 2000-07-03  Jim Meyering  <meyering@lucent.com>
28114
28115         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
28116         This is necessary to get a definition of e.g., UTMP_FILE on
28117         HP-UX 10.20.
28118         From Bob Proulx.
28119
28120 2000-07-02  Jim Meyering  <meyering@lucent.com>
28121
28122         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
28123
28124         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
28125         AC_LIBOBJ(function_name).
28126         * m4/chown.m4: Likewise.
28127         * m4/fnmatch.m4: Likewise.
28128         * m4/ftruncate.m4: Likewise.
28129         * m4/getgroups.m4: Likewise.
28130         * m4/getline.m4: Likewise.
28131         * m4/group-member.m4: Likewise.
28132         * m4/jm-macros.m4: Likewise.
28133         * m4/lstat.m4: Likewise.
28134         * m4/malloc.m4: Likewise.
28135         * m4/memcmp.m4: Likewise.
28136         * m4/nanosleep.m4: Likewise.
28137         * m4/putenv.m4: Likewise.
28138         * m4/realloc.m4: Likewise.
28139         * m4/regex.m4: Likewise.
28140         * m4/stat.m4: Likewise.
28141         * m4/strftime.m4: Likewise.
28142
28143 2000-07-02  Jim Meyering  <meyering@lucent.com>
28144
28145         * lib/quotearg.c (mbstate_t): Don't define here.
28146
28147 2000-07-02  Jim Meyering  <meyering@lucent.com>
28148
28149         * lib/nanosleep.c (SIGCONT): Define if not already defined.
28150
28151 2000-07-01  Jim Meyering  <meyering@lucent.com>
28152
28153         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
28154
28155 2000-07-01  Jim Meyering  <meyering@lucent.com>
28156
28157         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
28158         problem.
28159
28160 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
28161
28162         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
28163         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
28164
28165 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
28166
28167         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
28168         per change in ../m4/ls-mntd-fs.m4.
28169         (read_filesystem_list): Ignore symbolic links.
28170
28171 2000-06-29  Jim Meyering  <meyering@lucent.com>
28172
28173         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
28174         for declaration of strcmp.
28175
28176         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
28177
28178         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
28179         Avoid warning by casting result to `char *' to remove `const'.
28180
28181 2000-06-28  Jim Meyering  <meyering@lucent.com>
28182
28183         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
28184         included by quotearg.c, for which we perform this test.  From
28185         Bruno Haible.
28186
28187 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
28188
28189         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
28190         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
28191         <utmpx.h> exists, put readutmp.o into LIBOBJS.
28192
28193 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
28194
28195         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
28196
28197 2000-06-26  Paul Eggert  <eggert@twinsun.com>
28198
28199         savedir now sets errno on failure and invokes xmalloc to get memory.
28200         Fix a couple of other minor bugs while we're at it.
28201
28202         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
28203         (NAMLEN): Remove macro.
28204         (malloc, realloc): Remove decls.
28205         (stpcpy): Likewise.
28206         ("xalloc.h"): Include.
28207         (NAME_SIZE_DEFAULT): New macro.
28208         (savedir): Use xmalloc / xrealloc to allocate memory.
28209         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
28210         Skip "" directory entries.
28211         Use strlen to calculate directory entry length, since the old method
28212         is rarely used these days and isn't worth supporting.
28213         Don't use a pointer after freeing it.
28214         Check for integer overflow when calculating allocation size.
28215         Use memcpy to copy entries, instead of stpcpy.
28216         Set errno properly when returning NULL.
28217         Check for readdir error.
28218
28219 2000-06-26  Jim Meyering  <meyering@lucent.com>
28220
28221         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
28222
28223 2000-06-25  Jim Meyering  <meyering@lucent.com>
28224
28225         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
28226         Linux header bug when _XOPEN_SOURCE is defined to 500.
28227
28228 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
28229
28230         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
28231         deficiency.
28232
28233 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
28234
28235         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
28236         Include xalloc.h.
28237         Don't include <stdlib.h>.  Don't declare malloc, realloc.
28238
28239 2000-06-24  Jim Meyering  <meyering@lucent.com>
28240
28241         * m4/strerror_r.m4: Revive this file -- to try out an experimental
28242         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
28243         for which strerror does return char*, but which lacks a conveniently
28244         accessible declaration of the function.  If the compile-test says
28245         strerror_r doesn't work, then resort to a `run'-test that works on
28246         BeOS and segfaults on DEC Unix.
28247
28248 2000-06-24  Jim Meyering  <meyering@lucent.com>
28249
28250         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
28251
28252 2000-06-23  Paul Eggert  <eggert@twinsun.com>
28253
28254         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
28255         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
28256
28257 2000-06-23  Paul Eggert  <eggert@twinsun.com>
28258
28259         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
28260         (mbrtowc, mbstate_t): Define substitutes if
28261         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
28262         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
28263         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
28264
28265 2000-06-23  Jim Meyering  <meyering@lucent.com>
28266
28267         * m4/afs.m4: Add missing AC_MSG_RESULT.
28268         Reported by Bruno Haible.
28269
28270         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
28271         Suggestion from Bruno Haible.
28272
28273 2000-06-23  Jim Meyering  <meyering@lucent.com>
28274
28275         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
28276
28277 2000-06-21  Jim Meyering  <meyering@lucent.com>
28278
28279         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
28280
28281 2000-06-21  Jim Meyering  <meyering@lucent.com>
28282
28283         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
28284         (noinst_HEADERS): Add getstr.h.
28285
28286         * lib/getline.c (getstr): Move into a separate file.
28287         * lib/getstr.c (getstr): New file, extracted from getline.c, with
28288         the following changes: new parameter, delim2; both delim[12]
28289         parameters have type `int', not `char'.  The latter would lose
28290         with 8-bit delimiters.
28291         * lib/getstr.h: New file.
28292
28293 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
28294
28295         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
28296         than 1024, return a memory chunk of least possible size, instead
28297         of size PATH_MAX + 2. In the loop, increment the size proportionally.
28298         Use free/xmalloc instead of xrealloc to avoid copying for very long
28299         paths.
28300
28301 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
28302
28303         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
28304         the empty string.
28305
28306 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
28307
28308         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
28309         address, not strdup.  Include <stdlib.h> and don't declare free().
28310
28311 2000-06-19  Jim Meyering  <meyering@lucent.com>
28312
28313         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
28314
28315 2000-06-18  Jim Meyering  <meyering@lucent.com>
28316
28317         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
28318
28319         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
28320         `checking whether...' message to be consistent with that of the
28321         lstat test.
28322
28323 2000-06-18  Jim Meyering  <meyering@lucent.com>
28324
28325         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
28326         Besides, these days every porting target provides a mkdir function.
28327
28328         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
28329         needed. (this snippet comes from src/system.h).
28330
28331 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
28332
28333         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
28334
28335 2000-06-15  Paul Eggert  <eggert@twinsun.com>
28336
28337         * lib/human.c (adjust_value): New function.
28338         (human_readable_inexact): Apply rounding style even when
28339         printing approximate values.
28340
28341 2000-06-14  Paul Eggert  <eggert@twinsun.com>
28342
28343         * lib/human.c (human_readable_inexact): Allow an input block
28344         size that is not a multiple of the output block size, and vice versa.
28345         Reported by Piergiorgio Sartor.
28346
28347 2000-06-14  Paul Eggert  <eggert@twinsun.com>
28348
28349         * lib/getdate.y (get_date): Apply relative times after time
28350         zone indicator, not before.  Reported by Todd A. Jacobs.
28351
28352 2000-06-13  Jim Meyering  <meyering@lucent.com>
28353
28354         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
28355
28356         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
28357
28358 2000-06-12  Paul Eggert  <eggert@twinsun.com>
28359
28360         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
28361
28362 2000-06-12  Jim Meyering  <meyering@lucent.com>
28363
28364         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
28365         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
28366         optional argument.
28367         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
28368         the optional argument, `lib'.
28369
28370 2000-06-08  Jim Meyering  <meyering@lucent.com>
28371
28372         * m4/largefile.m4: Remove file (now that it's part of autoconf).
28373
28374 2000-06-04  Paul Eggert  <eggert@twinsun.com>
28375
28376         Rewrite largefile configuration so that we don't need to run
28377         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
28378         AC_CANONICAL_HOST in configure.in -- jmm]
28379
28380         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
28381         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
28382         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
28383         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
28384         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
28385         All uses changed.
28386         Instead of inspecting the output of getconf, try to compile the
28387         test program without and with the macro definition.
28388         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
28389         for getconf.  Instead, check for the needed flags by compiling
28390         test programs.
28391
28392 2000-06-04  Paul Eggert  <eggert@twinsun.com>
28393
28394         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
28395
28396 2000-06-04  Jim Meyering  <meyering@lucent.com>
28397
28398         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
28399         SunOS 4.1.4 for which gid_t is an unsigned type.
28400
28401 2000-06-03  Jim Meyering  <meyering@lucent.com>
28402
28403         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
28404         now that autoconf requires that.
28405
28406         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
28407         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
28408         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
28409
28410 2000-06-03  Jim Meyering  <meyering@lucent.com>
28411
28412         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
28413
28414 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
28415
28416         * m4/glibc21.m4: New file.
28417         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
28418
28419 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
28420
28421         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
28422         newer, don't install charset.alias.
28423         * lib/config.charset: Change the Linux/glibc rules so they become empty
28424         on glibc-2.1 or newer.
28425
28426 2000-06-02  Jim Meyering  <meyering@lucent.com>
28427
28428         * lib/mountlist.c: Back out last change.  Instead, do this...
28429         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
28430         me_dummy member using the same `ignore'-testing code.
28431         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
28432         fs_type strings.
28433         From Mark D. Roth.
28434
28435 2000-05-29  Jim Meyering  <meyering@lucent.com>
28436
28437         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
28438         mounts with the `ignore' attribute.  Based on a patch from
28439         Mark D. Roth.
28440
28441 2000-05-28  Jim Meyering  <meyering@lucent.com>
28442
28443         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
28444         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
28445         * m4/stat.m4: Likewise.
28446         * m4/lstat.m4: Likewise.
28447         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
28448
28449         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
28450         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
28451
28452 2000-05-26  Jim Meyering  <meyering@lucent.com>
28453
28454         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
28455
28456 2000-05-24  Jim Meyering  <meyering@lucent.com>
28457
28458         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
28459         autoconf requires that.
28460         * m4/lib-check.m4: Likewise.
28461         * m4/jm-macros.m4: Likewise.
28462         * m4/strftime.m4: Likewise.
28463
28464         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
28465         AC_CHECK_DECLS, now that autoconf requires that.
28466
28467 2000-05-22  Jim Meyering  <meyering@lucent.com>
28468
28469         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
28470         * m4/lstat.m4: Likewise.
28471
28472 2000-05-22  Jim Meyering  <meyering@lucent.com>
28473
28474         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
28475
28476 2000-05-20  Jim Meyering  <meyering@lucent.com>
28477
28478         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
28479         (jm_PREREQ): Use it.
28480
28481 2000-05-18  Jim Meyering  <meyering@lucent.com>
28482
28483         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
28484         back, too, since it may have been modified by allocate_entry.
28485         (hash_delete): Rewrite to use neither the assignment operator
28486         nor the comma operator in an if-expression.
28487
28488 2000-05-15  Paul Eggert  <eggert@twinsun.com>
28489
28490         * lib/closeout.c:
28491         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
28492         Remove; no longer needed.
28493         "quotearg.h": Add include.
28494         (file_name): Do not bother to explicitly initialize to NULL; it's less
28495         efficient on some hosts.
28496         (close_stdout_status): Remove test as to whether stdout was already
28497         closed; it breaks for the case "echo x | sort >&-".
28498         Quote file name colons.
28499         Do not assume that _("write error") lacks format strings.
28500
28501 2000-05-15  Jim Meyering  <meyering@lucent.com>
28502
28503         * lib/version-etc.c (version_etc_copyright): Update the copyright
28504         string used in all --version output.
28505
28506 2000-05-14  Jim Meyering  <meyering@lucent.com>
28507
28508         * lib/closeout.c (close_stdout_set_file_name): New function.
28509         (close_stdout_status): Use new file-scoped global.
28510         Return right away if fstat says the stdout file descriptor is invalid.
28511         * lib/closeout.h (close_stdout_set_file_name): Declare.
28512
28513 2000-05-10  Jim Meyering  <meyering@lucent.com>
28514
28515         * lib/closeout.c [default_exit_status]: New file-scoped variable.
28516         (close_stdout_set_status): New function.
28517         * lib/closeout.h (close_stdout_set_status): Declare.
28518
28519 2000-05-09  Jim Meyering  <meyering@lucent.com>
28520
28521         * m4/gettext.m4: Rename this...
28522         * m4/libintl.m4: ...to this.
28523
28524 2000-05-08  Jim Meyering  <meyering@lucent.com>
28525
28526         * lib/long-options.c: Don't include closeout.h.
28527         (parse_long_options): Don't call close_stdout for --version.
28528
28529 2000-05-06  Paul Eggert  <eggert@twinsun.com>
28530
28531         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
28532         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
28533         2.1.3 bug.  This avoids a clash when files like regex.c define
28534         _GNU_SOURCE.
28535
28536 2000-05-06  Jim Meyering  <meyering@lucent.com>
28537
28538         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
28539         (AC_REPLACE_FUNCS): Add strnlen.
28540
28541         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
28542         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
28543
28544         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
28545         AC_SEARCH_LIBS call for nanosleep.
28546         (LIB_NANOSLEEP): Set and AC_SUBST.
28547
28548 2000-05-06  Jim Meyering  <meyering@lucent.com>
28549
28550         * lib/strnlen.c: Undefine __strnlen and strnlen.
28551         [!weak_alias]: Define __strnlen to strnlen.
28552
28553         * lib/atexit.c: New file, from libiberty.
28554
28555 2000-05-06  Jim Meyering  <meyering@lucent.com>
28556
28557         * lib/closeout.c (close_stdout_status): Also check for errors on the
28558         stderr stream.
28559
28560 2000-05-05  Jim Meyering  <meyering@lucent.com>
28561
28562         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
28563         AC_SEARCH_LIBS call for clock_gettime.
28564         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
28565
28566         * m4/search-libs.m4: Update from autoconf.
28567
28568         su doesn't work on Solaris 2.6.
28569         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
28570         <shadow.h>.  Reported by Dragos Harabor.
28571
28572 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
28573
28574         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
28575         memcpy instead of xmalloc, xrealloc, path_concat.
28576         (locale_charset): Treat empty environment variables as absent.
28577         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
28578
28579 2000-05-04  Jim Meyering  <meyering@lucent.com>
28580
28581         * lib/getopt.c: Update from glibc.
28582         * lib/obstack.c: Likewise.
28583         * lib/obstack.h: Likewise.
28584         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
28585         file
28586
28587         * lib/regex.h: Likewise.
28588         * lib/strndup.c: Likewise.
28589         * lib/strnlen.c: New file, from glibc.
28590
28591 2000-05-03  Jim Meyering  <meyering@lucent.com>
28592
28593         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
28594
28595 2000-05-02  Paul Eggert  <eggert@twinsun.com>
28596
28597         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
28598         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
28599         compile-time test, rather than inspecting host and OS, to
28600         decide whether to define _LARGEFILE_SOURCE.
28601
28602 2000-05-01  Jim Meyering  <meyering@lucent.com>
28603
28604         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
28605
28606         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
28607         Based on a patch from Bruno Haible.
28608
28609 2000-05-01  Jim Meyering  <meyering@lucent.com>
28610
28611         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
28612
28613 2000-04-29  Jim Meyering  <meyering@lucent.com>
28614
28615         * lib/path-concat.c: Declare strdup only if it's not defined.
28616         * lib/canon-host.c: Likewise.
28617
28618 2000-04-28  Jim Meyering  <meyering@lucent.com>
28619
28620         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
28621         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
28622         is included first, then limits.h is included by locale.h by libintl.h.
28623         From John David Anglin.
28624
28625 2000-04-25  Jim Meyering  <meyering@lucent.com>
28626
28627         * lib/makepath.c (S_IRWXUGO): Define.
28628         (make_path): Always perform explicit chmod if MODE specifies any
28629         of the `special' permission bits.  Prompted by a bug report against
28630         install from Mate Wierdl and Joost van Baal.
28631
28632 2000-04-18  Jim Meyering  <meyering@lucent.com>
28633
28634         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
28635         (jm_PREREQ): Use it.
28636
28637 2000-04-18  Jim Meyering  <meyering@lucent.com>
28638
28639         * lib/README: New file.
28640
28641         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
28642         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
28643
28644 2000-04-17  Jim Meyering  <meyering@lucent.com>
28645
28646         Get it right :-)
28647         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
28648         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
28649         Suggestion from Akim Demaille.
28650
28651 2000-04-17  Jim Meyering  <meyering@lucent.com>
28652
28653         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
28654         the definition of it to rpl_strftime also defined-away the system's
28655         declaration.
28656
28657 2000-04-15  Jim Meyering  <meyering@lucent.com>
28658
28659         Use `C' to denote so-called `contiguous' files, the same way
28660         that tar does.
28661         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
28662         (ftypelet): Use S_ISCTG.
28663         From Michael Deutschmann.
28664
28665 2000-04-14  Jim Meyering  <meyering@lucent.com>
28666
28667         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
28668         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
28669         clobbered.
28670
28671 2000-04-14  Jim Meyering  <meyering@lucent.com>
28672
28673         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
28674
28675 2000-04-13  Jim Meyering  <meyering@lucent.com>
28676
28677         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
28678         AH_VERBATIM to insert required #ifndef into config.h.in.
28679         Suggestion from Akim Demaille.
28680
28681 2000-04-12  Jim Meyering  <meyering@lucent.com>
28682
28683         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
28684         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
28685         Christian Krackowizer.
28686
28687         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
28688         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
28689         (AC_SYS_LARGEFILE): Require.
28690         (AM_C_PROTOTYPES): Require.
28691
28692 2000-04-08  Jim Meyering  <meyering@lucent.com>
28693
28694         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
28695         names don't conflict.  Reported by Eli Zaretskii.
28696
28697 2000-04-07  Jim Meyering  <meyering@lucent.com>
28698
28699         * lib/putenv.c: Move inclusion of errno.h so it follows that of
28700         sys/types.h, to work around system header problems on AIX 3.2.5.
28701         From Bruno Haible.
28702
28703 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
28704
28705         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
28706         bug.  Deal with the different error behavior of Irix iconv.
28707
28708 2000-04-05  Paul Eggert  <eggert@twinsun.com>
28709
28710         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
28711         IRIX if the installer said otherwise.
28712
28713 2000-04-05  Jim Meyering  <meyering@lucent.com>
28714
28715         Portability tweaks required for ultrix4.3.
28716         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
28717         (jm_CHECK_DECLS): Add getutent to the list of functions.
28718         (_jm_DECL_HEADERS): Add utmpx.h.
28719         From John David Anglin.
28720
28721         * m4/strftime.m4: Back out the 2000-04-02 change.
28722         Instead of that change, simply undefine putenv in the test program.
28723
28724 2000-04-05  Jim Meyering  <meyering@lucent.com>
28725
28726         Portability tweaks required for ultrix4.3.
28727         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
28728         getutent.
28729         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
28730         * lib/canon-host.c: Declare strdup.
28731         * lib/path-concat.c: Likewise.
28732         From John David Anglin.
28733
28734 2000-04-04  Jim Meyering  <meyering@lucent.com>
28735
28736         Be more DOS 8.3-friendly.
28737         * lib/ref-add.sin: Renamed from ref-add.sed.in.
28738         * lib/ref-del.sin: Renamed from ref-del.sed.in.
28739         * lib/Makefile.am: Reflect renaming.
28740         Reported by Eli Zaretskii.
28741
28742         Use a temporary file name that won't clash with `charset.alias'
28743         in the DOS 8.3 name space.
28744         * lib/Makefile.am (charset_tmp): Define.
28745         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
28746         (uninstall-local): Likewise.
28747         Reported by Eli Zaretskii.
28748
28749 2000-04-03  Jim Meyering  <meyering@lucent.com>
28750
28751         * m4/gettext.m4: Fix typo in comment.
28752
28753         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
28754         textutils/configure.in).  Suggestion from Paul Eggert.
28755         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
28756
28757 2000-04-02  Paul Eggert  <eggert@twinsun.com>
28758
28759         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
28760         variable in the shell rather than using putenv, which isn't
28761         portable.  This avoids the configure-time inter-test dependency
28762         on the potentially-renamed putenv function.
28763
28764 2000-03-30  Paul Eggert  <eggert@twinsun.com>
28765
28766         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
28767         before checking struct stat.st_blksize, so that
28768         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
28769
28770 2000-03-29  Paul Eggert  <eggert@twinsun.com>
28771
28772         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
28773         since strftime.c uses HAVE_STRFTIME to decide whether to use
28774         the underlying strftime.
28775
28776 2000-03-29  Paul Eggert  <eggert@twinsun.com>
28777
28778         * lib/time/strftime.c (my_strftime): Make sure we call the system
28779         strftime, not ourselves, when invoking the underlying strftime.
28780
28781 2000-03-24  Jim Meyering  <meyering@lucent.com>
28782
28783         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
28784         (charset_alias): Define.
28785         (install-exec-local): Factor out common code.
28786         (uninstall-local): Split lines longer than 80.
28787         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
28788         (SUFFIXES): Define.
28789         (.sed.in.sed): New rule.  Don't redirect directly to $@.
28790         (CLEANFILES): Add ref-add.sed and ref-del.sed.
28791
28792 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
28793
28794         * lib/config.charset: Output a line containing "Packages using this
28795         file".
28796         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
28797         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
28798         ref-del.sed): New rules.
28799
28800 2000-03-17  Jim Meyering  <meyering@lucent.com>
28801
28802         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
28803         Otherwise, include <strings.h>
28804
28805 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
28806
28807         * lib/unicodeio.c (utf8_wctomb): New function.
28808         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
28809         format instead of in UCS-4 with platform dependent endianness.
28810
28811 2000-03-10  Jim Meyering  <meyering@lucent.com>
28812
28813         * m4/lib-check.m4: Look for getspnam in -lgen, too.
28814         From Marco Franzen.
28815
28816 2000-03-07  Paul Eggert  <eggert@twinsun.com>
28817
28818         * lib/savedir.c (savedir): Work even if directory size is
28819         negative; this can happen with some screwy NFS configurations.
28820
28821 2000-03-06  Jim Meyering  <meyering@lucent.com>
28822
28823         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
28824         if it's NULL (because we ran out of memory).  From Bruno Haible.
28825
28826 2000-03-05  Jim Meyering  <meyering@lucent.com>
28827
28828         * lib/localcharset.c ("path-concat.h"): Include.
28829         (get_charset_aliases): Use path_concat instead of ANSI string
28830         concatenation.
28831
28832         * lib/unicodeio.h (PARAMS): Define.
28833         Use it to guard prototype.
28834
28835 2000-03-04  Jim Meyering  <meyering@lucent.com>
28836
28837         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
28838         for lib/localcharset.c.
28839
28840 2000-03-04  Jim Meyering  <meyering@lucent.com>
28841
28842         * lib/Makefile.am (install-exec-local): Create $(libdir) before
28843         installing into it.
28844         (uninstall-local): Uncomment this rule so `make distcheck' works
28845         once again.
28846
28847         * lib/unicodeio.c (<errno.h>): Include it.
28848         (errno): Declare if not defined.
28849
28850         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
28851
28852         * lib/config.charset: New version, incorporating remarks from a linux
28853         i18n mailing list.  From Bruno Haible.
28854
28855 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
28856
28857         * m4/codeset.m4: New file.
28858         * m4/iconv.m4: New file.
28859         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
28860
28861 2000-03-03  Jim Meyering  <meyering@lucent.com>
28862
28863         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
28864
28865 2000-03-02  Jim Meyering  <meyering@lucent.com>
28866
28867         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
28868         the messages come out on separate lines.
28869
28870         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
28871         rather than jm_CHECK_DECLARATIONS.
28872         * m4/decl.m4: Remove now-unused file.
28873
28874         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
28875         geteuid.
28876
28877 2000-03-02  Jim Meyering  <meyering@lucent.com>
28878
28879         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
28880
28881 2000-03-01  Jim Meyering  <meyering@lucent.com>
28882
28883         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
28884         * lib/unicodeio.c: Likewise.
28885
28886 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
28887
28888         * lib/config.charset: New file.
28889         * lib/localcharset.c: New file.
28890         * lib/unicodeio.h, lib/unicodeio.c: New files.
28891         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
28892         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
28893         (noinst_HEADERS): Add unicodeio.h.
28894         (all-local, install-exec-local, charset.alias): New targets.
28895
28896 2000-02-28  Paul Eggert  <eggert@twinsun.com>
28897
28898         * lib/quotearg.c (ALERT_CHAR): New macro.
28899         (quotearg_buffer_restyled): Use it.
28900
28901 2000-02-27  Jim Meyering  <meyering@lucent.com>
28902
28903         * m4/check-decl.m4: Add getenv to the list.
28904
28905 2000-02-27  Jim Meyering  <meyering@lucent.com>
28906
28907         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
28908         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
28909
28910         * lib/backupfile.c: Guard inclusion of stdlib.h with
28911         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
28912         Declare malloc if needed.
28913
28914         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
28915         `#ifndef HAVE_DECL..'
28916         now that autoconf always defines the HAVE_DECL_ symbols.
28917         * lib/human.c: Likewise.
28918         * lib/same.c: Likewise.
28919         * lib/strtoumax.c: Likewise.
28920
28921         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
28922         declaration check was not run.
28923         * lib/hash.c: Likewise.
28924         * lib/human.c: Likewise.
28925         * lib/same.c: Likewise.
28926         * lib/strtoumax.c: Likewise.
28927
28928         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
28929         `.', then first look up the entire `.'-containing string as a login
28930         name.
28931
28932 2000-02-23  Jim Meyering  <meyering@lucent.com>
28933
28934         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
28935         in place of my hack.
28936
28937 2000-02-18  Paul Eggert  <eggert@twinsun.com>
28938
28939         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
28940         (textint): New typedef.
28941         (parser_control): Member year changed from int to textint.
28942         All uses changed.
28943         (YYSTYPE): Removed; replaced by %union with int and textint members.
28944         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
28945         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
28946         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
28947         (tSNUMBER, tUNUMBER): Now of type <textintval>.
28948         (date, number, to_year): Use width of number in digits, not its value,
28949         to determine whether it's a 2-digit year, or a 2-digit time.
28950         (yylex): Store number of digits of numeric tokens.
28951         Reported by John Kendall.
28952
28953         (parser_control): Changed from struct parser_control to typedef (for
28954         consistency).  All uses changed.
28955
28956         (tID): Removed; not used.
28957         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
28958
28959 2000-02-14  Paul Eggert  <eggert@twinsun.com>
28960
28961         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
28962         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
28963
28964 2000-02-12  Jim Meyering  <meyering@lucent.com>
28965
28966         * lib/userspec.c (ISDIGIT): Define it.
28967         (isdigit): Remove definition.
28968         (is_number): Use ISDIGIT, not isdigit.
28969         <libintl.h>: Include.
28970         (_ and N_): Define.
28971         (parse_user_spec): Mark translatable strings.
28972
28973 2000-02-10  Jim Meyering  <meyering@lucent.com>
28974
28975         With these changes, nanosleep.[ch] are finally enough like the other
28976         lib/* replacement files to compile on a few more losing systems.
28977
28978         * lib/nanosleep.h: Don't include config.h.
28979         Remove prototype from declaration of nanosleep.
28980         (PARAMS): Remove now-unneeded definition.
28981         * lib/nanosleep.c: #undef nanosleep.
28982         (rpl_nanosleep): Rename from nanosleep.
28983
28984 2000-02-10  Jim Meyering  <meyering@lucent.com>
28985
28986         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
28987         gnu_nanosleep to rpl_nanosleep.
28988
28989 2000-02-09  Jim Meyering  <meyering@lucent.com>
28990
28991         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
28992         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
28993
28994 2000-02-08  Akim Demaille  <akim@epita.fr>
28995
28996         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
28997         `[' and `]' and remove uses of `changequote'.
28998         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
28999         (AC_SYS_LARGEFILE): Likewise.
29000         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
29001         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
29002         of changequote.
29003         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
29004         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
29005         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
29006         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
29007
29008 2000-02-05  Jim Meyering  <meyering@lucent.com>
29009
29010         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
29011         Remove explicit use of AC_HEADER_TIME.  It is required by
29012         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
29013         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
29014         in autoconf whereby the expansion of the latter ended up preceding
29015         the expansion of its prerequisite, AC_HEADER_TIME.
29016         Reported by Volker Borchert.
29017
29018 2000-02-03  Jim Meyering  <meyering@lucent.com>
29019
29020         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
29021
29022 2000-02-03  Jim Meyering  <meyering@lucent.com>
29023
29024         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
29025         rather than with `#if HAVE_UTMPNAME'.
29026
29027 2000-02-02  Jim Meyering  <meyering@lucent.com>
29028
29029         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
29030         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
29031         Reported by Eli Zaretskii.
29032
29033 2000-02-01  Jim Meyering  <meyering@lucent.com>
29034
29035         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
29036
29037 2000-01-31  Jim Meyering  <meyering@lucent.com>
29038
29039         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
29040         functions.  Add the time.h and sys/time.h headers along with the
29041         AC_REQUIRE'ment of AC_HEADER_TIME.
29042
29043 2000-01-31  Jim Meyering  <meyering@lucent.com>
29044
29045         * lib/nanosleep.h (nanosleep): Guard declaration with
29046         `#if ! HAVE_DECL_NANOSLEEP'.
29047         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
29048         the declaration in that vendor's sys/timers.h.
29049         Reported by Christian Krackowizer.
29050
29051         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
29052         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
29053         (ISPRINT): Likewise.
29054         Reported by Tom Tromey.
29055
29056 2000-01-30  Jim Meyering  <meyering@lucent.com>
29057
29058         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
29059
29060         * m4/prereq.m4 (utmp_includes): Define.
29061         Check for ut_user and ut_name members in both struct utmpx
29062         and struct utmp.
29063
29064 2000-01-30  Jim Meyering  <meyering@lucent.com>
29065
29066         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
29067         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
29068         header files where only utmpx.ut_user is declared.
29069
29070         * lib/readutmp.h (UT_USER): Define.
29071
29072 2000-01-29  Jim Meyering  <meyering@lucent.com>
29073
29074         * m4/lib-check.m4: New file containing library-related checks from
29075         fileutils and sh-utils (textutils had none).
29076
29077 2000-01-28  Jim Meyering  <meyering@lucent.com>
29078
29079         * m4/perl.m4: Change format of warning message to look more like that
29080         from the missing script.  Suggestion from François Pinard.
29081
29082 2000-01-25  Jim Meyering  <meyering@lucent.com>
29083
29084         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
29085         well as time.h in the compile check.
29086         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
29087         Fix typo in cross-compiling case: s/yes/no/.
29088
29089 2000-01-23  Jim Meyering  <meyering@lucent.com>
29090
29091         * m4/jm-macros.m4: Move df-related tests here from
29092         fileutils/configure.in
29093
29094         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
29095         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
29096
29097         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
29098         s/space/ac_fsusage_space/.
29099         (jm_FILE_SYSTEM_USAGE): Take two parameters.
29100
29101         * m4/ftruncate.m4: New file (derived from part of
29102         fileutils/configure.in).
29103         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
29104         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
29105
29106         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
29107         AC_SUBST these here, rather than just in sh-util/configure.in, so
29108         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
29109         all the same.
29110         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
29111         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
29112         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
29113         (AC_SUBST(POW_LIBM)): Likewise.
29114         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
29115
29116 2000-01-23  Jim Meyering  <meyering@lucent.com>
29117
29118         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
29119         obstack.c.
29120
29121 2000-01-22  Jim Meyering  <meyering@lucent.com>
29122
29123         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
29124
29125         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
29126
29127         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
29128         configure.in
29129         (AC_CHECK_HEADERS): Likewise for sh-utils.
29130         (AC_CHECK_HEADERS): Likewise for textutils.
29131         Merge the three lists of headers.
29132
29133         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
29134         from fileutils' configure.in.
29135
29136         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
29137         code. Moved tests into their own function (_jm_DECL_HEADERS) in
29138         check-decl.m4.
29139
29140         * m4/check-decl.m4: Use #if rather than #ifdef.
29141         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
29142         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
29143         (_jm_DECL_HEADERS): Define new function.
29144         (jm_CHECK_DECLARATIONS): Require it.
29145
29146 2000-01-22  Jim Meyering  <meyering@lucent.com>
29147
29148         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
29149         [! HAVE_DECL_STRTOULL]: Declare strtoull.
29150         Required for some AIX systems.  Reported by Christian Krackowizer.
29151         [TESTING] (main): New function.
29152
29153         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
29154         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
29155         letters.
29156
29157         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
29158         iswprint.
29159
29160         * lib/strverscmp.c (ISDIGIT): Define.
29161         (strverscmp): Use ISDIGIT, not isdigit.
29162
29163 2000-01-19  Jim Meyering  <meyering@lucent.com>
29164
29165         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
29166         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
29167         defines `struct timespec' in <sys/time.h>
29168
29169         * m4/c-bs-a.m4: Remove uses of changequote altogether.
29170         Thanks to Akim for explaining.
29171
29172 2000-01-17  Paul Eggert  <eggert@twinsun.com>
29173
29174         * lib/nanosleep.c (nanosleep):
29175         Don't use SA_INTERRUPT to decide whether to call sigaction, as
29176         POSIX.1 doesn't require SA_INTERRUPT and some systems
29177         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
29178         it's been part of POSIX.1 since day 1 (in 1988).
29179
29180 2000-01-17  Jim Meyering  <meyering@lucent.com>
29181
29182         * lib/interlock: Remove unused file.  Reported by François Pinard.
29183
29184 2000-01-16  Paul Eggert  <eggert@twinsun.com>
29185
29186         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
29187         alert, backslash, formfeed, and vertical tab unnecessarily in
29188         shell quoting style.
29189
29190 2000-01-16  Jim Meyering  <meyering@lucent.com>
29191
29192         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
29193         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
29194         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
29195         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
29196
29197 2000-01-16  Jim Meyering  <meyering@lucent.com>
29198
29199         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
29200         because the latter didn't work.
29201
29202 2000-01-15  Jim Meyering  <meyering@lucent.com>
29203
29204         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
29205         (AC_REPLACE_FUNCS): Add memcpy and memset.
29206         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
29207         Add strpbrk.
29208         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
29209
29210 2000-01-12  Jim Meyering  <meyering@lucent.com>
29211
29212         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
29213         (jm_PREREQ): Use it.
29214         (jm_PREREQ_READUTMP): New macro.
29215         (jm_PREREQ): Use it.
29216
29217 2000-01-11  Paul Eggert  <eggert@twinsun.com>
29218
29219         Quote multibyte characters correctly.
29220         * m4/c-bs-a.m4: New file.
29221         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
29222         (jm_PREREQ): Use it.
29223
29224 2000-01-11  Paul Eggert  <eggert@twinsun.com>
29225
29226         * m4/uintmax_t.m4: Port to autoconf 2.13.
29227
29228 2000-01-08  Jim Meyering  <meyering@ascend.com>
29229
29230         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
29231         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
29232
29233 2000-01-04  Jim Meyering  <meyering@ascend.com>
29234
29235         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
29236         jm_STRUCT_DIRENT_D_TYPE.
29237         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
29238         jm_STRUCT_DIRENT_D_INO.
29239         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
29240         jm_STRUCT_UTIMBUF.
29241         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
29242         renamings.
29243         * m4/utime.m4: Likewise.
29244
29245         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
29246         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
29247
29248 2000-01-03  Paul Eggert  <eggert@twinsun.com>
29249
29250         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
29251         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
29252
29253 2000-01-02  Jim Meyering  <meyering@ascend.com>
29254
29255         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
29256         remember if this is necessary.
29257
29258 1999-12-26  Jim Meyering  <meyering@ascend.com>
29259
29260         * m4/jm-macros.m4: Use it here.
29261         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
29262
29263 1999-12-23  Jim Meyering  <meyering@ascend.com>
29264
29265         * m4/jm-macros.m4: Check for clock_gettime (moved from
29266         fileutils/configure.in)
29267         Check for gettimeofday.
29268
29269 1999-12-20  Jim Meyering  <meyering@ascend.com>
29270
29271         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
29272         autoconf-2.14a-1999-12-20.
29273
29274 1999-12-19  Jim Meyering  <meyering@ascend.com>
29275
29276         * m4/lstat-slash.m4: New file.
29277         * m4/jm-macros.m4: Use the new macro:
29278         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
29279
29280 1999-12-07  Jim Meyering  <meyering@ascend.com>
29281
29282         * m4/perl.m4: Require that File::Compare be available, too.
29283         Too many systems seem to lack it.
29284
29285         * m4/strftime.m4: Add checks for most of the cpp macros tested in
29286         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
29287
29288 1999-11-18  Paul Eggert  <eggert@twinsun.com>
29289
29290         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
29291         problem with the QNX 4.25 shell, which doesn't propagate exit
29292         status of failed commands inside shell assignments.
29293
29294 1999-11-17  Jim Meyering  <meyering@ascend.com>
29295
29296         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
29297
29298 1999-11-07  Jim Meyering  <meyering@ascend.com>
29299
29300         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
29301
29302 1999-11-06  Jim Meyering  <meyering@ascend.com>
29303
29304         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
29305         * m4/jm-macros.m4 (jm_MACROS): Use it here.
29306
29307 1999-11-05  Jim Meyering  <meyering@ascend.com>
29308
29309         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
29310         configure.in of textutils, fileutils, and sh-utils into this one
29311         (shared between those packages) file.
29312         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
29313         AC_STRUCT_ST_BLKSIZE.
29314
29315 1999-11-03  Jim Meyering  <meyering@ascend.com>
29316
29317         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
29318         of AC_CHECK_TYPE checks includes unistd.h.
29319         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
29320         Suggestion from Akim Demaille.
29321
29322 1999-10-30  Jim Meyering  <meyering@ascend.com>
29323
29324         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
29325         m4-quoted string.
29326         * m4/ls-mntd-fs.m4: Likewise.
29327         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
29328         * m4/jm-winsz1.m4: Likewise.
29329
29330         * m4/const.m4: Remove file, since the fix made it into the experimental
29331         version of autoconf.
29332         * m4/mktime.m4: Likewise.
29333
29334         * m4/check-type.m4: Remove file, now that the latest version of
29335         AC_CHECK_TYPE takes a third arg to specify additional #includes.
29336
29337         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
29338         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
29339         AC_CHECK_TYPE.
29340
29341 1999-10-04  Jim Meyering  <meyering@ascend.com>
29342
29343         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
29344
29345 1999-09-22  Paul Eggert  <eggert@twinsun.com>
29346
29347         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
29348         2.95.1 bug with HP-UX 10.20.
29349
29350 1999-09-17  Jim Meyering  <meyering@ascend.com>
29351
29352         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
29353         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
29354         due to missing strdup (against sh-utils-2.0).
29355
29356 1999-08-29  Jim Meyering  <meyering@ascend.com>
29357
29358         * m4/jm-macros.m4: Require jm_BISON.
29359         * m4/bison.m4: New file.
29360
29361 1999-08-17  Paul Eggert  <eggert@twinsun.com>
29362
29363         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
29364         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
29365
29366 1999-08-05  Jim Meyering  <meyering@ascend.com>
29367
29368         * m4/getline.m4: Rename test file from conftestdata to conftest.data
29369         to avoid conflicts with `conftest' on 8+3 filesystems.
29370         Suggestion from Eli Zaretskii.
29371
29372 1999-08-04  Jim Meyering  <meyering@ascend.com>
29373
29374         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
29375         fileutils and sh-utils (textutils's getline test was inadequate).
29376         (AM_FUNC_GETLINE): Run this test.
29377         (AC_CHECK_FUNCS): Check for getdelim.
29378         Reported by Bob Proulx.
29379
29380 1999-08-02  Jim Meyering  <meyering@ascend.com>
29381
29382         * m4/jm-macros.m4: Add a comment.
29383
29384 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29385
29386         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
29387         <inttypes.h> defines strtoumax as a macro (and not as a
29388         function).
29389
29390 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29391
29392         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
29393         that we can shift, multiply and divide unsigned long long
29394         values; Ultrix cc can't do it.
29395
29396 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29397
29398         * m4/mktime.m4: New file, which is a preview of what should appear
29399         in the next public autoconf release.
29400
29401 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29402
29403         * m4/lfs.m4: Remove this file.
29404         * m4/largefile.m4: New file.  It contains the old contents of
29405         lfs.m4, except that all names with prefix AC_LFS have been
29406         changed to use the prefix AC_SYS_LARGEFILE instead, to be
29407         compatible with future autoconf versions.  Also, some minor m4
29408         quoting problems have been fixed.
29409
29410 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29411
29412         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
29413         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
29414         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
29415         and simplify the shell code.
29416
29417 1999-08-01  Jim Meyering  <meyering@ascend.com>
29418
29419         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
29420         m4.
29421
29422 1999-07-20  Jim Meyering  <meyering@ascend.com>
29423
29424         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
29425
29426 1999-07-15  Jim Meyering  <meyering@ascend.com>
29427
29428         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
29429
29430 1999-05-22  Jim Meyering  <meyering@ascend.com>
29431
29432         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
29433
29434 1999-05-20  Jim Meyering  <meyering@ascend.com>
29435
29436         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
29437         Add a colon after each `then' in case $4 is empty.
29438
29439 1999-05-16  Jim Meyering  <meyering@ascend.com>
29440
29441         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
29442
29443 1999-05-10  Jim Meyering  <meyering@ascend.com>
29444
29445         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
29446
29447         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
29448         AC_FUNC_MKTIME.
29449
29450 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
29451
29452         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
29453
29454 1999-05-04  Paul Eggert  <eggert@twinsun.com>
29455
29456         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
29457         not CPPFLAGS, so that linking works correctly in IRIX.
29458
29459 1999-04-30  Paul Eggert  <eggert@twinsun.com>
29460
29461         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
29462
29463 1999-04-20  Paul Eggert  <eggert@twinsun.com>
29464
29465         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
29466         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
29467         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
29468         jm_AC_TYPE_UNSIGNED_LONG_LONG.
29469         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
29470
29471         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
29472
29473 1999-04-20  Jim Meyering  <meyering@ascend.com>
29474
29475         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
29476         AC_REPLACE xstroull if necessary.  From Paul Eggert.
29477         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
29478
29479 1999-04-18  Jim Meyering  <meyering@ascend.com>
29480
29481         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
29482         * m4/jm-macros.m4: Use it.
29483
29484 1999-04-06  Jim Meyering  <meyering@ascend.com>
29485
29486         * m4/strftime.m4: Remove test for %f.
29487
29488 1999-03-29  Jim Meyering  <meyering@ascend.com>
29489
29490         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
29491         superset of the AC_TYPE_* checks in the textutils, fileutils,
29492         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
29493         AC_TYPE_PID_T.
29494
29495 1999-03-28  Jim Meyering  <meyering@ascend.com>
29496
29497         * m4/jm-macros.m4: Define GNU_PACKAGE here.
29498         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
29499         replaced e.g., in the *.sh files of the sh-utils.
29500
29501 1999-03-20  Jim Meyering  <meyering@ascend.com>
29502
29503         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
29504         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
29505         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
29506
29507 1999-03-19  Jim Meyering  <meyering@ascend.com>
29508
29509         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
29510
29511 1999-03-12  Jim Meyering  <meyering@ascend.com>
29512
29513         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
29514
29515 1999-03-07  Jim Meyering  <meyering@ascend.com>
29516
29517         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
29518         declared.
29519
29520 1999-02-17  Jim Meyering  <meyering@ascend.com>
29521
29522         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
29523         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
29524
29525 1999-02-07  Jim Meyering  <meyering@ascend.com>
29526
29527         * m4/group-member.m4: New file -- extracted from sh-utils'
29528         configure.in.
29529
29530         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
29531         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
29532
29533 1999-02-06  Jim Meyering  <meyering@ascend.com>
29534
29535         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
29536         * m4/fnmatch.m4: Likewise.
29537         * m4/getgroups.m4: Likewise.
29538         * m4/lstat.m4: Likewise.
29539         * m4/malloc.m4: Likewise.
29540         * m4/putenv.m4: Likewise.
29541         * m4/realloc.m4: Likewise.
29542         * m4/regex.m4: Likewise.
29543         * m4/stat.m4: Likewise.
29544         * m4/strftime.m4: Likewise.
29545         Suggestion from Alain Magloire.
29546
29547         * m4/chown.m4: Use `.$ac_objext', not `.o'.
29548         * m4/fnmatch.m4: Likewise.
29549         * m4/getgroups.m4: Likewise.
29550         * m4/getline.m4: Likewise.
29551         * m4/lstat.m4: Likewise.
29552         * m4/malloc.m4: Likewise.
29553         * m4/memcmp.m4: Likewise.
29554         * m4/putenv.m4: Likewise.
29555         * m4/realloc.m4: Likewise.
29556         * m4/regex.m4: Likewise.
29557         * m4/stat.m4: Likewise.
29558         * m4/strftime.m4: Likewise.
29559         Suggestion from Alain Magloire.
29560
29561         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
29562         an argument.
29563
29564         * m4/regex.m4: Add a run-time Test for proper operation of
29565         re_compile_pattern.
29566
29567 1999-01-31  Jim Meyering  <meyering@ascend.com>
29568
29569         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
29570
29571 1999-01-30  Jim Meyering  <meyering@ascend.com>
29572
29573         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
29574
29575         * m4/jm-mktime.m4: Make this a wrapper around the official
29576         AM_FUNC_MKTIME rather than my private copy, now that the official one
29577         is up to date.
29578         * m4/mktime.m4: Remove file.
29579
29580         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
29581         * m4/uptime.m4: Likewise.
29582         * m4/uintmax_t.m4: Likewise.
29583
29584 1999-01-28  Jim Meyering  <meyering@ascend.com>
29585
29586         * m4/jm-macros.m4: Use jm_AFS.
29587         * m4/afs.m4: New file (from fileutils' configure.in).
29588
29589         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
29590         * m4/chown.m4: Likewise.
29591         * m4/d-ino.m4: Likewise.
29592         * m4/d-type.m4: Likewise.
29593         * m4/fnmatch.m4: Likewise.
29594         * m4/getgroups.m4: Likewise.
29595         * m4/gettext.m4: Likewise.
29596         * m4/jm-mktime.m4: Likewise.
29597         * m4/jm-winsz2.m4: Likewise.
29598         * m4/lcmessage.m4: Likewise.
29599         * m4/ls-mntd-fs.m4: Likewise.
29600         * m4/malloc.m4: Likewise.
29601         * m4/memcmp.m4: Likewise.
29602         * m4/putenv.m4: Likewise.
29603         * m4/realloc.m4: Likewise.
29604         * m4/st_mtim.m4: Likewise.
29605         * m4/strftime.m4: Likewise.
29606
29607 1999-01-16  Jim Meyering  <meyering@ascend.com>
29608
29609         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
29610         (ARGMATCH_DIE_DECL): Define.
29611
29612 1999-01-12  Jim Meyering  <meyering@ascend.com>
29613
29614         * m4/Makefile.am.in: Rewrite to avoid using fmt.
29615         Reported by Lars Hecking.
29616
29617 1999-01-10  Jim Meyering  <meyering@ascend.com>
29618
29619         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
29620         gross kludge.
29621         * m4/inttypes_h.m4: Likewise.
29622         * m4/lstat.m4: Likewise.
29623         * m4/malloc.m4: Likewise.
29624         * m4/readdir.m4: Likewise.
29625         * m4/realloc.m4: Likewise.
29626         * m4/st_dm_mode.m4: Likewise.
29627         * m4/stat.m4: Likewise.
29628         * m4/utimbuf.m4: Likewise.
29629         * m4/utimes.m4: Likewise.
29630
29631         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
29632         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
29633         comments in config.h.in are meaningful.
29634
29635         * m4/jm-macros.m4: Require autoconf-2.13 here.
29636
29637         * m4/regex.m4: By default, don't use the included regex.c on systems
29638         with glibc 2.  Suggestion from Uli Drepper.
29639
29640 1999-01-02  Jim Meyering  <meyering@ascend.com>
29641
29642         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
29643
29644 1998-12-18  Jim Meyering  <meyering@ascend.com>
29645
29646         * m4/Makefile.am.in (Makefile.am): Simplify rule.
29647         Based on a suggestion from Lars Hecking.
29648
29649 1998-11-16  Paul Eggert  <eggert@twinsun.com>
29650
29651         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
29652
29653 1998-11-16  Jim Meyering  <meyering@ascend.com>
29654
29655         * m4/lfs.m4: Double-quote the `uname...` expression.
29656
29657 1998-11-14  Jim Meyering  <meyering@ascend.com>
29658
29659         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
29660         * m4/stat.m4: Likewise.
29661
29662 1998-11-03  Jim Meyering  <meyering@ascend.com>
29663
29664         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
29665         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
29666
29667 1998-10-18  Jim Meyering  <meyering@ascend.com>
29668
29669         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
29670
29671 1998-10-17  Jim Meyering  <meyering@ascend.com>
29672
29673         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
29674         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
29675         calls for those previously hard-coded headers.  Instead, take a new
29676         parameter.
29677         (jm_CHECK_DECLARATIONS): Reflect interface change.
29678         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
29679         (jm_CHECK_DECL_LOCALTIME_R): New macro.
29680
29681         * m4/mktime.m4: Test for spring-forward gap before long-running test.
29682
29683 1998-10-14  Jim Meyering  <meyering@ascend.com>
29684
29685         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
29686         instead of "TZ=America/Vancouver".  From Paul Eggert.
29687
29688 1998-10-11  Jim Meyering  <meyering@ascend.com>
29689
29690         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
29691         This adds a test for a recently added compatibility fix for mktime.c.
29692         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
29693
29694 1998-09-27  Jim Meyering  <meyering@ascend.com>
29695
29696         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
29697
29698         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
29699         ../configure.in, including a change from Gordon Matzigkeit to allow
29700         cross-compiling for the Hurd.
29701
29702         * m4/glibc.m4: New file/macro to test for the GNU C Library
29703         versions 1 and 2.  From Gordon Matzigkeit.
29704         Indent.
29705
29706 1998-09-21  Jim Meyering  <meyering@ascend.com>
29707
29708         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
29709
29710 1998-08-18  Paul Eggert  <eggert@twinsun.com>
29711
29712         Port nanosecond-resolution times to UnixWare 2.1.2 and
29713         pedantic Solaris 2.6.
29714
29715         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
29716         AC_STRUCT_ST_MTIM.
29717         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
29718         Generate name of ns member, instead of just 1 or undef.
29719         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
29720
29721 1998-08-15  Jim Meyering  <meyering@ascend.com>
29722
29723         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
29724         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
29725         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
29726         instead of jm_TYPE_SSIZE_T.
29727
29728 1998-08-12  Jim Meyering  <meyering@ascend.com>
29729
29730         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
29731
29732 1998-08-02  Jim Meyering  <meyering@ascend.com>
29733
29734         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
29735         in acconfig.h manually.
29736
29737 1998-07-31  Paul Eggert  <eggert@twinsun.com>
29738
29739         * m4/st_mtim.m4: New file.
29740
29741 1998-07-28  Jim Meyering  <meyering@ascend.com>
29742
29743         * m4/utimes.m4: Undef stat.
29744
29745 1998-07-25  Jim Meyering  <meyering@ascend.com>
29746
29747         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
29748         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
29749
29750 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
29751
29752         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
29753         uid and gid actually remain unchanged.
29754
29755 1998-07-07  Jim Meyering  <meyering@ascend.com>
29756
29757         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
29758
29759 1998-07-04  Jim Meyering  <meyering@ascend.com>
29760
29761         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
29762         to prove that this macro can be used in packages without regex.c.
29763
29764 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
29765
29766         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
29767         is to be used.
29768
29769 1998-07-03  Jim Meyering  <meyering@ascend.com>
29770
29771         * m4/gettext.m4: Add -lintl if it's found to be necessary.
29772
29773         * m4/gettext.m4: New file -- from gettext-0.10.35.
29774         * m4/lcmessage.m4: Likewise.
29775         * m4/progtest.m4: Likewise.
29776
29777         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
29778         * m4/jm-macros.m4: Require the new macro.
29779
29780 1998-06-29  Jim Meyering  <meyering@ascend.com>
29781
29782         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
29783         for the definition of NGROUPS (used in a system header included
29784         by sys/mount.h).
29785
29786 1998-06-28  Jim Meyering  <meyering@ascend.com>
29787
29788         * m4/ls-mntd-fs.m4: New file.
29789         * m4/fstypename.m4: New file.
29790
29791         * m4/jm-macros.m4: Require the new macro.
29792         * m4/jm-glibc-io.m4: New file.
29793
29794 1998-05-19  Jim Meyering  <meyering@ascend.com>
29795
29796         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
29797         * m4/lchown.m4: New file.
29798
29799         * m4/Makefile.am.in: New file.
29800         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
29801
29802 1998-05-14  Jim Meyering  <meyering@ascend.com>
29803
29804         * m4/Makefile.am (EXTRA_DIST): Add them.
29805         * m4/jm-macros.m4: New file.
29806         * m4/utimbuf.m4: New file.
29807
29808 1998-05-12  Jim Meyering  <meyering@ascend.com>
29809
29810         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
29811
29812 1998-05-11  Jim Meyering  <meyering@ascend.com>
29813
29814         * m4/isc-posix.m4: New file.
29815
29816 1998-05-10  Jim Meyering  <meyering@ascend.com>