On BSD implementations, when we call lseek(), we must also update or disable
[gnulib.git] / ChangeLog
1 2007-04-26  Bruno Haible  <bruno@clisp.org>
2
3         * tests/test-fflush.c (main): Also check the ftell result after
4         fflush and fseek/fseeko.
5         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
6         file descriptor position cache in the stream.
7         * lib/fseeko.c (rpl_fseeko): Likewise.
8
9 2007-04-26  Bruno Haible  <bruno@clisp.org>
10
11         * modules/fflush-tests (Depends-on): Add fseeko.
12
13 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
14             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15
16         * lib/argz_.h: ensure error_t definition is obtained in same
17         mechanism system argz.h would have.
18         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
19         argz facilities are known bad.  Err on the side of caution if
20         cross-compiling.
21
22 2007-04-25  Eric Blake  <ebb9@byu.net>
23
24         * lib/fpurge.c (includes): Use stdlib.h for free.
25         * tests/test-fflush.c (main): Also test fflush-fseeko.
26
27 2007-04-25  Bruno Haible  <bruno@clisp.org>
28
29         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
30         * lib/fseeko.c: New file.
31         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
32         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
33         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
34         gl_FUNC_FSEEKO.
35         (gl_FUNC_FSEEKO): Invoke it.
36         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
37         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
38         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
39
40 2007-04-25  Bruno Haible  <bruno@clisp.org>
41
42         * modules/fflush (Depends-on): Add ftello.
43
44 2007-04-25  Bruno Haible  <bruno@clisp.org>
45
46         * modules/ftello-tests: New file.
47         * tests/test-ftello.c: New file.
48
49         * modules/ftello: New file.
50         * m4/ftello.m4: New file.
51         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
52         HAVE_FTELLO.
53         * lib/stdio_.h (ftello): New declaration.
54         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
55         HAVE_FTELLO.
56
57 2007-04-25  Bruno Haible  <bruno@clisp.org>
58
59         * modules/fseeko-tests: New file.
60         * tests/test-fseeko.c: New file.
61
62         * modules/fseeko: New file.
63         * m4/fseeko.m4: New file.
64         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
65         HAVE_FSEEKO.
66         * lib/stdio_.h (fseeko): New declaration.
67         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
68         HAVE_FSEEKO.
69
70 2007-04-25  Bruno Haible  <bruno@clisp.org>
71
72         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
73
74 2007-04-25  Bruno Haible  <bruno@clisp.org>
75
76         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
77         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
78         * tests/test-unistd.c: Likewise.
79         * tests/test-fcntl.c: Likewise.
80
81 2007-04-23  Eric Blake  <ebb9@byu.net>
82
83         * lib/fflush.c: Fix missing include.
84         Reported by Bruno Haible.
85
86 2007-04-23  Bruno Haible  <bruno@clisp.org>
87
88         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
89         Reported by Eric Blake.
90
91 2007-04-23  Bruno Haible  <bruno@clisp.org>
92
93         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
94
95 2007-04-23  Bruno Haible  <bruno@clisp.org>
96
97         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
98
99 2007-04-23  Bruno Haible  <bruno@clisp.org>
100
101         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
102         Needed on HP-UX 11.
103
104 2007-04-16  Eric Blake  <ebb9@byu.net>
105
106         Make fflush rely on fpurge.
107         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
108         open coding all variants.
109         * modules/fflush (Depends-on): Add fpurge and unistd.
110         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
111         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
112
113         Fix --with-tests compilation on cygwin.
114         * modules/argmatch-tests (Makefile.am): List gnulib library first
115         in LDADD.
116         * modules/argp-tests (Makefile.am): Likewise.
117         * modules/array-list-tests (Makefile.am): Likewise.
118         * modules/array-oset-tests (Makefile.am): Likewise.
119         * modules/avltree-list-tests (Makefile.am): Likewise.
120         * modules/avltree-oset-tests (Makefile.am): Likewise.
121         * modules/avltreehash-list-tests (Makefile.am): Likewise.
122         * modules/carray-list-tests (Makefile.am): Likewise.
123         * modules/dirname-tests (Makefile.am): Likewise.
124         * modules/frexp-tests (Makefile.am): Likewise.
125         * modules/isnanl-tests (Makefile.am): Likewise.
126         * modules/linked-list-tests (Makefile.am): Likewise.
127         * modules/linkedhash-list-tests (Makefile.am): Likewise.
128         * modules/lock-tests (Makefile.am): Likewise.
129         * modules/rbtree-list-tests (Makefile.am): Likewise.
130         * modules/rbtree-oset-tests (Makefile.am): Likewise.
131         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
132         * modules/tls-tests (Makefile.am): Likewise.
133         * modules/tsearch-tests (Makefile.am): Likewise.
134         * modules/xvasprintf-tests (Makefile.am): Likewise.
135
136         Fix fpurge for cygwin.
137         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
138         value.
139         * modules/fpurge-tests (Depends-on): Clean up trash.
140
141 2007-04-16  Simon Josefsson  <simon@josefsson.org>
142
143         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
144
145         * m4/autobuild.m4: Re-indent.
146
147 2007-04-13  Bruno Haible  <bruno@clisp.org>
148
149         * modules/fpurge-tests: New file.
150         * tests/test-fpurge.c: New file.
151
152         * modules/fpurge: New file.
153         * lib/fpurge.h: New file.
154         * lib/fpurge.c: New file.
155         * m4/fpurge.m4: New file.
156
157 2007-04-13  Bruno Haible  <bruno@clisp.org>
158
159         * modules/fbufmode-tests: New file.
160         * tests/test-fbufmode.c: New file.
161
162         * modules/fbufmode: New file.
163         * lib/fbufmode.h: New file.
164         * lib/fbufmode.c: New file.
165         * m4/fbufmode.m4: New file.
166
167 2007-04-13  Bruno Haible  <bruno@clisp.org>
168
169         * modules/fwritable-tests: New file.
170         * tests/test-fwritable.c: New file.
171
172         * modules/fwritable: New file.
173         * lib/fwritable.h: New file.
174         * lib/fwritable.c: New file.
175         * m4/fwritable.m4: New file.
176
177 2007-04-13  Bruno Haible  <bruno@clisp.org>
178
179         * modules/freadable-tests: New file.
180         * tests/test-freadable.c: New file.
181
182         * modules/freadable: New file.
183         * lib/freadable.h: New file.
184         * lib/freadable.c: New file.
185         * m4/freadable.m4: New file.
186
187 2007-04-13  Bruno Haible  <bruno@clisp.org>
188
189         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
190         MOSTLYCLEANFILES.
191
192 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
193
194         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
195         gzip bootstrap.conf to avoid dragging in i18n machinery.
196         (gnulib_tool_option): Use it.
197
198 2007-04-13  Bruno Haible  <bruno@clisp.org>
199
200         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
201         %F directives.
202         * tests/test-vasprintf-posix.c (test_function): Likewise.
203         * tests/test-snprintf-posix.h (test_function): Likewise.
204         * tests/test-sprintf-posix.h (test_function): Likewise.
205         * tests/test-fprintf-posix.h (test_function): Likewise.
206         * tests/test-printf-posix.h (test_function): Likewise.
207         * tests/test-fprintf-posix.out: Likewise.
208
209 2007-04-13  Bruno Haible  <bruno@clisp.org>
210
211         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
212         * modules/tls-tests (configure.ac): Likewise.
213         Reported by Arto C. Nirkko <anirkko@insel.ch>.
214
215 2007-04-13  Bruno Haible  <bruno@clisp.org>
216
217         * lib/tls.c (glthread_tls_get): Fix return type.
218         Patch by Arto C. Nirkko <anirkko@insel.ch>.
219
220 2007-04-12  Eric Blake  <ebb9@byu.net>
221
222         * modules/gettime (Depends-on): Remove gettime.
223         Reported by Dmitry V. Levin.
224
225 2007-04-12  Bruno Haible  <bruno@clisp.org>
226
227         * modules/fflush (Include): Mention <stdio.h>.
228         * modules/strtoimax (Include): Mention <inttypes.h>.
229         * modules/strtoumax (Include): Likewise.
230
231 2007-04-12  Eric Blake  <ebb9@byu.net>
232
233         * .cvsignore: New file.
234         * .gitignore: Likewise.
235
236 2007-04-12  Bruno Haible  <bruno@clisp.org>
237
238         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
239         not before, since $(LDADD) often contains libgnu.a.
240         * modules/striconv-tests (test_striconv_LDADD): Likewise.
241         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
242         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
243         Needed on Cygwin.
244
245 2007-04-12  Eric Blake  <ebb9@byu.net>
246
247         Work around glibc's failure to flush stdin on fclose.
248         * lib/closein.c (close_stdin): Flush stdin before closing.
249
250         Work around glibc's failure to reset seekable stdin on exit.
251         * modules/closein: New module.
252         * lib/closein.c: New file.
253         * lib/closein.h: Likewise.
254         * m4/closein.m4: Likewise.
255         * MODULES.html.sh (File stream based Input/Output): Document it.
256
257 2007-04-12  Simon Josefsson  <simon@josefsson.org>
258
259         * gnulib-tool: Rename generated 'autobuild' script to
260         'do-autobuild' in --create-megatestdir output.
261
262         * doc/gnulib.texi (Build robot for gnulib): Fix.
263
264 2007-04-12  Simon Josefsson  <simon@josefsson.org>
265
266         * modules/sysexits (Depends-on): Add absolute-header.
267
268 2007-04-12  Eric Blake  <ebb9@byu.net>
269
270         No need to preserve errno on success.
271         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
272         Reported by Bruno Haible.
273
274 2007-04-12  Simon Josefsson  <simon@josefsson.org>
275
276         * MODULES.html.sh (Support for maintaining and releasing
277         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
278
279 2007-04-12  Simon Josefsson  <simon@josefsson.org>
280
281         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
282
283 2007-04-12  Simon Josefsson  <simon@josefsson.org>
284
285         * modules/autobuild: New module.
286
287         * m4/autobuild.m4: New file.
288
289 2007-04-11  Bruno Haible  <bruno@clisp.org>
290
291         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
292         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
293         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
294         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
295         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
296         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
297         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
298         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
299         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
300         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
301         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
302         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
303         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
304         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
305         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
306         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
307         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
308         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
309         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
310         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
311         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
312         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
313         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
314         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
315         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
316         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
317         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
318         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
319         Reported by Eric Blake.
320
321 2007-04-11  Bruno Haible  <bruno@clisp.org>
322
323         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
324
325 2007-04-10  Bruno Haible  <bruno@clisp.org>
326
327         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
328         for NaN and Infinity. Needed on FreeBSD 6.1.
329         * tests/test-vasnprintf-posix.c (test_function): Undo last change
330         regarding results for "%010a" of Infinity and NaN.
331         * tests/test-vasprintf-posix.c (test_function): Likewise.
332         * tests/test-snprintf-posix.h (test_function): Likewise.
333         * tests/test-sprintf-posix.h (test_function): Likewise.
334         * tests/test-fprintf-posix.h (test_function): Likewise.
335         * tests/test-printf-posix.h (test_function): Likewise.
336         * tests/test-fprintf-posix.out: Likewise.
337
338 2007-04-10  Bruno Haible  <bruno@clisp.org>
339
340         * modules/locale-tests: New file.
341         * tests/test-locale.c: New file.
342
343         * modules/locale: New file.
344         * lib/locale_.h: New file.
345         * m4/locale_h.m4: New file.
346
347 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
348             Bruno Haible  <bruno@clisp.org>
349
350         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
351         be determined, test for availability of the copysignf, copysign,
352         copysignl functions.
353         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
354         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
355         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
356
357 2007-04-09  Eric Blake  <ebb9@byu.net>
358
359         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
360         * modules/stdio (Makefile.am): Support fflush.
361         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
362         * modules/fflush: New file.
363         * lib/fflush.c: Likewise.
364         * m4/fflush.m4: Likewise.
365         * modules/fflush-tests: New test.
366         * tests/test-fflush.c: Likewise.
367         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
368
369 2007-04-06  Bruno Haible  <bruno@clisp.org>
370
371         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
372         (VASNPRINTF): Use signbit for faster determination whether to print a
373         minus sign.
374         * modules/vasnprintf (Files): Remove lib/float+.h.
375         * modules/fprintf-posix (Depends-on): Add signbit.
376         * modules/snprintf-posix (Depends-on): Likewise.
377         * modules/sprintf-posix (Depends-on): Likewise.
378         * modules/vasnprintf-posix (Depends-on): Likewise.
379         * modules/vasprintf-posix (Depends-on): Likewise.
380         * modules/vfprintf-posix (Depends-on): Likewise.
381         * modules/vsnprintf-posix (Depends-on): Likewise.
382         * modules/vsprintf-posix (Depends-on): Likewise.
383
384 2007-04-06  Bruno Haible  <bruno@clisp.org>
385
386         * tests/test-frexp.c (main): Test also the sign bit of zero results.
387         * tests/test-frexpl.c (main): Likewise.
388         * tests/test-ldexpl.c (main): Likewise.
389         * modules/frexp-tests (Depends-on): Add signbit.
390         * modules/frexpl-tests (Depdends-on): Likewise.
391         * modules/ldexpl-tests (Depdends-on): Likewise.
392
393 2007-04-06  Bruno Haible  <bruno@clisp.org>
394
395         * modules/signbit-tests: New file.
396         * tests/test-signbit.c: New file.
397
398         * modules/signbit: New file.
399         * lib/signbitf.c: New file.
400         * lib/signbitd.c: New file.
401         * lib/signbitl.c: New file.
402         * m4/signbit.m4: New file.
403         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
404         (signbit): New macro.
405         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
406         REPLACE_SIGNBIT.
407         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
408         REPLACE_FREXPL into math.h.
409
410 2007-04-06  Bruno Haible  <bruno@clisp.org>
411
412         * modules/isnanf-nolibm-tests: New file.
413         * tests/test-isnanf.c: New file.
414
415         * modules/isnanf-nolibm: New file.
416         * lib/isnanf.h: New file.
417         * lib/isnanf.c: New file.
418         * lib/isnan.c: Consider the USE_FLOAT macro.
419         * m4/isnanf.m4: New file.
420
421 2007-04-06  Bruno Haible  <bruno@clisp.org>
422
423         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
424         (Link): New section.
425
426         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
427
428 2007-04-06  Bruno Haible  <bruno@clisp.org>
429
430         Assume the 'long double' type.
431         * m4/longdouble.m4: Remove file.
432         * config/srclist.txt: Don't mention longdouble.m4.
433         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
434         * lib/float+.h: Likewise.
435         * lib/frexp.c: Likewise.
436         * lib/printf-args.h: Likewise.
437         * lib/printf-args.c: Likewise.
438         * lib/printf-frexp.c: Likewise.
439         * lib/printf-parse.c: Likewise.
440         * lib/vasnprintf.c: Likewise.
441         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
442         * m4/intl.m4: Likewise.
443         * m4/isnanl.m4: Likewise.
444         * m4/printf.m4: Likewise.
445         * m4/printf-frexpl.m4: Likewise.
446         * m4/vasnprintf.m4: Likewise.
447         * modules/allocsa (Files): Remove m4/longdouble.m4.
448         * modules/gettext (Files): Likewise.
449         * modules/relocatable-prog-wrapper (Files): Likewise.
450         * modules/vasnprintf (Files): Likewise.
451         * modules/isnanl (Files): Likewise.
452         (Include): Simplify.
453         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
454         (Include): Simplify.
455         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
456         (Include): Simplify.
457         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
458         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
459         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
460         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
461         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
462         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
463         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
464         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
465         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
466         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
467         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
468         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
469         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
470         * tests/test-isnanl.c: Likewise.
471         * tests/test-snprintf-posix.h: Likewise.
472         * tests/test-sprintf-posix.h: Likewise.
473         * tests/test-vasnprintf-posix.c: Likewise.
474         * tests/test-vasnprintf-posix2.c: Likewise.
475         * tests/test-vasprintf-posix.c: Likewise.
476
477 2007-04-06  Bruno Haible  <bruno@clisp.org>
478
479         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
480         * lib/math_.h [__DECC]: Include the overridden include file through
481         #include_next, outside the double-inclusion guard.
482         * lib/stdio_.h [__DECC]: Likewise.
483         * lib/stdlib_.h [__DECC]: Likewise.
484         * lib/string_.h [__DECC]: Likewise.
485         * lib/time_.h [__DECC]: Likewise.
486         * lib/wchar_.h [__DECC]: Likewise.
487         * lib/wctype_.h [__DECC]: Likewise.
488         * lib/inttypes_.h [__DECC]: Likewise.
489         Reported by Albert Chin <china@thewrittenword.com> in
490         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
491
492 2007-04-04  Eric Blake  <ebb9@byu.net>
493
494         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
495         1.5.x.
496
497 2007-04-04  Bruno Haible  <bruno@clisp.org>
498
499         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
500         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
501
502 2007-04-04  Bruno Haible  <bruno@clisp.org>
503
504         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
505         results for "%010a" of Infinity and NaN.
506         * tests/test-vasprintf-posix.c (test_function): Likewise.
507         * tests/test-snprintf-posix.h (test_function): Likewise.
508         * tests/test-sprintf-posix.h (test_function): Likewise.
509         * tests/test-fprintf-posix.h (test_function): Remove these tests.
510         * tests/test-printf-posix.h (test_function): Likewise.
511         * tests/test-fprintf-posix.out: Update.
512         Needed for FreeBSD 6.1.
513
514 2007-04-04  Bruno Haible  <bruno@clisp.org>
515
516         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
517         directly used by the gnulib modules nor by gnulib-tool.
518
519 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
520
521         * DEPENDENCIES: Give overall description of version dependency
522         desirability.  Use more-typical names for apps.
523         Add shell, coreutils, diffutils, grep, tar, gzip.
524
525 2007-04-04  Simon Josefsson  <simon@josefsson.org>
526
527         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
528
529 2007-04-04  Karl Berry  <karl@gnu.org>
530
531         * MODULES.html.sh (func_module): missing '.
532
533 2007-04-03  Bruno Haible  <bruno@clisp.org>
534
535         * modules/argmatch-tests (Makefile.am): New variable
536         test_argmatch_LDADD.
537         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
538         * modules/array-list-tests (Makefile.am): New variable
539         test_array_list_LDADD.
540         * modules/array-oset-tests (Makefile.am): New variable
541         test_array_oset_LDADD.
542         * modules/avltree-list-tests (Makefile.am): New variable
543         test_avltree_list_LDADD.
544         * modules/avltree-oset-tests (Makefile.am): New variable
545         test_avltree_oset_LDADD.
546         * modules/avltreehash-list-tests (Makefile.am): New variable
547         test_avltreehash_list_LDADD.
548         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
549         test_canonicalize_lgpl_LDADD.
550         * modules/carray-list-tests (Makefile.am): New variable
551         test_carray_list_LDADD.
552         * modules/dirname-tests (Makefile.am): New variable
553         test_dirname_LDADD.
554         * modules/linked-list-tests (Makefile.am): New variable
555         test_linked_list_LDADD.
556         * modules/linkedhash-list-tests (Makefile.am): New variable
557         test_linkedhash_list_LDADD.
558         * modules/rbtree-list-tests (Makefile.am): New variable
559         test_rbtree_list_LDADD.
560         * modules/rbtree-oset-tests (Makefile.am): New variable
561         test_rbtree_oset_LDADD.
562         * modules/rbtreehash-list-tests (Makefile.am): New variable
563         test_rbtreehash_list_LDADD.
564         * modules/xvasprintf-tests (Makefile.am): New variable
565         test_xvasprintf_LDADD.
566         Reported by Eric Blake.
567
568 2007-04-03  Eric Blake  <ebb9@byu.net>
569
570         * DEPENDENCIES: Weaken m4 requirements.
571
572 2007-04-03  Bruno Haible  <bruno@clisp.org>
573
574         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
575         * modules/isnanl-tests (configure.ac): Likewise.
576
577 2007-04-03  Ben Pfaff  <blp@gnu.org>
578
579         * modules/iconv_open: Add $(srcdir)/ to source directory
580         references in Makefile fragments that call gperf, to fix VPATH
581         builds.
582
583 2007-04-03  Bruno Haible  <bruno@clisp.org>
584
585         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
586         * lib/ldexpl.c: Undo last change.
587
588 2007-04-03  Bruno Haible  <bruno@clisp.org>
589
590         * modules/printf-frexpl (Depends-on): Undo last change.
591         (Files): Add m4/ldexpl.m4.
592
593 2007-04-03  Bruno Haible  <bruno@clisp.org>
594
595         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
596         * modules/isnanl (Link): New section.
597
598         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
599         * modules/frexp (Link): New section.
600
601         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
602         * modules/frexpl (Link): New section.
603
604         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
605         * modules/ldexpl (Link): New section.
606
607 2007-04-03  Bruno Haible  <bruno@clisp.org>
608
609         * modules/TEMPLATE-EXTENDED: New file.
610         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
611
612 2007-04-03  Bruno Haible  <bruno@clisp.org>
613
614         * DEPENDENCIES: New file.
615         Suggested by Simon Josefsson.
616
617 2007-04-03  Bruno Haible  <bruno@clisp.org>
618
619         * doc/gnulib.texi: Escape @.
620
621 2007-04-03  James Youngman  <jay@gnu.org>
622         and Paul Eggert  <eggert@cs.ucla.edu>
623
624         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
625         birthtime on all systems that have birthtime, not just those which
626         use st_birthtimensec rather than st_birthtim.  Putting zero in
627         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
628         that the birth time is not available for files on an NFS mount.
629
630 2007-04-03  Simon Josefsson  <simon@josefsson.org>
631
632         * modules/memxor: Move back from crypto/, suggested by Bruno.
633         * modules/crypto/hmac-sha1: Fix memxor dependency.
634
635         * modules/crypto/gc: Moved from ../.
636
637 2007-04-02  Eric Blake  <ebb9@byu.net>
638
639         * lib/ldexpl.c (includes): Avoid libm.
640
641         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
642
643 2007-04-02  Bruno Haible  <bruno@clisp.org>
644
645         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
646         on IRIX.
647
648 2007-04-02  Bruno Haible  <bruno@clisp.org>
649
650         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
651         x86 or x86_64 platforms running MacOS X.
652         Reported by Ryan Schmidt <@ryandesign.com>.
653
654 2007-04-02  Bruno Haible  <bruno@clisp.org>
655
656         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
657         i386.
658
659 2007-04-01  Simon Josefsson  <simon@josefsson.org>
660
661         * modules/crypto/arcfour: Moved from ../.
662         * modules/crypto/arcfour-tests: Moved from ../.
663         * modules/crypto/arctwo: Moved from ../.
664         * modules/crypto/arctwo-tests: Moved from ../.
665         * modules/crypto/des: Moved from ../.
666         * modules/crypto/des-tests: Moved from ../.
667         * modules/crypto/gc-arcfour: Moved from ../.
668         * modules/crypto/gc-arcfour-tests: Moved from ../.
669         * modules/crypto/gc-arctwo: Moved from ../.
670         * modules/crypto/gc-arctwo-tests: Moved from ../.
671         * modules/crypto/gc-des: Moved from ../.
672         * modules/crypto/gc-des-tests: Moved from ../.
673         * modules/crypto/gc-hmac-md5: Moved from ../.
674         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
675         * modules/crypto/gc-hmac-sha1: Moved from ../.
676         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
677         * modules/crypto/gc-md2: Moved from ../.
678         * modules/crypto/gc-md2-tests: Moved from ../.
679         * modules/crypto/gc-md4: Moved from ../.
680         * modules/crypto/gc-md4-tests: Moved from ../.
681         * modules/crypto/gc-md5: Moved from ../.
682         * modules/crypto/gc-md5-tests: Moved from ../.
683         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
684         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
685         * modules/crypto/gc-random: Moved from ../.
686         * modules/crypto/gc-rijndael: Moved from ../.
687         * modules/crypto/gc-rijndael-tests: Moved from ../.
688         * modules/crypto/gc-sha1: Moved from ../.
689         * modules/crypto/gc-sha1-tests: Moved from ../.
690         * modules/crypto/gc-tests: Moved from ../.
691         * modules/crypto/hmac-md5: Moved from ../.
692         * modules/crypto/hmac-md5-tests: Moved from ../.
693         * modules/crypto/hmac-sha1: Moved from ../.
694         * modules/crypto/hmac-sha1-tests: Moved from ../.
695         * modules/crypto/md2: Moved from ../.
696         * modules/crypto/md2-tests: Moved from ../.
697         * modules/crypto/md4: Moved from ../.
698         * modules/crypto/md4-tests: Moved from ../.
699         * modules/crypto/md5: Moved from ../.
700         * modules/crypto/md5-tests: Moved from ../.
701         * modules/crypto/memxor: Moved from ../.
702         * modules/crypto/rijndael: Moved from ../.
703         * modules/crypto/rijndael-tests: Moved from ../.
704         * modules/crypto/sha1: Moved from ../.
705
706 2007-03-30  James Youngman  <jay@gnu.org>
707
708         * tests/test-stat-time.c (prepare_test): use chmod() rather than
709         rename() to change the ctime of a file (because ctime is unaffected
710         by rename on jfs2 on AIX 5.1).
711         (main): Start by doing cleanup, in case a previous run failed leaving
712         test files behind.
713
714 2007-03-31  Bruno Haible  <bruno@clisp.org>
715
716         Support old proprietary implementations of iconv.
717         * modules/iconv_open: New file.
718         * lib/iconv_.h: New file.
719         * m4/iconv_h.m4: New file.
720         * lib/iconv_open.c: New file.
721         * lib/iconv_open-aix.gperf: New file.
722         * lib/iconv_open-hpux.gperf: New file.
723         * lib/iconv_open-irix.gperf: New file.
724         * lib/iconv_open-osf.gperf: New file.
725         * m4/iconv_open.m4: New file.
726         * modules/linebreak (Depends-on): Add iconv_open.
727         * modules/striconv (Depends-on): Likewise.
728         * modules/striconveh (Depends-on): Likewise.
729         * modules/unicodeio (Depends-on): Likewise.
730         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
731         (iconv_t)(-1).
732         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
733         conversion if cd is (iconv_t)(-1).
734         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
735         is not possible.
736
737 2007-03-31  Bruno Haible  <bruno@clisp.org>
738
739         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
740         work on Solaris either. Protect also second use of "autodetect_jp".
741
742 2007-03-31  Bruno Haible  <bruno@clisp.org>
743
744         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
745         the function is not present.
746
747 2007-03-31  Bruno Haible  <bruno@clisp.org>
748
749         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
750         the function is not present.
751
752 2007-03-31  Bruno Haible  <bruno@clisp.org>
753
754         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
755         a bug in HP-UX iconv_open().
756
757 2007-03-31  Bruno Haible  <bruno@clisp.org>
758
759         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
760         (Mathematics <math.h>): New section, add fpieee.
761         (Input/output <stdio.h>): Add fseterr.
762         (Mathematics <math.h>): New section, add printf-frexp.
763         (Container data structures): Add sublist.
764         (Core language properties): Add fpucw, inline.
765         (Functions for greatest-width integer types <inttypes.h>): Add
766         imaxabs, imaxdiv, inttypes.
767         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
768         isnanl-nolibm, ldexp.
769         (Mathematics <math.h>): New section, add printf-frexpl.
770         (Support for systems lacking POSIX:2001): Add fprintf-posix,
771         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
772         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
773         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
774         (Unicode string functions): Add unistr/u*-mbtoucr.
775         (Java): Add javacomp-script, javaexec-script.
776         (C#): Add csharpcomp-script, csharpexec-script.
777         (Support for building libraries and executables): Add havelib,
778         relocatable-*.
779         (Support for maintaining and releasing projects): Renamed from
780         'Support for maintaining and release projects'. Add announce-gen.
781
782 2007-03-31  Bruno Haible  <bruno@clisp.org>
783
784         * README: Talk primarily about git.
785         (git and CVS): Renamed from CVS.
786         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
787         gnulib is available through git.
788         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
789
790 2007-03-30  Bruno Haible  <bruno@clisp.org>
791
792         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
793         * lib/poll_.h: Likewise.
794         * lib/stat_.h: Likewise.
795         * lib/sys_time_.h: Likewise.
796         * lib/sysexit_.h: Likewise.
797         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
798         * lib/stdbool_.h: Likewise.
799         * lib/byteswap_.h: Add double-inclusion guard.
800
801 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
802
803         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
804
805 2007-03-30  Karl Berry  <karl@gnu.org>
806
807         * config/srclist-update: double space after USA in the license
808         substitution, since that's how it's usually (?) written.
809
810 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
811
812         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
813         reported by Bruno Haible.
814
815 2007-03-29  Bruno Haible  <bruno@clisp.org>
816
817         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
818         a bug in AIX iconv().
819
820 2007-03-29  Bruno Haible  <bruno@clisp.org>
821
822         * modules/ldexpl-tests: New file.
823         * tests/test-ldexpl.c: New file.
824
825 2007-03-29  Bruno Haible  <bruno@clisp.org>
826
827         * lib/ldexpl.c: Include fpucw.h.
828         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
829         multiplication.
830         * modules/ldexpl (Depends-on): Add fpucw.
831
832 2007-03-29  Bruno Haible  <bruno@clisp.org>
833
834         * modules/ldexpl: New file.
835         * m4/ldexpl.m4: New file.
836         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
837         set.
838         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
839         REPLACE_LDEXPL.
840         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
841         REPLACE_LDEXPL.
842         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
843         gl_FUNC_LDEXPL_WORKS.
844         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
845         * modules/mathl (Files): Remove lib/ldexpl.c.
846         (Depends-on): Add ldexpl.
847
848 2007-03-29  Bruno Haible  <bruno@clisp.org>
849
850         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
851
852 2007-03-29  Bruno Haible  <bruno@clisp.org>
853
854         * tests/test-striconveh.c (main): Don't assume that a direct conversion
855         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
856         and possibly also HP-UX.
857         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
858         work on AIX, IRIX, HP-UX, OSF/1.
859         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
860         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
861         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
862         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
863         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
864         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
865
866 2007-03-29  Bruno Haible  <bruno@clisp.org>
867
868         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
869
870 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
871
872         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
873         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
874
875 2007-03-29  Eric Blake  <ebb9@byu.net>
876
877         * lib/acl-internal.h: Remove redundant include.
878         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
879         Cygwin when a file is locked.
880
881 2007-03-29  Bruno Haible  <bruno@clisp.org>
882
883         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
884         file.
885         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
886
887 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
888
889         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
890         try to remove a parent directory if the child couldn't be removed
891         (except for the first rmdir, which could fail because the child
892         doesn't exist).  Problem reported by Jeff Blaine in
893         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
894
895 2007-03-28  Bruno Haible  <bruno@clisp.org>
896
897         * lib/striconveh.c (utf8conv_carefully): New function.
898         (mem_cd_iconveh_internal): Invoke it.
899
900 2007-03-28  Bruno Haible  <bruno@clisp.org>
901
902         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
903         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
904         input.
905         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
906         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
907         unistr/u8-uctomb.
908
909 2007-03-28  Bruno Haible  <bruno@clisp.org>
910
911         * modules/unistr/u8-mbtoucr: New file.
912         * lib/unistr/u8-mbtoucr.c: New file.
913         * modules/unistr/u16-mbtoucr: New file.
914         * lib/unistr/u16-mbtoucr.c: New file.
915         * modules/unistr/u16-mbtoucr: New file.
916         * lib/unistr/u16-mbtoucr.c: New file.
917         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
918
919 2007-03-27  Simon Josefsson  <simon@josefsson.org>
920             Bruno Haible  <bruno@clisp.org>
921
922         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
923         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
924         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
925
926         * m4/stdio_h.m4: Add stubs for vasprintf too.
927
928         * modules/stdio: Support vasprintf in sed command.
929
930         * modules/vasprintf: Depend on stdio for prototypes.  Remove
931         vasprintf.h.  Add stdio module indicator.
932
933         * lib/stdio_.h: Declare asprintf and vasprintf, based on
934         vasprintf.h.
935
936         * lib/vasprintf.h: File removed.
937
938         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
939         * lib/vasprintf.c: Ditto.
940         * lib/xvasprintf.c: Ditto.
941         * tests/test-vasprintf-posix.c: Ditto.
942         * tests/test-vasprintf.c: Ditto.
943
944 2007-03-27  Bruno Haible  <bruno@clisp.org>
945
946         Make vasnprintf multithread-safe.
947         * lib/vasnprintf.c (decimal_point_char): New function.
948         (VASNPRINTF): Use it.
949         Suggested by Simon Josefsson.
950
951 2007-03-27  Eric Blake  <ebb9@byu.net>
952
953         Support sub-second birthtime on cygwin.
954         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
955         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
956         (get_stat_birthtime): Also work with st_birthtim.
957
958 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
959
960         * lib/stat-time.h (USE_BIRTHTIME): Remove.
961         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
962         (get_stat_birthtime_ns): Do not try to use "spare" fields.
963         (get_stat_birthtime_ns): Simplify compile-time tests.
964         (get_stat_birthtime): Change the API to look like
965         get_stat_mtime etc., except return a negative tv_nsec on error.
966         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
967         Don't check for "spare" fields.
968         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
969         or for struct stat.st_birthtime, as these tests aren't used.
970         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
971
972 2007-03-27  Bruno Haible  <bruno@clisp.org>
973
974         * lib/stat-time.h: Include <sys/stat.h>.
975
976 2007-03-27  James Youngman  <jay@gnu.org>
977
978         * lib/stat-time.h (get_stat_birthtime): New function for
979           retrieving st_birthtime as provided by UFS2 (hence *BSD).
980         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
981           and its variants.
982         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
983         * modules/stat-time-test: New file.
984         * tests/test-stat-time.c: New test, devised by Bruno Haible.
985
986 2007-03-26  Bruno Haible  <bruno@clisp.org>
987
988         Better support of signalling NaNs.
989         * lib/atanl.c: Include isnanl.h.
990         (atanl): Perform test for NaN at the beginning of the function and
991         through a call to isnanl.
992         * lib/cosl.c: Include isnanl.h.
993         (cosl): Perform test for NaN at the beginning of the function and
994         through a call to isnanl.
995         * lib/ldexpl.c: Include isnanl.h.
996         (ldexpl): Perform test for NaN through a call to isnanl.
997         * lib/logl.c: Include isnanl.h.
998         (logl): Perform test for NaN at the beginning of the function and
999         through a call to isnanl.
1000         * lib/sinl.c: Include isnanl.h.
1001         (sinl): Perform test for NaN at the beginning of the function and
1002         through a call to isnanl.
1003         * lib/sqrtl.c: Include isnanl.h.
1004         (sqrtl): Perform test for NaN at the beginning of the function and
1005         through a call to isnanl.
1006         * lib/tanl.c: Include isnanl.h.
1007         (tanl): Perform test for NaN at the beginning of the function and
1008         through a call to isnanl.
1009         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
1010         * modules/mathl (Depends-on): Add isnanl.
1011
1012 2007-03-26  Eric Blake  <ebb9@byu.net>
1013
1014         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
1015         regression in logic sense of previous patch.
1016
1017 2007-03-26  Bruno Haible  <bruno@clisp.org>
1018
1019         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
1020         unportable shell command "if ! ...".
1021         Reported by Ralf Wildenhues.
1022
1023 2007-03-25  Bruno Haible  <bruno@clisp.org>
1024
1025         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
1026         <sysexits.h> file, and only add EX_CONFIG.
1027         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
1028         absolute file name and whether it is sufficient. Substitute also
1029         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
1030         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
1031         ABSOLUTE_SYSEXITS_H into sysexits.h.
1032
1033 2007-03-25  Bruno Haible  <bruno@clisp.org>
1034
1035         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
1036         hints is NULL.
1037
1038 2007-03-25  Bruno Haible  <bruno@clisp.org>
1039
1040         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
1041         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
1042
1043 2007-03-25  Bruno Haible  <bruno@clisp.org>
1044
1045         * lib/vasnprintf.c: Include langinfo.h.
1046         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
1047         multithread-safe.
1048         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
1049         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
1050         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1051         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1052         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1053         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1054         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1055         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
1056         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1057         Reported by Simon Josefsson.
1058
1059 2007-03-25  Bruno Haible  <bruno@clisp.org>
1060
1061         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
1062         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
1063         * modules/vasnprintf (Depends-on): Add stdint.
1064
1065 2007-03-25  Bruno Haible  <bruno@clisp.org>
1066
1067         * modules/fpieee: New file.
1068         * m4/fpieee.m4: New file.
1069         * modules/isnan-nolibm (Depends-on): Add fpieee.
1070         * modules/isnanl-nolibm (Depends-on): Add fpieee.
1071         * modules/isnanl (Depends-on): Add fpieee.
1072
1073 2007-03-25  Bruno Haible  <bruno@clisp.org>
1074
1075         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
1076
1077 2007-03-25  Bruno Haible  <bruno@clisp.org>
1078
1079         Avoid test failures on IRIX 6.5.
1080         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
1081         (main): Use it.
1082         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
1083         macros.
1084         (main): Use them.
1085
1086 2007-03-25  Bruno Haible  <bruno@clisp.org>
1087
1088         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
1089         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
1090         exists but doesn't work.
1091         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
1092         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
1093         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
1094         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
1095
1096 2007-03-25  Bruno Haible  <bruno@clisp.org>
1097
1098         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
1099         returns inf. Needed on IRIX 6.5.
1100
1101 2007-03-25  Bruno Haible  <bruno@clisp.org>
1102
1103         * tests/test-frexpl.c: Include isnanl-nolibm.h.
1104         (main): Use isnanl instead of x != x idiom.
1105         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
1106
1107         * tests/test-frexp.c: Include isnan.h.
1108         (main): Use isnan instead of x != x idiom.
1109         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
1110
1111 2007-03-25  Bruno Haible  <bruno@clisp.org>
1112
1113         * tests/test-frexp.c (NaN): New function/macro.
1114         (main): Use it instead of 0.0 / 0.0.
1115         * tests/test-isnan.c (NaN): New function/macro.
1116         (main): Use it instead of 0.0 / 0.0.
1117         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
1118         (test_function): Use it instead of 0.0 / 0.0.
1119         * tests/test-vasprintf-posix.c (NaN): New function/macro.
1120         (test_function): Use it instead of 0.0 / 0.0.
1121         * tests/test-snprintf-posix.h (NaN): New function/macro.
1122         (test_function): Use it instead of 0.0 / 0.0.
1123         * tests/test-sprintf-posix.h (NaN): New function/macro.
1124         (test_function): Use it instead of 0.0 / 0.0.
1125         * tests/test-fprintf-posix.h (NaN): New function/macro.
1126         (test_function): Use it instead of 0.0 / 0.0.
1127         * tests/test-printf-posix.h (NaN): New function/macro.
1128         (test_function): Use it instead of 0.0 / 0.0.
1129
1130         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
1131
1132 2007-03-25  Bruno Haible  <bruno@clisp.org>
1133
1134         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
1135
1136 2007-03-25  Bruno Haible  <bruno@clisp.org>
1137
1138         * lib/regexec.c (merge_state_with_log): Make static.
1139
1140 2007-03-25  Bruno Haible  <bruno@clisp.org>
1141
1142         * lib/trigl.c (kernel_rem_pio2): Make static.
1143
1144 2007-03-25  Bruno Haible  <bruno@clisp.org>
1145
1146         * lib/sincosl.c (sincosl_table): Make static.
1147
1148 2007-03-25  Bruno Haible  <bruno@clisp.org>
1149
1150         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
1151         if the compiler does not support C99.
1152
1153 2007-03-25  Bruno Haible  <bruno@clisp.org>
1154
1155         * modules/time (Makefile.am): Ensure all rule action lines start with a
1156         tab.
1157
1158 2007-03-24  Bruno Haible  <bruno@clisp.org>
1159
1160         * modules/tsearch-tests: New file.
1161         * tests/test-tsearch.sh: New file.
1162         * tests/test-tsearch.c: New file, mostly copied from glibc.
1163
1164         * modules/search-tests: New file.
1165         * tests/test-search.c: New file.
1166
1167         * modules/search: New file.
1168         * lib/search_.h: New file, incorporating lib/tsearch.h.
1169         * m4/search_h.m4: New file.
1170         * lib/tsearch.h: Remove file.
1171         * lib/tsearch.c: Include search.h instead of tsearch.h.
1172         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
1173         HAVE_TSEARCH.
1174         * modules/tsearch (Files): Remove lib/tsearch.h.
1175         (Depends-on): Add search.
1176         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
1177         (Include): Change tsearch.h into search.h.
1178
1179 2007-03-24  Bruno Haible  <bruno@clisp.org>
1180
1181         * modules/fpucw: New file.
1182         * lib/fpucw.h: New file.
1183         * lib/frexp.c: Include fpucw.h.
1184         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
1185         (FUNC): Use them.
1186         * lib/printf-frexp.c: Include fpucw.h.
1187         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
1188         (FUNC): Use them.
1189         * lib/vasnprintf.c: Include fpucw.h.
1190         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
1191         'long double' calculations.
1192         * tests/test-frexpl.c: Include fpucw.h.
1193         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
1194         * tests/test-printf-frexpl.c: Include fpucw.h.
1195         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
1196         * modules/frexpl (Depends-on): Add fpucw.
1197         * modules/printf-frexpl (Depends-on): Likewise.
1198         * modules/fprintf-posix (Depends-on): Likewise.
1199         * modules/snprintf-posix (Depends-on): Likewise.
1200         * modules/sprintf-posix (Depends-on): Likewise.
1201         * modules/vasnprintf-posix (Depends-on): Likewise.
1202         * modules/vasprintf-posix (Depends-on): Likewise.
1203         * modules/vfprintf-posix (Depends-on): Likewise.
1204         * modules/vsnprintf-posix (Depends-on): Likewise.
1205         * modules/vsprintf-posix (Depends-on): Likewise.
1206         * modules/frexpl-tests (Depends-on): Likewise.
1207         * modules/printf-frexpl-tests (Depends-on): Likewise.
1208
1209 2007-03-24  Bruno Haible  <bruno@clisp.org>
1210
1211         * lib/float+.h: New file.
1212         * lib/isnan.c: Include float+.h.
1213         (SIZE): New macro.
1214         (FUNC): Compare only SIZE bytes of the value.
1215         * lib/vasnprintf.c: Include float+.h.
1216         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
1217         SIZEOF_LDBL or SIZEOF_DBL bytes.
1218         * modules/isnan-nolibm (Files): Add lib/float+.h.
1219         * modules/isnanl-nolibm (Files): Add lib/float+.h.
1220         * modules/isnanl (Files): Add lib/float+.h.
1221         * modules/vasnprintf (Files): Add lib/float+.h.
1222
1223 2007-03-24  Bruno Haible  <bruno@clisp.org>
1224
1225         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
1226         include isnanl-nolibm.h.
1227
1228 2007-03-24  Bruno Haible  <bruno@clisp.org>
1229
1230         * tests/test-read-file.c (main): Don't produce spurious output for
1231         expected situations. Make the test fail if it encountered unexpected
1232         results.
1233
1234 2007-03-24  Bruno Haible  <bruno@clisp.org>
1235
1236         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
1237         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
1238
1239 2007-03-24  Bruno Haible  <bruno@clisp.org>
1240
1241         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
1242
1243 2007-03-24  Bruno Haible  <bruno@clisp.org>
1244
1245         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
1246         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
1247
1248         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
1249         * modules/utf8-ucs4: Turn into a symbolic link to module
1250         unistr/u8-mbtouc.
1251
1252         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
1253         utf8-ucs4-unsafe.
1254         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
1255         unistr/u8-mbtouc-unsafe.
1256
1257         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
1258         * modules/utf16-ucs4: Turn into a symbolic link to module
1259         unistr/u16-mbtouc.
1260
1261         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
1262         utf16-ucs4-unsafe.
1263         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
1264         unistr/u16-mbtouc-unsafe.
1265
1266         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
1267         * modules/ucs4-utf8: Turn into a symbolic link to module
1268         unistr/u8-ubtomb.
1269
1270         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
1271         * modules/ucs4-utf16: Turn into a symbolic link to module
1272         unistr/u16-ubtomb.
1273
1274 2007-03-24  Bruno Haible  <bruno@clisp.org>
1275
1276         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
1277         Enable the function only if HAVE_INLINE.
1278         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
1279         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
1280         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
1281         Enable the function only if HAVE_INLINE.
1282         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
1283         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
1284         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
1285         Enable the function only if HAVE_INLINE.
1286         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
1287         Enable the function only if HAVE_INLINE.
1288         * modules/utf8-ucs4: Update.
1289         * modules/utf8-ucs4-unsafe: Update.
1290         * modules/utf16-ucs4: Update.
1291         * modules/utf16-ucs4-unsafe: Update.
1292         * modules/ucs4-utf8: Update.
1293         * modules/ucs4-utf16: Update.
1294
1295 2007-03-24  Bruno Haible  <bruno@clisp.org>
1296
1297         * lib/utf8-ucs4.h: Remove file.
1298         * lib/utf8-ucs4-unsafe.h: Remove file.
1299         * lib/utf16-ucs4.h: Remove file.
1300         * lib/utf16-ucs4-unsafe.h: Remove file.
1301         * lib/ucs4-utf8.h: Remove file.
1302         * lib/ucs4-utf16.h: Remove file.
1303         * lib/unistr.h: Include their previous contents.
1304         * m4/utf-ucs4.m4: Remove file.
1305         * m4/ucs4-utf.m4: Remove file.
1306         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
1307         (Depends-on): Add unistr/base.
1308         (configure.ac): Remove gl_UTF_UCS4.
1309         (Makefile.am): Update.
1310         (Include): Change to unistr.h.
1311         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
1312         (Depends-on): Add unistr/base.
1313         (configure.ac): Remove gl_UTF_UCS4.
1314         (Makefile.am): Update.
1315         (Include): Change to unistr.h.
1316         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
1317         (Depends-on): Add unistr/base.
1318         (configure.ac): Remove gl_UTF_UCS4.
1319         (Makefile.am): Update.
1320         (Include): Change to unistr.h.
1321         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
1322         (Depends-on): Add unistr/base.
1323         (configure.ac): Remove gl_UTF_UCS4.
1324         (Makefile.am): Update.
1325         (Include): Change to unistr.h.
1326         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
1327         (Depends-on): Add unistr/base.
1328         (configure.ac): Remove gl_UCS4_UTF.
1329         (Makefile.am): Update.
1330         (Include): Change to unistr.h.
1331         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
1332         (Depends-on): Add unistr/base.
1333         (configure.ac): Remove gl_UCS4_UTF.
1334         (Makefile.am): Update.
1335         (Include): Change to unistr.h.
1336         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
1337         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
1338         utf8-ucs4-unsafe.h.
1339         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
1340         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
1341         utf16-ucs4-unsafe.h.
1342         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
1343         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
1344         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
1345         * lib/unistr/u8-strchr.c: Likewise.
1346         * lib/unistr/u8-strrchr.c: Likewise.
1347         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
1348         * lib/unistr/u16-strchr.c: Likewise.
1349         * lib/unistr/u16-strrchr.c: Likewise.
1350         * lib/striconveh.c: Update.
1351         * lib/linebreak.c: Update.
1352
1353 2007-03-24  Bruno Haible  <bruno@clisp.org>
1354
1355         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
1356         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
1357
1358 2007-03-22  Bruno Haible  <bruno@clisp.org>
1359
1360         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
1361
1362 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
1363
1364         * MODULES.html.sh (File system functions): New module write-any-file.
1365         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
1366         * m4/write-any-file.m4: New files.
1367
1368 2007-03-23  Eric Blake  <ebb9@byu.net>
1369
1370         * gnulib-tool: Rearrange space-tab sequences, since some editors
1371         like to eat them.
1372
1373 2007-03-23  Eric Blake  <ebb9@byu.net>
1374
1375         * lib/version-etc.c (version_etc_va): Update license wording to
1376         be more concise.  Recommended by Richard Stallman.
1377
1378 2007-03-22  Bruno Haible  <bruno@clisp.org>
1379
1380         * lib/poll.c (MSG_PEEK): New fallback definition.
1381
1382 2007-03-22  Bruno Haible  <bruno@clisp.org>
1383
1384         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
1385         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
1386         (main): Update.
1387         Fixes a compilation error on BeOS.
1388
1389 2007-03-22  Bruno Haible  <bruno@clisp.org>
1390
1391         * modules/frexpl-tests: New file.
1392         * tests/test-frexpl.c: New file.
1393
1394         * modules/frexpl: New file.
1395         * m4/frexpl.m4: New file.
1396         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
1397         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
1398         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
1399         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
1400         (Depends-on): Add frexpl. Remove isnanl-nolibm.
1401         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
1402
1403 2007-03-22  Bruno Haible  <bruno@clisp.org>
1404
1405         * lib/frexpl.c: Share code with lib/frexp.c.
1406         * modules/mathl (Files): Add lib/frexp.c.
1407         (Depends-on): Add isnanl-nolibm.
1408
1409 2007-03-22  Bruno Haible  <bruno@clisp.org>
1410
1411         * modules/printf-frexp (Files): Add m4/frexp.m4.
1412         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
1413         only if the found frexp function actually works.
1414
1415 2007-03-22  Bruno Haible  <bruno@clisp.org>
1416
1417         * lib/frexp.c: Remove older implementation that uses divisions.
1418
1419 2007-03-21  Bruno Haible  <bruno@clisp.org>
1420
1421         * modules/frexp-tests: New file.
1422         * tests/test-frexp.c: New file.
1423
1424         * modules/frexp: New file.
1425         * lib/frexp.c: New file.
1426         * m4/frexp.m4: New file.
1427         * lib/math_.h (frexp): New declaration.
1428         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
1429         REPLACE_FREXP.
1430         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
1431
1432 2007-03-21  Bruno Haible  <bruno@clisp.org>
1433
1434         * modules/isnanl-tests: New file.
1435         * tests/test-isnanl.c: New file.
1436
1437         * modules/isnanl: New file.
1438         * lib/isnanl.h: New file.
1439         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
1440         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
1441         gl_FUNC_ISNANL_WORKS.
1442         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
1443         New macros.
1444
1445 2007-03-21  Bruno Haible  <bruno@clisp.org>
1446
1447         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
1448         lib/isnanl.h.
1449         (Include): Update.
1450         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
1451         * lib/vasnprintf.c: Update.
1452         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
1453         tests/test-isnanl.h, remove tests/test-isnanl.c.
1454         (Makefile.am): Update.
1455         * tests/test-isnanl-nolibm.c: New file.
1456         * tests/test-isnanl.h: New file.
1457         * tests/test-isnanl.c: Remove file.
1458
1459 2007-03-21  Jim Meyering  <jim@meyering.net>
1460
1461         When trying to open ".", treat ESTALE like EACCES.
1462         * lib/savewd.c (savewd_save): Resort to forking not just upon
1463         failure with EACCES, but also when errno is ESTALE.
1464
1465 2007-03-20  Bruno Haible  <bruno@clisp.org>
1466
1467         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
1468         Needed on AIX 5.1. Reported by Matthew Woehlke.
1469
1470 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
1471
1472         Suggestions by Bruno Haible:
1473         * lib/acl-internal.h: Include "gettext.h" rather than rolling
1474         our own.
1475         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
1476         * modules/acl (Depends-on): Add gettext.
1477
1478 2007-03-19  Bruno Haible  <bruno@clisp.org>
1479
1480         * modules/iconvme: Remove file.
1481         * lib/iconvme.h: Remove file.
1482         * lib/iconvme.c: Remove file.
1483         * m4/iconvme.m4: Remove file.
1484
1485 2007-03-19  Bruno Haible  <bruno@clisp.org>
1486
1487         * doc/relocatable-maint.texi: Break long shell script line.
1488         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
1489
1490 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
1491
1492         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
1493         handle file_has_acl.
1494         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
1495         * lib/acl.c: Move header inclusions and related macro defns into
1496         lib/acl-internal.h.
1497         (S_ISLNK): Remove defn, since that's now done for us.
1498         (file_has_acl): Move to lib/file-has-acl.c.
1499         Call acl_trivial if available.  This is the crucial part of the fix.
1500         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
1501         shared within the library.  Rewrite a bit, partly to make it compatible
1502         with the GNU coding style.
1503         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
1504         Remove unnecessary double-quotes.
1505         Don't test for acl_to_text; the build will catch that.
1506         Replace acl_entries if it doesn't exist and it is needed.
1507         Check for -lsec and acl_trivial (as used on Solaris 10).
1508         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
1509         lib/file-has-acl.c.
1510         (Depends-on): Add sys_stat, for S_ISLNK.
1511
1512 2007-03-19  Ben Pfaff  <blp@gnu.org>
1513
1514         * doc/gnulib.texi: Fix typos.
1515         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
1516
1517 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
1518
1519         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
1520         If size is zero here, buf must be zero.
1521
1522 2007-03-19  Simon Josefsson  <simon@josefsson.org>
1523
1524         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
1525         <bruno@clisp.org>.
1526
1527 2007-03-18  Bruno Haible  <bruno@clisp.org>
1528
1529         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
1530         Suggested by Eric Blake.
1531
1532 2007-03-18  Ben Pfaff  <blp@gnu.org>
1533
1534         * doc/relocatable.texi: Recommend using as prefix a directory
1535         that does not exist and will never be created.  Based on
1536         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
1537         and others.
1538
1539 2007-03-17  Bruno Haible  <bruno@clisp.org>
1540
1541         * lib/fchownat.c: Include lchown.h.
1542
1543 2007-03-17  Bruno Haible  <bruno@clisp.org>
1544
1545         Fix endless loop when the given allocated size was > INT_MAX.
1546         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
1547         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
1548         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
1549         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
1550         * lib/sprintf.c (sprintf): Likewise.
1551
1552 2007-03-17  Bruno Haible  <bruno@clisp.org>
1553
1554         * tests/test-argp-2.sh (func_compare): Output a context diff.
1555
1556 2007-03-17  Bruno Haible  <bruno@clisp.org>
1557
1558         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
1559         locale's decimal-point character.
1560
1561 2007-03-17  Bruno Haible  <bruno@clisp.org>
1562
1563         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
1564         before comparing it. Needed because on some platforms (e.g. x86) a
1565         'long double' occupies less bytes than sizeof (long double).
1566
1567 2007-03-17  Bruno Haible  <bruno@clisp.org>
1568
1569         * tests/test-crc.c (main): Make printf statements 64-bit clean.
1570         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
1571         * tests/test-getaddrinfo.c (simple): Likewise.
1572         * tests/test-read-file.c (main): Likewise.
1573
1574 2007-03-17  Bruno Haible  <bruno@clisp.org>
1575
1576         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
1577
1578 2007-03-17  Bruno Haible  <bruno@clisp.org>
1579
1580         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
1581         unused variable.
1582
1583 2007-03-17  Bruno Haible  <bruno@clisp.org>
1584
1585         * tests/test-c-strcasecmp.c: Include c-strcase.h.
1586         * tests/test-c-strncasecmp.c: Likewise.
1587
1588 2007-03-17  Bruno Haible  <bruno@clisp.org>
1589
1590         * modules/stdlib (Depends-on): Add unistd.
1591         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
1592         Needed for MacOS X 10.3.
1593
1594 2007-03-17  Bruno Haible  <bruno@clisp.org>
1595
1596         * lib/unistr/u-strdup.h: Include <stdlib.h>.
1597
1598 2007-03-17  Bruno Haible  <bruno@clisp.org>
1599
1600         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
1601
1602 2007-03-17  Bruno Haible  <bruno@clisp.org>
1603
1604         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
1605         to reflect files copied from gnulib (with or without modifications).
1606         Suggested by Jim Meyering.
1607
1608 2007-03-17  Eric Blake  <ebb9@byu.net>
1609
1610         * NEWS: Document stdlib change from 2007-02-18.
1611
1612 2007-03-17  Jim Meyering  <jim@meyering.net>
1613
1614         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
1615         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
1616         someone uses a name containing shell meta-characters.
1617         Reported by Alfred M. Szmidt.
1618
1619         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
1620
1621 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
1622
1623         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
1624         and copy gettext configuration files only if configure.ac contains
1625         a use of AM_GNU_GETTEXT_VERSION.
1626
1627 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
1628
1629         * build-aux/bootstrap (gnulib_name): New variable.
1630         (gnulib_tool_options): Use it.
1631
1632 2007-03-13  Simon Josefsson  <simon@josefsson.org>
1633
1634         * tests/test-des.c: Use new namespace.
1635
1636 2007-03-15  Bruno Haible  <bruno@clisp.org>
1637
1638         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
1639         Reported by James Youngman <jay@gnu.org>.
1640
1641 2007-03-15  Bruno Haible  <bruno@clisp.org>
1642
1643         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
1644         declared prototype. Needed with cc on OSF/1 5.1.
1645
1646 2007-03-15  Bruno Haible  <bruno@clisp.org>
1647
1648         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
1649         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
1650         (struct gl_list_implementation): Add dispose_fn argument to the
1651         'create_empty', 'create' methods.
1652         (struct gl_list_impl_base): Add field 'dispose_fn'.
1653         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
1654         argument.
1655         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
1656         dispose_fn argument.
1657         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
1658         dispose_fn on the dropped values.
1659         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
1660         dispose_fn argument.
1661         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
1662         dropped values.
1663         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
1664         (gl_tree_remove_node): Call dispose_fn on the dropped value.
1665         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
1666         (gl_tree_remove_node): Call dispose_fn on the dropped value.
1667         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
1668         argument.
1669         (gl_tree_list_free): Call dispose_fn on the dropped values.
1670         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
1671         the dropped values.
1672         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
1673         Add dispose_fn argument.
1674         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
1675         Call dispose_fn on the dropped values.
1676         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
1677         Add dispose_fn argument.
1678         (gl_sublist_create): Initialize the 'dispose_fn' field.
1679         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
1680         * tests/test-array_list.c (main): Update.
1681         * tests/test-carray_list.c (main): Update.
1682         * tests/test-avltree_list.c (main): Update.
1683         * tests/test-rbtree_list.c (main): Update.
1684         * tests/test-avltreehash_list.c (main): Update.
1685         * tests/test-rbtreehash_list.c (main): Update.
1686         * tests/test-linked_list.c (main): Update.
1687         * tests/test-linkedhash_list.c (main): Update.
1688         * tests/test-array_oset.c (main): Update.
1689
1690 2007-03-15  Bruno Haible  <bruno@clisp.org>
1691
1692         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
1693         (gl_oset_create_empty): Add dispose_fn argument.
1694         (struct gl_oset_implementation): Add dispose_fn argument to
1695         'create_empty' method.
1696         (struct gl_oset_impl_base): Add dispose_fn field.
1697         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
1698         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
1699         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
1700         values.
1701         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
1702         (gl_tree_oset_free): Call dispose_fn on the dropped values.
1703         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
1704         dropped value.
1705         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
1706         dropped value.
1707         * tests/test-array_oset.c (main): Update.
1708         * tests/test-avltree_oset.c (main): Update.
1709         * tests/test-rbtree_oset.c (main): Update.
1710         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
1711
1712 2007-03-13  Bruno Haible  <bruno@clisp.org>
1713
1714         * tests/test-stdbool.c (i): Update after last patch.
1715
1716 2007-03-12  Bruno Haible  <bruno@clisp.org>
1717
1718         * lib/quotearg.c: Include <wctype.h> early, before the definition of
1719         the iswprint macro. Needed on Solaris 2.5.1.
1720
1721 2007-03-12  Bruno Haible  <bruno@clisp.org>
1722
1723         * tests/test-printf-frexp.c (main): Declare x as volatile.
1724
1725 2007-03-12  Simon Josefsson  <simon@josefsson.org>
1726
1727         * doc/gnulib.texi (Build robot for gnulib): New section.
1728
1729 2007-03-12  Jim Meyering  <jim@meyering.net>
1730
1731         * build-aux/bootstrap: New file.
1732         * build-aux/bootstrap.conf: New file, from coreutils.
1733
1734 2007-03-11  Bruno Haible  <bruno@clisp.org>
1735
1736         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
1737
1738 2007-03-12  Simon Josefsson  <simon@josefsson.org>
1739
1740         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
1741         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
1742         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
1743
1744 2007-03-11  Bruno Haible  <bruno@clisp.org>
1745
1746         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
1747         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
1748
1749 2007-03-11  Bruno Haible  <bruno@clisp.org>
1750
1751         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
1752         formula. Needed for SunPRO C 5.0.
1753
1754 2007-03-11  Bruno Haible  <bruno@clisp.org>
1755
1756         * modules/long-options (Depends-on): Add getopt.
1757
1758 2007-03-11  Bruno Haible  <bruno@clisp.org>
1759
1760         * modules/modechange (Depends-on): Add stdbool.
1761
1762 2007-03-11  Bruno Haible  <bruno@clisp.org>
1763
1764         * modules/i-ring (Depends-on): Add stdbool.
1765
1766 2007-03-11  Bruno Haible  <bruno@clisp.org>
1767
1768         * modules/gc-des (Depends-on): Add stdbool.
1769
1770 2007-03-11  Bruno Haible  <bruno@clisp.org>
1771
1772         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
1773
1774 2007-03-11  Bruno Haible  <bruno@clisp.org>
1775
1776         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
1777
1778 2007-03-11  Bruno Haible  <bruno@clisp.org>
1779
1780         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
1781
1782 2007-03-11  Bruno Haible  <bruno@clisp.org>
1783
1784         * lib/vasnprintf.c (sprintf): Undefine.
1785
1786 2007-03-11  Bruno Haible  <bruno@clisp.org>
1787
1788         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
1789         initializers in SunPRO C and Compaq C compilers.
1790
1791 2007-03-11  Bruno Haible  <bruno@clisp.org>
1792
1793         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
1794         decrementing code ANSI C compliant.
1795
1796 2007-03-11  Bruno Haible  <bruno@clisp.org>
1797
1798         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
1799         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
1800
1801 2007-03-11  Bruno Haible  <bruno@clisp.org>
1802
1803         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
1804         <stdbool.h> substitute doesn't pass.
1805
1806 2007-03-11  Bruno Haible  <bruno@clisp.org>
1807
1808         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
1809
1810 2007-03-11  Bruno Haible  <bruno@clisp.org>
1811
1812         * gnulib-tool (func_create_megatestdir): Create also an autobuild
1813         script, for submission to autobuild.josefsson.org.
1814
1815 2007-03-10  Bruno Haible  <bruno@clisp.org>
1816
1817         * modules/canonicalize-lgpl-tests: New file.
1818         * tests/test-canonicalize-lgpl.sh: New file.
1819         * tests/test-canonicalize-lgpl.c: New file.
1820
1821         * modules/c-strcase-tests: New file.
1822         * tests/test-c-strcase.sh: New file.
1823         * tests/test-c-strcasecmp.c: New file.
1824         * tests/test-c-strncasecmp.c: New file.
1825
1826         * modules/atexit-tests: New file.
1827         * tests/test-atexit.sh: New file.
1828         * tests/test-atexit.c: New file.
1829
1830 2007-03-10  Bruno Haible  <bruno@clisp.org>
1831
1832         * tests/test-binary-io.sh: Use temporary filenames that are not so
1833         likely to clash with those of other tests (in a parallel make).
1834         * tests/test-binary-io.c: Likewise.
1835
1836 2007-03-10  Bruno Haible  <bruno@clisp.org>
1837
1838         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
1839         fallback; use #error instead.
1840         Suggested by Simon Josefsson.
1841
1842 2007-03-10  Bruno Haible  <bruno@clisp.org>
1843
1844         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
1845         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
1846         first and the last.
1847
1848 2007-03-10  Bruno Haible  <bruno@clisp.org>
1849
1850         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
1851
1852 2007-03-10  Bruno Haible  <bruno@clisp.org>
1853
1854         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
1855         "make distcheck".
1856         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
1857         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
1858         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
1859
1860 2007-03-10  Bruno Haible  <bruno@clisp.org>
1861
1862         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
1863         variable.
1864         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
1865         variable.
1866
1867 2007-03-09  Eric Blake  <ebb9@byu.net>
1868         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
1869
1870         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
1871         types are not being provided by gnulib.
1872         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
1873         types are supported.
1874
1875 2007-03-10  Bruno Haible  <bruno@clisp.org>
1876
1877         * lib/stdio_.h (__attribute__): New macro.
1878         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
1879         vsprintf): Specify __attribute__ __format__ for GCC.
1880         Suggested by Eric Blake.
1881
1882 2007-03-09  Bruno Haible  <bruno@clisp.org>
1883
1884         * modules/printf-posix-tests: New file.
1885         * tests/test-printf-posix.sh: New file.
1886         * tests/test-printf-posix.c: New file.
1887
1888         * modules/printf-posix: New file.
1889         * lib/printf.c: New file.
1890         * m4/printf-posix-rpl.m4: New file.
1891         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
1892         REPLACE_PRINTF.
1893         * lib/stdio_.h (printf): New declaration.
1894         (format, __format__, ____printf____, ____scanf____, ____strftime____,
1895         ____strfmon____): New macros.
1896         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
1897         REPLACE_PRINTF.
1898
1899 2007-03-09  Bruno Haible  <bruno@clisp.org>
1900
1901         * tests/test-vasnprintf-posix2.sh: New file.
1902         * tests/test-vasnprintf-posix2.c: New file.
1903         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
1904         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
1905         (Makefile.am): Activate test-vasnprintf-posix2.sh.
1906
1907         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
1908         a locale dependent decimal point, rather than always '.'.
1909
1910 2007-03-09  Eric Blake  <ebb9@byu.net>
1911
1912         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
1913         spite of platforms like Tandem/NSK that define it to -1.
1914
1915 2007-03-08  Bruno Haible  <bruno@clisp.org>
1916
1917         * modules/vprintf-posix-tests: New file.
1918         * tests/test-vprintf-posix.sh: New file.
1919         * tests/test-vprintf-posix.c: New file.
1920         * tests/test-printf-posix.h: New file.
1921
1922         * modules/vprintf-posix: New file.
1923         * lib/vprintf.c: New file.
1924         * m4/vprintf-posix.m4: New file.
1925         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
1926         REPLACE_VPRINTF.
1927         * lib/stdio_.h (vprintf): New declaration.
1928         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
1929         REPLACE_VPRINTF.
1930
1931 2007-03-08  Bruno Haible  <bruno@clisp.org>
1932
1933         * modules/fprintf-posix-tests: New file.
1934         * tests/test-fprintf-posix.sh: New file.
1935         * tests/test-fprintf-posix.c: New file.
1936
1937         * modules/fprintf-posix: New file.
1938         * lib/fprintf.c: New file.
1939         * m4/fprintf-posix.m4: New file.
1940         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
1941         REPLACE_FPRINTF.
1942         * lib/stdio_.h (fprintf): New declaration.
1943         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
1944         REPLACE_FPRINTF.
1945
1946 2007-03-08  Bruno Haible  <bruno@clisp.org>
1947
1948         * modules/vfprintf-posix-tests: New file.
1949         * tests/test-vfprintf-posix.sh: New file.
1950         * tests/test-vfprintf-posix.c: New file.
1951         * tests/test-fprintf-posix.h: New file.
1952         * tests/test-fprintf-posix.out: New file.
1953
1954         * modules/vfprintf-posix: New file.
1955         * lib/vfprintf.c: New file.
1956         * m4/vfprintf-posix.m4: New file.
1957         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
1958         REPLACE_VFPRINTF.
1959         * lib/stdio_.h (vfprintf): New declaration.
1960         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
1961         REPLACE_VFPRINTF.
1962
1963 2007-03-08  Bruno Haible  <bruno@clisp.org>
1964
1965         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
1966
1967 2007-03-08  Bruno Haible  <bruno@clisp.org>
1968
1969         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
1970         instead of 'expr' invocations.
1971         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1972         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1973         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1974         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1975         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1976         Suggested by Paul Eggert.
1977
1978 2007-03-08  Bruno Haible  <bruno@clisp.org>
1979
1980         * modules/fseterr-tests: New file.
1981         * tests/test-fseterr.c: New file.
1982
1983         * modules/fseterr: New file.
1984         * lib/fseterr.h: New file.
1985         * lib/fseterr.c: New file.
1986
1987 2007-03-08  Bruno Haible  <bruno@clisp.org>
1988
1989         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
1990         * lib/getopt_.h: Likewise.
1991         * lib/mbswidth.h: Likewise.
1992         * lib/setenv.h: Likewise.
1993         * lib/vasnprintf.h: Likewise.
1994         * lib/vasprintf.h: Likewise.
1995         * lib/verror.h: Likewise.
1996         * lib/xsetenv.h: Likewise.
1997         * lib/xvasprintf.h: Likewise.
1998
1999 2007-03-08  Jim Meyering  <jim@meyering.net>
2000
2001         * users.txt: Add parted.
2002
2003         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
2004
2005 2007-03-07  Bruno Haible  <bruno@clisp.org>
2006
2007         * m4/printf.m4: Make the shell script snippets copy&pastable.
2008
2009 2007-03-02  Bruno Haible  <bruno@clisp.org>
2010
2011         * lib/netinet_in_.h: New file.
2012         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
2013         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
2014         * modules/netinet_in (Files): Add lib/netinet_in_.h.
2015         (Depends-on): Add absolute-header.
2016         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
2017         into netinet/in.h.
2018
2019 2007-03-03  Bruno Haible  <bruno@clisp.org>
2020
2021         * lib/sys_select_.h: New file.
2022         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
2023         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
2024         * modules/sys_select (Files): Add lib/sys_select_.h.
2025         (Depends-on): Add absolute-header.
2026         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
2027         into sys/select.h.
2028
2029 2007-03-02  Bruno Haible  <bruno@clisp.org>
2030
2031         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
2032         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
2033         values.
2034         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
2035         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
2036         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
2037         * modules/sys_socket (Depends-on): Add absolute-header.
2038         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
2039         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
2040         (Include): Remove requirement of inclusion of <sys/types.h>.
2041
2042 2007-03-02  Bruno Haible  <bruno@clisp.org>
2043
2044         * lib/byteswap_.h (bswap_32): Fix formula.
2045
2046 2007-03-06  Bruno Haible  <bruno@clisp.org>
2047
2048         * modules/sprintf-posix-tests: New file.
2049         * tests/test-sprintf-posix.c: New file.
2050
2051         * modules/sprintf-posix: New file.
2052         * lib/sprintf.c: New file.
2053         * m4/sprintf-posix.m4: New file.
2054         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
2055         REPLACE_SPRINTF.
2056         * lib/stdio_.h (sprintf): New declaration.
2057         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
2058         REPLACE_SPRINTF.
2059
2060 2007-03-06  Bruno Haible  <bruno@clisp.org>
2061
2062         * modules/vsprintf-posix-tests: New file.
2063         * tests/test-vsprintf-posix.c: New file.
2064         * tests/test-sprintf-posix.h: New file.
2065
2066         * modules/vsprintf-posix: New file.
2067         * lib/vsprintf.c: New file.
2068         * m4/vsprintf-posix.m4: New file.
2069         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
2070         REPLACE_VSPRINTF.
2071         * lib/stdio_.h (vsprintf): New declaration.
2072         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
2073         REPLACE_VSPRINTF.
2074
2075 2007-03-06  Bruno Haible  <bruno@clisp.org>
2076
2077         * modules/vsnprintf (Depend-on): Remove minmax.
2078
2079 2007-03-06  Bruno Haible  <bruno@clisp.org>
2080
2081         * modules/snprintf-posix-tests: New file.
2082         * tests/test-snprintf-posix.c: New file.
2083
2084         * modules/snprintf-posix: New file.
2085         * m4/snprintf-posix.m4: New file.
2086         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
2087         gl_FUNC_SNPRINTF.
2088         (gl_FUNC_SNPRINTF): Invoke it.
2089         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
2090         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
2091         is set.
2092         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
2093
2094 2007-03-06  Bruno Haible  <bruno@clisp.org>
2095
2096         * modules/vsnprintf-posix-tests: New file.
2097         * tests/test-vsnprintf-posix.c: New file.
2098         * tests/test-snprintf-posix.h: New file.
2099
2100         * modules/vsnprintf-posix: New file.
2101         * m4/vsnprintf-posix.m4: New file.
2102         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
2103         gl_FUNC_VSNPRINTF.
2104         (gl_FUNC_VSNPRINTF): Invoke it.
2105         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
2106         * lib/stdio_.h (vsnprintf): Define as a replacement if
2107         REPLACE_VSNPRINTF is set.
2108         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
2109
2110 2007-03-06  Bruno Haible  <bruno@clisp.org>
2111
2112         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
2113         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
2114
2115 2007-03-06  Bruno Haible  <bruno@clisp.org>
2116
2117         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
2118         (asinl): Declare also if HAVE_DECL_ASINL is set.
2119         (atanl): Declare also if HAVE_DECL_ATANL is set.
2120         (ceill): Declare also if HAVE_DECL_CEILL is set.
2121         (cosl): Declare also if HAVE_DECL_COSL is set.
2122         (expl): Declare also if HAVE_DECL_EXPL is set.
2123         (floorl): Declare also if HAVE_DECL_FLOORL is set.
2124         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
2125         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
2126         (logl): Declare also if HAVE_DECL_LOGL is set.
2127         (sinl): Declare also if HAVE_DECL_SINL is set.
2128         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
2129         (tanl): Declare also if HAVE_DECL_TANL is set.
2130         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
2131         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
2132         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
2133         declaration of frexpl, ldexpl.
2134         * modules/printf-frexpl (Depends-on): Add math.
2135         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
2136
2137 2007-03-05  Bruno Haible  <bruno@clisp.org>
2138
2139         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
2140         frexpl and ldexpl are declared.
2141         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
2142
2143 2007-03-05  Bruno Haible  <bruno@clisp.org>
2144
2145         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
2146         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
2147
2148 2007-03-05  Bruno Haible  <bruno@clisp.org>
2149
2150         * lib/stdio_.h: Include <stddef.h>.
2151
2152 2007-03-05  Bruno Haible  <bruno@clisp.org>
2153
2154         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
2155
2156 2007-03-05  Bruno Haible  <bruno@clisp.org>
2157
2158         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
2159         NetBSD 4, from Ralf Wildenhues.
2160
2161 2007-03-04  Bruno Haible  <bruno@clisp.org>
2162
2163         * lib/vasprintf.h: Update #if logic for the case when the functions
2164         exist but are overridden.
2165
2166 2007-03-04  Bruno Haible  <bruno@clisp.org>
2167
2168         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
2169         implementations: glibc-2.4 and MacOS X 10.3.
2170         * tests/test-vasnprintf-posix.c (test_function): Test also the case
2171         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
2172         * tests/test-vasprintf-posix.c (test_function): Likewise.
2173
2174 2007-03-04  Bruno Haible  <bruno@clisp.org>
2175
2176         * modules/vasprintf-posix-tests: New file.
2177         * tests/test-vasprintf-posix.c: New file.
2178
2179         * modules/vasprintf-posix: New file.
2180         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
2181         defined.
2182         * m4/vasprintf-posix.m4: New file.
2183         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
2184         gl_FUNC_VASPRINTF.
2185         (gl_FUNC_VASPRINTF): Invoke it.
2186         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
2187         here.
2188         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
2189
2190 2007-03-04  Bruno Haible  <bruno@clisp.org>
2191
2192         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
2193         REPLACE_GETTIMEOFDAY.
2194         * modules/sys_time (Makefile.am): Likewise.
2195         * m4/sys_time_h.m4: Likewise.
2196         * m4/gettimeofday.m4: Likewise.
2197
2198 2007-03-04  Bruno Haible  <bruno@clisp.org>
2199
2200         * modules/vasnprintf-posix-tests: New file.
2201         * tests/test-vasnprintf-posix.c: New file.
2202
2203         * modules/vasnprintf-posix: New file.
2204         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
2205         printf-frexpl.h.
2206         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
2207         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
2208         REPLACE_VASNPRINTF is defined.
2209         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
2210         gl_FUNC_VASNPRINTF.
2211         (gl_FUNC_VASNPRINTF): Invoke it.
2212         * m4/vasnprintf-posix.m4: New file.
2213         * m4/printf.m4: New file.
2214
2215 2007-03-04  Bruno Haible  <bruno@clisp.org>
2216
2217         Compile progreloc.c only if --enable-relocatable is specified.
2218         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
2219         if --enable-relocatable was specified.
2220         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
2221         lib_SOURCES.
2222
2223 2007-03-04  Jim Meyering  <jim@meyering.net>
2224
2225         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
2226         Use it consistently, rather than enumerating errno constants.
2227
2228 2007-03-04  Bruno Haible  <bruno@clisp.org>
2229
2230         * modules/xvasprintf-tests: New file.
2231         * tests/test-xvasprintf.c: New file.
2232
2233         * modules/vasprintf-tests: New file.
2234         * tests/test-vasprintf.c: New file.
2235
2236         * modules/vasnprintf-tests: New file.
2237         * tests/test-vasnprintf.c: New file.
2238
2239         * modules/vsnprintf-tests: New file.
2240         * tests/test-vsnprintf.c: New file.
2241
2242         * modules/snprintf-tests: New file.
2243         * tests/test-snprintf.c: New file.
2244
2245 2007-03-04  Bruno Haible  <bruno@clisp.org>
2246
2247         Compile relocatable.c only if --enable-relocatable is specified.
2248         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
2249         gl_RELOCATABLE_LIBRARY.
2250         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
2251         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
2252         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
2253         gl_RELOCATABLE_LIBRARY.
2254         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
2255         (Makefile.am): Remove lib_SOURCES.
2256         * modules/relocatable-lib-lgpl (configure.ac): Invoke
2257         gl_RELOCATABLE_LIBRARY.
2258         (Makefile.am): Remove lib_SOURCES.
2259         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
2260         always.
2261         * modules/relocatable-prog-wrapper (configure.ac): Invoke
2262         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
2263
2264 2007-03-04  Bruno Haible  <bruno@clisp.org>
2265
2266         * modules/argmatch-tests: New file.
2267         * tests/test-argmatch.c: New file.
2268
2269         * tests/test-allocsa.c (main): Halve the number of loop runs.
2270
2271         * modules/alloca-opt-tests: New file.
2272         * tests/test-alloca-opt.c: New file.
2273
2274 2007-03-04  Jim Meyering  <jim@meyering.net>
2275
2276         Work around difference between Linux ACLs and Solaris 10 ZFS.
2277         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
2278         for EINVAL.
2279
2280 2007-03-03  Bruno Haible  <bruno@clisp.org>
2281
2282         * modules/relocatable-prog (Depends-on): Add back progreloc's
2283         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
2284
2285 2007-03-03  Bruno Haible  <bruno@clisp.org>
2286
2287         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
2288         * modules/relocatable-lib: New file.
2289
2290 2007-03-03  Bruno Haible  <bruno@clisp.org>
2291
2292         * modules/relocatable-prog: Renamed from modules/relocatable.
2293         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
2294
2295 2007-03-03  Bruno Haible  <bruno@clisp.org>
2296
2297         * modules/relocatable-script (Files): Add doc/relocatable.texi,
2298         m4/relocatable-lib.m4.
2299         (Depends-on): Remove 'relocatable'.
2300         (configure.ac): Add gl_RELOCATABLE_NOP.
2301
2302 2007-03-03  Bruno Haible  <bruno@clisp.org>
2303
2304         * modules/relocatable-prog-wrapper: New file.
2305         * modules/relocatable (Depends-on): Add it. Remove all other
2306         dependencies except progname.
2307         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
2308
2309         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
2310         (gl_FUNC_STRERROR): Nop.
2311         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
2312
2313         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
2314         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
2315
2316         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
2317         (gl_FUNC_READLINK): Update.
2318
2319         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
2320
2321 2007-03-03  Bruno Haible  <bruno@clisp.org>
2322
2323         * lib/xreadlink.c: Include <unistd.h> unconditionally.
2324         * modules/xreadlink (Depends-on): Add unistd.
2325         * modules/xreadlink-with-size (Depends-on): Likewise.
2326
2327 2007-03-03  Bruno Haible  <bruno@clisp.org>
2328
2329         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
2330         extracted from gt_FUNC_SETENV.
2331         (gt_FUNC_SETENV): Remove macro.
2332         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
2333         remove gt_FUNC_SETENV.
2334
2335 2007-03-03  Bruno Haible  <bruno@clisp.org>
2336
2337         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
2338         ENABLE_RELOCATABLE here.
2339         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
2340
2341 2007-03-03  Bruno Haible  <bruno@clisp.org>
2342
2343         * modules/rbtreehash-list-tests (Depends-on): Add progname.
2344         * tests/test-rbtreehash_list.c: Include progname.h.
2345         (main): Call set_program_name.
2346
2347         * modules/rbtree-oset-tests (Depends-on): Add progname.
2348         * tests/test-rbtree_oset.c: Include progname.h.
2349         (main): Call set_program_name.
2350
2351         * modules/rbtree-list-tests (Depends-on): Add progname.
2352         * tests/test-rbtree_list.c: Include progname.h.
2353         (main): Call set_program_name.
2354
2355         * modules/linked-list-tests (Depends-on): Add progname.
2356         * tests/test-linked_list.c: Include progname.h.
2357         (main): Call set_program_name.
2358
2359 2007-03-03  Bruno Haible  <bruno@clisp.org>
2360
2361         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
2362         All uses of __restrict changed to _Restrict_.
2363         * lib/glob_.h (__restrict): Remove macro.
2364
2365 2007-03-02  Bruno Haible  <bruno@clisp.org>
2366
2367         * modules/gettext (configure.ac): Require gettext infrastructure
2368         from version 0.16.1.
2369
2370 2007-03-02  Bruno Haible  <bruno@clisp.org>
2371
2372         * modules/linkedhash-list-tests (Depends-on): Add progname.
2373         * tests/test-linkedhash_list.c: Include progname.h.
2374         (main): Call set_program_name.
2375
2376         * modules/carray-list-tests (Depends-on): Add progname.
2377         * tests/test-carray_list.c: Include progname.h.
2378         (main): Call set_program_name.
2379
2380         * modules/avltreehash-list-tests (Depends-on): Add progname.
2381         * tests/test-avltreehash_list.c: Include progname.h.
2382         (main): Call set_program_name.
2383
2384         * modules/avltree-oset-tests (Depends-on): Add progname.
2385         * tests/test-avltree_oset.c: Include progname.h.
2386         (main): Call set_program_name.
2387
2388         * modules/avltree-list-tests (Depends-on): Add progname.
2389         * tests/test-avltree_list.c: Include progname.h.
2390         (main): Call set_program_name.
2391
2392         * modules/array-oset-tests (Depends-on): Add progname.
2393         * tests/test-array_oset.c: Include progname.h.
2394         (main): Call set_program_name.
2395
2396         * modules/array-list-tests (Depends-on): Add progname.
2397         * tests/test-array_list.c: Include progname.h.
2398         (main): Call set_program_name.
2399
2400         * modules/argp-tests (Depends-on): Add progname.
2401         * tests/test-argp.c: Include argp.h first. Include progname.h.
2402         (main): Call set_program_name.
2403
2404 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
2405
2406         * doc/gnulib-tool.texi (Initial import): Reword description of
2407         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
2408         limited effect even if defined after the first system include.
2409
2410 2007-03-01  Bruno Haible  <bruno@clisp.org>
2411
2412         * build-aux/config.libpath: Update to libtool-1.5.22.
2413         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
2414
2415 2007-03-01  Bruno Haible  <bruno@clisp.org>
2416
2417         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
2418         foo_CFLAGS.
2419         Reported by Ralf Wildenhues.
2420
2421 2007-03-01  Bruno Haible  <bruno@clisp.org>
2422
2423         * build-aux/install-reloc: Remove object files left over by some
2424         compilers.
2425         Reported by Ralf Wildenhues.
2426
2427 2007-03-01  Bruno Haible  <bruno@clisp.org>
2428
2429         * build-aux/install-reloc: Break long lines.
2430
2431 2007-03-01  Bruno Haible  <bruno@clisp.org>
2432
2433         * doc/relocatable.texi: Document that it may not work on OpenBSD.
2434         Reported by Ralf Wildenhues.
2435
2436 2007-03-01  Bruno Haible  <bruno@clisp.org>
2437
2438         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
2439         include ordering constraints.
2440
2441 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
2442
2443         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
2444         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
2445         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
2446         as another example.
2447         * lib/time_.h: Fix misspelling.
2448         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
2449         Require gl_HEADER_TIME_H_DEFAULTS.
2450         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
2451         * m4/time_r.m4 (gl_TIME_R): Likewise.
2452         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
2453
2454 2007-03-01  Bruno Haible  <bruno@clisp.org>
2455
2456         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
2457         * m4/utimens.m4 (gl_UTIMENS): Likewise.
2458
2459 2007-03-01  Jim Meyering  <jim@meyering.net>
2460
2461         * modules/xreadlink (Maintainer): Add my name.
2462         * modules/xreadlink-with-size (Depends-on): Alphabetize.
2463
2464 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
2465             Bruno Haible  <bruno@clisp.org>
2466
2467         * build-aux/install-reloc: Compile also c-ctype.c.
2468         * build-aux/relocatable.sh.in: New file.
2469         * doc/relocatable.texi: New file.
2470         * doc/relocatable-maint.texi: New file.
2471         * doc/gnulib.texi: Include relocatable-maint.texi.
2472         * lib/progreloc.c: Include unistd.h unconditionally.
2473         * lib/relocwrapper.c: Include unistd.h unconditionally.
2474         Include c-ctype.h.
2475         (add_dotbin): Use c_tolower.
2476         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
2477         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
2478         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
2479         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
2480         to m4/relocatable-lib.m4.
2481         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
2482         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
2483         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
2484         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
2485         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
2486         * modules/relocatable: New file.
2487         * modules/relocatable-lib: New file.
2488         * modules/relocatable-script: New file.
2489
2490 2007-02-28  Bruno Haible  <bruno@clisp.org>
2491
2492         Import --enable-relocatable infrastructure.
2493         * build-aux/config.libpath: New file, from GNU gettext.
2494         * build-aux/install-reloc: New file, from GNU gettext.
2495         * build-aux/reloc-ldflags: New file, from GNU gettext.
2496         * lib/relocatable.h: New file, from GNU gettext.
2497         * lib/relocatable.c: New file, from GNU gettext.
2498         * lib/relocwrapper.c: New file, from GNU gettext.
2499         * m4/relocatable.m4: New file, from GNU gettext.
2500
2501 2007-02-28  Bruno Haible  <bruno@clisp.org>
2502
2503         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
2504
2505         * modules/xreadlink: New file, from GNU gettext with modifications.
2506         * lib/xreadlink.c: New file, from GNU gettext.
2507         * lib/xreadlink.h: Add comments.
2508         (xreadlink): New declaration.
2509
2510         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
2511         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
2512         lib/xreadlink-with-size.c.
2513         (configure.ac): Remove gl_XREADLINK invocation.
2514         (Makefile.am): Augment lib_SOURCES.
2515         * m4/xreadlink.m4: Remove file.
2516         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
2517         (xreadlink_with_size): Renamed from xreadink.
2518         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
2519         * modules/canonicalize (Depends-on): Replace xreadlink with
2520         xreadlink-with-size.
2521         * lib/canonicalize.c (canonicalize_filename_mode): Update.
2522
2523 2007-02-25  Jim Meyering  <jim@meyering.net>
2524
2525         * build-aux/announce-gen: When complaining about excess arguments,
2526         list them.
2527
2528 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
2529
2530         * README: Document signed integer overflow situation more
2531         accurately.
2532
2533 2007-02-25  Bruno Haible  <bruno@clisp.org>
2534
2535         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
2536         'a' or 'A' conversion.
2537
2538 2007-02-25  Bruno Haible  <bruno@clisp.org>
2539
2540         * modules/filename: Renamed from modules/pathname.
2541         (Files): Replace lib/pathname.h with lib/filename.h. Replace
2542         lib/concatpath.c with lib/concat-filename.c.
2543         (Makefile.am): Update.
2544         (Include): Replace pathname.h with filename.h.
2545         * lib/filename.h: Renamed from lib/pathname.h.
2546         (concatenated_filename): Renamed from concatenated_pathname.
2547         * lib/concat-filename.c: Renamed from lib/concatpath.c.
2548         (concatenated_filename): Renamed from concatenated_pathname.
2549         * lib/findprog.c: Include filename.h instead of pathname.h.
2550         (find_in_path): Update.
2551         * lib/javacomp.c: Include filename.h instead of pathname.h.
2552         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
2553         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
2554         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
2555         is_oldgcj_14_13_usable, is_javac_usable): Update.
2556         * lib/javaexec.c: Include filename.h instead of pathname.h.
2557         (execute_java_class): Update.
2558         * modules/findprog: Update.
2559         * modules/javacomp: Update.
2560         * modules/javaexec: Update.
2561         * MODULES.html.sh (File system functions): Add 'filename', remove
2562         'pathname'.
2563
2564 2007-02-25  Bruno Haible  <bruno@clisp.org>
2565
2566         * modules/printf-frexpl-tests: New file.
2567         * tests/test-printf-frexpl.c: New file.
2568
2569         * modules/printf-frexpl: New file.
2570         * lib/printf-frexpl.h: New file.
2571         * lib/printf-frexpl.c: New file.
2572         * m4/printf-frexpl.m4: New file.
2573
2574 2007-02-25  Bruno Haible  <bruno@clisp.org>
2575
2576         * modules/printf-frexp-tests: New file.
2577         * tests/test-printf-frexp.c: New file.
2578
2579         * modules/printf-frexp: New file.
2580         * lib/printf-frexp.h: New file.
2581         * lib/printf-frexp.c: New file.
2582         * m4/printf-frexp.m4: New file.
2583
2584 2007-02-25  Bruno Haible  <bruno@clisp.org>
2585
2586         Assume automake >= 1.10 for the tests.
2587         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
2588         * modules/arctwo-tests: Likewise.
2589         * modules/argp-tests: Likewise.
2590         * modules/avltree-list-tests: Likewise.
2591         * modules/avltree-oset-tests: Likewise.
2592         * modules/avltreehash-list-tests: Likewise.
2593         * modules/carray-list-tests: Likewise.
2594         * modules/crc-tests: Likewise.
2595         * modules/des-tests: Likewise.
2596         * modules/gc-arcfour-tests: Likewise.
2597         * modules/gc-arctwo-tests: Likewise.
2598         * modules/gc-des-tests: Likewise.
2599         * modules/gc-hmac-md5-tests: Likewise.
2600         * modules/gc-hmac-sha1-tests: Likewise.
2601         * modules/gc-md2-tests: Likewise.
2602         * modules/gc-md4-tests: Likewise.
2603         * modules/gc-md5-tests: Likewise.
2604         * modules/gc-pbkdf2-sha1-tests: Likewise.
2605         * modules/gc-rijndael-tests: Likewise.
2606         * modules/gc-sha1-tests: Likewise.
2607         * modules/gc-tests: Likewise.
2608         * modules/getaddrinfo-tests: Likewise.
2609         * modules/hmac-md5-tests: Likewise.
2610         * modules/hmac-sha1-tests: Likewise.
2611         * modules/linked-list-tests: Likewise.
2612         * modules/linkedhash-list-tests: Likewise.
2613         * modules/lock-tests: Likewise.
2614         * modules/md2-tests: Likewise.
2615         * modules/md4-tests: Likewise.
2616         * modules/md5-tests: Likewise.
2617         * modules/rbtree-list-tests: Likewise.
2618         * modules/rbtree-oset-tests: Likewise.
2619         * modules/rbtreehash-list-tests: Likewise.
2620         * modules/read-file-tests: Likewise.
2621         * modules/rijndael-tests: Likewise.
2622         * modules/stdint-tests: Likewise.
2623         * modules/tls-tests: Likewise.
2624
2625 2007-02-24  Bruno Haible  <bruno@clisp.org>
2626
2627         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
2628         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
2629         function; instead check whether isnan with a double argument links.
2630         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
2631         function; instead check whether isnan with a 'long double' argument
2632         links.
2633         Reported by Eric Blake <ebb9@byu.net>.
2634
2635 2007-02-24  Bruno Haible  <bruno@clisp.org>
2636
2637         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
2638         defined.
2639         * lib/isnanl.c: Remove all code. Just include isnan.c.
2640         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
2641
2642 2007-02-25  Jim Meyering  <jim@meyering.net>
2643
2644         Avoid conflicting types for 'unsetenv' on FreeBSD.
2645         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
2646         conflicting with FreeBSD's (5.0 and 6.1) function declaration
2647         in stdlib.h.
2648
2649 2007-02-24  Bruno Haible  <bruno@clisp.org>
2650
2651         * modules/isnanl-nolibm-tests: New file.
2652         * tests/test-isnanl.c: New file.
2653
2654         * modules/isnanl-nolibm: New file.
2655         * lib/isnanl.h: New file.
2656         * lib/isnanl.c: New file.
2657         * m4/isnanl.m4: New file.
2658
2659 2007-02-24  Bruno Haible  <bruno@clisp.org>
2660
2661         * modules/isnan-nolibm-tests: New file.
2662         * tests/test-isnan.c: New file.
2663
2664         * modules/isnan-nolibm: New file.
2665         * lib/isnan.h: New file.
2666         * lib/isnan.c: New file.
2667         * m4/isnan.m4: New file.
2668
2669 2007-02-24  Bruno Haible  <bruno@clisp.org>
2670
2671         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
2672         assume that an exponent fits in 20 bits.
2673
2674 2007-02-24  Jim Meyering  <jim@meyering.net>
2675
2676         * m4/regex.m4: Update the description of the configure-time option,
2677         --without-included-regex, to state accurately what the defaults are,
2678         and perhaps to give people an idea why using this option is risky.
2679
2680 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
2681
2682         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
2683         loops on small arguments.  This attempts to avoid the problem
2684         Bruno Haible reported for AIX 4.3.2 in
2685         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
2686
2687 2007-02-23  Bruno Haible  <bruno@clisp.org>
2688
2689         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
2690         Needed for help2man.
2691
2692 2007-02-23  Karl Berry  <karl@gnu.org>
2693
2694         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
2695         exists, foo.h should be cvs-ignored, not committed.
2696
2697 2007-02-23  Eric Blake  <ebb9@byu.net>
2698
2699         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
2700         * lib/stat-time.h (includes): Likewise.
2701         * lib/utimecmp.c (includes): Likewise.
2702         * lib/utimens.h (includes): Likewise.
2703         * lib/getdate.y (includes): Also include "timespec.h" for use
2704         internal to the module.
2705         * modules/utimens (Depends-on): Revert yesterday's patch.
2706         * modules/nanosleep (Depends-on): Add missing dependency.
2707
2708 2007-02-22  Bruno Haible  <bruno@clisp.org>
2709
2710         * lib/glob.c: Don't include getlogin_r.h.
2711
2712 2007-02-22  Jim Meyering  <jim@meyering.net>
2713
2714         * modules/utimens (Depends-on): Add timespec, required for
2715         utimens.h's inclusion of timespec.h.
2716
2717 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
2718
2719         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
2720         long unreadable paths in GNU/Linux.  Problem reported by Andreas
2721         Schwab in
2722         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
2723         I'll try to think of a better way to fix the Solaris problem.
2724
2725         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
2726         like glibc; on Solaris 10, it fails with errno == EINVAL.
2727         POSIX says the behavior is unspecified if the first argument is NULL,
2728         so play it safe and never pass NULL to the system getcwd.
2729
2730 2007-02-21  Jim Meyering  <jim@meyering.net>
2731
2732         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
2733         of gettimeofday.  It would conflict with the one now always
2734         provided via sys_time_.h.  Reported by Matthew Woehlke, as
2735         an IRIX 6.5 build failure.
2736
2737 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
2738
2739         Minor fixups to port to Solaris 10 with Sun C 5.8.
2740         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
2741         * modules/getcwd (Depends-on): Add dirfd.
2742         * lib/putenv.c (putenv): #undef it.
2743         (rpl_putenv): New decl.
2744         (malloc, free): Include <stdlib.h> rather than prototyping separately.
2745
2746 2007-02-20  Bruno Haible  <bruno@clisp.org>
2747
2748         * modules/stdio-tests: New file.
2749         * tests/test-stdio.c: New file.
2750
2751         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
2752         (Depends-on): Add stdio.
2753         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
2754         (Include): Use <stdio.h> instead of vsnprintf.h.
2755         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
2756         HAVE_DECL_VSNPRINTF.
2757         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
2758
2759         * modules/snprintf (Files): Remove lib/snprintf.h.
2760         (Depends-on): Add stdio.
2761         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
2762         (Include): Use <stdio.h> instead of snprintf.h.
2763         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
2764         HAVE_DECL_SNPRINTF.
2765         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
2766         * lib/getaddrinfo.c: Likewise.
2767
2768         * modules/stdio: New file.
2769         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
2770         * lib/snprintf.h: Remove file.
2771         * lib/vsnprintf.h: Remove file.
2772         * lib/.cppi-disable: Remove snprintf.h.
2773         * m4/stdio_h.m4: New file.
2774         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
2775
2776 2007-02-20  Jim Meyering  <jim@meyering.net>
2777
2778         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
2779         used by e.g., mingw.  From Bruno Haible.
2780
2781 2007-02-19  Bruno Haible  <bruno@clisp.org>
2782
2783         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
2784         warnings.
2785         Reported by Ben Pfaff <blp@cs.stanford.edu>.
2786
2787 2007-02-19  Bruno Haible  <bruno@clisp.org>
2788
2789         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
2790         from mingw users.
2791
2792 2007-02-19  Bruno Haible  <bruno@clisp.org>
2793
2794         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
2795         warnings.
2796         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
2797
2798 2007-02-19  Jim Meyering  <jim@meyering.net>
2799
2800         Don't use FD after a successful "fdopendir (fd)".
2801         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
2802         Reset it by calling dirfd on the just-obtained DIR*.
2803
2804         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
2805         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
2806
2807 2007-02-18  Bruno Haible  <bruno@clisp.org>
2808
2809         * lib/readlink.c: Include <unistd.h>.
2810         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
2811         HAVE_READLINK.
2812         * modules/readlink (Depends-on): Add unistd.
2813         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2814         (Include): Add <unistd.h>.
2815
2816         * lib/getlogin_r.h: Remove file.
2817         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
2818         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
2819         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
2820         HAVE_DECL_GETLOGIN_R.
2821         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
2822         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2823         (Include): Use <unistd.h> instead of getlogin_r.h.
2824
2825         * lib/getcwd.h: Remove file.
2826         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
2827         * lib/xgetcwd.c: Likewise.
2828         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
2829         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
2830         * modules/getcwd (Files): Remove lib/getcwd.h.
2831         (Depends-on): Add unistd.
2832         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2833         (Include): Use <unistd.h> instad of getcwd.h.
2834
2835         * lib/ftruncate.c: Include <unistd.h> first.
2836         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
2837         Set HAVE_FTRUNCATE.
2838         * modules/ftruncate (Depends-on): Add unistd.
2839         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2840
2841         * lib/fchdir.c: Include <unistd.h> first.
2842         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
2843         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
2844         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
2845         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2846         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
2847
2848         * lib/dup2.c: Include <unistd.h> first.
2849         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
2850         HAVE_DUP2.
2851         * modules/dup2 (Depends-on): Add unistd.
2852         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2853
2854         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
2855         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
2856         REPLACE_CHOWN. Don't define chown as a macro here.
2857         * modules/chown (Depends-on): Add unistd.
2858         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2859
2860         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
2861         Add definition for GL_LINK_WARNING.
2862         (chown, dup2): New declarations.
2863         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
2864         link warning.
2865         (ftruncate): New declaration.
2866         (getcwd): New declaration, taken from old getcwd.h.
2867         (getlogin_r): New declaration, taken from old getlogin_r.h.
2868         (readlink): New declaration.
2869         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
2870         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
2871         (gl_PREREQ_UNISTD): Remove macro.
2872         (gl_UNISTD_MODULE_INDICATOR): New macro.
2873         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
2874         many new variables. Don't set UNISTD_H.
2875         * modules/unistd (Description): Change.
2876         (Depends-on): Add link-warning.
2877         (configure.ac): Update.
2878         (Makefile.am): Create unistd.h always. Substitute many new variables
2879         into it.
2880
2881 2007-02-18  Bruno Haible  <bruno@clisp.org>
2882
2883         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
2884         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
2885         HAVE_GETSUBOPT.
2886         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
2887         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
2888         * lib/getsubopt.h: Remove file.
2889         * modules/getsubopt (Files): Remove lib/getsubopt.h.
2890         (Depends-on): Add stdlib.
2891         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
2892         (Includes): Use <stdlib.h> instead of getsubopt.h.
2893         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
2894         Set HAVE_GETSUBOPT.
2895         * lib/getsubopt.c: Don't include getsubopt.h.
2896
2897 2007-02-18  Bruno Haible  <bruno@clisp.org>
2898
2899         * modules/fchdir (Depends-on): Add dup2.
2900
2901 2007-02-18  Bruno Haible  <bruno@clisp.org>
2902
2903         * lib/stdlib_.h: Handle glibc's special invocation convention
2904         specially.
2905
2906 2007-02-18  Bruno Haible  <bruno@clisp.org>
2907
2908         * modules/stdlib-tests: New file.
2909         * tests/test-stdlib.c: New file.
2910
2911         * modules/mkstemp (Files): Remove lib/mkstemp.h.
2912         (Depends-on): Add stdlib.
2913         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
2914         (Includes): Use <stdlib.h> instead of mkstemp.h.
2915         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
2916         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
2917         * lib/mkstemp.c: Don't include mkstemp.h.
2918         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
2919         * lib/stdlib--.h: Don't include mkstemp.h.
2920
2921         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
2922         (Depends-on): Add stdlib.
2923         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
2924         (Includes): Use <stdlib.h> instead of mkdtemp.h.
2925         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
2926         HAVE_MKDTEMP.
2927         * lib/mkdtemp.c: Don't include mkdtemp.h.
2928         * lib/clean-temp.c: Don't include mkdtemp.h.
2929
2930         * modules/exit (Files): Remove lib/exit.h.
2931         (Depends-on): Add stdlib.
2932         (Makefile.am): Remove lib_SOURCES.
2933         (Include): Use <stdlib.h> instead of exit.h.
2934         * lib/argmatch.c: Don't include exit.h.
2935         * lib/execute.c: Likewise.
2936         * lib/pagealign_alloc.c: Likewise.
2937         * lib/pipe.c: Likewise.
2938         * lib/wait-process.c: Likewise.
2939         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
2940         * lib/exitfail.c: Likewise.
2941         * lib/savewd.c: Likewise.
2942         * lib/xsetenv.c: Likewise.
2943
2944         * modules/stdlib: New file.
2945         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
2946         and extra comments about mkstemp().
2947         * lib/exit.h: Remove file.
2948         * lib/mkdtemp.h: Remove file.
2949         * lib/mkstemp.h: Remove file.
2950         * m4/stdlib_h.m4: New file.
2951         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
2952
2953 2007-02-18  Bruno Haible  <bruno@clisp.org>
2954
2955         * modules/math-tests: New file.
2956         * tests/test-math.c: New file.
2957
2958         * modules/math: New file.
2959         * modules/mathl (Files): Remove lib/mathl.h.
2960         (Depends-on): Add math.
2961         (Makefile.am): Don't mention mathl.h.
2962         (Include): Use <math.h> instead of mathl.h.
2963         * lib/math_.h: New file.
2964         * lib/mathl.h: Remove file.
2965         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
2966         mathl.h.
2967         * lib/asinl.c: Likewise.
2968         * lib/atanl.c: Likewise.
2969         * lib/ceill.c: Likewise.
2970         * lib/cosl.c: Likewise.
2971         * lib/expl.c: Likewise.
2972         * lib/floorl.c: Likewise.
2973         * lib/frexpl.c: Likewise.
2974         * lib/ldexpl.c: Likewise.
2975         * lib/logl.c: Likewise.
2976         * lib/sincosl.c: Likewise.
2977         * lib/sinl.c: Likewise.
2978         * lib/sqrtl.c: Likewise.
2979         * lib/tanl.c: Likewise.
2980         * lib/trigl.c: Likewise.
2981         * m4/math_h.m4: New file.
2982         * MODULES.html.sh (Mathematics): Add math.
2983
2984 2007-02-17  Bruno Haible  <bruno@clisp.org>
2985
2986         * modules/wctype-tests: New file.
2987         * tests/test-wctype.c: New file.
2988
2989         * modules/wchar-tests: New file.
2990         * tests/test-wchar.c: New file.
2991
2992         * modules/unistd-tests: New file.
2993         * tests/test-unistd.c: New file.
2994
2995         * modules/time-tests: New file.
2996         * tests/test-time.c: New file.
2997
2998         * modules/sysexits-tests: New file.
2999         * tests/test-sysexits.c: New file.
3000
3001         * modules/sys_time-tests: New file.
3002         * tests/test-sys_time.c: New file.
3003
3004         * modules/sys_stat-tests: New file.
3005         * tests/test-sys_stat.c: New file.
3006
3007         * modules/sys_socket-tests: New file.
3008         * tests/test-sys_socket.c: New file.
3009
3010         * modules/sys_select-tests: New file.
3011         * tests/test-sys_select.c: New file.
3012
3013         * modules/string-tests: New file.
3014         * tests/test-string.c: New file.
3015
3016         * modules/stdbool-tests: New file.
3017         * tests/test-stdbool.c: New file.
3018
3019         * modules/netinet_in-tests: New file.
3020         * tests/test-netinet_in.c: New file.
3021
3022         * modules/inttypes-tests: New file.
3023         * tests/test-inttypes.c: New file.
3024
3025         * modules/fcntl-tests: New file.
3026         * tests/test-fcntl.c: New file.
3027
3028         * modules/byteswap-tests: New file.
3029         * tests/test-byteswap.c: New file.
3030
3031         * modules/arpa_inet-tests: New file.
3032         * tests/test-arpa_inet.c: New file.
3033
3034 2007-02-17  Bruno Haible  <bruno@clisp.org>
3035
3036         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
3037         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
3038         if the corresponding module is not enabled. Emit link warnings if
3039         the function is used nevertheless.
3040         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
3041         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
3042         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
3043         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
3044         * modules/inttypes (Depends-on): Add link-warning.
3045         (Makefile.am): Copy the contents of build-aux/link-warning.h into
3046         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
3047         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
3048         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
3049         * modules/imaxdiv (configure.ac): Likewise.
3050         * modules/strtoimax (configure.ac): Likewise.
3051         * modules/strtoumax (configure.ac): Likewise.
3052
3053 2007-02-17  Bruno Haible  <bruno@clisp.org>
3054
3055         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
3056         gl_STRING_MODULE_INDICATOR_DEFAULTS.
3057         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
3058         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
3059
3060 2007-02-17  Bruno Haible  <bruno@clisp.org>
3061
3062         * modules/link-warning: New file.
3063         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
3064         * lib/string_.h (GL_LINK_WARNING): Remove definition.
3065         * modules/string (Depends-on): Add link-warning.
3066         (Makefile.am): Copy the contents of build-aux/link-warning.h into
3067         string.h.
3068         * MODULES.html.sh (Support for building libraries and executables): Add
3069         link-warning.
3070
3071 2007-02-17  Bruno Haible  <bruno@clisp.org>
3072
3073         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
3074         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
3075         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
3076         long lines.
3077
3078 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
3079             Bruno Haible  <bruno@clisp.org>
3080
3081         * modules/tmpfile: New file.
3082         * lib/tmpfile.c: New file.
3083         * m4/tmpfile.m4: New file.
3084         * MODULES.html.sh (func_all_modules): New section "Input/output".
3085
3086 2007-02-15  Bruno Haible  <bruno@clisp.org>
3087
3088         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
3089         (supports_delete_on_close): New function.
3090         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
3091
3092 2007-02-14  Bruno Haible  <bruno@clisp.org>
3093
3094         * modules/mbspcasecmp-tests: New file.
3095         * tests/test-mbspcasecmp.sh: New file.
3096         * tests/test-mbspcasecmp.c: New file.
3097
3098         New module mbspcasecmp.
3099         * modules/mbspcasecmp: New file.
3100         * lib/mbspcasecmp.c: New file.
3101         * lib/string_.h (strncasecmp): Change warning message.
3102         (mbspcasecmp): New declaration.
3103         * m4/mbspcasecmp.m4: New file.
3104         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3105         GNULIB_MBSPCASECMP.
3106         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
3107         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
3108
3109 2007-02-14  Bruno Haible  <bruno@clisp.org>
3110
3111         * modules/mbsncasecmp-tests: New file.
3112         * tests/test-mbsncasecmp.sh: New file.
3113         * tests/test-mbsncasecmp.c: New file.
3114
3115         New module mbsncasecmp.
3116         * modules/mbsncasecmp: New file.
3117         * lib/mbsncasecmp.c: New file.
3118         * lib/string_.h (mbsncasecmp): New declaration.
3119         * m4/mbsncasecmp.m4: New file.
3120         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3121         GNULIB_MBSNCASECMP.
3122         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
3123         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
3124
3125 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
3126
3127         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
3128         Verify that it doesn't overlap with our flags.
3129         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
3130         do not have the desired effect in multibyte locales; instead, use
3131         mbscasecmp.
3132         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
3133         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
3134         we don't require GNU fnmatch ourselves (if our users require it, they
3135         should do so explicitly).
3136
3137         Fix regex code so it doesn't rely on strcasecmp.
3138         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
3139         Otherwise, include gnulib's langinfo.h.
3140         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
3141         undesirable behavior in non-C locales.  Instead, rely on localecharset.
3142         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
3143         * modules/regex (FILES): Remove m4/codeset.m4.
3144         (Depends-on): Add localcharset.  Remove strcase.
3145
3146 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3147
3148         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
3149         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
3150
3151 2007-02-13  Bruno Haible  <bruno@clisp.org>
3152
3153         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
3154         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
3155
3156 2007-02-12  Bruno Haible  <bruno@clisp.org>
3157
3158         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
3159         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
3160         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
3161         time warning rather than a link error.
3162
3163 2007-02-12  Bruno Haible  <bruno@clisp.org>
3164
3165         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
3166         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
3167         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
3168
3169 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
3170
3171         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
3172         args, not 2.
3173
3174 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
3175
3176         New module 'time', so that apps can include <time.h> as per
3177         POSIX and GNU instead of separate include files like time_r.h
3178         and timegm.h.  This implementation tries out a simpler approach
3179         for replacing decls in standard include files (as compared to
3180         the string module), somewhat as an experiment.
3181
3182         * config/srclist.txt: Comment out mktime.c for now.
3183         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
3184         since it doesn't apply any more.  Use generic wording instead.
3185         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
3186         'time'.
3187         * lib/time_.h, m4/time_h.m4, modules/time: New files.
3188         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
3189         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
3190         Don't include <sys/types.h>; no longer needed since we assume C89.
3191         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
3192         * lib/strftime.c: Likewise.
3193         * lib/time_r.c: Likewise.
3194         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
3195         * lib/nanosleep.c: Include <time.h> first, to check interface.
3196         * lib/strptime.c: Likewise.
3197         * lib/time_r.c: Likewise.
3198         * lib/timegm.c: Likewise.
3199         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
3200         needed.
3201         * lib/timegm.c: Don't include timegm.h; no longer needed.
3202         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
3203         time.h now handles any problems in that area.
3204         (struct timespec, nanosleep): Remove; time.h now arranges for these.
3205         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
3206         that time.h defines struct timespec.
3207         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
3208         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
3209         handles that.
3210         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
3211         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
3212         needed.  Set REPLACE_LOCALTIME.
3213         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
3214         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
3215         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
3216         nanosleep; time_h.m4 now does that.  Don't require
3217         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
3218         module handles this now.
3219         * modules/getdate (Depends-on): Remove timespec.  Add time.
3220         * modules/nanosleep (Depends-on): Likewise.
3221         * modules/stat-time (Depends-on): Likewise.
3222         * modules/nanosleep (Include): Include time.h, not timespec.h.
3223         * modules/strptime (Files): Remove lib/strptime.h.
3224         (Depends-on): Add extensions, time.
3225         (Include): Include time.h, not strptime.h.
3226         * modules/time_r (Files): Remove lib/time_r.h.
3227         (Depends-on): Add time.
3228         (Include): Include time.h, not time_r.h.
3229         * modules/timegm: Likewise.
3230         * modules/timespec (Description): Now does timespec-related decls
3231         of our own, instead of struct timespec itself.
3232         (Depends-on): Add time; remove extensions.
3233         (Maintainer): Add self.
3234         * modules/utimecmp (Depends-on): Add time; remove timespec.
3235         * modules/utimens (Depends-on): Likewise.
3236         * modules/xnanosleep (Depends-on): Likewise.
3237
3238 2007-02-11  Bruno Haible  <bruno@clisp.org>
3239
3240         * lib/c-strstr.c: Include allocsa.h.
3241         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
3242         * lib/c-strcasestr.c: Include allocsa.h.
3243         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
3244         * lib/strcasestr.c: Include allocsa.h.
3245         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
3246         * lib/mbsstr.c: Include allocsa.h.
3247         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
3248         allocsa/freesa instead of malloc/free.
3249         * lib/mbscasestr.c: Include allocsa.h.
3250         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
3251         allocsa/freesa instead of malloc/free.
3252         * modules/c-strstr (Depends-on): Add allocsa.
3253         * modules/c-strcasestr (Depends-on): Likewise.
3254         * modules/strcasestr (Depends-on): Likewise.
3255         * modules/mbsstr (Depends-on): Likewise.
3256         * modules/mbscasestr (Depends-on): Likewise.
3257
3258 2007-02-11  Bruno Haible  <bruno@clisp.org>
3259
3260         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
3261
3262         * modules/mbsspn-tests: New file.
3263         * tests/test-mbsspn.sh: New file.
3264         * tests/test-mbsspn.c: New file.
3265
3266 2007-02-11  Bruno Haible  <bruno@clisp.org>
3267
3268         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
3269
3270         * modules/mbspbrk-tests: New file.
3271         * tests/test-mbspbrk.sh: New file.
3272         * tests/test-mbspbrk.c: New file.
3273
3274 2007-02-11  Bruno Haible  <bruno@clisp.org>
3275
3276         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
3277         unneeded cast.
3278
3279         * modules/mbscspn-tests: New file.
3280         * tests/test-mbscspn.sh: New file.
3281         * tests/test-mbscspn.c: New file.
3282
3283 2007-02-11  Bruno Haible  <bruno@clisp.org>
3284
3285         * modules/mbscasecmp-tests: New file.
3286         * tests/test-mbscasecmp.sh: New file.
3287         * tests/test-mbscasecmp.c: New file.
3288
3289 2007-02-11  Bruno Haible  <bruno@clisp.org>
3290
3291         Ensure O(n) worst-case complexity of mbscasestr.
3292         * lib/mbscasestr.c: Include stdbool.h.
3293         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
3294         functions.
3295         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
3296         the bookkeeping indicates that it's worth it.
3297         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
3298
3299         * modules/mbscasestr-tests: New file.
3300         * tests/test-mbscasestr1.c: New file.
3301         * tests/test-mbscasestr2.sh: New file.
3302         * tests/test-mbscasestr2.c: New file.
3303         * tests/test-mbscasestr3.sh: New file.
3304         * tests/test-mbscasestr3.c: New file.
3305         * tests/test-mbscasestr4.sh: New file.
3306         * tests/test-mbscasestr4.c: New file.
3307         * m4/locale-tr.m4: New file.
3308
3309 2007-02-11  Bruno Haible  <bruno@clisp.org>
3310
3311         Ensure O(n) worst-case complexity of mbsstr.
3312         * lib/mbsstr.c: Include stdbool.h.
3313         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
3314         functions.
3315         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
3316         bookkeeping indicates that it's worth it.
3317         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
3318
3319         * modules/mbsstr-tests: New file.
3320         * tests/test-mbsstr1.c: New file.
3321         * tests/test-mbsstr2.sh: New file.
3322         * tests/test-mbsstr2.c: New file.
3323         * tests/test-mbsstr3.sh: New file.
3324         * tests/test-mbsstr3.c: New file.
3325         * m4/locale-fr.m4: New file.
3326
3327 2007-02-11  Bruno Haible  <bruno@clisp.org>
3328
3329         * lib/mbsrchr.c (mbsrchr): Fix bug.
3330
3331         * modules/mbsrchr-tests: New file.
3332         * tests/test-mbsrchr.sh: New file.
3333         * tests/test-mbsrchr.c: New file.
3334
3335 2007-02-11  Bruno Haible  <bruno@clisp.org>
3336
3337         * lib/mbschr.c (mbschr): Fix bug.
3338
3339         * modules/mbschr-tests: New file.
3340         * tests/test-mbschr.sh: New file.
3341         * tests/test-mbschr.c: New file.
3342         * m4/locale-zh.m4: New file.
3343
3344 2007-02-11  Bruno Haible  <bruno@clisp.org>
3345
3346         Support for copying multibyte string iterators.
3347         * lib/mbiter.h: Include <string.h>.
3348         (mbiter_multi_copy): New function.
3349         (mbi_copy): New macro.
3350         * lib/mbuiter.h: Include <string.h>.
3351         (mbuiter_multi_copy): New function.
3352         (mbui_copy): New macro.
3353
3354 2007-02-11  Bruno Haible  <bruno@clisp.org>
3355
3356         New module mbslen.
3357         * modules/mbslen: New file.
3358         * lib/mbslen.c: New file.
3359         * lib/string_.h (mbslen): New declaration.
3360         * m4/mbslen.m4: New file.
3361         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3362         GNULIB_MBSLEN.
3363         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
3364         * MODULES.html.sh (Internationalization functions): Add mbslen.
3365
3366 2007-02-11  Bruno Haible  <bruno@clisp.org>
3367
3368         Ensure O(n) worst-case complexity of strcasestr substitute.
3369         * lib/strcasestr.c: Include stdbool.h.
3370         (knuth_morris_pratt): New function.
3371         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
3372         bookkeeping indicates that it's worth it.
3373         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
3374
3375         * modules/strcasestr-tests: New file.
3376         * tests/test-strcasestr.c: New file.
3377
3378 2007-02-11  Bruno Haible  <bruno@clisp.org>
3379
3380         Ensure O(n) worst-case complexity of c_strcasestr.
3381         * lib/c-strcasestr.c: Include stdbool.h, string.h.
3382         (knuth_morris_pratt): New function.
3383         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
3384         the bookkeeping indicates that it's worth it.
3385         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
3386
3387         * modules/c-strcasestr-tests: New file.
3388         * tests/test-c-strcasestr.c: New file.
3389
3390 2007-02-11  Bruno Haible  <bruno@clisp.org>
3391
3392         Ensure O(n) worst-case complexity of c_strstr.
3393         * lib/c-strstr.c: Include stdbool.h, string.h.
3394         (knuth_morris_pratt): New function.
3395         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
3396         bookkeeping indicates that it's worth it.
3397         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
3398
3399         * lib/c-strstr.c: Complete rewrite for maintainability.
3400
3401         * modules/c-strstr-tests: New file.
3402         * tests/test-c-strstr.c: New file.
3403
3404 2007-02-11  Bruno Haible  <bruno@clisp.org>
3405
3406         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
3407         5.2.1 and earlier, whereby \055 was treated just like the range
3408         delimiter '-'.
3409         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
3410
3411 2007-02-08  Bruno Haible  <bruno@clisp.org>
3412
3413         * modules/regex (Depends-on): Add stdbool.
3414         Reported by Dalibor Topic <robilad@kaffe.org>.
3415
3416 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
3417
3418         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
3419         Prefer returning from main to exiting from it.
3420         Remove unnecessary parens after sizeof.
3421
3422 2007-02-05  Bruno Haible  <bruno@clisp.org>
3423
3424         New module mbssep.
3425         * modules/mbssep: New file.
3426         * lib/mbssep.c: New file.
3427         * lib/string_.h (strsep): Add a conditional link warning.
3428         (mbssep): New declaration.
3429         * m4/mbssep.m4: New file.
3430         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3431         GNULIB_MBSSEP.
3432         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
3433         * MODULES.html.sh (Internationalization functions): Add mbssep.
3434
3435 2007-02-05  Bruno Haible  <bruno@clisp.org>
3436
3437         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
3438         Optimize search in case of 1 delimiter.
3439
3440 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
3441
3442         * lib/acl.h: Include sys/types.h before sys/acl.h.
3443
3444 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
3445
3446         Merge upstream fix for glibc bugzilla #3957:
3447
3448         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
3449
3450         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
3451         bit for RE_HAT_LISTS_NOT_NEWLINE.
3452         (build_charclass_op): Remove bogus comment.
3453
3454 2007-02-05  Simon Josefsson  <simon@josefsson.org>
3455
3456         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
3457
3458 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
3459
3460         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
3461         * lib/memmem.c [!defined _LIBC]: Include config.h.
3462
3463 2007-02-04  Bruno Haible  <bruno@clisp.org>
3464
3465         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
3466         warning message.
3467
3468 2007-02-04  Bruno Haible  <bruno@clisp.org>
3469
3470         New module mbstok_r.
3471         * modules/mbstok_r: New file.
3472         * lib/mbstok_r.c: New file.
3473         * lib/string_.h (strtok_r): Change argument names to match the
3474         comments. Add a conditional link warning.
3475         (mbstok_r): New declaration.
3476         * m4/mbstok_r.m4: New file.
3477         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3478         GNULIB_MBSTOK_R.
3479         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
3480         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
3481
3482 2007-02-04  Bruno Haible  <bruno@clisp.org>
3483
3484         New module mbsspn.
3485         * modules/mbsspn: New file.
3486         * lib/mbsspn.c: New file.
3487         * lib/string_.h (strspn): Add a conditional link warning.
3488         (mbsspn): New declaration.
3489         * m4/mbsspn.m4: New file.
3490         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3491         GNULIB_MBSSPN.
3492         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
3493         * MODULES.html.sh (Internationalization functions): Add mbsspn.
3494
3495 2007-02-04  Bruno Haible  <bruno@clisp.org>
3496
3497         New module mbspbrk.
3498         * modules/mbspbrk: New file.
3499         * lib/mbspbrk.c: New file.
3500         * lib/string_.h (strpbrk): Add a conditional link warning.
3501         (mbspbrk): New declaration.
3502         * m4/mbspbrk.m4: New file.
3503         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3504         GNULIB_MBSPBRK.
3505         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
3506         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
3507
3508 2007-02-04  Bruno Haible  <bruno@clisp.org>
3509
3510         New module mbscspn.
3511         * modules/mbscspn: New file.
3512         * lib/mbscspn.c: New file.
3513         * lib/string_.h (strcspn): Add a conditional link warning.
3514         (mbscspn): New declaration.
3515         * m4/mbscspn.m4: New file.
3516         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3517         GNULIB_MBSCSPN.
3518         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
3519         * MODULES.html.sh (Internationalization functions): Add mbscspn.
3520
3521 2007-02-04  Bruno Haible  <bruno@clisp.org>
3522
3523         New module mbscasestr, reduced goal of strcasestr.
3524         * modules/mbscasestr: New file.
3525         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
3526         (mbscasestr): Renamed from strcasestr.
3527         * lib/strcasestr.c: Don't include mbuiter.h.
3528         (strcasestr): Remove support for multibyte locales.
3529         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
3530         Change the conditional link warning.
3531         (mbscasestr): New declaration.
3532         * m4/mbscasestr.m4: New file.
3533         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
3534         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
3535         REPLACE_STRCASESTR.
3536         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
3537         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
3538         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
3539         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
3540         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
3541         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
3542         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
3543         (Depends-on): Remove mbuiter.
3544         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
3545
3546 2007-02-04  Bruno Haible  <bruno@clisp.org>
3547
3548         Simplify handling of strncasecmp.
3549         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
3550         the conditional link warning.
3551         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
3552         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
3553         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
3554         * modules/strcase (configure.ac): Don't invoke
3555         gl_STRING_MODULE_INDICATOR.
3556         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
3557
3558 2007-02-04  Bruno Haible  <bruno@clisp.org>
3559
3560         New module mbscasecmp, reduced goal of strcasecmp.
3561         * modules/mbscasecmp: New file.
3562         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
3563         (mbscasecmp): Renamed from strcasecmp.
3564         * lib/strcasecmp.c: Don't include mbuiter.h.
3565         (strcasecmp): Remove support for multibyte locales.
3566         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
3567         Change the conditional link warning.
3568         (mbscasecmp): New declaration.
3569         * m4/mbscasecmp.m4: New file.
3570         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
3571         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
3572         REPLACE_STRCASECMP.
3573         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
3574         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3575         GNULIB_MBSCASECMP.
3576         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
3577         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
3578         * modules/strcase (Files): Remove m4/mbrtowc.m4.
3579         (Depends-on): Remove mbuiter.
3580         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
3581
3582 2007-02-04  Bruno Haible  <bruno@clisp.org>
3583
3584         New module mbsstr. Remove module strstr.
3585         * modules/mbsstr: New file.
3586         * modules/strstr: Remove file.
3587         * lib/mbsstr.c: Renamed from lib/strstr.c.
3588         (mbsstr): Renamed from strstr.
3589         * lib/string_.h (strstr): Remove declaration. Change the conditional
3590         link warning.
3591         (mbsstr): New declaration.
3592         * m4/mbsstr.m4: New file.
3593         * m4/strstr.m4: Remove file.
3594         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
3595         REPLACE_STRSTR.
3596         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
3597         Don't initialize GNULIB_STRSTR.
3598         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
3599         substitute GNULIB_STRSTR and REPLACE_STRSTR.
3600         * MODULES.html.sh (Internationalization functions): Add mbsstr.
3601         (Support for systems lacking ANSI C 89): Remove strstr.
3602
3603 2007-02-04  Bruno Haible  <bruno@clisp.org>
3604
3605         New module mbsrchr.
3606         * modules/mbsrchr: New file.
3607         * lib/mbsrchr.c: New file.
3608         * lib/string_.h (strrchr): Add a conditional link warning.
3609         (mbsrchr): New declaration.
3610         * m4/mbsrchr.m4: New file.
3611         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3612         GNULIB_MBSRCHR.
3613         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
3614         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
3615
3616 2007-02-04  Bruno Haible  <bruno@clisp.org>
3617
3618         New module mbschr.
3619         * modules/mbschr: New file.
3620         * lib/mbschr.c: New file.
3621         * lib/string_.h (strchr): Add a conditional link warning.
3622         (mbschr): New declaration.
3623         * m4/mbschr.m4: New file.
3624         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3625         GNULIB_MBSCHR.
3626         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
3627         * MODULES.html.sh (Internationalization functions): Add mbschr.
3628
3629 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
3630
3631         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
3632
3633         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
3634
3635 2007-02-04  Bruno Haible  <bruno@clisp.org>
3636
3637         New module description section 'configure.ac-early'.
3638         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
3639         (func_get_autoconf_early_snippet): New function.
3640         (func_import, func_create_testdir): Use it. Remove special cases for
3641         modules 'extensions' and 'lock'.
3642         * modules/extensions (configure.ac-early): Require
3643         gl_USE_SYSTEM_EXTENSIONS.
3644         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
3645
3646 2007-02-04  Bruno Haible  <bruno@clisp.org>
3647
3648         Make use of gcj-4.3's -fsource and -ftarget option.
3649         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
3650         and if so try the options -fsource and -ftarget.
3651         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
3652         source_version, ftarget_option, target_version arguments.
3653         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
3654         (is_envjavac_oldgcj_14_14_usable): Renamed from
3655         is_envjavac_gcj_14_14_usable.
3656         (is_envjavac_oldgcj_14_13_usable): Renamed from
3657         is_envjavac_gcj_14_13_usable.
3658         (is_gcj_present): Update.
3659         (is_gcj_43, is_gcj43_usable): New functions.
3660         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
3661         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
3662         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
3663         try the options -fsource and -ftarget.
3664
3665 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
3666
3667         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
3668         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
3669         larger value.
3670
3671 2007-02-03  Jim Meyering  <jim@meyering.net>
3672
3673         Give tools a better chance to allocate space for very large buffers.
3674         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
3675
3676         Make pwd and readlink work also when run with an unreadable parent dir
3677         on systems with openat support.
3678         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
3679         provided getcwd function, even when we have openat support.
3680         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
3681
3682 2007-02-02  Bruno Haible  <bruno@clisp.org>
3683
3684         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
3685         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
3686         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
3687         portability problems if one of these functions is only used on specific
3688         platforms.
3689         Reported by Paul Eggert.
3690
3691 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
3692
3693         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
3694         is causing more trouble than it's curing.
3695         * lib/regex_internal.h (__mempcpy): Remove.
3696         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
3697         (and make the code a tad smaller to boot).
3698         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
3699
3700 2007-02-02  Jim Meyering  <jim@meyering.net>
3701
3702         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
3703         section, not in the Makefile.am: one.
3704
3705 2007-02-02  Eric Blake  <ebb9@byu.net>
3706
3707         * lib/strchrnul.c: Always include config.h first.
3708
3709         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
3710         gnulib strstr is not necessary here.
3711
3712 2007-02-02  Simon Josefsson  <simon@josefsson.org>
3713
3714         * m4/socklen.m4: Fix typo.
3715
3716 2007-02-02  Eric Blake  <ebb9@byu.net>
3717
3718         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
3719         * modules/netinet_in (Makefile.am): Likewise.
3720
3721 2007-02-01  Bruno Haible  <bruno@clisp.org>
3722
3723         * lib/string_.h (GL_LINK_WARNING): New macro.
3724         (strcasecmp, strstr, strcasestr): If provided by the system,
3725         conditionally define as a macro that leads to a warning instead of to
3726         an error.
3727         (strncasecmp): Conditionally define as a macro that leads to a warning.
3728
3729 2007-02-01  Karl Berry  <karl@gnu.org>
3730
3731         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
3732
3733 2007-02-01  Bruno Haible  <bruno@clisp.org>
3734
3735         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
3736         renamings.
3737
3738 2007-02-01  Eric Blake  <ebb9@byu.net>
3739
3740         * modules/regex (Depends-on): Revert dependence on mempcpy.
3741         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
3742         module's definition of mempcpy.
3743         Reported by Paul Eggert.
3744
3745 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
3746
3747         * lib/string_.h: If the gnulib module XYZ is not present, undefine
3748         the symbol XYZ before redefining it.  This fixes a problem with
3749         programs that don't use XYZ, when compiled on systems that define
3750         XYZ to something else.
3751
3752 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
3753
3754         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
3755         occurs when "mkdir -m foo" creates a setgid directory that is (1)
3756         writeable to group or other and (2) is intended to have a special
3757         mode bit that is set or cleared.  In such a case, the directory
3758         should be neither group- nor other-writeable until the special
3759         mode bits are right.
3760
3761 2007-01-31  Eric Blake  <ebb9@byu.net>
3762
3763         * modules/mountlist (Depends-on): Add strstr.
3764
3765         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
3766         bug.
3767         * modules/string (Makefile.am): Remove redundant replacement.
3768         * modules/regex (Depends-on): Add mempcpy.
3769
3770 2007-01-31  Bruno Haible  <bruno@clisp.org>
3771
3772         New module description field 'Link'.
3773         * gnulib-tool (func_usage): Document --extract-link-directive.
3774         (sed_extract_prog): Recognize 'Link' directive.
3775         (func_get_link_directive): New function.
3776         (func_import): Show summary of link directives.
3777         Handle --extract-link-directive option.
3778         * modules/acl (Link): New section.
3779         * modules/clock-time (Link): New section.
3780         * modules/euidaccess (Link): New section.
3781         * modules/gettext (Link): New section.
3782         * modules/iconv (Link): New section.
3783         * modules/lock (Link): New section.
3784         * modules/nanosleep (Link): New section.
3785         * modules/readline (Link): New section.
3786
3787 2007-01-27  Bruno Haible  <bruno@clisp.org>
3788
3789         Enforce the use of gnulib modules for unportable <string.h> functions.
3790         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
3791         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
3792         (gl_HEADER_STRING_H_BODY): Require it.
3793         * lib/string_.h: If the gnulib module XYZ is not present, redefine
3794         the symbol XYZ to one that gives a link error.
3795         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
3796         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
3797         * modules/mempcpy (configure.ac): Likewise.
3798         * modules/memrchr (configure.ac): Likewise.
3799         * modules/stpcpy (configure.ac): Likewise.
3800         * modules/stpncpy (configure.ac): Likewise.
3801         * modules/strcase (configure.ac): Likewise.
3802         * modules/strcasestr (configure.ac): Likewise.
3803         * modules/strchrnul (configure.ac): Likewise.
3804         * modules/strdup (configure.ac): Likewise.
3805         * modules/strndup (configure.ac): Likewise.
3806         * modules/strnlen (configure.ac): Likewise.
3807         * modules/strpbrk (configure.ac): Likewise.
3808         * modules/strsep (configure.ac): Likewise.
3809         * modules/strstr (configure.ac): Likewise.
3810         * modules/strtok_r (configure.ac): Likewise.
3811
3812 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
3813
3814         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
3815
3816 2007-01-30  Jim Meyering  <jim@meyering.net>
3817
3818         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
3819
3820 2007-01-29  Bruno Haible  <bruno@clisp.org>
3821
3822         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
3823         * lib/execute.c: Likewise.
3824         * lib/pipe.c: Likewise.
3825         * lib/printf-args.h: Likewise.
3826         * lib/printf-args.c: Likewise.
3827         * lib/printf-parse.c: Likewise.
3828         * lib/vasnprintf.c: Likewise.
3829
3830 2007-01-29  Eric Blake  <ebb9@byu.net>
3831
3832         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
3833         declaration.
3834
3835 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
3836
3837         * lib/strptime.h (strptime): Use 'restrict' for args where
3838         POSIX requires this.
3839         * lib/strptime.c (strptime): Likewise.
3840         Change license notice from LGPL to GPL, since gnulib-tool will
3841         change this as needed.
3842         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
3843         defined.
3844         Include "strptime.h" first, to check interface.
3845         Do not #undef _LIBC and _NL_CURRENT.
3846         Do not include <stdlib.h>; no longer needed.
3847         Include "time_r.h" and declare ptime_locale_status
3848         only if _LIBC is not defined.
3849         (__P): Remove unused macro.
3850         (match_string): Bring back glibc version, but use it only if _LIBC
3851         is defined.
3852         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
3853         Remove unnecessary assertion and abort() call.
3854         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
3855         * m4/strptime.m4: Fix serial number comment.
3856         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
3857         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
3858         (Depends-on): Add time_r.
3859
3860 2007-01-29  Bruno Haible  <bruno@clisp.org>
3861
3862         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
3863         strptime.
3864         * modules/strptime (Depends-on): Add stdbool.
3865         * lib/strptime.h: Include <time.h> always. Add comments.
3866
3867 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
3868
3869         * modules/strptime: New file.
3870         * lib/strptime.h: New file.
3871         * lib/strptime.c: New file.
3872         * m4/strptime.m4: New file.
3873
3874 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
3875
3876         * MODULES.html.sh: New module mpsort.
3877         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
3878
3879         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
3880         a circularity problem with HP-UX ia64 reported by Bob Proulx in
3881         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
3882         All uses changed.
3883         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
3884         All uses changed.
3885         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
3886         to _Restrict_.
3887         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
3888         the parameter matches the prototype.
3889
3890 2007-01-28  Jim Meyering  <jim@meyering.net>
3891
3892         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
3893         sys/time.h here, reverting that part of the previous patch:
3894         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
3895
3896 2007-01-28  Bruno Haible  <bruno@clisp.org>
3897
3898         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
3899         value of $(SYS_TIME_H).
3900         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
3901         remove it conditionally, too. [added by Jim Meyering]
3902         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
3903         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
3904         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
3905         GETTIMEOFDAY_REPLACEMENT to 1.
3906
3907 2007-01-28  Bruno Haible  <bruno@clisp.org>
3908
3909         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
3910         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
3911         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
3912         Set UNISTD_H instead of UNISTD_H2.
3913         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
3914
3915 2007-01-28  Bruno Haible  <bruno@clisp.org>
3916
3917         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
3918         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
3919
3920 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3921
3922         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
3923         (func_create_testdir): Ensure C locale for `grep' and `tr'
3924         character ranges.
3925         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
3926         ACLOCAL_AMFLAGS parsing state machine.
3927
3928 2007-01-27  Bruno Haible  <bruno@clisp.org>
3929
3930         * modules/unistr/base: Update.
3931
3932 2007-01-27  Bruno Haible  <bruno@clisp.org>
3933
3934         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
3935         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
3936         * modules/unistr/u32-mbtouc-unsafe: Renamed from
3937         modules/unistr/u32-mbtouc.
3938         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
3939         * lib/unistr.h: Update.
3940         * lib/linebreak.c: Update.
3941         * modules/unistr/u32-mbtouc: Renamed from
3942         modules/unistr/u32-mbtouc-safe.
3943         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
3944         * lib/unistr.h: Update.
3945         * lib/unistr/u32-to-u8.c: Update.
3946         * lib/unistr/u32-to-u16.c: Update.
3947
3948 2007-01-27  Bruno Haible  <bruno@clisp.org>
3949
3950         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
3951         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
3952         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
3953         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
3954         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
3955         * modules/unistr/u16-mbtouc-unsafe: Renamed from
3956         modules/unistr/u16-mbtouc.
3957         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
3958         * lib/unistr.h: Update.
3959         * lib/linebreak.c: Update.
3960         * modules/linebreak: Update.
3961         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
3962         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
3963         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
3964         * modules/unistr/u16-mbtouc: Renamed from
3965         modules/unistr/u16-mbtouc-safe.
3966         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
3967         * lib/unistr.h: Update.
3968         * lib/unistr/u16-to-u8.c: Update.
3969         * modules/unistr/u16-to-u8: Update.
3970         * lib/unistr/u16-to-u32.c: Update.
3971         * modules/unistr/u16-to-u32: Update.
3972
3973 2007-01-27  Bruno Haible  <bruno@clisp.org>
3974
3975         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
3976         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
3977         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
3978         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
3979         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
3980         * modules/unistr/u8-mbtouc-unsafe: Renamed from
3981         modules/unistr/u8-mbtouc.
3982         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
3983         * lib/unistr.h: Update.
3984         * lib/striconveh.c: Update.
3985         * modules/striconveh: Update.
3986         * lib/linebreak.c: Update.
3987         * modules/linebreak: Update.
3988         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
3989         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
3990         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
3991         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
3992         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
3993         * lib/unistr.h: Update.
3994         * lib/striconveh.c: Update.
3995         * modules/striconveh: Update.
3996         * lib/unistr/u8-to-u16.c: Update.
3997         * modules/unistr/u8-to-u16: Update.
3998         * lib/unistr/u8-to-u32.c: Update.
3999         * modules/unistr/u8-to-u32: Update.
4000
4001 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4002
4003         Sync from Libtool.
4004         * lib/argz.c: Do not include strings.h nor memory.h, include
4005         string.h unconditionally.  Patch by Simon Josefsson.
4006
4007 2007-01-27  Bruno Haible  <bruno@clisp.org>
4008
4009         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
4010         from gl_HEADER_STRING_H_BODY.
4011         (gl_HEADER_STRING_H_BODY): Require it.
4012         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
4013         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
4014         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
4015         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
4016         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
4017         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
4018         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
4019         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
4020         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
4021         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
4022         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
4023         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
4024         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
4025         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
4026         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
4027
4028 2007-01-27  Bruno Haible  <bruno@clisp.org>
4029
4030         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
4031         check_PROGRAMS into noinst_PROGRAMS.
4032         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
4033         check_PROGRAMS in this case.
4034         (func_import): Set for_test to false.
4035         (func_create_testdir): Set for_test to true.
4036
4037 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
4038             Bruno Haible  <bruno@clisp.org>
4039
4040         * modules/strcasestr (Files): Remove lib/strcasestr.h.
4041         (Depends-on): Add string.
4042         (Includes): Use <string.h> instead of strcasestr.h.
4043         * modules/string (Makefile.am): Also substitute the value of
4044         REPLACE_STRCASESTR.
4045         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
4046         assume strcasestr is declared in <string.h> not <strings.h>. Also
4047         set REPLACE_STRCASESTR.
4048         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
4049         REPLACE_STRCASESTR.
4050         * lib/strcasestr.h: Remove file.
4051         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
4052         * lib/string_.h (strcasestr): New declaration.
4053
4054 2007-01-27  Bruno Haible  <bruno@clisp.org>
4055
4056         * lib/string_.h: Use 'extern'.
4057
4058 2007-01-27  Jim Meyering  <jim@meyering.net>
4059
4060         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
4061         of set-but-not-used local, "q".
4062
4063         * lib/mempcpy.c: Include <config.h> before <string.h>.
4064         This fixes a compilation error on HP-UX, due to the system's
4065         "restrict"-using mempcpy prototype.
4066
4067 2007-01-26  Bruno Haible  <bruno@clisp.org>
4068
4069         Small optimization.
4070         * lib/javacomp.c: Include c-strstr.h.
4071          (is_envjavac_gcj): Use c_strstr instead of strstr.
4072         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
4073
4074 2007-01-26  Bruno Haible  <bruno@clisp.org>
4075
4076         * MODULES.html.sh (Unicode string functions): Add the new modules.
4077
4078         * modules/uniconv/u32-strconv-to-locale: New file.
4079         * lib/uniconv/u32-strconv-to-locale.c: New file.
4080
4081         * modules/uniconv/u16-strconv-to-locale: New file.
4082         * lib/uniconv/u16-strconv-to-locale.c: New file.
4083
4084         * modules/uniconv/u8-strconv-to-locale: New file.
4085         * lib/uniconv/u8-strconv-to-locale.c: New file.
4086
4087         * modules/uniconv/u32-strconv-from-locale: New file.
4088         * lib/uniconv/u32-strconv-from-locale.c: New file.
4089
4090         * modules/uniconv/u16-strconv-from-locale: New file.
4091         * lib/uniconv/u16-strconv-from-locale.c: New file.
4092
4093         * modules/uniconv/u8-strconv-from-locale: New file.
4094         * lib/uniconv/u8-strconv-from-locale.c: New file.
4095
4096         * modules/uniconv/u32-strconv-to-enc: New file.
4097         * lib/uniconv/u32-strconv-to-enc.c: New file.
4098         * modules/uniconv/u32-strconv-to-enc-tests: New file.
4099         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
4100
4101         * modules/uniconv/u16-strconv-to-enc: New file.
4102         * lib/uniconv/u16-strconv-to-enc.c: New file.
4103         * lib/uniconv/u-strconv-to-enc.h: New file.
4104         * modules/uniconv/u16-strconv-to-enc-tests: New file.
4105         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
4106
4107         * modules/uniconv/u8-strconv-to-enc: New file.
4108         * lib/uniconv/u8-strconv-to-enc.c: New file.
4109         * modules/uniconv/u8-strconv-to-enc-tests: New file.
4110         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
4111
4112         * modules/uniconv/u32-strconv-from-enc: New file.
4113         * lib/uniconv/u32-strconv-from-enc.c: New file.
4114         * modules/uniconv/u32-strconv-from-enc-tests: New file.
4115         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
4116
4117         * modules/uniconv/u16-strconv-from-enc: New file.
4118         * lib/uniconv/u16-strconv-from-enc.c: New file.
4119         * modules/uniconv/u16-strconv-from-enc-tests: New file.
4120         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
4121
4122         * modules/uniconv/u8-strconv-from-enc: New file.
4123         * lib/uniconv/u8-strconv-from-enc.c: New file.
4124         * lib/uniconv/u-strconv-from-enc.h: New file.
4125         * modules/uniconv/u8-strconv-from-enc-tests: New file.
4126         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
4127
4128         * modules/uniconv/u32-conv-from-enc: New file.
4129         * lib/uniconv/u32-conv-from-enc.c: New file.
4130         * modules/uniconv/u32-conv-from-enc-tests: New file.
4131         * tests/uniconv/test-u32-conv-from-enc.c: New file.
4132
4133         * modules/uniconv/u16-conv-from-enc: New file.
4134         * lib/uniconv/u16-conv-from-enc.c: New file.
4135         * lib/uniconv/u-conv-from-enc.h: New file.
4136         * modules/uniconv/u16-conv-from-enc-tests: New file.
4137         * tests/uniconv/test-u16-conv-from-enc.c: New file.
4138
4139         * modules/uniconv/u8-conv-from-enc: New file.
4140         * lib/uniconv/u8-conv-from-enc.c: New file.
4141         * modules/uniconv/u8-conv-from-enc-tests: New file.
4142         * tests/uniconv/test-u8-conv-from-enc.c: New file.
4143
4144         * modules/uniconv/base: New file.
4145         * lib/uniconv.h: New file.
4146
4147 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
4148
4149         * doc/gnulib-tool.texi (Initial import): Update to match current
4150         behavior with strdup module.
4151         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
4152         * lib/memmem.h: Remove; all uses removed.  This is now done
4153         by <string.h>.
4154         * lib/mempcpy.h: Likewise.
4155         * lib/memrchr.h: Likewise.
4156         * lib/stpcpy.h: Likewise.
4157         * lib/stpncpy.h: Likewise.
4158         * lib/strcase.h: Likewise.
4159         * lib/strchrnul.h: Likewise.
4160         * lib/strdup.h: Likewise.
4161         * lib/strndup.h: Likewise.
4162         * lib/strnlen.h: Likewise.
4163         * lib/strpbrk.h: Likewise.
4164         * lib/strsep.h: Likewise.
4165         * lib/strstr.h: Likewise.
4166         * lib/strtok_r.h: Likewise.
4167         * lib/string_.h: New file.
4168         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
4169         Rely on <string.h> instead.
4170         * lib/canon-host.c: Likewise.
4171         * lib/chdir-long.c: Likewise.
4172         * lib/concatpath.c: Likewise.
4173         * lib/exclude.c: Likewise.
4174         * lib/fchdir.c: Likewise.
4175         * lib/getaddrinfo.c: Likewise.
4176         * lib/getcwd.c: Likewise.
4177         * lib/getsubopt.c: Likewise.
4178         * lib/glob.c: Likewise.
4179         * lib/hard-locale.c: Likewise.
4180         * lib/iconvme.c: Likewise.
4181         * lib/javacomp.c: Likewise.
4182         * lib/mempcpy.c: Likewise.
4183         * lib/memrchr.c: Likewise.
4184         * lib/regex_internal.h: Likewise.
4185         * lib/stpncpy.c: Likewise.
4186         * lib/strcasecmp.c: Likewise.
4187         * lib/strchrnul.c: Likewise.
4188         * lib/strdup.c: Likewise.
4189         * lib/striconv.c: Likewise.
4190         * lib/striconveh.c: Likewise.
4191         * lib/striconveha.c: Likewise.
4192         * lib/strncasecmp.c: Likewise.
4193         * lib/strndup.c: Likewise.
4194         * lib/strnlen.c: Likewise.
4195         * lib/strsep.c: Likewise.
4196         * lib/strstr.c: Likewise.
4197         * lib/strtok_r.c: Likewise.
4198         * lib/userspec.c: Likewise.
4199         * lib/w32spawn.h: Likewise.
4200         * lib/xstrndup.c: Likewise.
4201         * lib/mountlist.c (strstr): Remove decl.
4202         * m4/string_h.m4: New file.
4203         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
4204         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
4205         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
4206         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
4207         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
4208         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
4209         Set REPLACE_STRCASECMP if necessary.
4210         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
4211         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
4212         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
4213         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
4214         HAVE_DECL_STRDUP if necessary.
4215         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
4216         since gl_FUNC_STRNDUP does that now.
4217         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
4218         Check for decl here...
4219         (gl_PREREQ_STRNLEN): ... not here.
4220         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
4221         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
4222         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
4223         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
4224         necessary.
4225         * modules/string: New file.
4226         * modules/memmem (Files): Remove special-purpose include file.
4227         (Depends-on): Add string.
4228         (Include): Include <string.h>, not the removed file.
4229         * modules/mempcpy: Likewise.
4230         * modules/memrchr: Likewise.
4231         * modules/stpcpy: Likewise.
4232         * modules/stpncpy: Likewise.
4233         * modules/strcase: Likewise.
4234         * modules/strchrnul: Likewise.
4235         * modules/strdup: Likewise.
4236         * modules/strndup: Likewise.
4237         * modules/strnlen: Likewise.
4238         * modules/strpbrk: Likewise.
4239         * modules/strsep: Likewise.
4240         * modules/strstr: Likewise.
4241         * modules/strtok_r: Likewise.
4242         * tests/test-dirname.c: Don't include "strdup.h", since
4243         <string.h> now suffices.
4244         * tests/test-memmem.c: Don't include "memmem.h", since
4245         <string.h> now suffices.
4246
4247 2007-01-25  Bruno Haible  <bruno@clisp.org>
4248
4249         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
4250         *resultp is 0.
4251
4252         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
4253         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
4254         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
4255         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
4256
4257         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
4258         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
4259         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
4260         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
4261         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
4262         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
4263
4264 2007-01-24  Bruno Haible  <bruno@clisp.org>
4265
4266         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
4267         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
4268         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
4269         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
4270         gl_FUNC_FTS_CORE.
4271         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
4272         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
4273         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
4274         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
4275         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
4276         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
4277         gl_FUNC_FCHOWNAT.
4278         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
4279         gl_FUNC_STRFTIME.
4280         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
4281         Reported by Ralf Wildenhues.
4282
4283 2007-01-24  Bruno Haible  <bruno@clisp.org>
4284
4285         Drop AC_REQUIRE calls that are redundant with the module dependencies.
4286         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
4287         gl_GETADDRINFO.
4288         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
4289         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
4290         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
4291
4292 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
4293
4294         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
4295         Don't use 'exit'; just return from 'main'.
4296         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
4297
4298         * lib/fnmatch_.h: Readjust white space and comments to match
4299         glibc, to avoid spurious diffs.
4300
4301 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
4302
4303         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
4304         2004-12-01 change by Jakub Jelinek, since this code won't compile
4305         if !LIBC.  Problem reported by Bob Proulx.
4306
4307 2007-01-23  Bruno Haible  <bruno@clisp.org>
4308
4309         * lib/striconveh.c: Include c-strcaseeq.h.
4310         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
4311         * modules/striconveh (Depends-on): Add c-strcaseeq.
4312
4313 2007-01-23  Bruno Haible  <bruno@clisp.org>
4314
4315         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
4316
4317         * modules/c-strcaseeq: New file.
4318         * lib/c-strcaseeq.h: New file.
4319
4320         * modules/streq: New file.
4321         * lib/streq.h: New file.
4322
4323 2007-01-23  Bruno Haible  <bruno@clisp.org>
4324
4325         * modules/striconveha-tests: New file.
4326         * tests/test-striconveha.c: New file.
4327
4328         * lib/striconveha.h: Include <stdbool.h>.
4329         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
4330         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
4331         (mem_iconveha_notranslit): Renamed from mem_iconveha.
4332         (mem_iconveha): New function.
4333         (str_iconveha_notranslit): Renamed from str_iconveha.
4334         (str_iconveha): New function.
4335         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
4336         c-strcase.
4337
4338 2007-01-23  Bruno Haible  <bruno@clisp.org>
4339
4340         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
4341         encodings without forgiving before trying any encoding with handler.
4342         (str_iconveha): Try all encodings without forgiving before trying any
4343         encoding with handler.
4344
4345 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
4346
4347         Import the following changes from libc.
4348
4349         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
4350
4351         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
4352
4353         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
4354
4355         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
4356         normal_bracket label.
4357
4358         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
4359
4360         [BZ #361]
4361         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
4362         to normal_bracket after fetching the next character.
4363
4364 2007-01-22  Bruno Haible  <bruno@clisp.org>
4365
4366         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
4367         argument.
4368         * lib/striconveh.c (iconv_carefully_1): New function.
4369         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
4370         argument.
4371         (str_cd_iconveh): Update.
4372         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
4373         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
4374         * tests/test-striconveh.c (MAGIC): New macro.
4375         (new_offsets): New function.
4376         (main): Test call with and without offsets.
4377
4378 2007-01-22  Bruno Haible  <bruno@clisp.org>
4379
4380         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
4381         * modules/sys_select (Makefile.am): Likewise.
4382         * modules/sys_socket (Makefile.am): Likewise.
4383         * modules/sys_time (Makefile.am): Likewise.
4384
4385 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
4386
4387         * modules/gettimeofday (License): Change from GPL to LGPL, since
4388         gettimeofday is a library function.
4389
4390 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4391
4392         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
4393
4394 2007-01-21  Bruno Haible  <bruno@clisp.org>
4395
4396         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
4397
4398 2007-01-21  Bruno Haible  <bruno@clisp.org>
4399
4400         * modules/striconveha: New file.
4401         * lib/striconveha.h: New file.
4402         * lib/striconveha.c: New file.
4403         * MODULES.html.sh (Internationalization functions): Add striconveha.
4404         * lib/striconv.c (str_iconv): Optimize the case of an empty input
4405         string.
4406         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
4407
4408 2007-01-21  Bruno Haible  <bruno@clisp.org>
4409
4410         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
4411         * lib/striconveh.c (str_iconveh): Likewise.
4412
4413 2007-01-21  Bruno Haible  <bruno@clisp.org>
4414
4415         * lib/striconveh.h (mem_iconveh): New declaration.
4416         * lib/striconveh.c (mem_iconveh): New function.
4417         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
4418
4419 2007-01-21  Bruno Haible  <bruno@clisp.org>
4420
4421         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
4422
4423         * lib/striconveh.h (mem_cd_iconveh): Change specification.
4424         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
4425         original result buffer.
4426         (str_cd_iconveh): Update.
4427         * tests/test-striconveh.c (main): Update.
4428
4429         * lib/striconv.h (mem_cd_iconv): Change specification.
4430         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
4431         result buffer.
4432         (str_cd_iconv): Update.
4433         * tests/test-striconv.c (main): Update.
4434
4435 2007-01-21  Bruno Haible  <bruno@clisp.org>
4436
4437         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
4438
4439 2007-01-20  Jim Meyering  <jim@meyering.net>
4440
4441         * lib/userspec.c (parse_with_separator): If a user or group string
4442         starts with "+", skip the corresponding name-to-ID look-up, since
4443         such a look-up must fail: user and group names may not include "+".
4444
4445 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
4446
4447         * lib/poll.c: Include sys/time.h and time.h unconditionally,
4448         since we now assume the sys_time module.
4449         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
4450         check for sys/time.h; no longer needed.
4451         * modules/poll (Depends-on): Depend on sys_time.
4452
4453 2007-01-18  Bruno Haible  <bruno@clisp.org>
4454
4455         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
4456         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
4457
4458         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
4459         gettimeofday.
4460
4461         * tests/test-gettimeofday.c: Include <time.h>.
4462         (dummy): Remove variable.
4463
4464         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
4465         gl_HEADER_SYS_TIME_H.
4466         (gl_HEADER_SYS_TIME_H): New macro.
4467
4468         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
4469         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4470         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
4471         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
4472         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4473         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
4474         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
4475         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4476         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
4477         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
4478         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4479
4480         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
4481         last change; it caused a compilation error when cross-compiling to
4482         Cygwin.
4483
4484 2007-01-18  Jim Meyering  <jim@meyering.net>
4485
4486         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
4487         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
4488         than the race-prone "test -d sys || mkdir sys".
4489         (configure.ac): Use AC_PROG_MKDIR_P.
4490         * modules/sys_select: Likewise.
4491         * modules/sys_socket: Likewise.
4492         * modules/sys_time: Likewise.
4493
4494 2007-01-18  Eric Blake  <ebb9@byu.net>
4495
4496         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
4497         replace gettimeofday.
4498         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
4499         name, to avoid infinite recursion.
4500
4501 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
4502
4503         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
4504         module sys_time.
4505         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
4506         assume timespec.h defines struct timeval.
4507         * lib/settime.c: Likewise.
4508         * lib/utimens.c: Likewise.
4509         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
4510         since we now assume the gettimeofday module.
4511         * lib/tempname.c (__gen_tempname): Likewise.
4512         * lib/gettimeofday.h: Remove.
4513         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
4514         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
4515         Include <time.h>, for 'time()'.
4516         (localtime_buffer_addr): Also use this workaround if
4517         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
4518         to simplify the uses.  All uses changed.
4519         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
4520         that #undef is inside {}, and 'const' follows type name consistently.
4521         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
4522         (gettimeofday): Do not use the maximum possible value for
4523         tv->tv_usec, since that might break usages other than ls.c.
4524         Instead, we'll leave ls.c alone.  This undoes today's patch
4525         by Bruno.  Add a compile-time warning for 1s-clock resolution;
4526         we've never observed the problem but might as well keep the
4527         canary.
4528         * lib/nanosleep.c: Include timespec.h first, for interface check.
4529         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
4530         now assume the sys_time module.
4531         * lib/tempname.c: Likewise.
4532         * lib/timespec.h: Likewise.
4533         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
4534         needed.
4535         * lib/strftime.c: Likewise.
4536         * lib/timespec.h: Likewise.
4537         * lib/posixtm.c: Include posixtm.h first, for interface check.
4538         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
4539         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
4540         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
4541         * lib/sys_time_.h: New file.
4542         * lib/timespec.h (struct timespec): Use long int, not long.
4543         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
4544         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
4545         Remove obsolescent call to AC_HEADER_TIME.
4546         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
4547         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
4548         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
4549         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
4550         Likewise.
4551         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
4552         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
4553         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
4554         into the sys_time module.  Check for gettimeofday just once.
4555         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
4556         for gettimeofday signature to just check the signature.  Merely
4557         compile it, since linking doesn't test signature.  Improve test for
4558         whether gettimeofday.o is actually needed.
4559         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
4560         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
4561         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
4562         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4563         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
4564         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
4565         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
4566         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
4567         than worrying about sys/time.h.
4568         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
4569         Don't bother worrying about TIME_WITH_SYS_TIME.
4570         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
4571         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
4572         * m4/sys_time_h.m4: New file.
4573         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
4574         Don't include sys/time.h.  Return from main rather than exiting.
4575         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
4576         all uses changed.
4577         * modules/gethrxtime (Depends-on): Add sys_time.
4578         * modules/gettime (Depends-on): Likewise.
4579         * modules/gettimeofday (Depends-on): Likewise.
4580         * modules/nanosleep (Depends-on): Likewise.
4581         * modules/settime (Depends-on): Likewise.
4582         * modules/tempname (Depends-on): Likewise.
4583         * modules/utimens (Depends-on): Likewise.
4584         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
4585         (Include:) Change back to <sys/time.h>.
4586         (Maintainer:) Add self.
4587         * modules/sys_time: New file.
4588         * modules/tempname (Depends-on): Add gettimeofday.
4589         * tests/test-gettimeofday.c: Include <sys/time.h>
4590         rather than gettimeofday.h.
4591
4592 2007-01-17  Bruno Haible  <bruno@clisp.org>
4593
4594         * gnulib-tool (func_get_license): Revert last patch. Instead, let
4595         the license default to GPL.
4596         (func_create_testdir): Don't complain if a module is LGPL and its
4597         tests module depends on GPLed modules.
4598
4599 2007-01-17  Bruno Haible  <bruno@clisp.org>
4600
4601         * lib/gettimeofday.c (gettimeofday): Add code for the case
4602         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
4603         maximum possible value for tv->tv_usec, rather than the minimum one.
4604
4605 2005-10-08  Martin Lambers  <marlam@marlam.de>
4606 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
4607 2007-01-16  Bruno Haible  <bruno@clisp.org>
4608
4609         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
4610         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
4611         gl_FUNC_GETTIMEOFDAY.
4612         (Include): Add gettimeofday.h.
4613         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
4614         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
4615         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
4616         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
4617         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
4618         * lib/gettimeofday.h: New file.
4619         * lib/gettimeofday.c: Include <sys/timeb.h>.
4620         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
4621         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4622         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
4623         fall back on time().
4624
4625         * tests/test-gettimeofday.c: New file.
4626         * modules/gettimeofday-tests: New file.
4627
4628 2007-01-16  Eric Blake  <ebb9@byu.net>
4629
4630         * modules/fnmatch (Depends-on): Depend on wchar.
4631         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
4632         * m4/fnmatch.m4: Likewise.
4633         * modules/mbchar (Makefile.am): Assume <wchar.h>.
4634         * m4/mbchar.m4: Likewise.
4635         * modules/mbswidth (Depends-on): Depend on wchar.
4636         * lib/mbswidth.c: Assume <wchar.h>.
4637         * m4/mbswidth.m4: Likewise.
4638         * modules/quotearg (Depends-on): Depend on wchar.
4639         * lib/quotearg.c: Assume <wchar.h>.
4640         * m4/quotearg.m4: Likewise.
4641         * modules/regex (Depends-on): Depend on wchar.
4642         * lib/regex_internal.h: Assume <wchar.h>.
4643         * m4/regex.m4: Likewise.
4644         * modules/stdint (Depends-on): Depend on wchar.
4645         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
4646         * m4/stdint.m4: Likewise.
4647         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
4648         * modules/strftime (Depends-on): Depend on wchar.
4649         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
4650         * modules/strtol (Depends-on): Depend on wchar.
4651         * lib/strtol.c: Assume <wchar.h>.
4652         * modules/wcwidth (Depends-on): Depend on wchar.
4653         * lib/wcwidth.h: Assume <wchar.h>.
4654         * m4/wcwidth.m4: Likewise.
4655
4656 2007-01-16  Bruno Haible  <bruno@clisp.org>
4657
4658         * modules/csharpexec-script: New, created from...
4659         * modules/csharpexec: ... this.
4660
4661 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
4662
4663         * modules/javaexec-script: New, created from...
4664         * modules/javaexec: ... this.
4665
4666 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4667
4668         * modules/poll (Dependencies): Add sys_select.
4669
4670 2007-01-15  Jim Meyering  <jim@meyering.net>
4671
4672         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
4673         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
4674         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
4675         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
4676
4677 2007-01-15  Bruno Haible  <bruno@clisp.org>
4678
4679         * modules/striconveh: New file.
4680         * lib/striconveh.h: New file.
4681         * lib/striconveh.c: New file.
4682         * MODULES.html.sh (Internationalization functions): Add striconveh.
4683
4684         * modules/striconveh-tests: New file.
4685         * tests/test-striconveh.c: New file.
4686
4687 2007-01-15  Bruno Haible  <bruno@clisp.org>
4688
4689         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
4690         not from GNU libiconv or GNU libc.
4691
4692 2007-01-15  Bruno Haible  <bruno@clisp.org>
4693
4694         * doc/gnulib-intro.texi (Copyright): Explain the different license
4695         terms for module descriptions, autoconf macros, tests, documentation.
4696
4697 2007-01-14  Bruno Haible  <bruno@clisp.org>
4698
4699         * modules/striconv-tests: New file.
4700         * tests/test-striconv.c: New file.
4701
4702 2007-01-14  Bruno Haible  <bruno@clisp.org>
4703
4704         * modules/iconv-tests: New file.
4705         * tests/test-iconv.c: New file.
4706
4707 2007-01-14  Bruno Haible  <bruno@clisp.org>
4708
4709         * gnulib-tool (func_get_license): For test modules, use the license of
4710         the main module.
4711
4712 2007-01-14  Bruno Haible  <bruno@clisp.org>
4713
4714         * modules/iconv (Include): Clarify that <iconv.h> can only be included
4715         if iconv is found to exist.
4716
4717 2007-01-14  Bruno Haible  <bruno@clisp.org>
4718
4719         * modules/c-ctype-tests: New file.
4720         * tests/test-c-ctype.c: New file.
4721
4722 2007-01-14  Bruno Haible  <bruno@clisp.org>
4723
4724         * modules/binary-io-tests: New file.
4725         * tests/test-binary-io.sh: New file.
4726         * tests/test-binary-io.c: New file.
4727
4728 2007-01-14  Bruno Haible  <bruno@clisp.org>
4729
4730         * modules/array-oset-tests: New file.
4731         * tests/test-array_oset.c: New file.
4732
4733 2007-01-14  Bruno Haible  <bruno@clisp.org>
4734
4735         * modules/array-list-tests: New file.
4736         * tests/test-array_list.c: New file.
4737
4738 2007-01-14  Bruno Haible  <bruno@clisp.org>
4739
4740         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
4741         and make.
4742         Reported by Simon Josefsson in
4743         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
4744
4745 2007-01-14  Bruno Haible  <bruno@clisp.org>
4746
4747         * modules/allocsa-tests: New file.
4748         * tests/test-allocsa.c: New file.
4749
4750 2007-01-14  Bruno Haible  <bruno@clisp.org>
4751
4752         * modules/fchdir (Depends-on): Add absolute-header.
4753         * modules/unistd (Depends-on): Likewise.
4754
4755 2006-12-30  Bruno Haible  <bruno@clisp.org>
4756
4757         * modules/fchdir: New file.
4758         * modules/unistd (Files): Add lib/unistd_.h.
4759         (Makefile.am): Generate unistd.h from unistd_.h.
4760         * lib/fchdir.c: New file.
4761         * lib/dirent_.h: New file.
4762         * lib/unistd_.h: New file.
4763         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
4764         * m4/fchdir.m4: New file.
4765         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
4766         (gl_HEADER_UNISTD): Invoke it.
4767         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
4768         function.
4769         * lib/backupfile.c (opendir, closedir): Undefine.
4770         * lib/chown.c (open, close): Undefine.
4771         * lib/clean-temp.c (open, close): Undefine.
4772         * lib/copy-file.c (open, close): Undefine.
4773         * lib/execute.c (open, close): Undefine.
4774         * lib/fsusage.c (open, close): Undefine.
4775         * lib/gc-gnulib.c (open, close): Undefine.
4776         * lib/getcwd.c (opendir, closedir): Undefine.
4777         * lib/glob.c (opendir, closedir): Undefine.
4778         * lib/javacomp.c (open, close): Undefine.
4779         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
4780         * lib/openat-proc.c (open, close): Undefine.
4781         * lib/pagealign_alloc.c (open, close): Undefine.
4782         * lib/pipe.c (open, close): Undefine.
4783         * lib/progreloc.c (open, close): Undefine.
4784         * lib/savedir.c (opendir, closedir): Undefine.
4785         * lib/utime.c (open, close): Undefine.
4786         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
4787
4788 2007-01-10  Bruno Haible  <bruno@clisp.org>
4789
4790         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
4791
4792 2007-01-12  Eric Blake  <ebb9@byu.net>
4793
4794         Provide a robust <wchar.h>.  Further simplifications are now
4795         possible in other modules, but not included here.
4796         * modules/wchar: New module.
4797         * m4/wchar.m4: New file.
4798         * lib/wchar_.h: Likewise.
4799         * modules/mbchar (Depends-on): Depend on wchar, as the first use
4800         of the new module.
4801         * MODULES.html.sh (Extended multibyte and wide character utilities):
4802         New section.
4803
4804 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
4805
4806         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
4807         to a reasonable default for memory allocation.
4808         (xreadlink): Don't allocate a huge buffer, to work around a buggy
4809         file system that reports garbage st_size values for symlinks.
4810         Problem reported by Liyang Hu.
4811
4812 2007-01-11  Simon Josefsson  <simon@josefsson.org>
4813
4814         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
4815         Emacs .#* auto-save files).
4816
4817 2007-01-11  Bruno Haible  <bruno@clisp.org>
4818
4819         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
4820         directory.
4821
4822 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
4823
4824         Use @...@ consistently in lib/wctype_.h.
4825         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
4826         on it being set to 1 or 0.
4827         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
4828         go back to AC_SUBSTing it.
4829         * modules/wctype (Makefile.am): Undo previous change.
4830
4831 2007-01-10  Eric Blake  <ebb9@byu.net>
4832
4833         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
4834         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
4835         * modules/wctype (Makefile.am): Likewise.
4836         Reported by Chris McGuire.
4837
4838 2007-01-10  Jim Meyering  <jim@meyering.net>
4839
4840         fts.c: a small readability/maintainability improvement
4841         * lib/fts.c (fts_read): Make this code slightly more readable and
4842         maintainable by hoisting the "sp->fts_cur = p" assignments to
4843         immediately follow the statements that set P.  Derived from
4844         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
4845
4846 2007-01-10  Eric Blake  <ebb9@byu.net>
4847
4848         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
4849         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
4850         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
4851         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
4852         Reported by Chris McGuire.
4853
4854 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4855
4856         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
4857         in sed script.
4858
4859 2007-01-09  Bruno Haible  <bruno@clisp.org>
4860
4861         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
4862         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
4863         variables.
4864         (func_module): Use them.
4865
4866 2007-01-09  Bruno Haible  <bruno@clisp.org>
4867
4868         * modules/unistr/base: New file.
4869         * lib/unistr.h: New file.
4870
4871         * modules/unistr/u8-to-u16: New file.
4872         * lib/unistr/u8-to-u16.c: New file.
4873
4874         * modules/unistr/u8-to-u32: New file.
4875         * lib/unistr/u8-to-u32.c: New file.
4876
4877         * modules/unistr/u16-to-u8: New file.
4878         * lib/unistr/u16-to-u8.c: New file.
4879
4880         * modules/unistr/u16-to-u32: New file.
4881         * lib/unistr/u16-to-u32.c: New file.
4882
4883         * modules/unistr/u32-to-u8: New file.
4884         * lib/unistr/u32-to-u8.c: New file.
4885
4886         * modules/unistr/u32-to-u16: New file.
4887         * lib/unistr/u32-to-u16.c: New file.
4888
4889         * modules/unistr/u8-check: New file.
4890         * modules/unistr/u16-check: New file.
4891         * modules/unistr/u32-check: New file.
4892         * lib/unistr/u8-check.c: New file.
4893         * lib/unistr/u16-check.c: New file.
4894         * lib/unistr/u32-check.c: New file.
4895
4896         * modules/unistr/u8-chr: New file.
4897         * modules/unistr/u16-chr: New file.
4898         * modules/unistr/u32-chr: New file.
4899         * lib/unistr/u8-chr.c: New file.
4900         * lib/unistr/u16-chr.c: New file.
4901         * lib/unistr/u32-chr.c: New file.
4902
4903         * modules/unistr/u8-cmp: New file.
4904         * modules/unistr/u16-cmp: New file.
4905         * modules/unistr/u32-cmp: New file.
4906         * lib/unistr/u8-cmp.c: New file.
4907         * lib/unistr/u16-cmp.c: New file.
4908         * lib/unistr/u32-cmp.c: New file.
4909
4910         * modules/unistr/u8-cpy: New file.
4911         * modules/unistr/u16-cpy: New file.
4912         * modules/unistr/u32-cpy: New file.
4913         * lib/unistr/u8-cpy.c: New file.
4914         * lib/unistr/u16-cpy.c: New file.
4915         * lib/unistr/u32-cpy.c: New file.
4916         * lib/unistr/u-cpy.h: New file.
4917
4918         * modules/unistr/u8-cpy-alloc: New file.
4919         * modules/unistr/u16-cpy-alloc: New file.
4920         * modules/unistr/u32-cpy-alloc: New file.
4921         * lib/unistr/u8-cpy-alloc.c: New file.
4922         * lib/unistr/u16-cpy-alloc.c: New file.
4923         * lib/unistr/u32-cpy-alloc.c: New file.
4924         * lib/unistr/u-cpy-alloc.h: New file.
4925
4926         * modules/unistr/u8-endswith: New file.
4927         * modules/unistr/u16-endswith: New file.
4928         * modules/unistr/u32-endswith: New file.
4929         * lib/unistr/u8-endswith.c: New file.
4930         * lib/unistr/u16-endswith.c: New file.
4931         * lib/unistr/u32-endswith.c: New file.
4932         * lib/unistr/u-endswith.h: New file.
4933
4934         * modules/unistr/u8-mblen: New file.
4935         * modules/unistr/u16-mblen: New file.
4936         * modules/unistr/u32-mblen: New file.
4937         * lib/unistr/u8-mblen.c: New file.
4938         * lib/unistr/u16-mblen.c: New file.
4939         * lib/unistr/u32-mblen.c: New file.
4940
4941         * modules/unistr/u8-mbtouc: New file.
4942         * modules/unistr/u16-mbtouc: New file.
4943         * modules/unistr/u32-mbtouc: New file.
4944         * lib/unistr/u8-mbtouc.c: New file.
4945         * lib/unistr/u16-mbtouc.c: New file.
4946         * lib/unistr/u32-mbtouc.c: New file.
4947
4948         * modules/unistr/u8-mbtouc-safe: New file.
4949         * modules/unistr/u16-mbtouc-safe: New file.
4950         * modules/unistr/u32-mbtouc-safe: New file.
4951         * lib/unistr/u8-mbtouc-safe.c: New file.
4952         * lib/unistr/u16-mbtouc-safe.c: New file.
4953         * lib/unistr/u32-mbtouc-safe.c: New file.
4954
4955         * modules/unistr/u8-move: New file.
4956         * modules/unistr/u16-move: New file.
4957         * modules/unistr/u32-move: New file.
4958         * lib/unistr/u8-move.c: New file.
4959         * lib/unistr/u16-move.c: New file.
4960         * lib/unistr/u32-move.c: New file.
4961         * lib/unistr/u-move.h: New file.
4962
4963         * modules/unistr/u8-next: New file.
4964         * modules/unistr/u16-next: New file.
4965         * modules/unistr/u32-next: New file.
4966         * lib/unistr/u8-next.c: New file.
4967         * lib/unistr/u16-next.c: New file.
4968         * lib/unistr/u32-next.c: New file.
4969
4970         * modules/unistr/u8-prev: New file.
4971         * modules/unistr/u16-prev: New file.
4972         * modules/unistr/u32-prev: New file.
4973         * lib/unistr/u8-prev.c: New file.
4974         * lib/unistr/u16-prev.c: New file.
4975         * lib/unistr/u32-prev.c: New file.
4976
4977         * modules/unistr/u8-set: New file.
4978         * modules/unistr/u16-set: New file.
4979         * modules/unistr/u32-set: New file.
4980         * lib/unistr/u8-set.c: New file.
4981         * lib/unistr/u16-set.c: New file.
4982         * lib/unistr/u32-set.c: New file.
4983         * lib/unistr/u-set.h: New file.
4984
4985         * modules/unistr/u8-startswith: New file.
4986         * modules/unistr/u16-startswith: New file.
4987         * modules/unistr/u32-startswith: New file.
4988         * lib/unistr/u8-startswith.c: New file.
4989         * lib/unistr/u16-startswith.c: New file.
4990         * lib/unistr/u32-startswith.c: New file.
4991         * lib/unistr/u-startswith.h: New file.
4992
4993         * modules/unistr/u8-stpcpy: New file.
4994         * modules/unistr/u16-stpcpy: New file.
4995         * modules/unistr/u32-stpcpy: New file.
4996         * lib/unistr/u8-stpcpy.c: New file.
4997         * lib/unistr/u16-stpcpy.c: New file.
4998         * lib/unistr/u32-stpcpy.c: New file.
4999         * lib/unistr/u-stpcpy.h: New file.
5000
5001         * modules/unistr/u8-stpncpy: New file.
5002         * modules/unistr/u16-stpncpy: New file.
5003         * modules/unistr/u32-stpncpy: New file.
5004         * lib/unistr/u8-stpncpy.c: New file.
5005         * lib/unistr/u16-stpncpy.c: New file.
5006         * lib/unistr/u32-stpncpy.c: New file.
5007         * lib/unistr/u-stpncpy.h: New file.
5008
5009         * modules/unistr/u8-strcat: New file.
5010         * modules/unistr/u16-strcat: New file.
5011         * modules/unistr/u32-strcat: New file.
5012         * lib/unistr/u8-strcat.c: New file.
5013         * lib/unistr/u16-strcat.c: New file.
5014         * lib/unistr/u32-strcat.c: New file.
5015         * lib/unistr/u-strcat.h: New file.
5016
5017         * modules/unistr/u8-strchr: New file.
5018         * modules/unistr/u16-strchr: New file.
5019         * modules/unistr/u32-strchr: New file.
5020         * lib/unistr/u8-strchr.c: New file.
5021         * lib/unistr/u16-strchr.c: New file.
5022         * lib/unistr/u32-strchr.c: New file.
5023
5024         * modules/unistr/u8-strcmp: New file.
5025         * modules/unistr/u16-strcmp: New file.
5026         * modules/unistr/u32-strcmp: New file.
5027         * lib/unistr/u8-strcmp.c: New file.
5028         * lib/unistr/u16-strcmp.c: New file.
5029         * lib/unistr/u32-strcmp.c: New file.
5030
5031         * modules/unistr/u8-strcpy: New file.
5032         * modules/unistr/u16-strcpy: New file.
5033         * modules/unistr/u32-strcpy: New file.
5034         * lib/unistr/u8-strcpy.c: New file.
5035         * lib/unistr/u16-strcpy.c: New file.
5036         * lib/unistr/u32-strcpy.c: New file.
5037         * lib/unistr/u-strcpy.h: New file.
5038
5039         * modules/unistr/u8-strcspn: New file.
5040         * modules/unistr/u16-strcspn: New file.
5041         * modules/unistr/u32-strcspn: New file.
5042         * lib/unistr/u8-strcspn.c: New file.
5043         * lib/unistr/u16-strcspn.c: New file.
5044         * lib/unistr/u32-strcspn.c: New file.
5045         * lib/unistr/u-strcspn.h: New file.
5046
5047         * modules/unistr/u8-strdup: New file.
5048         * modules/unistr/u16-strdup: New file.
5049         * modules/unistr/u32-strdup: New file.
5050         * lib/unistr/u8-strdup.c: New file.
5051         * lib/unistr/u16-strdup.c: New file.
5052         * lib/unistr/u32-strdup.c: New file.
5053         * lib/unistr/u-strdup.h: New file.
5054
5055         * modules/unistr/u8-strlen: New file.
5056         * modules/unistr/u16-strlen: New file.
5057         * modules/unistr/u32-strlen: New file.
5058         * lib/unistr/u8-strlen.c: New file.
5059         * lib/unistr/u16-strlen.c: New file.
5060         * lib/unistr/u32-strlen.c: New file.
5061         * lib/unistr/u-strlen.h: New file.
5062
5063         * modules/unistr/u8-strmblen: New file.
5064         * modules/unistr/u16-strmblen: New file.
5065         * modules/unistr/u32-strmblen: New file.
5066         * lib/unistr/u8-strmblen.c: New file.
5067         * lib/unistr/u16-strmblen.c: New file.
5068         * lib/unistr/u32-strmblen.c: New file.
5069
5070         * modules/unistr/u8-strmbtouc: New file.
5071         * modules/unistr/u16-strmbtouc: New file.
5072         * modules/unistr/u32-strmbtouc: New file.
5073         * lib/unistr/u8-strmbtouc.c: New file.
5074         * lib/unistr/u16-strmbtouc.c: New file.
5075         * lib/unistr/u32-strmbtouc.c: New file.
5076
5077         * modules/unistr/u8-strncat: New file.
5078         * modules/unistr/u16-strncat: New file.
5079         * modules/unistr/u32-strncat: New file.
5080         * lib/unistr/u8-strncat.c: New file.
5081         * lib/unistr/u16-strncat.c: New file.
5082         * lib/unistr/u32-strncat.c: New file.
5083         * lib/unistr/u-strncat.h: New file.
5084
5085         * modules/unistr/u8-strncmp: New file.
5086         * modules/unistr/u16-strncmp: New file.
5087         * modules/unistr/u32-strncmp: New file.
5088         * lib/unistr/u8-strncmp.c: New file.
5089         * lib/unistr/u16-strncmp.c: New file.
5090         * lib/unistr/u32-strncmp.c: New file.
5091
5092         * modules/unistr/u8-strncpy: New file.
5093         * modules/unistr/u16-strncpy: New file.
5094         * modules/unistr/u32-strncpy: New file.
5095         * lib/unistr/u8-strncpy.c: New file.
5096         * lib/unistr/u16-strncpy.c: New file.
5097         * lib/unistr/u32-strncpy.c: New file.
5098         * lib/unistr/u-strncpy.h: New file.
5099
5100         * modules/unistr/u8-strnlen: New file.
5101         * modules/unistr/u16-strnlen: New file.
5102         * modules/unistr/u32-strnlen: New file.
5103         * lib/unistr/u8-strnlen.c: New file.
5104         * lib/unistr/u16-strnlen.c: New file.
5105         * lib/unistr/u32-strnlen.c: New file.
5106         * lib/unistr/u-strnlen.h: New file.
5107
5108         * modules/unistr/u8-strpbrk: New file.
5109         * modules/unistr/u16-strpbrk: New file.
5110         * modules/unistr/u32-strpbrk: New file.
5111         * lib/unistr/u8-strpbrk.c: New file.
5112         * lib/unistr/u16-strpbrk.c: New file.
5113         * lib/unistr/u32-strpbrk.c: New file.
5114         * lib/unistr/u-strpbrk.h: New file.
5115
5116         * modules/unistr/u8-strrchr: New file.
5117         * modules/unistr/u16-strrchr: New file.
5118         * modules/unistr/u32-strrchr: New file.
5119         * lib/unistr/u8-strrchr.c: New file.
5120         * lib/unistr/u16-strrchr.c: New file.
5121         * lib/unistr/u32-strrchr.c: New file.
5122
5123         * modules/unistr/u8-strspn: New file.
5124         * modules/unistr/u16-strspn: New file.
5125         * modules/unistr/u32-strspn: New file.
5126         * lib/unistr/u8-strspn.c: New file.
5127         * lib/unistr/u16-strspn.c: New file.
5128         * lib/unistr/u32-strspn.c: New file.
5129         * lib/unistr/u-strspn.h: New file.
5130
5131         * modules/unistr/u8-strstr: New file.
5132         * modules/unistr/u16-strstr: New file.
5133         * modules/unistr/u32-strstr: New file.
5134         * lib/unistr/u8-strstr.c: New file.
5135         * lib/unistr/u16-strstr.c: New file.
5136         * lib/unistr/u32-strstr.c: New file.
5137         * lib/unistr/u-strstr.h: New file.
5138
5139         * modules/unistr/u8-strtok: New file.
5140         * modules/unistr/u16-strtok: New file.
5141         * modules/unistr/u32-strtok: New file.
5142         * lib/unistr/u8-strtok.c: New file.
5143         * lib/unistr/u16-strtok.c: New file.
5144         * lib/unistr/u32-strtok.c: New file.
5145         * lib/unistr/u-strtok.h: New file.
5146
5147         * modules/unistr/u8-uctomb: New file.
5148         * modules/unistr/u16-uctomb: New file.
5149         * modules/unistr/u32-uctomb: New file.
5150         * lib/unistr/u8-uctomb.c: New file.
5151         * lib/unistr/u16-uctomb.c: New file.
5152         * lib/unistr/u32-uctomb.c: New file.
5153
5154         * MODULES.html.sh (Unicode string functions): Add the new modules.
5155
5156 2007-01-08  Bruno Haible  <bruno@clisp.org>
5157
5158         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
5159         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
5160         subdirectories.
5161
5162 2007-01-08  Karl Berry  <karl@gnu.org>
5163
5164         * doc/error.texi: mention that main() fns must set program_name
5165         when progname is used.
5166
5167 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
5168
5169         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
5170         WCTYPE_H is empty, for the benefit of builds from non-distclean
5171         directories.  Problem reported by Eric Blake in
5172         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
5173
5174 2007-01-08  Bruno Haible  <bruno@clisp.org>
5175
5176         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
5177         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
5178         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
5179         PROVIDE_CANONICALIZE_FILENAME_MODE.
5180         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
5181
5182 2007-01-08  Bruno Haible  <bruno@clisp.org>
5183
5184         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
5185         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
5186         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
5187         * lib/fts.c: Likewise.
5188         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
5189
5190 2006-12-25  Bruno Haible  <bruno@clisp.org>
5191
5192         * modules/utf8-ucs4-safe: New file.
5193         * lib/utf8-ucs4-safe.h: New file.
5194         * lib/unistr/utf8-ucs4-safe.c: New file.
5195
5196         * modules/utf16-ucs4-safe: New file.
5197         * lib/utf16-ucs4-safe.h: New file.
5198         * lib/unistr/utf16-ucs4-safe.c: New file.
5199
5200         * MODULES.html.sh (Unicode string functions): Add the new modules.
5201
5202 2007-01-08  Bruno Haible  <bruno@clisp.org>
5203
5204         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
5205         (Depends-on): Add unitypes.
5206         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
5207         (u8_mbtouc_aux): Move out to separate file.
5208         (u8_mbtouc): Use ucs4_t, uint8_t types.
5209         * lib/unistr/utf8-ucs4.c: New file.
5210
5211         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
5212         (Depends-on): Add unitypes.
5213         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
5214         (u16_mbtouc_aux): Move out to separate file.
5215         (u16_mbtouc): Use ucs4_t, uint16_t types.
5216         * lib/unistr/utf16-ucs4.c: New file.
5217
5218         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
5219         (Depends-on): Add unitypes.
5220         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
5221         (u8_uctomb_aux): Move out to separate file.
5222         (u8_uctomb): Use ucs4_t, uint8_t types.
5223         * lib/unistr/ucs4-utf8.c: New file.
5224
5225         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
5226         (Depends-on): Add unitypes.
5227         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
5228         (u16_uctomb_aux): Move out to separate file.
5229         (u16_uctomb): Use ucs4_t, uint16_t types.
5230         * lib/unistr/ucs4-utf16.c: New file.
5231
5232 2006-12-25  Bruno Haible  <bruno@clisp.org>
5233
5234         * modules/unitypes: New file.
5235         * lib/unitypes.h: New file.
5236         * MODULES.html.sh (func_all_modules): New section "Unicode string
5237         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
5238         this section. Add unitypes.
5239
5240 2007-01-08  Bruno Haible  <bruno@clisp.org>
5241
5242         Avoid variable names that conflict with those from libtool.
5243         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
5244         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
5245         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
5246         library_names_spec to acl_library_names_spec, hardcode_* to
5247         acl_hardcode_*.
5248         Reported by Ralf Wildenhues.
5249
5250 2007-01-08  Bruno Haible  <bruno@clisp.org>
5251
5252         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
5253         definition.
5254         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
5255         definition.
5256         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
5257         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
5258         definition.
5259         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
5260         definition.
5261         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
5262         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
5263         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
5264         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
5265         definition.
5266         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
5267         definition.
5268         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
5269         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
5270         GC_USE_<algorithm>.
5271         * lib/gc-libgcrypt.c: Likewise.
5272         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
5273         * modules/gc-arctwo (configure.ac): Likewise.
5274         * modules/gc-des (configure.ac): Likewise.
5275         * modules/gc-hmac-md5 (configure.ac): Likewise.
5276         * modules/gc-hmac-sha1 (configure.ac): Likewise.
5277         * modules/gc-md2 (configure.ac): Likewise.
5278         * modules/gc-md4 (configure.ac): Likewise.
5279         * modules/gc-md5 (configure.ac): Likewise.
5280         * modules/gc-random (configure.ac): Likewise.
5281         * modules/gc-rijndael (configure.ac): Likewise.
5282         * modules/gc-sha1 (configure.ac): Likewise.
5283
5284 2007-01-08  Bruno Haible  <bruno@clisp.org>
5285
5286         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
5287         macro definition.
5288         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
5289         definition.
5290         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
5291         definition.
5292         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
5293         * modules/fcntl-safer (configure.ac): Likewise.
5294         * modules/fopen-safer (configure.ac): Likewise.
5295         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
5296         GNULIB_FWRITEERROR macro definition.
5297
5298 2007-01-08  Bruno Haible  <bruno@clisp.org>
5299
5300         * m4/gnulib-common.m4: New file.
5301         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
5302         (func_get_filelist): Add m4/gnulib-common.m4.
5303
5304 2007-01-08  Bruno Haible  <bruno@clisp.org>
5305
5306         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
5307         command.
5308
5309 2007-01-08  Jim Meyering  <jim@meyering.net>
5310
5311         Use a more robust test for a "can't happen" condition.
5312         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
5313         narrowed the st_size value.  Presuming the "can't happen" condition
5314         is true, that narrowing could conceivably convert an invalid st_size
5315         value into a valid one.  Instead, use a change based on Matthew
5316         Woehlke's original patch.
5317
5318         Slight readability improvement: use an assert-like macro
5319         in place of literal "abort ()" uses.
5320         * lib/fts.c (fts_assert): Define.
5321         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
5322         Use this macro instead of a bare 'abort'.
5323
5324 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
5325
5326         Don't worry about using IRIX 5.3's wctype.h broken definitions;
5327         simply work around them.
5328         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
5329         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
5330         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
5331         declaring.
5332         Don't bother to define as macros, since the standard doesn't require it.
5333         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
5334         longer worry about IRIX 5.3.
5335         (HAVE_WCTYPE_CTMP_BUG): Remove.
5336
5337 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
5338
5339         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
5340         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
5341         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
5342         Problems reported by Georg Schwarz for IRIX 5.3.
5343
5344         * gnulib-tool (autoconf_minversion): Take the maximum version number
5345         found, not the minimum.  Problem reported by James Youngman.
5346
5347 2007-01-03  Karl Berry  <karl@gnu.org>
5348
5349         * doc/error.texi: new file, explaining interaction with progname.
5350         * doc/gnulib.texi: include it.  Update copyright.
5351
5352 2007-01-03  Simon Josefsson  <simon@josefsson.org>
5353
5354         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
5355         AC_CANONICAL_HOST, to improve autobuild outputs.
5356
5357 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
5358             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
5359
5360         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
5361         sockets, server sockets, and other file descriptors.  Count errors
5362         to compute the return value.  Reorder the code a bit to be easier
5363         to follow.  Don't set event bits that were not requested (except
5364         POLLERR and POLLHUP).
5365
5366 2007-01-01  Bruno Haible  <bruno@clisp.org>
5367
5368         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
5369
5370 2007-01-03  Jim Meyering  <jim@meyering.net>
5371
5372         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
5373
5374 2007-01-02  Bruno Haible  <bruno@clisp.org>
5375
5376         * modules/settime (Include): Require timespec.h.
5377         * modules/nanosleep (Include): Likewise.
5378
5379 2007-01-01  Bruno Haible  <bruno@clisp.org>
5380
5381         * gnulib-tool (func_emit_copyright_notice): Bump year.
5382         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
5383
5384 2007-01-01  Bruno Haible  <bruno@clisp.org>
5385
5386         Improve support for OpenBSD.
5387         * build-aux/config.rpath (libname_spec): Export.
5388         (library_names_spec): New variable. Export.
5389         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
5390         library_names_spec from the config.rpath output. Locate shared library
5391         through the name pattern in library_names_spec.
5392
5393 2007-01-01  Eric Blake  <ebb9@byu.net>
5394
5395         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
5396
5397 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
5398
5399         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
5400         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
5401         assume the C locale, and avoid an "eval" that could cause trouble.
5402         Problem with SORT reported by Bob Proulx.
5403
5404         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
5405         Define.  Trivial patch from Henning Nielsen Lund, originally
5406         sent to bug-grep@gnu.org today.
5407
5408 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
5409
5410         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
5411         struct stat.  Problem reported by Henning Nielsen Lund.
5412         * lib/acl.c: Include acl.h first, to check interface.  Don't
5413         bother to include sys/types.h and sys/stat.h again.
5414
5415 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
5416
5417         Import the following change from libc; problem reported by
5418         Sven Verdoolaege.
5419
5420         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
5421
5422         [BZ #1373]
5423         * lib/argp.h: Remove __NTH for __argp_usage inline function.
5424
5425 2006-12-28  Jim Meyering  <jim@meyering.net>
5426
5427         * build-aux/announce-gen: Do not assume that the package
5428         builds any of tar.gz, tar.bz2, and .xdelta files.
5429         Suggestion from Simon Josefsson.
5430
5431 2006-12-28  Simon Josefsson  <simon@josefsson.org>
5432
5433         * modules/announce-gen: New file.
5434
5435 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
5436
5437         * lib/mbchar.h: Just include <wctype.h>; the wctype module
5438         handles its gotchas now.
5439         * lib/mbswidth.c: Likewise.
5440         * lib/wcwidth.h: Likewise.
5441         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
5442         and iswcntrl; the wctype module does this stuff now.
5443         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
5444         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
5445         * modules/mbchar (Depends-on): Add wctype.
5446         * modules/mbswidth (Depends-on): Likewise.
5447         * modules/wcwidth (Depends-on): Likewise.
5448
5449 2006-12-27  Eric Blake  <ebb9@byu.net>
5450
5451         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
5452         module uses more than what <wctype.h> is required to provide.
5453
5454 2006-12-26  Eric Blake  <ebb9@byu.net>
5455
5456         * gnulib-tool (sed_extract_prog): Avoid space-tab.
5457
5458 2006-12-26  Eric Blake  <ebb9@byu.net>
5459
5460         * modules/absolute-header: New module.
5461         * modules/fcntl (Depends-on): Depend on it.
5462         * modules/inttypes (Depends-on): Likewise.
5463         * modules/stdint (Depends-on): Likewise.
5464         * modules/sys_stat (Depends-on): Likewise.
5465         * modules/wctype (Depends-on): Likewise.
5466         * MODULES.html.sh (Support for building libraries and
5467         executables): Document it.
5468
5469 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
5470
5471         * gnulib-tool (SED): Remove, undoing previous change.
5472         The problem was that it broke coreutils on Solaris, because
5473         "sed --posix" leaked into a makefile.
5474         (sed): New alias, if 'alias' and GNU sed.
5475
5476 2006-12-24  Jim Meyering  <jim@meyering.net>
5477
5478         Work around an fchownat bug in glibc-2.4:
5479         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
5480         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
5481         in spite of the -P option.
5482         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
5483         New macros.
5484         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
5485         * modules/openat (Files): Add lib/fchownat.c.
5486         * lib/openat.c (fchownat): Don't define here.  Move to...
5487         * lib/fchownat.c: ...this new file.
5488
5489 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
5490
5491         Fix bug reported by Bruno Haible in
5492         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
5493         where quotearg.c didn't compile on Mac OS X 10.2 because it
5494         lacks <wchar.h> and wint_t.
5495         * lib/wctype_.h (__wctype_wint_t): New type.
5496         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
5497         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
5498         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
5499         Arg is now of type __wctype_wint_t, not wint_t.
5500         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
5501         substitute HAVE_WINT_T.
5502         * modules/wctype (Files): Add m4/wint_t.m4.
5503         (wctype.h): Substitute HAVE_WINT_T.
5504
5505 2006-12-23  Bruno Haible  <bruno@clisp.org>
5506
5507         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
5508
5509 2006-12-23  Bruno Haible  <bruno@clisp.org>
5510
5511         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
5512         S_ISLNK.
5513         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
5514         mingw.
5515
5516 2006-12-22  Bruno Haible  <bruno@clisp.org>
5517
5518         * lib/copy-file.c: Include acl.h.
5519         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
5520         Close the file descriptors only after being done with copy_acl.
5521         * modules/copy-file (Depends-on): Add acl.
5522
5523 2006-12-22  Bruno Haible  <bruno@clisp.org>
5524
5525         * gnulib-tool (SED): New variable.
5526         Use $SED instead of sed everywhere.
5527
5528 2006-12-22  Bruno Haible  <bruno@clisp.org>
5529
5530         * modules/no-c++: New file.
5531         * m4/no-c++.m4: New file.
5532         * MODULES.html.sh (Support for building libraries and executables):
5533         Add no-c++.
5534
5535 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
5536
5537         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
5538         Include <limits.h>, and use its INT_MAX to rewrite the
5539         j loop so that it does not overflow 'int'.  Problem reported by
5540         Ralf Wildenhues in
5541         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
5542         Play it safe by shifting left by 1 rather than multiplying by 2,
5543         as GCC is less likely to optimize this away when the value
5544         is signed (when it assumes overflow leads to undefined behavior).
5545         Also, don't assume time_t uses two's complement.
5546
5547 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
5548
5549         * MODULES.html.sh: New module wctype.
5550         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
5551         * lib/fnmatch.c: Don't bother to include <wchar.h> before
5552         <wctype.h>, since the new wctype module should fix this.
5553         * lib/quotearg.c: Include <wctype.h> unconditionally, since
5554         the wctype module should arrange for it.
5555         * lib/regex_internal.h: Likewise.
5556         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
5557         since the wctype module should handle this now.
5558         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
5559         * modules/fnmatch (Depends-on): Add wctype.
5560         * modules/quotearg (Depends-on): Likewise.
5561         * modules/regex (Depends-on): Likewise.
5562
5563 2006-12-19  Bruno Haible  <bruno@clisp.org>
5564
5565         * lib/strdup.h [C++]: Wrap definitions in extern "C".
5566         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
5567
5568 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5569
5570         * modules/savewd (Depends-on): Fix dependency on fcntl.
5571
5572 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
5573
5574         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
5575         conforms to C99, rather than relying on the user's environment
5576         setting of STDINT_H.
5577
5578 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
5579         and Eric Blake  <ebb9@byu.net>
5580
5581         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
5582         This is more consistent with the other defines here.
5583         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
5584         Port to z/OS.  Problem reported by Paul Gilmartin.
5585         Change local vars to use gl_ prefix rather than ac_.
5586         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
5587         with other defines.
5588         * modules/double-slash-root: New module.
5589         * modules/dirname (Files): Remove m4/double-slash-root.m4.
5590         (Depends-on): Add double-slash-root.
5591         * MODULES.html.sh (File system functions): Mention new module.
5592
5593 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
5594
5595         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
5596         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
5597         This is for the benefit of gzip, which doesn't do i18n.
5598
5599 2006-12-12  Jim Meyering  <jim@meyering.net>
5600
5601         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
5602         Reported by Andreas Schwab <schwab@suse.de>.
5603
5604 2006-12-12  Bruno Haible  <bruno@clisp.org>
5605
5606         Merge these changes.
5607         2006-09-05  Bruno Haible  <bruno@clisp.org>
5608         * lib/iconvme.c (iconv_string): No need to save and restore errno when
5609         iconv_alloc succeeded.
5610         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
5611         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
5612         test for " && dest " at the end - dest is always != NULL there. Call
5613         iconv with 4xNULL arguments initially, to reset the state. Call iconv
5614         with 2xNULL arguments, also to flush the state storage. Handle the
5615         IRIX iconv behaviour. Realloc the final result, to throw away unused
5616         memory.
5617
5618 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
5619
5620         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
5621         and fchmodat unconditionally, since glibc 2.4 has them.
5622         Problem reported by Arkadiusz Miskiewicz.
5623
5624 2006-12-10  Bruno Haible  <bruno@clisp.org>
5625
5626         * gnulib-tool (func_import): Show the include files only for those
5627         modules that are copied and specified.
5628         Reported by Karl Berry.
5629
5630 2006-12-08  Jim Meyering  <jim@meyering.net>
5631
5632         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
5633         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
5634
5635         * build-aux/announce-gen: Add two new options, both optional:
5636         --bootstrap-tools=TOOL_LIST
5637               a comma-separated list of tools, e.g.,
5638               autoconf,automake,bison,gnulib
5639         --gnulib-snapshot-date=DATE
5640               if gnulib is in the bootstrap tool list,
5641               then report this as the snapshot date.
5642               If not specified, use the current date/time.
5643               If you specify a date here, be sure it's UTC.
5644
5645 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5646
5647         * tests/test-argp-2.sh: Fix test to match actual output.
5648         (func_compare): Fix sed script to be portable.
5649
5650 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
5651
5652         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
5653         workaround for this case.  It is not autoconfigured now; offhand
5654         it's hard to see how to autoconfigure it.
5655
5656 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
5657
5658         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
5659         a directory that is about to be chowned.  Such a directory's
5660         initial file permissions should permit the owner only and this
5661         should not be changed until after the chown, since the group and
5662         other bits would be incorrect if they granted permission before
5663         the chown.
5664
5665         Fix porting problem for iswctype reported by Georg Schwarz in:
5666         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
5667         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
5668         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
5669         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
5670         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
5671
5672 2006-12-03  Jim Meyering  <jim@meyering.net>
5673
5674         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
5675         p->fts_statp may not yet be defined.
5676         (fts_read): Instead, set it in the caller, once p->fts_statp is
5677         sure to be defined, and corresponds to a top-level directory.
5678         This bug made du -x fail.  Here's the coreutils test case:
5679         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
5680         Reported by Mike Frysinger.
5681
5682 2006-12-01  Jim Meyering  <jim@meyering.net>
5683
5684         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
5685         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
5686         Reported by Simon Josefsson.
5687
5688 2006-11-30  Jim Meyering  <jim@meyering.net>
5689
5690         * m4/warning.m4: Use the all-permissive copyright notice
5691         recommended by RMS (rather than LGPL).
5692         * m4/vararrays.m4: Likewise.
5693         * m4/flexmember.m4: Likewise.
5694
5695 2006-11-29  Bruno Haible  <bruno@clisp.org>
5696
5697         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5698         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
5699         using +=.
5700         Reported by Simon Josefsson <simon@josefsson.org>.
5701
5702 2006-11-28  James Youngman <jay@gnu.org>
5703
5704         * README: Advise users that they might find the bug-gnulib@gnu.org
5705         and autotools-announce@gnu.org mailing lists useful.
5706
5707 2006-11-28  Bruno Haible  <bruno@clisp.org>
5708
5709         * m4/ptrdiff_max.m4: Remove file.
5710
5711 2006-11-21  Bruno Haible  <bruno@clisp.org>
5712
5713         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
5714         _AC_COMPUTE_INT.
5715         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
5716         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
5717         _AC_COMPUTE_INT.
5718         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
5719         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
5720         _AC_COMPUTE_INT.
5721         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
5722
5723 2006-11-28  Jim Meyering  <jim@meyering.net>
5724
5725         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
5726         warning from "gcc -Wshadow" about shadowing the builtin.
5727
5728 2006-11-27  Bruno Haible  <bruno@clisp.org>
5729
5730         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
5731         _AC_COMPUTE_INT.
5732         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
5733
5734 2006-11-27  Bruno Haible  <bruno@clisp.org>
5735             Paul Eggert  <eggert@cs.ucla.edu>
5736
5737         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
5738
5739 2006-11-26  Bruno Haible  <bruno@clisp.org>
5740
5741         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5742         noinst_LTLIBRARIES.
5743
5744 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
5745             Bruno Haible  <bruno@clisp.org>
5746
5747         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
5748         if compiling with "gcc -ansi".
5749
5750 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
5751
5752         Fix some incompatibilities with gcc -ansi -pedantic.
5753         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
5754         if compiling pedantically with GCC, unless it's C99 or later.
5755         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
5756         it mishandles gcc -ansi -pedantic as well.
5757         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
5758         if gcc -pedantic.
5759         * lib/regexec.c (check_node_accept_bytes): Don't use auto
5760         initializers for struct if -pedantic, unless it's C99 or later.
5761
5762 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
5763
5764         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
5765         Don't close an fd more than once. Identical atimes indicate
5766         success, not failure.
5767
5768 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
5769
5770         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
5771
5772 2006-11-23  Jim Meyering  <jim@meyering.net>
5773
5774         * build-aux/announce-gen: New file.  From coreutils.
5775
5776 2006-11-22  Jim Meyering  <jim@meyering.net>
5777
5778         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
5779         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
5780         (fts_read): Use a temporary to narrow the overused st_size member
5781         before using it in a switch statement.  Reported by Matthew Woehlke.
5782
5783         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
5784         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
5785
5786 2006-11-20  Bruno Haible  <bruno@clisp.org>
5787
5788         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
5789         changequote instead of pairs of brackets.
5790         Reported by Andreas Schwab <schwab@suse.de>.
5791
5792 2006-11-21  Jim Meyering  <jim@meyering.net>
5793
5794         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
5795         so as to remain compatible with older compilers.
5796         Patch from Michael Deutschmann.
5797
5798 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
5799
5800         * MODULES.html.sh (File system functions): Add openat.
5801
5802         * lib/openat.h (rpl_fstatat): New macro, if
5803         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
5804         (fstatat): Define to rpl_fstatat under the same conditions,
5805         unless COMPILING_FSTATAT.
5806         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
5807         seems to have the bug.
5808         * lib/fstatat.c: New file.
5809         * modules/openat (Files): Add it.
5810
5811 2006-11-20  Bruno Haible  <bruno@clisp.org>
5812
5813         * Makefile: New file.
5814
5815 2006-11-20  Jim Meyering  <jim@meyering.net>
5816
5817         The beginnings of syntax-related checks for gnulib.
5818         * lib/Makefile: New file.
5819         * lib/t-idcache: New script.  Ensure that the two halves of
5820         idcache.c stay in sync.
5821
5822         * lib/idcache.c: Adjust comments in user- and group- portions to
5823         be more accurate, and to be consistent with one another.
5824
5825 2006-11-20  Jim Meyering  <jim@meyering.net>
5826
5827         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
5828         continue using the flexible array member (thus, this module performs
5829         half as many malloc calls), with the addition that...
5830         (getgroup, getuser): Consistently record a non-match via an empty
5831         "name" string, and map an empty string match to a NULL return value.
5832         * modules/idcache (Depends-on): Re-add flexmember.
5833
5834         * lib/idcache.c (getuser): Remove all uses of the register keyword.
5835         (getuidbyname, getgroup, getgidbyname): Likewise.
5836
5837         Use cleaner syntax: NULL rather than 0.
5838         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
5839
5840 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
5841
5842         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
5843         It mishandled the case where the group was missing.
5844         Problem reported by Greg Schafer.
5845         * modules/idcache: Likewise.
5846
5847 2006-11-18  Jim Meyering  <jim@meyering.net>
5848
5849         * check-module (%exempt_header): Add exception for some
5850         conditionally-included headers.
5851
5852         * modules/i-ring (Depends-on): Add verify.
5853         (License): Change to LGPL.
5854
5855 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
5856
5857         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
5858         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
5859         and inttostr.h.  Use snprintf rather than uinttostr, so that
5860         LGPLed code doesn't depend on GPLed.
5861
5862 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
5863
5864         * modules/inline (License): Change from GPL to LGPL.
5865
5866 2006-11-17  Jim Meyering  <jim@meyering.net>
5867
5868         * modules/d-type (License): Switch to LGPL.
5869
5870 2006-11-15  Bruno Haible  <bruno@clisp.org>
5871
5872         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
5873
5874 2006-11-15  Eric Blake  <ebb9@byu.net>
5875
5876         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
5877         the module dependency.
5878
5879 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5880             Bruno Haible  <bruno@clisp.org>
5881
5882         * gnulib-tool (func_create_testdir): Add license consistency check.
5883
5884 2006-11-15  Eric Blake  <ebb9@byu.net>
5885
5886         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
5887         random "(cached)" in configure output.
5888
5889 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5890
5891         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
5892         test for conforming inttypes.h is both announced and cached.
5893
5894         * MODULES.html.sh (seen_modules, seen_files): New variables.
5895         (func_module): Rewrite to use a few less gnulib-tool and sed
5896         invocations.  Avoid a couple of quadratic algorithms for ...
5897         (missed_modules, missed_files): ... these, with ...
5898         (func_append, func_tmpdir): ... these new functions, from
5899         gnulib-tool.  Analogously, install traps for cleanup.
5900
5901         * tests/test-gc.c (main): Remove unused variables.
5902         * tests/test-read-file.c: Include stdlib.h, for 'free'.
5903
5904 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
5905
5906         * modules/inttostr (License): Change to LGPL.
5907
5908 2006-11-14  Eric Blake  <ebb9@byu.net>
5909
5910         * modules/tempname (License): Change to LGPL.
5911
5912 2006-11-14  Eric Blake  <ebb9@byu.net>
5913
5914         * doc/functions.texi (Function Portability): *printf functions on
5915         Cygwin now understand all POSIX size specifiers.
5916
5917 2006-11-14  Bruno Haible  <bruno@clisp.org>
5918
5919         * modules/c-ctype (License): Change to LGPL.
5920
5921 2006-11-12  Bruno Haible  <bruno@clisp.org>
5922
5923         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
5924         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
5925         for GNOME libraries, for which the include files are installed in
5926         subdirectories of $prefix/include.
5927
5928 2006-11-12  Bruno Haible  <bruno@clisp.org>
5929
5930         * m4/lib-link.m4: Require at least autoconf-2.54.
5931         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
5932         name to underscores for the --with option.
5933
5934 2006-11-13  Bruno Haible  <bruno@clisp.org>
5935
5936         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
5937         the tests directory.
5938         Reported by Ralf Wildenhues.
5939
5940 2006-11-13  Bruno Haible  <bruno@clisp.org>
5941
5942         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
5943         (func_emit_initmacro_end): Undo the override here.
5944         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
5945         Works around the famous automake error in coreutils.
5946
5947 2006-11-13  Eric Blake  <ebb9@byu.net>
5948
5949         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
5950         element, not its node.
5951
5952 2006-11-12  Bruno Haible  <bruno@clisp.org>
5953
5954         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
5955         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
5956
5957 2006-11-12  Bruno Haible  <bruno@clisp.org>
5958
5959         * gnulib-tool: New option --local-symlink.
5960         (func_usage): Document it.
5961         (lsymbolic): New variable.
5962         (func_import, func_create_testdir): If --symlink was not specified,
5963         test whether --local-symlink was specified and the file comes from
5964         the local_gnulib_dir.
5965
5966 2006-11-12  Bruno Haible  <bruno@clisp.org>
5967
5968         * gnulib-tool (func_ln): New function.
5969         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
5970
5971 2006-11-12  Bruno Haible  <bruno@clisp.org>
5972
5973         Finish support for source files in subdirectories.
5974         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
5975         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
5976         AUTOMAKE_OPTIONS.
5977         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
5978
5979 2006-11-12  Bruno Haible  <bruno@clisp.org>
5980
5981         * gnulib-tool (func_get_automake_snippet): Synthesize also an
5982         EXTRA_lib_SOURCES augmentation.
5983         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
5984
5985 2006-11-12  Jim Meyering  <jim@meyering.net>
5986
5987         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
5988         file descriptors.  This also averts a failure on systems with
5989         native openat support when a traversed directory lacks "x" access.
5990         * lib/fts_.h: Include "i-ring.h"
5991         (struct FTS) [fts_fd_ring]: New member.
5992         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
5993         (FCHDIR): Add parentheses.
5994         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
5995         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
5996         When descending, rather than simply closing the previous
5997         fts_cwd_fd value, push that file descriptor onto the ring.
5998         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
5999         (fts_open): Initialize the new fd_ring member.
6000         (fts_close): Clear the ring.
6001         (fts_safe_changedir): When possible, use our new fd_ring to skip
6002         the diropen and fstat and dev/ino comparison that would normally
6003         accompany a virtual `chdir ("..")'.
6004
6005         * modules/fts (Depends-on): Add i-ring.
6006         * modules/i-ring: New module.
6007         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
6008         * m4/i-ring.m4: New file.
6009
6010 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6011
6012         * gnulib-tool (func_create_testdir): Fix replacement of
6013         `build-aux' in configure.ac.  Run autotools in gltests
6014         subdirectory.
6015         (func_create_testdir, func_create_megatestdir, test): There is
6016         no need for '--force' in most autotool invocations in a new
6017         tree.  Actually fail the whole test if any of the tools, or the
6018         configure or make stages fail.
6019
6020         Sync from Automake.
6021         * build-aux/gnupload: Revert last change.  Add pointer to upload
6022         instructions of the GNU Maintenance Instructions.
6023         Suggestion by Karl Berry.
6024
6025 2006-11-10  Jim Meyering  <jim@meyering.net>
6026
6027         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
6028
6029 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
6030
6031         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
6032         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
6033         (bind_textdomain_codeset) [! ENABLE_NLS]:
6034         Evaluate all the arguments.  That way, callers get compatible behavior
6035         if the arguments have side effects.  Also, it avoids some GCC
6036         diagnostics in some cases; Joel E. Denny reported problems when Bison
6037         was configured with --enable-gcc-warnigs.
6038
6039 2006-11-10  Jim Meyering  <jim@meyering.net>
6040
6041         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
6042         relevant options in CFLAGS (like -O, -fno-inline) are taken into
6043         account.
6044
6045 2006-11-10  Jim Meyering  <jim@meyering.net>
6046
6047         * modules/inline: New file/module.
6048         * modules/xalloc (Files): Remove m4/inline.m4.
6049         (Depends-on): Add inline, instead.
6050         * modules/oset: Likewise.
6051         * modules/list: Likewise.
6052
6053 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
6054
6055         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
6056         Problem reported by Matthew Woehlke.
6057
6058 2006-11-09  Bruno Haible  <bruno@clisp.org>
6059
6060         * lib/tempname.c (gen_tempname): Remove variant that invokes
6061         __gen_tempname.
6062         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
6063         __gen_tempname.
6064
6065 2006-11-08  Bruno Haible  <bruno@clisp.org>
6066
6067         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
6068         to 'yes' instead of 'cross-compiling'.
6069
6070 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
6071
6072         * lib/quotearg.h (quotearg_free): New decl.
6073         * lib/quotearg.c (quotearg_free): New function.
6074         (slot0, nslots, slotvec0, slotvec):
6075         Now file-scope so that quotearg_free can get at them.
6076
6077 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6078
6079         Sync from Automake.
6080         * build-aux/gnupload: Add missing 'gnu' to example URL.
6081         Report by Karl Berry.
6082
6083 2006-11-08  Bruno Haible  <bruno@clisp.org>
6084
6085         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
6086         Suggested by Paul Eggert.
6087
6088 2006-11-08  Jim Meyering  <jim@meyering.net>
6089
6090         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
6091         It's already included if !_LIBC.
6092         (fts_safe_changedir): Add a comment.
6093
6094 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
6095
6096         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
6097         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
6098         Matthew Woehlke.
6099
6100         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
6101         definitions up, to avoid colliding with change below.
6102         (static_inline) [HAVE_INLINE]: New macro.
6103         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
6104         Provide extern decls when !HAVE_INLINE.  Do not define unless
6105         static_inline is defined, either by us or by xmalloc.c.  Use
6106         static_inline rather than static inline.
6107         (XCALLOC): Optimize sizeof(T) = 1 case.
6108         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
6109
6110 2006-11-07  Bruno Haible  <bruno@clisp.org>
6111
6112         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
6113         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
6114         AC_C_INLINE.
6115         * modules/xalloc (Files): Add m4/inline.m4.
6116
6117 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6118
6119         * README: Fix typo.
6120         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
6121         (Miscellanous Notes): ...from this.
6122
6123 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
6124
6125         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
6126         Mention that offsetof should be used instead of sizeof.
6127         From Bruno Haible.
6128
6129 2006-11-07  Bruno Haible  <bruno@clisp.org>
6130
6131         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
6132
6133 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
6134
6135         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
6136         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
6137         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
6138         (gl_tree_add_before, gl_tree_add_after):
6139         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
6140         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
6141         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
6142         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
6143         (gl_linked_add_after, gl_linked_add_at): Likewise.
6144         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
6145         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
6146         (gl_tree_add_before, gl_tree_add_after): Likewise.
6147         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
6148         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
6149         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
6150
6151 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6152
6153         * lib/gl_oset.h: Use C comment style, not C++ comment style.
6154
6155 2006-11-06  Bruno Haible  <bruno@clisp.org>
6156
6157         * m4/inline.m4: New file.
6158         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
6159         * modules/list (Files): Add m4/inline.m4.
6160         * modules/oset (Files): Likewise.
6161
6162 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
6163
6164         * lib/idcache.c: Include <stddef.h>, for offsetof.
6165         (struct userid.name): Change from char * to a flexible array member.
6166         All uses changed.
6167         * modules/idcache (Depends-on): Add flexmember.
6168
6169         * MODULES.html.sh (Core language properties): New module flexmember.
6170         * modules/flexmember, m4/flexmember.m4: New files.
6171
6172         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
6173         inline functions that are identical with the old xnmalloc_inline,
6174         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
6175         that we can avoid some unnecessary integer multiplications and
6176         divisions in the common case where the element size is known at
6177         compile time.
6178         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
6179         needed.
6180         (xnboundedmalloc): Remove.
6181         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
6182         arguments, for consistency with rest of this header.
6183         (xcharalloc): Rewrite using XNMALLOC.
6184         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
6185         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
6186         versions have been moved to lib/xalloc.h and renamed to be the
6187         non-*_inline versions.
6188         (xmalloc, xrealloc): Implement without reference to the xnmalloc
6189         and xnrealloc functions, since those functions are now inline and
6190         now call us.
6191         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
6192         renaming described above.
6193         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
6194         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
6195         captures the dependency in AC_C_INLINE.
6196
6197         New module canonicalize-lgpl, proposed by Charles Wilson in
6198         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
6199         with a few small changes afterwards.
6200         * MODULES.html.sh (File system functions): New module
6201         canonicalize-lgpl.
6202         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
6203         and canonicalize_file_name.
6204         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
6205         * modules/canonicalize-lgpl: New files.
6206
6207 2006-11-05  Bruno Haible  <bruno@clisp.org>
6208
6209         * gnulib-tool (func_import, func_create_testdir): Create directories
6210         also for files in subdirectories of lib/.
6211
6212 2006-11-05  Bruno Haible  <bruno@clisp.org>
6213
6214         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
6215         ANSI C compliant.
6216
6217 2006-11-03  Bruno Haible  <bruno@clisp.org>
6218
6219         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
6220         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
6221         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
6222         (xnboundedmalloc): New inline function.
6223         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
6224         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
6225         xmalloc.
6226         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
6227         xmalloc.
6228         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
6229         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
6230         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
6231         xmalloc.
6232         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
6233         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
6234         xmalloc.
6235         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
6236         gl_tree_add_after): Use XMALLOC instead of xmalloc.
6237         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
6238         xmalloc.
6239         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
6240         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
6241         gl_tree_add_after): Use XMALLOC instead of xmalloc.
6242         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
6243         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
6244         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
6245         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
6246
6247 2006-11-03  Bruno Haible  <bruno@clisp.org>
6248
6249         * lib/c-ctype.h [C++]: Define functions without name mangling.
6250         * lib/fwriteerror.h [C++]: Likewise.
6251         * lib/gcd.h [C++]: Likewise.
6252         * lib/linebreak.h [C++]: Likewise.
6253
6254 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
6255
6256         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
6257         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
6258         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
6259         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
6260         Check for functions and headers just once.
6261         Check for declaration of canonicalize_file_name.
6262         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
6263
6264 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6265
6266         * gnulib-tool (func_import): Fix typo in actioncmd.
6267
6268 2006-11-02  Bruno Haible  <bruno@clisp.org>
6269
6270         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
6271         newline sequence in the Makefile.am snippet as a space, like "make"
6272         does.
6273         Reported by Roger Persson <perrog@gmail.com>.
6274
6275 2006-11-01  Bruno Haible  <bruno@clisp.org>
6276
6277         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
6278         already declared in <string.h>.
6279         * lib/strcase.h (strncasecmp): Don't declare it if yes.
6280
6281 2006-11-01  Bruno Haible  <bruno@clisp.org>
6282
6283         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
6284         * lib/strcase.h: Include <string.h>.
6285         (strcasecmp): Define to rpl_strcasecmp here.
6286
6287 2006-11-01  Bruno Haible  <bruno@clisp.org>
6288
6289         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
6290
6291 2006-11-01  Eric Blake  <ebb9@byu.net>
6292
6293         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
6294
6295         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
6296
6297 2006-10-29  Bruno Haible  <bruno@clisp.org>
6298
6299         Make it compile in C++ mode.
6300         * lib/full-write.c (full_rw): Add a cast.
6301
6302 2006-11-01  Bruno Haible  <bruno@clisp.org>
6303
6304         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
6305         be POSIX compliant.
6306         Reported by Roger Persson <perrog@gmail.com>.
6307
6308 2006-11-01  Eric Blake  <ebb9@byu.net>
6309
6310         * lib/getopt_.h: Fix comments.
6311
6312 2006-10-31  Eric Blake  <ebb9@byu.net>
6313
6314         * modules/tmpdir (Depends-on): Add sys_stat.
6315         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
6316         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
6317         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
6318         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
6319         tempname.
6320
6321 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
6322
6323         Avoid some C++ diagnostics reported by Bruno Haible.
6324         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
6325         xmalloc.
6326         (quotearg_alloc): Use xcharalloc rather than xmalloc.
6327         (struct slotvec): Move to top level.
6328         (quotearg_n_options): Rewrite to avoid xmalloc.
6329         * lib/xalloc.h (xcharalloc): New function.
6330         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
6331         [defined __cplusplus]: Add function template that provides result
6332         type propagation.  This part of the change is from Bruno Haible.
6333
6334 2006-10-29  Bruno Haible  <bruno@clisp.org>
6335
6336         Make it compile in C++ mode.
6337         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
6338         * lib/strnlen1.c (strnlen1): Cast memchr result.
6339         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
6340         * lib/clean-temp.c (string_equals, string_hash): Add casts.
6341         (create_temp_dir): Rename local variable 'template'.
6342         (compile_csharp_using_sscli): Add cast.
6343         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
6344         * lib/findprog.c (find_in_path): Likewise.
6345         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
6346         * lib/wait-process.c (register_slave_subprocess): Likewise.
6347
6348 2006-10-22  Bruno Haible  <bruno@clisp.org>
6349
6350         * modules/tsearch: New file.
6351         * lib/tsearch.h: New file.
6352         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
6353         * m4/tsearch.m4: New file.
6354         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
6355
6356 2006-10-29  Eric Blake  <ebb9@byu.net>
6357
6358         * lib/arcfour.c: Assume config.h.
6359         * lib/arctwo.c: Likewise.
6360         * lib/base64.c: Likewise.
6361         * lib/check-version.c: Likewise.
6362         * lib/crc.c: Likewise.
6363         * lib/des.c: Likewise.
6364         * lib/gc-gnulib.c: Likewise.
6365         * lib/gc-libgcrypt.c: Likewise.
6366         * lib/gc-pbkdf2-sha1.c: Likewise.
6367         * lib/getaddrinfo.c: Likewise.
6368         * lib/getdelim.c: Likewise.
6369         * lib/getline.c: Likewise.
6370         * lib/hmac-md5.c: Likewise.
6371         * lib/hmac-sha1.c: Likewise.
6372         * lib/iconvme.c: Likewise.
6373         * lib/md2.c: Likewise.
6374         * lib/md4.c: Likewise.
6375         * lib/memxor.c: Likewise.
6376         * lib/read-file.c: Likewise.
6377         * lib/readline.c: Likewise.
6378         * lib/rijndael-alg-fst.c: Likewise.
6379         * lib/rijndael-api-fst.c: Likewise.
6380         * lib/xgetdomainname.c: Likewise.
6381
6382 2006-10-28  Eric Blake  <ebb9@byu.net>
6383
6384         * lib/xstrndup.c: Assume config.h.
6385
6386 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
6387
6388         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
6389         stat-macros.h is now for our own macros, whereas stat_h is for
6390         macros in the <sys/stat.h> name space.
6391         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
6392         (STAT_MACROS_H): Remove.
6393         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
6394         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
6395         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
6396         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
6397         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
6398         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
6399         Move these macros to ...
6400         * lib/stat_.h: here.  Don't include stat-macros.h.
6401         * lib/canonicalize.c: Don't include stat-macros.h.
6402         * lib/chown.c: Likewise.
6403         * lib/euidaccess.c: Likewise.
6404         * lib/file-type.c: Likewise.
6405         * lib/filemode.c: Likewise.
6406         * lib/glob.c: Likewise.
6407         * lib/isapipe.c: Likewise.
6408         * lib/lchown.c: Likewise.
6409         * lib/lstat.c: Likewise.
6410         * lib/mkdir-p.c: Likewise.
6411         * lib/rmdir.c: Likewise.
6412         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
6413         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
6414         unless mkdir isn't declared, to speed up 'configure'.
6415         Always create sys/stat.h, since it's unlikely any real sys/stat.h
6416         would define all the S_* symbols.
6417         * modules/canonicalize (Depends-on):
6418         Depend on sys_stat, not stat-macros.
6419         * modules/chown: Likewise.
6420         * modules/euidaccess: Likewise.
6421         * modules/filemode: Likewise.
6422         * modules/file-type: Likewise.
6423         * modules/glob: Likewise.
6424         * modules/isapipe: Likewise.
6425         * modules/lchown: Likewise.
6426         * modules/lstat: Likewise.
6427         * modules/mkancesdirs: Likewise.
6428         * modules/rmdir: Likewise.
6429         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
6430         * modules/modechange: Likewise.
6431         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
6432         (configure.ac): Remove gl_STAT_MACROS.
6433         * modules/sys_stat (Depends-on): Remove stat-macros.
6434
6435 2006-10-27  Bruno Haible  <bruno@clisp.org>
6436
6437         * m4/signed.m4: Remove file.
6438         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
6439         invocation.
6440         * modules/vasnprintf (Files): Remove m4/signed.m4.
6441
6442 2006-10-27  Bruno Haible  <bruno@clisp.org>
6443
6444         Update to GNU gettext 0.16.
6445         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
6446         m4/inttypes-h.m4, m4/signed.m4.
6447         * m4/gettext.m4: Update to GNU gettext 0.16.
6448         * m4/intl.m4: New file, from GNU gettext.
6449         * m4/intldir.m4: New file, from GNU gettext.
6450         * config/srclist.txt: Update
6451
6452 2006-10-27  Eric Blake  <ebb9@byu.net>
6453
6454         * MODULES.html.sh: Document tempname.
6455         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
6456         dependencies.
6457         (Files): Move lib/tempname.c...
6458         * modules/tempname: ...to this new module.
6459         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
6460         (gl_PREREQ_TEMPNAME): Move...
6461         * m4/tempname.m4: ...to this new file.
6462         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
6463         * modules/sys_stat (Depends-on): Add stat-macros.
6464         * lib/stat_.h (includes): Pick up stat macros.
6465         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
6466         if stat macros are broken.
6467         * lib/tempname.c (includes): No need to include "stat-macros.h".
6468         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
6469         (direxists, __path_search) [!_LIBC]: Don't compile these in
6470         gnulib; the tmpdir module covers that.
6471         * lib/tempname.h: New file.
6472
6473 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
6474
6475         * COPYING: Explain how gnulib-tool converts licence headers.
6476         Almost all wording by Eric Blake.
6477
6478 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
6479
6480         * lib/mbchar.h (is_basic_table): Make read-only.
6481         * lib/mbchar.c (is_basic_table): Likewise.
6482         Reported by John Darrington.
6483
6484 2006-10-25  Bruno Haible  <bruno@clisp.org>
6485
6486         * lib/progname.h (set_program_name): Undefine before defining.
6487
6488 2006-10-25  Bruno Haible  <bruno@clisp.org>
6489
6490         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
6491         false for non-gcc C++ compilers.
6492         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
6493
6494 2006-10-24  Bruno Haible  <bruno@clisp.org>
6495
6496         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
6497         iconv implementations like Irix iconv.
6498
6499 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
6500
6501         * modules/vararrays: New file.
6502         * m4/vararrays.m4: New file, taken from diffutils.
6503         * MODULES.html.sh: New module vararrays.
6504
6505 2006-10-24  Karl Berry  <karl@gnu.org>
6506
6507         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
6508         Don't call GNU Unix.
6509
6510 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6511
6512         * users.txt: Add Libtool.
6513
6514         Sync from Libtool:
6515
6516         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
6517
6518         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
6519         to gnulib's policy of including config.h unconditionally.
6520
6521 2006-10-24  Bruno Haible  <bruno@clisp.org>
6522
6523         * modules/wcwidth (Files): Add m4/wint_t.m4.
6524         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
6525         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
6526
6527 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
6528
6529         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
6530         to pacify GCC with some -W flags enabled.  Problem reported by
6531         Bruno Haible.
6532
6533 2006-10-24  Jim Meyering  <jim@meyering.net>
6534
6535         * MODULES.html.sh: Remove uinttostr.  It's not a module.
6536         Reported by Karl Berry.
6537
6538 2006-10-23  Bruno Haible  <bruno@clisp.org>
6539
6540         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
6541
6542 2006-10-24  Bruno Haible  <bruno@clisp.org>
6543
6544         * lib/gl_list.h: Use C comment style, not C++ comment style.
6545
6546 2006-10-23  Eric Blake  <ebb9@byu.net>
6547
6548         * lib/getaddrinfo.c (includes): Add missing include.
6549
6550 2006-10-23  Bruno Haible  <bruno@clisp.org>
6551             Paul Eggert  <eggert@cs.ucla.edu>
6552
6553         Ability to rename obstack_free.
6554         * lib/obstack.h (__obstack_free): New macro. Declare instead of
6555         obstack_free.
6556         (obstack_free): Invoke the __obstack_free macro.
6557         * lib/obstack.c (obstack_free): Use __obstack_free macro.
6558
6559 2006-10-23  Bruno Haible  <bruno@clisp.org>
6560             Paul Eggert  <eggert@cs.ucla.edu>
6561
6562         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
6563         __argc, __argv from the declaration. (They are defined as macros on
6564         mingw.)
6565
6566 2006-10-22  Bruno Haible  <bruno@clisp.org>
6567
6568         * doc/gnulib-intro.texi: New file.
6569         * doc/gnulib.texi: Include it.
6570
6571 2006-10-21  Bruno Haible  <bruno@clisp.org>
6572
6573         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
6574         "Introduction", "Miscellanous Notes", "Particular Modules".
6575
6576 2006-10-21  Bruno Haible  <bruno@clisp.org>
6577
6578         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6579         Change mostlyclean-local rule to avoid sh syntax error from bash
6580         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
6581
6582 2006-10-23  Jim Meyering  <jim@meyering.net>
6583
6584         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
6585         in place of snprintf.
6586
6587         * modules/inttostr (Files): Add lib/uinttostr.c.
6588         * lib/uinttostr.c (inttostr): New file/function.
6589         * lib/inttostr.h (uinttostr): Declare.
6590         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
6591         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
6592         Add uinttostr.
6593         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
6594
6595 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
6596
6597         * lib/canonicalize.c (ELOOP): Define if not already defined.
6598         Problem reported by Bruno Haible in
6599         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
6600
6601 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
6602
6603         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
6604         Problem reported by Perry Smith and Ville Laurikari.
6605
6606         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
6607         uses.
6608
6609 2006-10-19  Bruno Haible  <bruno@clisp.org>
6610
6611         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
6612         for mingw.
6613
6614 2006-10-19  Bruno Haible  <bruno@clisp.org>
6615
6616         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
6617         Needed for mingw.
6618
6619 2006-10-19  Bruno Haible  <bruno@clisp.org>
6620
6621         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
6622
6623 2006-10-19  Bruno Haible  <bruno@clisp.org>
6624
6625         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
6626         it.
6627
6628 2006-10-19  Bruno Haible  <bruno@clisp.org>
6629
6630         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
6631         invocation.
6632
6633 2006-10-19  Bruno Haible  <bruno@clisp.org>
6634
6635         * gnulib-tool (func_create_testdir): Don't include ftruncate and
6636         mountlist by default.
6637
6638 2006-10-16  Bruno Haible  <bruno@clisp.org>
6639
6640         * lib/c-strstr.c: Include c-strstr.h.
6641
6642 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6643
6644         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
6645         in a slash.
6646
6647 2006-10-18  Bruno Haible  <bruno@clisp.org>
6648
6649         * lib/lock.h [C++]: Wrap definitions in extern "C".
6650
6651 2006-10-18  Bruno Haible  <bruno@clisp.org>
6652
6653         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
6654         gl_LIBOBJS list.
6655
6656 2006-10-18  Bruno Haible  <bruno@clisp.org>
6657
6658         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
6659
6660 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
6661
6662         * lib/xstrtol.h: Include gettext.h.
6663         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
6664         Problem reported by Eric Blake.
6665         * modules/xstrtol (Depends-on): Add gettext-h.
6666
6667 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
6668
6669         * lib/strftime.c (advance): New macro.
6670         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
6671         incomplete type, so you can't add 0 to it.  Problem and patch
6672         reported by Eelco Dolstra for dietlibc.
6673
6674 2006-10-18  Jim Meyering  <jim@meyering.net>
6675
6676         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
6677         type for a local, and rename it: s/up/user_proc/.
6678
6679 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
6680
6681         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
6682         READ_UTMP_USER_PROCESS.
6683         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
6684
6685 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
6686
6687         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
6688         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
6689
6690 2006-10-17  Eric Blake  <ebb9@byu.net>
6691
6692         * lib/sigprocmask.c (sigprocmask): Fix typo.
6693
6694         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
6695
6696         * modules/clean-temp (Makefile.am): Don't add to make output...
6697         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
6698         config.h.
6699
6700 2006-10-17  Bruno Haible  <bruno@clisp.org>
6701
6702         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
6703         differently if DEFAULT_TEXT_DOMAIN is set.
6704
6705 2006-10-16  Bruno Haible  <bruno@clisp.org>
6706
6707         * lib/clean-temp.c: Include fwriteerror.h.
6708
6709 2006-10-16  Bruno Haible  <bruno@clisp.org>
6710
6711         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
6712
6713 2006-10-16  Bruno Haible  <bruno@clisp.org>
6714
6715         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
6716         * lib/sigprocmask.h: Include <sys/types.h>.
6717         (sigset_t): Use the system's definition if present.
6718
6719 2006-10-17  Eric Blake  <ebb9@byu.net>
6720
6721         * lib/xvasprintf.c (includes): Assume config.h.
6722         * lib/xasprintf.c (includes): Likewise.
6723
6724 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
6725
6726         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
6727         at least as wide as intmax_t.
6728
6729 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
6730
6731         (Imported from Automake.)
6732         * build-aux/gnupload: Update to version 1.1 of directive file.
6733
6734 2006-10-16  Eric Blake  <ebb9@byu.net>
6735
6736         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
6737         match Automake 1.10a.
6738
6739 2006-10-14  Bruno Haible  <bruno@clisp.org>
6740
6741         * modules/sigprocmask: New file.
6742         * lib/sigprocmask.h: New file.
6743         * lib/sigprocmask.c: New file.
6744         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
6745         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
6746         request sigprocmask.o.
6747         (gl_PREREQ_SIGPROCMASK): New macro.
6748         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
6749         (Depends-on): Add sigprocmask.
6750         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
6751         gt_SIGNALBLOCKING. Test for 'raise' only once.
6752         * lib/fatal-signal.c: Include sigprocmask.h.
6753         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
6754         unblock_fatal_signals): Define always.
6755         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
6756         sigprocmask.
6757
6758 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
6759
6760         Sync from Automake.
6761         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
6762         which incorrectly sets the mode of an existing destination
6763         directory.  In some cases the unpatched install-sh could do the
6764         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
6765         system.  We hope this is rare in practice, but it's clearly worth
6766         fixing.  Problem reported by Alex Unleashed in
6767         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
6768         Also, don't bother to check for -m bugs unless we're using -m;
6769         suggested by Stepan Kasal.
6770
6771 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6772
6773         Sync from Automake.
6774         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
6775         `-c' flag, so they appear at the same position as in %FASTDEP%
6776         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
6777         which ignores unknown options only after the first non-option.
6778         Bug report against M4 by Nelson H. F. Beebe.
6779
6780 2006-10-13  Jim Meyering  <jim@meyering.net>
6781
6782         Fix a bug in yesterday's change.
6783         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
6784         p->fts_statp->st_dev would be used uninitialized.
6785         Ensures that we always call fts_stat on the very first entry.
6786         Miklos Szeredi reported that find -xdev stopped working.
6787
6788 2006-10-12  Bruno Haible  <bruno@clisp.org>
6789
6790         * gnulib-tool (func_get_automake_snippet): Append an automatically
6791         computed EXTRA_DIST augmentation.
6792         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
6793         * modules/alloca-opt (Makefile.am): Likewise.
6794         * modules/allocsa (Makefile.am): Likewise.
6795         * modules/arcfour (Makefile.am): Likewise.
6796         * modules/arctwo (Makefile.am): Likewise.
6797         * modules/argmatch (Makefile.am): Likewise.
6798         * modules/argz (Makefile.am): Likewise.
6799         * modules/atexit (Makefile.am): Likewise.
6800         * modules/backupfile (Makefile.am): Likewise.
6801         * modules/byteswap (Makefile.am): Likewise.
6802         * modules/c-strtod (Makefile.am): Likewise.
6803         * modules/c-strtold (Makefile.am): Likewise.
6804         * modules/calloc (Makefile.am): Likewise.
6805         * modules/canon-host (Makefile.am): Likewise.
6806         * modules/canonicalize (Makefile.am): Likewise.
6807         * modules/chdir-long (Makefile.am): Likewise.
6808         * modules/chdir-safer (Makefile.am): Likewise.
6809         * modules/check-version (Makefile.am): Likewise.
6810         * modules/chown (Makefile.am): Likewise.
6811         * modules/cloexec (Makefile.am): Likewise.
6812         * modules/close-stream (Makefile.am): Likewise.
6813         * modules/closeout (Makefile.am): Likewise.
6814         * modules/crc (Makefile.am): Likewise.
6815         * modules/csharpexec (Makefile.am): Likewise.
6816         * modules/cycle-check (Makefile.am): Likewise.
6817         * modules/des (Makefile.am): Likewise.
6818         * modules/dev-ino (Makefile.am): Likewise.
6819         * modules/dirfd (Makefile.am): Likewise.
6820         * modules/dirname (Makefile.am): Likewise.
6821         * modules/dup2 (Makefile.am): Likewise.
6822         * modules/eealloc (Makefile.am): Likewise.
6823         * modules/error (Makefile.am): Likewise.
6824         * modules/euidaccess (Makefile.am): Likewise.
6825         * modules/exclude (Makefile.am): Likewise.
6826         * modules/exitfail (Makefile.am): Likewise.
6827         * modules/fcntl-safer (Makefile.am): Likewise.
6828         * modules/fcntl (Makefile.am): Likewise.
6829         * modules/file-type (Makefile.am): Likewise.
6830         * modules/fileblocks (Makefile.am): Likewise.
6831         * modules/filemode (Makefile.am): Likewise.
6832         * modules/filenamecat (Makefile.am): Likewise.
6833         * modules/fnmatch (Makefile.am): Likewise.
6834         * modules/fopen-safer (Makefile.am): Likewise.
6835         * modules/fpending (Makefile.am): Likewise.
6836         * modules/fprintftime (Makefile.am): Likewise.
6837         * modules/free (Makefile.am): Likewise.
6838         * modules/fsusage (Makefile.am): Likewise.
6839         * modules/ftruncate (Makefile.am): Likewise.
6840         * modules/fts (Makefile.am): Likewise.
6841         * modules/gc-arcfour (Makefile.am): Likewise.
6842         * modules/gc-des (Makefile.am): Likewise.
6843         * modules/gc-hmac-md5 (Makefile.am): Likewise.
6844         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
6845         * modules/gc-md4 (Makefile.am): Likewise.
6846         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
6847         * modules/gc-sha1 (Makefile.am): Likewise.
6848         * modules/gc (Makefile.am): Likewise.
6849         * modules/getaddrinfo (Makefile.am): Likewise.
6850         * modules/getcwd (Makefile.am): Likewise.
6851         * modules/getdelim (Makefile.am): Likewise.
6852         * modules/getdomainname (Makefile.am): Likewise.
6853         * modules/getgroups (Makefile.am): Likewise.
6854         * modules/gethostname (Makefile.am): Likewise.
6855         * modules/gethrxtime (Makefile.am): Likewise.
6856         * modules/getline (Makefile.am): Likewise.
6857         * modules/getloadavg (Makefile.am): Likewise.
6858         * modules/getlogin_r (Makefile.am): Likewise.
6859         * modules/getndelim2 (Makefile.am): Likewise.
6860         * modules/getopt (Makefile.am): Likewise.
6861         * modules/getpagesize (Makefile.am): Likewise.
6862         * modules/getpass-gnu (Makefile.am): Likewise.
6863         * modules/getpass (Makefile.am): Likewise.
6864         * modules/getsubopt (Makefile.am): Likewise.
6865         * modules/gettime (Makefile.am): Likewise.
6866         * modules/gettimeofday (Makefile.am): Likewise.
6867         * modules/getugroups (Makefile.am): Likewise.
6868         * modules/getusershell (Makefile.am): Likewise.
6869         * modules/glob (Makefile.am): Likewise.
6870         * modules/group-member (Makefile.am): Likewise.
6871         * modules/hard-locale (Makefile.am): Likewise.
6872         * modules/hash (Makefile.am): Likewise.
6873         * modules/hmac-md5 (Makefile.am): Likewise.
6874         * modules/hmac-sha1 (Makefile.am): Likewise.
6875         * modules/human (Makefile.am): Likewise.
6876         * modules/idcache (Makefile.am): Likewise.
6877         * modules/imaxabs (Makefile.am): Likewise.
6878         * modules/imaxdiv (Makefile.am): Likewise.
6879         * modules/inet_ntop (Makefile.am): Likewise.
6880         * modules/inet_pton (Makefile.am): Likewise.
6881         * modules/intprops (Makefile.am): Likewise.
6882         * modules/inttostr (Makefile.am): Likewise.
6883         * modules/inttypes (Makefile.am): Likewise.
6884         * modules/isapipe (Makefile.am): Likewise.
6885         * modules/javaversion (Makefile.am): Likewise.
6886         * modules/lchmod (Makefile.am): Likewise.
6887         * modules/lchown (Makefile.am): Likewise.
6888         * modules/localcharset (Makefile.am): Likewise.
6889         * modules/long-options (Makefile.am): Likewise.
6890         * modules/lstat (Makefile.am): Likewise.
6891         * modules/malloc (Makefile.am): Likewise.
6892         * modules/mathl (Makefile.am): Likewise.
6893         * modules/mbchar (Makefile.am): Likewise.
6894         * modules/md2 (Makefile.am): Likewise.
6895         * modules/md4 (Makefile.am): Likewise.
6896         * modules/md5 (Makefile.am): Likewise.
6897         * modules/memcasecmp (Makefile.am): Likewise.
6898         * modules/memchr (Makefile.am): Likewise.
6899         * modules/memcmp (Makefile.am): Likewise.
6900         * modules/memcoll (Makefile.am): Likewise.
6901         * modules/memcpy (Makefile.am): Likewise.
6902         * modules/memmem (Makefile.am): Likewise.
6903         * modules/memmove (Makefile.am): Likewise.
6904         * modules/mempcpy (Makefile.am): Likewise.
6905         * modules/memrchr (Makefile.am): Likewise.
6906         * modules/memset (Makefile.am): Likewise.
6907         * modules/memxor (Makefile.am): Likewise.
6908         * modules/mkancesdirs (Makefile.am): Likewise.
6909         * modules/mkdir-p (Makefile.am): Likewise.
6910         * modules/mkdir (Makefile.am): Likewise.
6911         * modules/mkdtemp (Makefile.am): Likewise.
6912         * modules/mkstemp (Makefile.am): Likewise.
6913         * modules/mktime (Makefile.am): Likewise.
6914         * modules/modechange (Makefile.am): Likewise.
6915         * modules/mountlist (Makefile.am): Likewise.
6916         * modules/nanosleep (Makefile.am): Likewise.
6917         * modules/obstack (Makefile.am): Likewise.
6918         * modules/openat (Makefile.am): Likewise.
6919         * modules/pagealign_alloc (Makefile.am): Likewise.
6920         * modules/pathmax (Makefile.am): Likewise.
6921         * modules/physmem (Makefile.am): Likewise.
6922         * modules/poll (Makefile.am): Likewise.
6923         * modules/posixtm (Makefile.am): Likewise.
6924         * modules/posixver (Makefile.am): Likewise.
6925         * modules/putenv (Makefile.am): Likewise.
6926         * modules/quote (Makefile.am): Likewise.
6927         * modules/quotearg (Makefile.am): Likewise.
6928         * modules/raise (Makefile.am): Likewise.
6929         * modules/read-file (Makefile.am): Likewise.
6930         * modules/readline (Makefile.am): Likewise.
6931         * modules/readlink (Makefile.am): Likewise.
6932         * modules/readtokens (Makefile.am): Likewise.
6933         * modules/readutmp (Makefile.am): Likewise.
6934         * modules/realloc (Makefile.am): Likewise.
6935         * modules/regex (Makefile.am): Likewise.
6936         * modules/rename-dest-slash (Makefile.am): Likewise.
6937         * modules/rename (Makefile.am): Likewise.
6938         * modules/rijndael (Makefile.am): Likewise.
6939         * modules/rmdir (Makefile.am): Likewise.
6940         * modules/rpmatch (Makefile.am): Likewise.
6941         * modules/safe-read (Makefile.am): Likewise.
6942         * modules/safe-write (Makefile.am): Likewise.
6943         * modules/same-inode (Makefile.am): Likewise.
6944         * modules/same (Makefile.am): Likewise.
6945         * modules/save-cwd (Makefile.am): Likewise.
6946         * modules/savedir (Makefile.am): Likewise.
6947         * modules/setenv (Makefile.am): Likewise.
6948         * modules/settime (Makefile.am): Likewise.
6949         * modules/sha1 (Makefile.am): Likewise.
6950         * modules/sig2str (Makefile.am): Likewise.
6951         * modules/snprintf (Makefile.am): Likewise.
6952         * modules/stat-macros (Makefile.am): Likewise.
6953         * modules/stat-time (Makefile.am): Likewise.
6954         * modules/stdbool (Makefile.am): Likewise.
6955         * modules/stdint (Makefile.am): Likewise.
6956         * modules/stdlib-safer (Makefile.am): Likewise.
6957         * modules/stpcpy (Makefile.am): Likewise.
6958         * modules/stpncpy (Makefile.am): Likewise.
6959         * modules/strcase (Makefile.am): Likewise.
6960         * modules/strcasestr (Makefile.am): Likewise.
6961         * modules/strchrnul (Makefile.am): Likewise.
6962         * modules/strcspn (Makefile.am): Likewise.
6963         * modules/strdup (Makefile.am): Likewise.
6964         * modules/strerror (Makefile.am): Likewise.
6965         * modules/strftime (Makefile.am): Likewise.
6966         * modules/strndup (Makefile.am): Likewise.
6967         * modules/strnlen (Makefile.am): Likewise.
6968         * modules/strpbrk (Makefile.am): Likewise.
6969         * modules/strsep (Makefile.am): Likewise.
6970         * modules/strstr (Makefile.am): Likewise.
6971         * modules/strtod (Makefile.am): Likewise.
6972         * modules/strtoimax (Makefile.am): Likewise.
6973         * modules/strtok_r (Makefile.am): Likewise.
6974         * modules/strtol (Makefile.am): Likewise.
6975         * modules/strtoll (Makefile.am): Likewise.
6976         * modules/strtoul (Makefile.am): Likewise.
6977         * modules/strtoull (Makefile.am): Likewise.
6978         * modules/strtoumax (Makefile.am): Likewise.
6979         * modules/strverscmp (Makefile.am): Likewise.
6980         * modules/sys_socket (Makefile.am): Likewise.
6981         * modules/sys_stat (Makefile.am): Likewise.
6982         * modules/sysexits (Makefile.am): Likewise.
6983         * modules/time_r (Makefile.am): Likewise.
6984         * modules/timegm (Makefile.am): Likewise.
6985         * modules/timespec (Makefile.am): Likewise.
6986         * modules/tmpfile-safer (Makefile.am): Likewise.
6987         * modules/trim (Makefile.am): Likewise.
6988         * modules/unistd-safer (Makefile.am): Likewise.
6989         * modules/unlinkdir (Makefile.am): Likewise.
6990         * modules/unlocked-io (Makefile.am): Likewise.
6991         * modules/userspec (Makefile.am): Likewise.
6992         * modules/utime (Makefile.am): Likewise.
6993         * modules/utimecmp (Makefile.am): Likewise.
6994         * modules/utimens (Makefile.am): Likewise.
6995         * modules/vasnprintf (Makefile.am): Likewise.
6996         * modules/vasprintf (Makefile.am): Likewise.
6997         * modules/vsnprintf (Makefile.am): Likewise.
6998         * modules/xalloc (Makefile.am): Likewise.
6999         * modules/xgetcwd (Makefile.am): Likewise.
7000         * modules/xnanosleep (Makefile.am): Likewise.
7001         * modules/xreadlink (Makefile.am): Likewise.
7002         * modules/xstrtod (Makefile.am): Likewise.
7003         * modules/xstrtol (Makefile.am): Likewise.
7004         * modules/xstrtold (Makefile.am): Likewise.
7005         * modules/yesno (Makefile.am): Likewise.
7006         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
7007
7008 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
7009
7010         * modules/error (Makefile.am): Distribute files through
7011         EXTRA_DIST, not lib_SOURCES.
7012
7013 2006-10-12  Eric Blake  <ebb9@byu.net>
7014
7015         * modules/error (Makefile.am): Distribute files in /lib.
7016         * modules/obstack (Makefile.am): Likewise.
7017
7018 2006-10-12  Bruno Haible  <bruno@clisp.org>
7019
7020         * modules/acl (Makefile.am): Distribute all files in lib/ through
7021         EXTRA_DIST.
7022         * modules/arcfour (Makefile.am): Likewise.
7023         * modules/arctwo (Makefile.am): Likewise.
7024         * modules/argmatch (Makefile.am): Likewise.
7025         * modules/argz (Makefile.am): Likewise.
7026         * modules/atexit (Makefile.am): Likewise.
7027         * modules/backupfile (Makefile.am): Likewise.
7028         * modules/c-strtod (Makefile.am): Likewise.
7029         * modules/c-strtold (Makefile.am): Likewise.
7030         * modules/calloc (Makefile.am): Likewise.
7031         * modules/canon-host (Makefile.am): Likewise.
7032         * modules/canonicalize (Makefile.am): Likewise.
7033         * modules/chdir-long (Makefile.am): Likewise.
7034         * modules/chdir-safer (Makefile.am): Likewise.
7035         * modules/check-version (Makefile.am): Likewise.
7036         * modules/chown (Makefile.am): Likewise.
7037         * modules/cloexec (Makefile.am): Likewise.
7038         * modules/close-stream (Makefile.am): Likewise.
7039         * modules/closeout (Makefile.am): Likewise.
7040         * modules/crc (Makefile.am): Likewise.
7041         * modules/cycle-check (Makefile.am): Likewise.
7042         * modules/des (Makefile.am): Likewise.
7043         * modules/dirfd (Makefile.am): Likewise.
7044         * modules/dirname (Makefile.am): Likewise.
7045         * modules/dup2 (Makefile.am): Likewise.
7046         * modules/euidaccess (Makefile.am): Likewise.
7047         * modules/exclude (Makefile.am): Likewise.
7048         * modules/exitfail (Makefile.am): Likewise.
7049         * modules/fcntl-safer (Makefile.am): Likewise.
7050         * modules/file-type (Makefile.am): Likewise.
7051         * modules/fileblocks (Makefile.am): Likewise.
7052         * modules/filemode (Makefile.am): Likewise.
7053         * modules/filenamecat (Makefile.am): Likewise.
7054         * modules/fnmatch (Makefile.am): Likewise.
7055         * modules/fopen-safer (Makefile.am): Likewise.
7056         * modules/fpending (Makefile.am): Likewise.
7057         * modules/fprintftime (Makefile.am): Likewise.
7058         * modules/free (Makefile.am): Likewise.
7059         * modules/fsusage (Makefile.am): Likewise.
7060         * modules/ftruncate (Makefile.am): Likewise.
7061         * modules/fts (Makefile.am): Likewise.
7062         * modules/gc (Makefile.am): Likewise.
7063         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
7064         * modules/getaddrinfo (Makefile.am): Likewise.
7065         * modules/getcwd (Makefile.am): Likewise.
7066         * modules/getdelim (Makefile.am): Likewise.
7067         * modules/getdomainname (Makefile.am): Likewise.
7068         * modules/getgroups (Makefile.am): Likewise.
7069         * modules/gethostname (Makefile.am): Likewise.
7070         * modules/gethrxtime (Makefile.am): Likewise.
7071         * modules/getline (Makefile.am): Likewise.
7072         * modules/getloadavg (Makefile.am): Likewise.
7073         * modules/getlogin_r (Makefile.am): Likewise.
7074         * modules/getopt (Makefile.am): Likewise.
7075         * modules/getpass (Makefile.am): Likewise.
7076         * modules/getpass-gnu (Makefile.am): Likewise.
7077         * modules/getsubopt (Makefile.am): Likewise.
7078         * modules/gettime (Makefile.am): Likewise.
7079         * modules/gettimeofday (Makefile.am): Likewise.
7080         * modules/getugroups (Makefile.am): Likewise.
7081         * modules/getusershell (Makefile.am): Likewise.
7082         * modules/glob (Makefile.am): Likewise.
7083         * modules/group-member (Makefile.am): Likewise.
7084         * modules/hard-locale (Makefile.am): Likewise.
7085         * modules/hash (Makefile.am): Likewise.
7086         * modules/hmac-md5 (Makefile.am): Likewise.
7087         * modules/hmac-sha1 (Makefile.am): Likewise.
7088         * modules/human (Makefile.am): Likewise.
7089         * modules/idcache (Makefile.am): Likewise.
7090         * modules/imaxabs (Makefile.am): Likewise.
7091         * modules/imaxdiv (Makefile.am): Likewise.
7092         * modules/inet_ntop (Makefile.am): Likewise.
7093         * modules/inet_pton (Makefile.am): Likewise.
7094         * modules/inttostr (Makefile.am): Likewise.
7095         * modules/isapipe (Makefile.am): Likewise.
7096         * modules/lchown (Makefile.am): Likewise.
7097         * modules/long-options (Makefile.am): Likewise.
7098         * modules/lstat (Makefile.am): Likewise.
7099         * modules/malloc (Makefile.am): Likewise.
7100         * modules/mathl (Makefile.am): Likewise.
7101         * modules/mbchar (Makefile.am): Likewise.
7102         * modules/md2 (Makefile.am): Likewise.
7103         * modules/md4 (Makefile.am): Likewise.
7104         * modules/md5 (Makefile.am): Likewise.
7105         * modules/memcasecmp (Makefile.am): Likewise.
7106         * modules/memchr (Makefile.am): Likewise.
7107         * modules/memcmp (Makefile.am): Likewise.
7108         * modules/memcoll (Makefile.am): Likewise.
7109         * modules/memcpy (Makefile.am): Likewise.
7110         * modules/memmem (Makefile.am): Likewise.
7111         * modules/memmove (Makefile.am): Likewise.
7112         * modules/mempcpy (Makefile.am): Likewise.
7113         * modules/memrchr (Makefile.am): Likewise.
7114         * modules/memset (Makefile.am): Likewise.
7115         * modules/memxor (Makefile.am): Likewise.
7116         * modules/mkancesdirs (Makefile.am): Likewise.
7117         * modules/mkdir (Makefile.am): Likewise.
7118         * modules/mkdir-p (Makefile.am): Likewise.
7119         * modules/mkdtemp (Makefile.am): Likewise.
7120         * modules/mkstemp (Makefile.am): Likewise.
7121         * modules/mktime (Makefile.am): Likewise.
7122         * modules/modechange (Makefile.am): Likewise.
7123         * modules/mountlist (Makefile.am): Likewise.
7124         * modules/nanosleep (Makefile.am): Likewise.
7125         * modules/openat (Makefile.am): Likewise.
7126         * modules/pagealign_alloc (Makefile.am): Likewise.
7127         * modules/physmem (Makefile.am): Likewise.
7128         * modules/poll (Makefile.am): Likewise.
7129         * modules/posixtm (Makefile.am): Likewise.
7130         * modules/posixver (Makefile.am): Likewise.
7131         * modules/putenv (Makefile.am): Likewise.
7132         * modules/quote (Makefile.am): Likewise.
7133         * modules/quotearg (Makefile.am): Likewise.
7134         * modules/raise (Makefile.am): Likewise.
7135         * modules/read-file (Makefile.am): Likewise.
7136         * modules/readline (Makefile.am): Likewise.
7137         * modules/readlink (Makefile.am): Likewise.
7138         * modules/readtokens (Makefile.am): Likewise.
7139         * modules/readutmp (Makefile.am): Likewise.
7140         * modules/realloc (Makefile.am): Likewise.
7141         * modules/regex (Makefile.am): Likewise.
7142         * modules/rename (Makefile.am): Likewise.
7143         * modules/rename-dest-slash (Makefile.am): Likewise.
7144         * modules/rijndael (Makefile.am): Likewise.
7145         * modules/rmdir (Makefile.am): Likewise.
7146         * modules/rpmatch (Makefile.am): Likewise.
7147         * modules/safe-read (Makefile.am): Likewise.
7148         * modules/safe-write (Makefile.am): Likewise.
7149         * modules/same (Makefile.am): Likewise.
7150         * modules/save-cwd (Makefile.am): Likewise.
7151         * modules/savedir (Makefile.am): Likewise.
7152         * modules/setenv (Makefile.am): Likewise.
7153         * modules/settime (Makefile.am): Likewise.
7154         * modules/sha1 (Makefile.am): Likewise.
7155         * modules/sig2str (Makefile.am): Likewise.
7156         * modules/snprintf (Makefile.am): Likewise.
7157         * modules/stdlib-safer (Makefile.am): Likewise.
7158         * modules/stpcpy (Makefile.am): Likewise.
7159         * modules/stpncpy (Makefile.am): Likewise.
7160         * modules/strcase (Makefile.am): Likewise.
7161         * modules/strcasestr (Makefile.am): Likewise.
7162         * modules/strchrnul (Makefile.am): Likewise.
7163         * modules/strcspn (Makefile.am): Likewise.
7164         * modules/strdup (Makefile.am): Likewise.
7165         * modules/strerror (Makefile.am): Likewise.
7166         * modules/strftime (Makefile.am): Likewise.
7167         * modules/strndup (Makefile.am): Likewise.
7168         * modules/strnlen (Makefile.am): Likewise.
7169         * modules/strpbrk (Makefile.am): Likewise.
7170         * modules/strsep (Makefile.am): Likewise.
7171         * modules/strstr (Makefile.am): Likewise.
7172         * modules/strtod (Makefile.am): Likewise.
7173         * modules/strtoimax (Makefile.am): Likewise.
7174         * modules/strtok_r (Makefile.am): Likewise.
7175         * modules/strtol (Makefile.am): Likewise.
7176         * modules/strtoll (Makefile.am): Likewise.
7177         * modules/strtoul (Makefile.am): Likewise.
7178         * modules/strtoull (Makefile.am): Likewise.
7179         * modules/strtoumax (Makefile.am): Likewise.
7180         * modules/strverscmp (Makefile.am): Likewise.
7181         * modules/time_r (Makefile.am): Likewise.
7182         * modules/timegm (Makefile.am): Likewise.
7183         * modules/tmpfile-safer (Makefile.am): Likewise.
7184         * modules/unistd-safer (Makefile.am): Likewise.
7185         * modules/unlinkdir (Makefile.am): Likewise.
7186         * modules/userspec (Makefile.am): Likewise.
7187         * modules/utime (Makefile.am): Likewise.
7188         * modules/utimecmp (Makefile.am): Likewise.
7189         * modules/utimens (Makefile.am): Likewise.
7190         * modules/vasnprintf (Makefile.am): Likewise.
7191         * modules/vasprintf (Makefile.am): Likewise.
7192         * modules/vsnprintf (Makefile.am): Likewise.
7193         * modules/xalloc (Makefile.am): Likewise.
7194         * modules/xgetcwd (Makefile.am): Likewise.
7195         * modules/xnanosleep (Makefile.am): Likewise.
7196         * modules/xreadlink (Makefile.am): Likewise.
7197         * modules/xstrtod (Makefile.am): Likewise.
7198         * modules/xstrtol (Makefile.am): Likewise.
7199         * modules/xstrtold (Makefile.am): Likewise.
7200         * modules/yesno (Makefile.am): Likewise.
7201
7202 2006-10-12  Jim Meyering  <jim@meyering.net>
7203
7204         * m4/getloadavg.m4: Revert the change below.
7205
7206         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
7207         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
7208         fail with a symlink, which is what coreutils' ./bootstrap now
7209         creates by default.
7210
7211 2006-10-12  Bruno Haible  <bruno@clisp.org>
7212
7213         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
7214         mingw.
7215         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
7216         MSVC and mingw explicitly.
7217
7218 2006-10-11  Simon Josefsson  <jas@extundo.com>
7219             Bruno Haible  <bruno@clisp.org>
7220
7221         Add support for multiple gnulib-tool invocations in the scope of a
7222         single configure.ac file.
7223         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
7224         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
7225         with the same contents as the _LIBADD variable.
7226         (func_emit_initmacro_start, func_emit_initmacro_end,
7227         func_emit_initmacro_done): New functions.
7228         (func_import, func_create_testdir): Invoke them. Allow the identifiers
7229         gl_LIBOBJS and gl_LTLIBOBJS.
7230
7231 2006-10-11  Bruno Haible  <bruno@clisp.org>
7232
7233         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
7234         (func_create_testdir): Don't create po/Makefile.am, don't invoke
7235         autoreconf. Instead, invoke autopoint explicitly but move back the
7236         *.m4 files from gnulib.
7237
7238 2006-10-11  Bruno Haible  <bruno@clisp.org>
7239
7240         * gnulib-tool (func_usage): Make module names after --create-testdir
7241         optional.
7242         (func_create_testdir): If no module was specified, use nearly all
7243         modules.
7244
7245 2006-10-12  Jim Meyering  <jim@meyering.net>
7246
7247         Big performance improvement for fts-based tools that use FTS_NOSTAT.
7248         Avoid spurious inode-mismatch problems on non-POSIX file systems.
7249         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
7250         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
7251         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
7252         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
7253         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
7254         (fts_set_stat_required): New function.
7255         (fts_open): Defer the calls to fts_stat, if possible or requested.
7256         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
7257         into fts_stat itself.
7258         (fts_read): Perform any required (deferred) fts_stat call.
7259         (fts_build): Likewise, for the directory we're about to open and read.
7260         In the readdir loop, carefully decide whether each entry will require
7261         an eventual call to fts_stat, using dirent.d_type info if available.
7262         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
7263         a command line argument into this function.  Update all callers.
7264         Map a return value of FTS_DOT to FTS_D for a command line argument.
7265         * modules/fts (Depends-on): Add d-type.  Alphabetize.
7266         Thanks to Miklos Szeredi for his tenacity and for the initial
7267         bug report about "find" failing on a FUSE-based file system.
7268
7269         * lib/fts.c (fts_open): Use consistent indentation.
7270
7271 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
7272
7273         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
7274         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
7275         reported by Jim Meyering.  All uses of cache variables renamed
7276         to match Autoconf's.
7277         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
7278         the other one.
7279
7280         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
7281         Fix misspelling in diagnostic.
7282
7283 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
7284
7285         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
7286         defined.  Problem reported by Matthew Woehlke.
7287
7288         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
7289         Add support for Tandem NonStop R series.
7290         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
7291         Use new macro.
7292
7293         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
7294         (has_trailing_slash): Omit size arg; all callers changed.
7295         Omit 'inline', since it doesn't help performance and we'd
7296         need to configure it.
7297         Don't count //, ///, etc. as having a trailing slash.
7298         As a side effect, this removes a C99ism reported by Matthew Woehlke.
7299         (rpl_rename_dest_slash): On failure, use rename's errno rather
7300         than (in some cases) an incorrect or junk errno.
7301         Simplify code by removing need to compute length; this does
7302         cause it to make two passes instead of one over the file name,
7303         but it's worth it.
7304
7305         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
7306         change, since Autoconf's version may no longer be appropriate now
7307         that we are using CVS Autoconf's version.  Add support for Tandem.
7308
7309 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
7310             Bruno Haible  <bruno@clisp.org>
7311
7312         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
7313         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
7314         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
7315         gl_AC_TYPE_LONG_LONG.
7316
7317         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
7318         instead of HAVE_LONG_LONG.
7319         * lib/printf-args.c (printf_fetchargs): Likewise.
7320         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
7321         * lib/vasnprintf.c (VASNPRINTF): Likewise.
7322         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
7323         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
7324         gl_AC_TYPE_LONG_LONG.
7325
7326 2006-10-11  Bruno Haible  <bruno@clisp.org>
7327
7328         * m4/longlong.m4: Add comments.
7329         * m4/ulonglong.m4: Likewise.
7330
7331 2006-10-10  Bruno Haible  <bruno@clisp.org>
7332
7333         Make it possible to #define stpcpy, strdup to aliases.
7334         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
7335         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
7336
7337 2006-10-10  Bruno Haible  <bruno@clisp.org>
7338
7339         Make it possible to #define gcd to an alias.
7340         * lib/gcd.c: Include config.h.
7341
7342 2006-10-10  Bruno Haible  <bruno@clisp.org>
7343
7344         Make it possible to #define c_isascii to an alias.
7345         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
7346         defined. Undefine the macros before defining them, to avoid gcc
7347         warnings.
7348         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
7349         define NO_C_CTYPE_MACROS early.
7350
7351 2006-10-10  Bruno Haible  <bruno@clisp.org>
7352
7353         Make it possible to #define set_program_name to an alias.
7354         * lib/progname.c: Don't undefine set_program_name; instead, undefine
7355         ENABLE_RELOCATABLE early.
7356
7357 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
7358
7359         Port to Tandem NSK OSS, which has 64-bit signed int but at most
7360         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
7361         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
7362         More generally, don't assume that 64-bit signed int is available
7363         if unsigned int is, and vice versa.
7364         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
7365         unsigned symbols, not on their signed counterparts.
7366         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
7367         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
7368         (UINT64_C, UINTMAX_C):
7369         Likewise.
7370         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
7371         unsigned counterparts.
7372         (Have_long_long, Unsigned): New macros.
7373         (Int): Renamed from INT.
7374         (strtoimax): Use the new macros.
7375         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
7376         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
7377         * modules/inttypes (inttypes.h): Substitute
7378         HAVE_UNSIGNED_LONG_LONG_INT.
7379         * modules/stdint (stdint.h): Likewise.
7380         (Files): Add m4/ulonglong.m4.
7381
7382 2006-10-10  Bruno Haible  <bruno@clisp.org>
7383
7384         Fix a gcc -Wshadow warning.
7385         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
7386         to 'bucket'.
7387         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
7388         gl_linked_indexof_from_to): Likewise.
7389         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
7390         Likewise.
7391         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
7392         Likewise.
7393         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
7394         Reported by Eric Blake.
7395
7396 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
7397
7398         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
7399         for NetBSD.  Problem reported by Bruno Haible.
7400
7401 2006-10-09  Jim Meyering  <jim@meyering.net>
7402
7403         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
7404         Patch from Bruno Haible.
7405
7406 2006-10-09  Jim Meyering  <jim@meyering.net>
7407
7408         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
7409         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
7410         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
7411
7412 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
7413
7414         Don't include <config.h> twice; this doesn't work in some cases,
7415         e.g., when config.h has "#define intmax_t long long int" and
7416         we include <config.h>, <inttypes.h>, <config.h> in that order.
7417         Problem reported by Matthew Woehlke in:
7418         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
7419         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
7420         * lib/fts-cycle.c: Don't include config.h.
7421         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
7422         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
7423         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
7424         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
7425         inttypes.h.
7426         * lib/xstrtoumax.c: Likewise.
7427         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
7428         __strtol and the like, so that this module is more like its siblings.
7429         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
7430         Remove; no longer needed now that we assume gnulib inttypes.h.
7431
7432 2006-10-08  Bruno Haible  <bruno@clisp.org>
7433
7434         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
7435         option.
7436
7437 2006-10-07  Jim Meyering  <jim@meyering.net>
7438
7439         * modules/inttypes (inttypes.h): Revert what seems to have been
7440         an inadvertent part of today's change: use "|", not "/" in the
7441         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
7442
7443 2006-10-07  Bruno Haible  <bruno@clisp.org>
7444
7445         * modules/sublist: New file.
7446
7447 2006-10-07  Bruno Haible  <bruno@clisp.org>
7448
7449         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
7450         * modules/argz (argz.h): Likewise.
7451         * modules/arpa_inet (arpa/inet.h): Likewise.
7452         * modules/byteswap (byteswap.h): Likewise.
7453         * modules/configmake (configmake.h): Likewise.
7454         * modules/fcntl (fcntl.h): Likewise.
7455         * modules/fnmatch (fnmatch.h): Likewise.
7456         * modules/getopt (getopt.h): Likewise.
7457         * modules/glob (glob.h): Likewise.
7458         * modules/inttypes (inttypes.h): Likewise.
7459         * modules/netinet_in (netinet/in.h): Likewise.
7460         * modules/poll (poll.h): Likewise.
7461         * modules/stdbool (stdbool.h): Likewise.
7462         * modules/stdint (stdint.h): Likewise.
7463         * modules/sys_select (sys/select.h): Likewise.
7464         * modules/sys_socket (sys/socket.h): Likewise.
7465         * modules/sys_stat (sys/stat.h): Likewise.
7466         * modules/sysexits (sysexits.h): Likewise.
7467         * modules/unistd (unistd.h): Likewise.
7468         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7469         Add a "DO NOT EDIT" comment to the generated file.
7470         (func_import): Likewise for gnulib-comp.m4.
7471
7472 2006-10-07  Bruno Haible  <bruno@clisp.org>
7473
7474         * lib/gl_sublist.h: New file.
7475         * lib/gl_sublist.c: New file.
7476
7477 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
7478
7479         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
7480         name (relative to the original working directory) and the file
7481         name component (relative to the temporary working directory).  All
7482         callers changed.
7483         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
7484         * lib/mkdir-p.c (make_dir_parents): Likewise.
7485         * lib/mkdir-p.h (make_dir_parents): Likewise.
7486
7487 2006-10-06  Eric Blake  <ebb9@byu.net>
7488
7489         Define several macros for use by the clean-temp module.
7490         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
7491         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
7492         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
7493
7494         * lib/clean-temp.h (close_stream_temp): New declaration.
7495         * lib/clean-temp.c (includes): Pull in headers according to what
7496         other modules are in use.
7497         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
7498
7499 2006-10-06  Bruno Haible  <bruno@clisp.org>
7500
7501         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
7502         instead of fopen, fwriteerror.
7503
7504 2006-10-06  Bruno Haible  <bruno@clisp.org>
7505
7506         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
7507         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
7508         int.
7509         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
7510         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
7511         Return an error indicator.
7512         Suggested by Eric Blake.
7513
7514 2006-10-06  Bruno Haible  <bruno@clisp.org>
7515
7516         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
7517         Reported by Eric Blake.
7518
7519 2006-10-06  Bruno Haible  <bruno@clisp.org>
7520
7521         * modules/closeout (Description): Mention stderr too.
7522
7523 2006-10-06  Bruno Haible  <bruno@clisp.org>
7524         and Paul Eggert  <eggert@cs.ucla.edu>
7525
7526         * lib/closeout.c (close_stdout): Also close stderr.
7527         * lib/closeout.h: Update comment.
7528
7529 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
7530
7531         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
7532         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
7533         * lib/dirchownmod.c: Include lchown.h.
7534         * lib/lchown.c: Don't include files that lchown.h now includes.
7535         Don't declare chown, since lchown.h now does that.
7536         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
7537         (lchown): Define to rpl_chown if lchown is declared but
7538         does not exist.  Declare using a prototype if lchown is not
7539         declared.  Add a copyright notice.
7540         * lib/mkstemp.h: Include <unistd.h>.
7541         * lib/openat.c: Include lchown.h.
7542
7543         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
7544         we now test for that separately.
7545         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
7546         rather than O_NOFOLLOW, when testing whether it's possible to
7547         avoid a race condition reliably.
7548         * lib/savewd.c (savewd_chdir): Likewise.
7549
7550         Remove macros that are no longer needed now that stdint.h is
7551         reliable.
7552         * lib/fsusage.c (UINTMAX_MAX): Remove.
7553         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
7554         * lib/utimecmp.c (SIZE_MAX): Remove.
7555
7556         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
7557
7558         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
7559         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
7560         O_NOATIME works.
7561
7562 2006-10-05  Bruno Haible  <bruno@clisp.org>
7563
7564         * lib/gl_list.h (gl_sortedlist_search_from_to,
7565         gl_sortedlist_indexof_from_to): New declarations.
7566         (gl_list_implementation): New fields sortedlist_search_from_to,
7567         sortedlist_indexof_from_to.
7568         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
7569         inline functions.
7570         * lib/gl_list.c (gl_sortedlist_search_from_to,
7571         gl_sortedlist_indexof_from_to): New functions.
7572         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
7573         function.
7574         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
7575         (gl_array_sortedlist_search_from_to): New function.
7576         (gl_array_list_implementation): Update.
7577         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
7578         function.
7579         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
7580         (gl_carray_sortedlist_search_from_to): New function.
7581         (gl_carray_list_implementation): Update.
7582         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
7583         gl_linked_sortedlist_indexof_from_to): New functions.
7584         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
7585         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
7586         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
7587         gl_tree_sortedlist_indexof_from_to): New functions.
7588         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
7589         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
7590         Update.
7591         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
7592         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
7593         Update.
7594
7595 2006-10-05  Bruno Haible  <bruno@clisp.org>
7596
7597         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
7598         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
7599         (struct gl_list_implementation): Add fields search_from_to,
7600         indexof_from_to. Remove fields search, indexof.
7601         (gl_list_search): Use the search_from_to method.
7602         (gl_list_search_from, gl_list_search_from_to): New functions.
7603         (gl_list_indexof): Use the indexof_from_to method.
7604         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
7605         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
7606         (gl_list_search_from, gl_list_search_from_to): New functions.
7607         (gl_list_indexof): Use the indexof_from_to method.
7608         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
7609         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
7610         gl_array_indexof. Add start_index, end_index arguments.
7611         (gl_array_search_from_to): Renamed from gl_array_search. Add
7612         start_index, end_index arguments.
7613         (gl_array_remove, gl_array_list_implementation): Update.
7614         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
7615         gl_carray_indexof. Add start_index, end_index arguments.
7616         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
7617         start_index, end_index arguments.
7618         (gl_carray_remove, gl_carray_list_implementation): Update.
7619         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
7620         gl_linked_search. Add start_index, end_index arguments.
7621         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
7622         start_index, end_index arguments.
7623         (gl_linked_remove): Update.
7624         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
7625         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
7626         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
7627         field to 'size_t'.
7628         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
7629         gl_tree_search. Add start_index, end_index arguments.
7630         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
7631         start_index, end_index arguments.
7632         (gl_tree_remove): Update.
7633         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
7634         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
7635         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
7636         function.
7637         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
7638         gl_tree_search. Add start_index, end_index arguments.
7639         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
7640         start_index, end_index arguments.
7641         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
7642         Update.
7643         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
7644
7645 2006-10-05  Bruno Haible  <bruno@clisp.org>
7646
7647         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
7648
7649         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
7650         fwriteerror_temp): New declarations.
7651         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
7652         (descriptors): New variable.
7653         (cleanup): First, close the descriptors.
7654         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
7655         fclose_temp, fwriteerror_temp): New functions.
7656
7657 2006-10-04  Jim Meyering  <jim@meyering.net>
7658
7659         * lib/fts.c (fts_open): Tiny comment change.
7660
7661 2006-10-04  Bruno Haible  <bruno@clisp.org>
7662
7663         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
7664         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
7665         gl_LOCK_BODY.
7666         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
7667         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
7668         gl_LOCK_EARLY_BODY.
7669         (gl_LOCK): Require gl_LOCK_BODY.
7670
7671 2006-10-04  Bruno Haible  <bruno@clisp.org>
7672
7673         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
7674         (gl_oset_search_atleast): New declaration.
7675         (struct gl_oset_implementation): Add field 'search_atleast'.
7676         (gl_oset_search_atleast): New inline function.
7677         * lib/gl_oset.c (gl_oset_search_atleast): New function.
7678         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
7679         (gl_array_oset_implementation): Update.
7680         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
7681         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
7682         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
7683
7684 2006-10-04  Bruno Haible  <bruno@clisp.org>
7685
7686         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
7687
7688 2006-10-03  Bruno Haible  <bruno@clisp.org>
7689
7690         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
7691         from gl_avltreehash_list_implementation.
7692
7693 2006-10-03  Bruno Haible  <bruno@clisp.org>
7694
7695         * lib/gl_oset.c (gl_oset_add): Fix return type.
7696
7697 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
7698
7699         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
7700
7701 2006-10-02  Eric Blake  <ebb9@byu.net>
7702
7703         * modules/strnlen (Depends-on): Add extensions.
7704
7705 2006-10-02  Eric Blake  <ebb9@byu.net>
7706
7707         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
7708         definition in 2.60+.
7709
7710 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
7711
7712         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
7713         checks.
7714
7715 2006-10-02  Bruno Haible  <bruno@clisp.org>
7716
7717         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
7718         to the AUTOMAKE_OPTIONS.
7719         Reported by Jim Meyering.
7720
7721 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
7722
7723         Work around bug in Solaris 10 /proc file system:
7724         /proc/self/fd/NNN/.. isn't the parent directory of
7725         the directory whose file descriptor is NNN.  This needs to
7726         be worked around at run time, not compile time, since a
7727         program might be built on Solaris 8, where things work, and
7728         run on Solaris 10.
7729         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
7730         to use the following interface instead:
7731         (OPENAT_BUFFER_SIZE): New macro.
7732         (openat_proc_name): New function.
7733         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
7734         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
7735         Likewise.
7736         * lib/openat-proc.c: New file.
7737         * modules/openat (Files): Add lib/openat-proc.c.
7738         (Depends-on): Add same-inode, stdbool.
7739         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
7740
7741 2006-09-29  Bruno Haible  <bruno@clisp.org>
7742
7743         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
7744         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
7745         argument. Set stdout_closed before testing for ferror, not after.
7746         (fwriteerror, fwriteerror_no_ebadf): New functions.
7747
7748 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7749
7750         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
7751
7752 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
7753
7754         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
7755         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
7756
7757 2006-09-28  Jim Meyering  <jim@meyering.net>
7758
7759         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
7760         Include <unistd.h>.
7761
7762 2006-09-28  Bruno Haible  <bruno@clisp.org>
7763
7764         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
7765         * modules/linkedhash-list (Depends-on): Likewise.
7766         * modules/rbtreehash-list (Depends-on): Likewise.
7767
7768 2006-09-28  Bruno Haible  <bruno@clisp.org>
7769
7770         * lib/strndup.h: Simplify the redefinition of strndup.
7771         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
7772         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
7773
7774 2006-09-28  Bruno Haible  <bruno@clisp.org>
7775
7776         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
7777         * lib/gl_linkedhash_list.c: Likewise.
7778         * lib/gl_rbtreehash_list.c: Likewise.
7779
7780 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
7781
7782         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
7783         getaddrinfo.
7784
7785         * lib/__fpending.h: Don't include <stdio_ext.h> unless
7786         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
7787         it causes <stdio_ext.h> to cause a compile-time error.
7788         Problem reported by Nelson H. F. Beebe.
7789         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
7790         of HAVE_DECL___PENDING.
7791
7792         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
7793         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
7794         declaration.
7795
7796 2006-09-27  Jim Meyering  <jim@meyering.net>
7797
7798         This file could end up with a definition for a function
7799         named __strndup, rather than rpl_strndup on a system with
7800         incomplete weak_alias support.
7801         * lib/strndup.c (strndup): Rename from __strndup.
7802         Remove #defines that used to map __strndup to strndup.
7803         Don't use K&R prototypes.
7804         Remove LIBC-related code, since this file is not sync'd with glibc.
7805         * lib/strndup.h: Revamp, accordingly.
7806         * m4/strndup.m4: Modernize.
7807
7808 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
7809
7810         * modules/savewd (Depends-on): Add 'raise'.
7811         * lib/savewd.c: Include <signal.h>, for 'raise'.
7812
7813 2006-09-26  Jim Meyering  <jim@meyering.net>
7814
7815         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
7816         when we detect Darwin 8.7.0's acl_get_file bug.
7817         Rearrange to perform the new (below) run-test while $LIBS
7818         contains any acl-related library.  Set USE_ACL at the end.
7819         (gl_ACL_GET_FILE): New function.
7820
7821 2006-09-26  Eric Blake  <ebb9@byu.net>
7822
7823         * lib/verror.c: Include <config.h> unconditionally.
7824
7825 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
7826
7827         * modules/clock-time (Maintainer): Add self.
7828         * modules/getlogin_r (Depends-on): Add extensions.
7829
7830 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7831
7832         * modules/clock-time: New module.
7833         * modules/nanosleep (Depends-on): Add clock-time.
7834         * modules/gethrxtime (Depends-on): Likewise.
7835         * modules/gettime (Depends-on): Likewise.
7836         * modules/settime (Depends-on): Likewise.
7837
7838         * modules/fts-lgpl: Depend on openat.
7839         * modules/mkancesdirs: Depend on savewd.
7840         * modules/mkdir-p: Likewise.
7841
7842 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7843
7844         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
7845
7846         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
7847         `gl_have_arbitrary_file_name_length_limit' to
7848         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
7849         actually works between configure runs.
7850
7851 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7852             Bruno Haible  <bruno@clisp.org>
7853
7854         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
7855
7856 2006-09-25  Jim Meyering  <jim@meyering.net>
7857
7858         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
7859         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
7860
7861 2006-09-25  Eric Blake  <ebb9@byu.net>
7862
7863         * gnulib-tool (func_import, func_create_testdir): Fix typos in
7864         exec's in 2006-09-18 patch when shuffling fds.
7865
7866 2006-09-25  Bruno Haible  <bruno@clisp.org>
7867
7868         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
7869         Reported by Jim Meyering.
7870
7871 2006-09-24  Jim Meyering  <jim@meyering.net>
7872
7873         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
7874         compare a pointer against a literal "0".  That caused failures with
7875         at least HP-UX's hpcc.
7876
7877 2006-09-22  Simon Josefsson  <jas@extundo.com>
7878
7879         * modules/gc-sha1:
7880         * modules/gc-md4:
7881         * modules/gc-hmac-sha1:
7882         * modules/gc-hmac-md5:
7883         * modules/gc-des:
7884         * modules/gc-arcfour: Distribute more files.
7885
7886 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7887
7888         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
7889         (gl_linked_iterator_from_to): Initialize struct completely.
7890         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
7891         (gl_tree_iterator_from_to): Likewise
7892         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
7893         * lib/gl_array_list.c [lint] (gl_array_iterator)
7894         (gl_array_iterator_from_to): Likewise.
7895         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
7896         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
7897         (gl_carray_iterator_from_to): Likewise.
7898
7899         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
7900         * lib/md4.c (md4_process_block): Remove unused variable.
7901         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
7902         parentheses for clarity.
7903
7904 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7905
7906         * modules/bison-i18n (Depends-on): Add gettext.
7907
7908 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7909
7910         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
7911         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
7912         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
7913         also add missing comma that caused broken test.
7914         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
7915         stdlib.h, for `abort'.
7916         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
7917         variables.
7918         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
7919         include unistd.h if present, for `rmdir'.
7920         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
7921         variables.
7922         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
7923         in the process include standard headers for prototypes.
7924         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
7925         gets declared on GNU/Linux.
7926         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
7927         unistd.h, for `rmdir'.
7928         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
7929
7930         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
7931         always true.
7932         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
7933
7934         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
7935
7936 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7937
7938         * gnulib-tool (func_version): Create output all at once.  This
7939         may help avoid triggering unnecessary SIGPIPEs, and at any
7940         rate it doesn't hurt.
7941
7942 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7943             Bruno Haible  <bruno@clisp.org>
7944
7945         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
7946         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
7947         * m4/signed.m4 (bh_C_SIGNED): Likewise.
7948
7949         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
7950         (gl_FUNC_VASPRINTF): Invoke it.
7951
7952 2006-09-22  Bruno Haible  <bruno@clisp.org>
7953
7954         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
7955         getloadavg.c as first argument.
7956
7957 2006-09-22  Bruno Haible  <bruno@clisp.org>
7958
7959         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
7960         at the beginning of the gl_INIT macro.
7961         * modules/getloadavg (configure.ac): Pass $gl_source_base to
7962         gl_GETLOADAVG.
7963
7964 2006-09-22  Bruno Haible  <bruno@clisp.org>
7965
7966         * gnulib-tool (func_create_megatestdir): Don't include the config-h
7967         module.
7968         Suggested by Ralf Wildenhues.
7969
7970 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
7971
7972         Import this patch from libc:
7973
7974         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
7975
7976         * lib/regex_internal.c (re_string_reconstruct): Handle
7977         offset < pstr->valid_raw_len && pstr->offsets_needed case.
7978         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
7979         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
7980         re_string_context_at.
7981
7982         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
7983         now requires it.
7984         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
7985         gl_REGEX now does it for us.
7986         (gl_REGEX): Add test taken from
7987         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
7988
7989         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
7990         Check that large offsets work.  Modernize Autoconf usages.
7991         Prefer "yes" to mean a good thing rather than a bad.
7992         Don't put "#define mkstemp" in config.h, as this might interfere
7993         with standard system headers that "#define mkstemp mkstemp64".
7994
7995         * modules/mkstemp (Depends-on): Add extensions, so that
7996         mkstemp is visible on some platforms.
7997         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
7998         (Include): Change to "mkstemp.h" from <stdlib.h>.
7999         (Files): Add mkstemp.h.
8000
8001         * lib/mkstemp.h: New file, since some standard headers
8002         #define mkstemp.
8003         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
8004         Include "mkstemp.h".
8005         Make the _LIBC code resemble glibc original more,
8006         e.g., use K&R style.
8007         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
8008         (mkstemp): Remove, since mkstemp.h does this for us.
8009         * lib/stdlib--.h: Include mkstemp.h.
8010
8011         Import this patch from libc:
8012
8013         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
8014
8015         * lib/tempname.c (__gen_tempname): Change attempts_min
8016         into a macro.  Use preprocessor to decide how to initialize
8017         attempts [Coverity CID 67].
8018
8019 2006-09-20  Bruno Haible  <bruno@clisp.org>
8020
8021         * lib/mkdtemp.c: Import from libc.
8022         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
8023                 * sysdeps/posix/tempname.c (__gen_tempname): Change
8024                 attempts_min into a macro.  Use preprocessor to decide how to
8025                 initialize attempts [Coverity CID 67].
8026         2001-11-27  Paul Eggert  <eggert@twinsun.com>
8027                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
8028                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
8029
8030 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8031
8032         * gnulib-tool (func_exit): New function, to allow to pass the
8033         exit status portably through the trap.  Use everywhere.
8034         (--help, --version): Signal a write error.
8035         (trap): catch SIGPIPE, for write errors.
8036         Exit at the end of the trap, with the correct exit status.
8037
8038 2006-09-19  Karl Berry  <karl@gnu.org>
8039
8040         * doc/gnulib.texi: note about the license texinfo files.
8041
8042 2006-09-19  Eric Blake  <ebb9@byu.net>
8043
8044         * gnulib-tool: Avoid space-tab.
8045
8046 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
8047
8048         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
8049         that prevented coreutils 6.1 from building.  Problem reported
8050         by Petter Reinholdtsen.
8051
8052 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
8053
8054         * gnulib-tool (avoidlist): Fix typo that broke options like
8055         --avoid=lock that are used by coreutils bootstrap.
8056
8057 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
8058
8059         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
8060         more systematically.
8061
8062 2006-09-18  Jim Meyering  <jim@meyering.net>
8063
8064         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
8065
8066 2006-09-18  Bruno Haible  <bruno@clisp.org>
8067
8068         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
8069
8070 2006-09-18  Bruno Haible  <bruno@clisp.org>
8071
8072         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
8073         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
8074         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
8075         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
8076         * m4/gettext.m4: Require autoconf >= 2.52.
8077         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
8078         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
8079         of gl_cv_header_inttypes_h.
8080
8081 2006-09-18  Bruno Haible  <bruno@clisp.org>
8082
8083         * lib/javaversion.c: Include configmake.h.
8084
8085 2006-09-18  Bruno Haible  <bruno@clisp.org>
8086
8087         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
8088         avoid that the while loops be executed in a subshell.
8089
8090 2006-09-18  Bruno Haible  <bruno@clisp.org>
8091
8092         * MODULES.html.sh (func_module): Break long lines.
8093         Suggested by Bruce Korb <bkorb@gnu.org>.
8094
8095 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8096
8097         Speed up by a factor of 1.12.
8098         * gnulib-tool (nl): New variable.
8099         (func_import): Rewrite include directive extraction to only read each
8100         directive once.
8101
8102 2006-09-17  Bruno Haible  <bruno@clisp.org>
8103
8104         * modules/javaversion (Makefile.am): Remove DEFS setting.
8105         (Depends-on): Add configmake, for PKGDATADIR definition.
8106
8107 2006-09-17  Bruno Haible  <bruno@clisp.org>
8108
8109         * gnulib-tool (func_create_testdir): Rewrite all files at once.
8110
8111 2006-09-17  Bruno Haible  <bruno@clisp.org>
8112
8113         * gnulib-tool (func_append): New function, stolen from libtool.m4.
8114         (func_modules_transitive_closure, func_modules_add_dummy,
8115         func_modules_to_filelist, func_import, func_create_testdir,
8116         func_create_megatestdir, ...): Use it wherever possible.
8117         Suggested by Ralf Wildenhues.
8118
8119 2006-09-16  Karl Berry  <karl@gnu.org>
8120
8121         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
8122         to avoid sectioning errors.
8123         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
8124         [ifinfo]: blank line after @center-ed titles.
8125         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
8126         Spell FSF address consistently with others.
8127         (These changes approved by rms.)
8128
8129 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8130
8131         Speed up by a factor of 1.61.
8132         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
8133         already checked module names again.
8134
8135 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8136
8137         Speed up by a factor of 1.13.
8138         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
8139         for new_files, and the input to func_add_or_update.
8140
8141 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8142
8143         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
8144         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
8145
8146 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
8147
8148         * modules/mkancesdirs (Depends-on): Add fcntl.
8149         * modules/savewd: New file.
8150         * MODULES.html.sh (File system functions): Add savewd.
8151
8152         * modules/configmake (Makefile.am): Add support for the
8153         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
8154
8155 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
8156
8157         * m4/savewd.m4: New file.
8158
8159 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
8160
8161         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
8162         (dirchownmod): New arg FD.  All callers changed.
8163         Use FD rather than opening the directory ourself, as opening is
8164         now the caller's responsibility.
8165         * lib/dirchownmod.h: Likewise.
8166         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
8167         hosts that require <sys/types.h> before <sys/stat.h>.  Include
8168         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
8169         (test_dir): Remove.
8170         (mkancesdirs): Return length of prefix of FILE that has already
8171         been made, or -2 if there is a child doing the work.  Redo
8172         algorithm so that it is O(N) rather than O(N**2).  Optimize away
8173         ".", and treat ".." specially since it might stray back into
8174         already-created areas.  Use a subprocess if necessary.  New arg
8175         WD; all users changed.  MAKE_DIR function should now return 1
8176         if it creates a directory that is not readable.  Return -2 if
8177         a child process is spun off.
8178         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
8179         Adjust signature to match code.
8180         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
8181         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
8182         all users changed.
8183         * lib/savewd.c, lib/savewd.h: New files.
8184
8185 2006-09-15  Jim Meyering  <jim@meyering.net>
8186
8187         * modules/rename-dest-slash: New module.
8188         * MODULES.html.sh (posix_compat): Add it here.
8189
8190         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
8191
8192 2006-09-15  Jim Meyering  <jim@meyering.net>
8193
8194         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
8195         file.
8196
8197         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
8198
8199 2006-09-15  Jim Meyering  <jim@meyering.net>
8200
8201         * lib/rename-dest-slash.c (has_trailing_slash): Use
8202         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
8203         (rpl_rename_dest_slash): Perform the cheaper trailing slash
8204         test before testing whether SRC is a directory.
8205         Suggestions from Bruno Haible.
8206
8207         Avoid a warning about an unused variable.
8208         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
8209         into the #ifdef block where it's used.
8210
8211         * lib/rename-dest-slash.c: New file.
8212
8213 2006-09-14  Bruno Haible  <bruno@clisp.org>
8214
8215         * lib/allocsa.c: Include <config.h> unconditionally.
8216         * lib/asnprintf.c: Likewise.
8217         * lib/asprintf.c: Likewise.
8218         * lib/c-strcasecmp.c: Likewise.
8219         * lib/c-strcasestr.c: Likewise.
8220         * lib/c-strncasecmp.c: Likewise.
8221         * lib/c-strstr.c: Likewise.
8222         * lib/classpath.c: Likewise.
8223         * lib/clean-temp.c: Likewise.
8224         * lib/concatpath.c: Likewise.
8225         * lib/copy-file.c: Likewise.
8226         * lib/csharpcomp.c: Likewise.
8227         * lib/csharpexec.c: Likewise.
8228         * lib/execute.c: Likewise.
8229         * lib/fatal-signal.c: Likewise.
8230         * lib/findprog.c: Likewise.
8231         * lib/fwriteerror.c: Likewise.
8232         * lib/gl_array_list.c: Likewise.
8233         * lib/gl_array_oset.c: Likewise.
8234         * lib/gl_avltree_list.c: Likewise.
8235         * lib/gl_avltree_oset.c: Likewise.
8236         * lib/gl_avltreehash_list.c: Likewise.
8237         * lib/gl_carray_list.c: Likewise.
8238         * lib/gl_linked_list.c: Likewise.
8239         * lib/gl_linkedhash_list.c: Likewise.
8240         * lib/gl_list.c: Likewise.
8241         * lib/gl_oset.c: Likewise.
8242         * lib/gl_rbtree_list.c: Likewise.
8243         * lib/gl_rbtree_oset.c: Likewise.
8244         * lib/gl_rbtreehash_list.c: Likewise.
8245         * lib/imaxabs.c: Likewise.
8246         * lib/imaxdiv.c: Likewise.
8247         * lib/javacomp.c: Likewise.
8248         * lib/javaexec.c: Likewise.
8249         * lib/javaversion.c: Likewise.
8250         * lib/linebreak.c: Likewise.
8251         * lib/localcharset.c: Likewise.
8252         * lib/lock.c: Likewise.
8253         * lib/mbchar.c: Likewise.
8254         * lib/mbswidth.c: Likewise.
8255         * lib/mkdtemp.c: Likewise.
8256         * lib/pipe.c: Likewise.
8257         * lib/printf-args.c: Likewise.
8258         * lib/printf-parse.c: Likewise.
8259         * lib/progname.c: Likewise.
8260         * lib/progreloc.c: Likewise.
8261         * lib/readlink.c: Likewise.
8262         * lib/sh-quote.c: Likewise.
8263         * lib/stpcpy.c: Likewise.
8264         * lib/stpncpy.c: Likewise.
8265         * lib/strcasecmp.c: Likewise.
8266         * lib/strcasestr.c: Likewise.
8267         * lib/strcspn.c: Likewise.
8268         * lib/striconv.c: Likewise.
8269         * lib/strncasecmp.c: Likewise.
8270         * lib/strnlen1.c: Likewise.
8271         * lib/strstr.c: Likewise.
8272         * lib/strtok_r.c: Likewise.
8273         * lib/tls.c: Likewise.
8274         * lib/tmpdir.c: Likewise.
8275         * lib/unicodeio.c: Likewise.
8276         * lib/unsetenv.c: Likewise.
8277         * lib/vasnprintf.c: Likewise.
8278         * lib/vasprintf.c: Likewise.
8279         * lib/wait-process.c: Likewise.
8280         * lib/xallocsa.c: Likewise.
8281         * lib/xsetenv.c: Likewise.
8282         * lib/xstriconv.c: Likewise.
8283
8284 2006-09-13  Simon Josefsson  <jas@extundo.com>
8285
8286         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
8287         that internally, suggested by Ralf Wildenhues
8288         <Ralf.Wildenhues@gmx.de>.
8289
8290 2006-09-13  Simon Josefsson  <jas@extundo.com>
8291
8292         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
8293         @LIBOBJS@.
8294         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8295
8296 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
8297
8298         * lib/_fpending.c: Include <config.h> unconditionally, since we no
8299         longer worry about uses that don't define HAVE_CONFIG_H.
8300         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
8301         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
8302         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
8303         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
8304         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
8305         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
8306         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
8307         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
8308         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
8309         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
8310         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
8311         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
8312         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
8313         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
8314         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
8315         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
8316         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
8317         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
8318         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
8319         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
8320         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
8321         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
8322         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
8323         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
8324         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
8325         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
8326         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
8327         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
8328         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
8329         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
8330         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
8331         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
8332         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
8333         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
8334         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
8335         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
8336         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
8337         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
8338         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
8339         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
8340         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
8341         Likewise.
8342
8343 2006-09-13  Eric Blake  <ebb9@byu.net>
8344
8345         * lib/getopt.c: Fix typo in last commit.
8346
8347 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
8348
8349         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
8350         dgettext.
8351
8352 2006-09-12  Jim Meyering  <jim@meyering.net>
8353
8354         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
8355         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
8356         Reported by Nelson H. F. Beebe.
8357
8358 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8359
8360         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
8361         program_invocation_name and program_invocation_short_name are
8362         initialized.
8363         * lib/argp-namefrob.h: Move declarations of program_invocation_name
8364         and program_invocation_short_name to argp.h, so they are visible
8365         to user programs.
8366         * lib/argp.h: Likewise
8367
8368 2006-09-10  Bruno Haible  <bruno@clisp.org>
8369
8370         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
8371         m4/inttypes_h.m4, m4/uintmax_t.m4.
8372
8373 2006-09-10  Bruno Haible  <bruno@clisp.org>
8374
8375         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
8376         gl_AC_TYPE_UINTMAX_T.
8377
8378 2006-09-10  Bruno Haible  <bruno@clisp.org>
8379
8380         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
8381
8382 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8383
8384         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
8385         convention.  Text proposed by Bruno Haible.
8386         (struct argp_option): Document the use of N_() wrappers.
8387
8388         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
8389         '\v', and translate the two parts separately, instead of feeding
8390         the whole string to gettext.  This allows to exclude
8391         '\v' from the strings visible to the translator by writing doc
8392         strings as N_("..") "\v" N_("..").
8393
8394 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
8395
8396         * config/srclist.txt: Undo latest change; the bug was fixed.
8397
8398 2006-09-09  Bruno Haible  <bruno@clisp.org>
8399
8400         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
8401         assignments if building a library without libtool.
8402         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
8403         in func_emit_lib_Makefile_am.
8404         (func_import): When building a static library libfoo.a, arrange to
8405         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
8406         (func_create_testdir): Likewise.
8407         * modules/gc (configure.ac, Makefile.am): If building statically,
8408         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
8409         * modules/iconvme (configure.ac, Makefile.am): Likewise.
8410         * modules/striconv (configure.ac, Makefile.am): Likewise.
8411         Based on a suggestion by Ralf Wildenhues.
8412
8413 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8414
8415         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
8416         Check for unistd.h too, since Autoconf doesn't assume POSIX.
8417         Also:
8418
8419         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8420         Add year_2050_test to catch glibc bug 2821
8421         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
8422
8423         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8424         Prefer #ifdef to #if.
8425
8426         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
8427         Return from 'main' instead of calling 'exit'.
8428
8429 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8430
8431         * lib/mktime.c (guess_time_tm): Fix bug where mktime
8432         returned the maximum time_t value rather than (time_t) -1.
8433         Problem originally reported by William Bardwell
8434         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
8435
8436         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
8437         Moved to here ...
8438         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
8439         ... from here.
8440
8441 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8442
8443         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
8444         2821 is fixed.
8445
8446 2006-09-08  Jim Meyering  <jim@meyering.net>
8447
8448         Don't make generated files read-only.  That would bother too many
8449         people.  However, do retain the ability to work when targets are
8450         read-only: remove the destination and temporary files before writing
8451         them (when generated via sed or echo), or by using the -f option for
8452         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
8453         * modules/alloca-opt, modules/argz, modules/arpa_inet:
8454         * modules/byteswap, modules/configmake, modules/fcntl:
8455         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
8456         * modules/localcharset, modules/netinet_in, modules/poll:
8457         * modules/stdbool, modules/stdint, modules/sys_select:
8458         * modules/sys_socket, modules/sys_stat, modules/sysexits:
8459
8460 2006-09-08  Jim Meyering  <jim@meyering.net>
8461
8462         Avoid new build failure on FreeBSD 6.0.
8463         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
8464         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
8465         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
8466
8467 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8468
8469         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
8470
8471 2006-09-07  Jim Meyering  <jim@meyering.net>
8472
8473         Fix global typo in last change: use chmod u-w, not chmod u-x.
8474         Spotted by Paul Eggert and Bruce Korb.
8475         * modules/alloca-opt, modules/argz, modules/arpa_inet:
8476         * modules/byteswap, modules/configmake, modules/fcntl:
8477         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
8478         * modules/localcharset, modules/netinet_in, modules/poll:
8479         * modules/stdbool, modules/stdint, modules/sys_select:
8480         * modules/sys_socket, modules/sys_stat, modules/sysexits:
8481
8482 2006-09-06  Jim Meyering  <jim@meyering.net>
8483
8484         Make generated files be read-only.
8485         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
8486         Ensure that each generated file is now read-only.
8487         * modules/argz: Likewise.
8488         * modules/arpa_inet: Likewise.
8489         * modules/byteswap: Likewise.
8490         * modules/configmake: Likewise.
8491         * modules/fcntl: Likewise.
8492         * modules/fnmatch: Likewise.
8493         * modules/getopt: Likewise.
8494         * modules/glob: Likewise.
8495         * modules/inttypes: Likewise.
8496         * modules/netinet_in: Likewise.
8497         * modules/poll: Likewise.
8498         * modules/stdbool: Likewise.
8499         * modules/stdint: Likewise.
8500         * modules/sys_select: Likewise.
8501         * modules/sys_socket: Likewise.
8502         * modules/sys_stat: Likewise.
8503         * modules/sysexits: Likewise.
8504         * modules/localcharset: Same as above, but continue using temporary
8505         file named "t-$@" (why different?) rather than the "$@-t" used
8506         everywhere else.
8507
8508         * modules/sysexits (Makefile.am): Replace literal occurrences
8509         of "sysexit.h" more readable, and more consistent, "$@".
8510
8511 2006-09-06  Bruno Haible  <bruno@clisp.org>
8512
8513         * modules/striconv: New file.
8514         * modules/xstriconv: New file.
8515         * MODULES.html.sh (Internationalization functions): Add striconv,
8516         xstriconv.
8517
8518 2006-09-06  Bruno Haible  <bruno@clisp.org>
8519
8520         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
8521         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
8522         not using libtool correctly.
8523
8524 2006-09-06  Bruno Haible  <bruno@clisp.org>
8525
8526         * lib/striconv.h: New file.
8527         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
8528         iconvstring.c.
8529         * lib/xstriconv.h: New file.
8530         * lib/xstriconv.c: New file.
8531
8532 2006-09-06  Bruno Haible  <bruno@clisp.org>
8533
8534         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8535         lib_..._LDFLAGS.
8536
8537 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8538
8539         * lib/argz_.h: Sync from Libtool.
8540
8541         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
8542                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8543
8544         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
8545
8546 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
8547
8548         * modules/trim: New file.
8549
8550 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
8551
8552         * lib/trim.h: New file.
8553         * lib/trim.c: New file.
8554
8555 2006-09-05  Bruno Haible  <bruno@clisp.org>
8556
8557         * MODULES.html.sh (String handling): Add trim.
8558
8559 2006-09-04  Karl Berry  <karl@gnu.org>
8560
8561         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
8562         until next release.
8563
8564 2006-09-03  Bruno Haible  <bruno@clisp.org>
8565
8566         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
8567         correctly.
8568
8569 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8570
8571         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
8572         not gl_GETLOADAVG.  Omit unneeded semicolons.
8573         Problems reported by Ralf Wildenhues in
8574         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
8575         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
8576         at the end, which is the usual gnulib style.
8577
8578         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
8579         of doing all the work ourselves.
8580         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
8581         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
8582
8583 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8584
8585         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
8586         Problem reported by Ralf Wildenhues in
8587         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
8588
8589         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
8590         HAVE_STRUCT_STATFS_F_FSTYPENAME.
8591
8592 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8593
8594         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
8595         yesterday's patch by changing test -n to test -z.
8596
8597 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8598
8599         * modules/getloadavg (Files): Add m4/getloadavg.m4.
8600         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
8601         the former is now obsolescent.
8602
8603         * modules/chdir-long (Depends-on): Add fcntl.
8604
8605 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8606
8607         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
8608         obsolescent, and programs should use gnulib instead.
8609         * m4/getloadavg.m4: New file, with contents taken from Autoconf
8610         but with prefixes changed.
8611
8612 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8613
8614         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
8615         or stdbool.h, because they might not exist while configuring.
8616
8617         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
8618         Don't include unistd.h or limits.h; not needed, since chdir-long.h
8619         does that for us.
8620         (O_DIRECTORY): Remove.
8621
8622 2006-08-31  Eric Blake  <ebb9@byu.net>
8623
8624         * gnulib-tool: Don't let emacs change spaces to TAB.
8625
8626 2006-08-31  Bruno Haible  <bruno@clisp.org>
8627
8628         * gnulib-tool: When calling func_import more than once, do it in a
8629         subshell.
8630         Reported by Eric Blake <ebb9@byu.net>.
8631
8632 2006-08-31  Bruno Haible  <bruno@clisp.org>
8633
8634         * gnulib-tool (nl): Remove variable.
8635         (sed_transform_lib_file): Use more robust test for config-h module.
8636         (func_import): Fix typo in 2006-08-25 patch.
8637
8638 2006-08-31  Bruno Haible  <bruno@clisp.org>
8639
8640         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
8641         specified, augment Makefile.am variables instead of assigning them.
8642
8643 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
8644
8645         Work around a bug in both the Linux and SunOS 64-bit kernels:
8646         nanosleep mishandles sleeps for longer than 2**31 seconds.
8647         Problem reported by Frank v Waveren in
8648         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
8649         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
8650         Check for nanosleep bug.
8651         (LIB_NANOSLEEP): Append clock_gettime library if needed.
8652
8653 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
8654
8655         Work around a bug in both the Linux and SunOS 64-bit kernels:
8656         nanosleep mishandles sleeps for longer than 2**31 seconds.
8657         Problem reported by Frank v Waveren in
8658         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
8659         * lib/nanosleep.c (BILLION): New constant.
8660         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
8661         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
8662         implementation.
8663
8664 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
8665
8666         * modules/nanosleep (Depends-on): Add gettime.
8667
8668 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
8669         and Simon Josefsson  <jas@extundo.com>
8670         and Oskar Liljeblad  <oskar@osk.mine.nu>
8671
8672         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
8673         * gnulib-tool (func_import): New license type 'unmodifiable license
8674         text'.
8675         * modules/fdl: Use it.  Longer description.
8676         * module/gpl, module/lgpl: New files.
8677
8678 2006-08-30  Jim Meyering  <jim@meyering.net>
8679
8680         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
8681         shadowing the parameter.
8682
8683 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8684
8685         Sync from Libtool:
8686
8687         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8688
8689         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
8690         sharing with gnulib.  Report by Eric Blake.
8691
8692 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
8693
8694         * modules/isapipe: New file.
8695         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
8696
8697 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
8698
8699         * modules/configmake (Makefile.am): Add a comment, and omit
8700         the CONFIGMAKE_ prefix from generated macro names.  Suggested
8701         by Bruno Haible.
8702
8703 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
8704
8705         * m4/isapipe.m4: New file.
8706
8707 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
8708
8709         * lib/isapipe.c, lib/isapipe.h: New files.
8710
8711 2006-08-29  Jim Meyering  <jim@meyering.net>
8712
8713         * modules/configmake (Makefile.am): Make configmake.h depend on
8714         Makefile.  Otherwise, a stale configmake.h could hang around.
8715
8716 2006-08-29  Eric Blake  <ebb9@byu.net>
8717
8718         * lib/error.c (error_at_line, print_errno_message): Match libc, after
8719         resolution of upstream bug 3044.
8720
8721 2006-08-29  Bruno Haible  <bruno@clisp.org>
8722
8723         * modules/localcharset (Depends-on): Add configmake.
8724         (Makefile.am): Remove setting of LIBDIR through DEFS.
8725
8726 2006-08-29  Bruno Haible  <bruno@clisp.org>
8727
8728         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
8729         defined.
8730
8731 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
8732
8733         * modules/fcntl: New file.
8734         * modules/chdir-safer (Depends-on): Add fcntl.
8735         * modules/fts: Likewise.
8736         * modules/mkdir-p: Likewise.
8737
8738         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
8739         This undoes the most recent change, since we're now addressing the
8740         problem in a different way.
8741
8742         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
8743         into output, since the output might be called Makefile.am even
8744         if $makefile_name is something different.
8745         (func_import): Use $makefile_am rather than
8746         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
8747         empty.
8748
8749         * modules/inttypes (Files): Add m4/inttypes-h.m4.
8750
8751 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
8752
8753         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
8754         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
8755         recent change to stdint.m4, since we're now addressing the problem in a
8756         different way.
8757
8758 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
8759
8760         * m4/fcntl_h.m4: New file.
8761
8762 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
8763
8764         * lib/fcntl_.h: New file.
8765         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
8766         the fcntl module.
8767         * lib/dirchownmod.c: Likewise.
8768         * lib/fts.c: Likewise.
8769
8770         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
8771         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
8772         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
8773         just before including <inttypes.h>, to avoid circular inclusion.
8774
8775 2006-08-28  Jim Meyering  <jim@meyering.net>
8776
8777         * doc/visibility.texi: Actually read and correct the grammar of the
8778         sentence affected by yesterday's change.
8779
8780 2006-08-28  Eric Blake  <ebb9@byu.net>
8781
8782         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
8783         needs wrapper.
8784
8785 2006-08-28  Eric Blake  <ebb9@byu.net>
8786
8787         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
8788
8789 2006-08-28  Eric Blake  <ebb9@byu.net>
8790
8791         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
8792
8793 2006-08-28  Bruno Haible  <bruno@clisp.org>
8794
8795         * modules/c-strstr: New file, from GNU gettext.
8796         * MODULES.html.sh (String handling): Add c-strstr.
8797
8798 2006-08-28  Bruno Haible  <bruno@clisp.org>
8799
8800         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
8801         macros.
8802         Reported by Eric Blake.
8803
8804 2006-08-28  Bruno Haible  <bruno@clisp.org>
8805
8806         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
8807         (VASNPRINTF): Return a string of length > INT_MAX without failing.
8808         * lib/vasprintf.c: Include errno.h, limits.h.
8809         (EOVERFLOW): New fallback definition.
8810         (vasprintf): Test here whether the string length is > INT_MAX.
8811         * lib/vsnprintf.c: Include errno.h, limits.h.
8812         (EOVERFLOW): New fallback definition.
8813         (vsnprintf): Fix bug when generated string was too long for the buffer.
8814         Test here whether the string length is > INT_MAX.
8815
8816 2006-08-28  Bruno Haible  <bruno@clisp.org>
8817
8818         * lib/inttypes_.h (SCNX*): Remove definitions.
8819         Reported by Eric Blake.
8820
8821 2006-08-28  Bruno Haible  <bruno@clisp.org>
8822
8823         * lib/c-strstr.h: New file, from GNU gettext.
8824         * lib/c-strstr.c: New file, from GNU gettext.
8825
8826 2006-08-28  Bruno Haible  <bruno@clisp.org>
8827
8828         * gnulib-tool: Reorder some statements.
8829
8830 2006-08-28  Bruno Haible  <bruno@clisp.org>
8831
8832         * gnulib-tool: New option --makefile-name.
8833         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
8834         $makefile_name.
8835         (func_import): Write $makefile_name to the cache file, and read it from
8836         there unless explicitly specified. Use $makefile_name as file name
8837         instead of Makefile.am. Adjust the recommendations accordingly.
8838
8839 2006-08-28  Bruno Haible  <bruno@clisp.org>
8840
8841         * gnulib-tool (func_verify_module): Check against misapplying patch.
8842
8843 2006-08-28  Bruno Haible  <bruno@clisp.org>
8844
8845         * gnulib-tool (func_relativize, func_relconcat): New functions.
8846         Give an error if --local-dir is given with --update.
8847         Remove trailing slashes from $local_gnulib_dir.
8848         (func_import): Store the relativized $local_gnulib_dir in
8849         gnulib-cache.m4, and read it from there if not specified explicitly.
8850
8851 2006-08-28  Bruno Haible  <bruno@clisp.org>
8852
8853         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
8854         is the current directory. Respect also $local_gnulib_dir.
8855
8856 2006-08-28  Bruno Haible  <bruno@clisp.org>
8857             Simon Josefsson  <jas@extundo.com>
8858
8859         BeOS portability.
8860         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
8861
8862 2006-08-27  Jim Meyering  <jim@meyering.net>
8863
8864         * doc/visibility.texi: Remove duplicate word: "pointer".
8865
8866 2006-08-26  Bruno Haible  <bruno@clisp.org>
8867
8868         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
8869         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
8870         (Makefile.am): Create inttypes.h from inttypes_.h.
8871         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
8872
8873         * modules/imaxabs: New file.
8874
8875         * modules/imaxdiv: New file.
8876
8877 2006-08-26  Bruno Haible  <bruno@clisp.org>
8878
8879         * m4/inttypes.m4: New file.
8880         * m4/_inttypes_h.m4: Remove file.
8881         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
8882         PRI_MACROS_BROKEN.
8883         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
8884
8885         * m4/imaxabs.m4: New file.
8886
8887         * m4/imaxdiv.m4: New file.
8888
8889 2006-08-26  Bruno Haible  <bruno@clisp.org>
8890
8891         * lib/inttypes_.h: New file.
8892         * lib/inttypes.h: Remove file.
8893         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
8894
8895         * lib/imaxabs.c: New file.
8896
8897         * lib/imaxdiv.c: New file.
8898
8899 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
8900
8901         New config-h module, so that "make" output needn't be cluttered
8902         by -DHAVE_CONFIG_H.
8903         * MODULES.html.sh (Support for building libraries and executables):
8904         Add config-h.
8905         * modules/config-h: New file.
8906         * gnulib-tool (nl, sed_transform_lib_file): New vars.
8907         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
8908         the config-h module is used.
8909
8910         New configmake module, so that "make" output needn't be cluttered
8911         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
8912         * MODULES.html.sh (Support for building libraries and executables):
8913         Add configmake.
8914         * modules/configmake: New file.
8915
8916 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
8917
8918         * m4/config-h.m4: New file.
8919
8920 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
8921
8922         * config/srclist.txt: Add elisp-comp.
8923
8924 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
8925
8926         * MODULES.html.sh (Support for building libraries and executables):
8927         Add elisp-comp.
8928         * build-aux/elisp-comp: New file.
8929         * modules/elisp-comp: New file.
8930
8931 2006-08-24  Bruno Haible  <bruno@clisp.org>
8932
8933         * gnulib-tool (func_create_testdir): Use non-default values of
8934         sourcebase and m4base.
8935
8936 2006-08-24  Bruno Haible  <bruno@clisp.org>
8937
8938         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
8939         HTML structure.
8940
8941 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
8942
8943         * modules/openat (Depends-on): Add lchown.
8944
8945 2006-08-23  Bruno Haible  <bruno@clisp.org>
8946
8947         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
8948         of gl_LOCK_EARLY instead of gl_LOCK.
8949
8950 2006-08-23  Bruno Haible  <bruno@clisp.org>
8951
8952         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
8953         on OSF/1 to no.
8954         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
8955
8956 2006-08-23  Bruno Haible  <bruno@clisp.org>
8957
8958         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
8959         as unusable.
8960
8961         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
8962         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
8963         (gl_LOCK): New macro.
8964
8965 2006-08-22  Simon Josefsson  <jas@extundo.com>
8966
8967         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
8968         to md5 module.
8969
8970 2006-08-22  Simon Josefsson  <jas@extundo.com>
8971
8972         * MODULES.html.sh: Add "Support for maintaining and release
8973         projects".
8974
8975         * build-aux/gnupload: New file, from coreutils.
8976
8977 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
8978
8979         Avoid the need for AC_LIBSOURCES in m4 macros.
8980         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
8981         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
8982         * modules/check-version (EXTRA_DIST): Add check-version.h.
8983         * modules/crc (EXTRA_DIST): Add crc.h.
8984         * modules/des (EXTRA_DIST): Add des.h.
8985         * modules/gc (EXTRA_DIST): Add gc.h.
8986         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
8987         * modules/getline (EXTRA_DIST): Add getline.h.
8988         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
8989         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
8990         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
8991         * modules/md2 (EXTRA_DIST): Add md2.h.
8992         * modules/md4 (EXTRA_DIST): Add md4.h.
8993         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
8994         * modules/read-file (EXTRA_DIST): Add read-file.h.
8995         * modules/readline (EXTRA_DIST): Add readline.h.
8996         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
8997         rijndael-api-fst.h.
8998
8999 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
9000
9001         * m4/rijndael.m4 (gl_ARCFOUR):
9002         * m4/arctwo.m4 (gl_ARCTWO):
9003         * m4/check-version.m4 (gl_CHECK_VERSION):
9004         * m4/crc.m4 (gl_CRC):
9005         * m4/des.m4 (gl_DES):
9006         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
9007         * m4/gc.m4 (gl_GC):
9008         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
9009         * m4/getline.m4 (gl_FUNC_GETLINE):
9010         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
9011         * m4/hmac-md5.m4 (gl_HMAC_MD5):
9012         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
9013         * m4/md2.m4 (gl_MD2):
9014         * m4/md4.m4 (gl_MD4):
9015         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
9016         * m4/read-file.m4 (gl_FUNC_READ_FILE):
9017         * m4/readline.m4 (gl_FUNC_READLINE):
9018         * m4/rijndael.m4 (gl_RIJNDAEL):
9019         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
9020         to get the necessary .h files and whatnot.
9021
9022 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
9023
9024         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
9025         gnulib rather than the other way around.
9026         * config/srclistvars.sh (COREUTILS): Remove.
9027
9028 2006-08-22  Jim Meyering  <jim@meyering.net>
9029
9030         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
9031
9032         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
9033
9034 2006-08-22  Eric Blake  <ebb9@byu.net>
9035
9036         * modules/regexprops-generic: New file.
9037         * MODULES.html.sh (Support for building documentation): List it.
9038
9039 2006-08-22  Eric Blake  <ebb9@byu.net>
9040
9041         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
9042         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
9043         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
9044         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
9045
9046 2006-08-22  Bruno Haible  <bruno@clisp.org>
9047
9048         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
9049         and lib_LTLIBRARIES like the other lib_* variables.
9050
9051 2006-08-22  Bruno Haible  <bruno@clisp.org>
9052
9053         * build-aux/x-to-1.in: New file, from GNU gettext.
9054
9055 2006-08-22  Bruno Haible  <bruno@clisp.org>
9056
9057         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
9058         <utmpx.h> exists.
9059
9060 2006-08-22  Bruno Haible  <bruno@clisp.org>
9061
9062         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
9063         <utmpx.h> exists.
9064
9065 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
9066
9067         BeOS portability.
9068         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
9069         exist.
9070         Problem reported by Bruno Haible.
9071
9072 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
9073
9074         Avoid the need for AC_LIBSOURCES in m4 macros.
9075         * modules/acl (EXTRA_DIST): Add acl.h.
9076         * modules/argmatch (Files): Add m4/argmatch.m4.
9077         (configure.ac): Add gl_ARGMATCH.
9078         (EXTRA_DIST): Renamed from lib_SOURCES, for
9079         consistency with the other modules.  Remove argmatch.c.
9080         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
9081         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
9082         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
9083         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
9084         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
9085         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
9086         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
9087         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
9088         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
9089         * modules/closeout (EXTRA_DIST): Add closeout.h.
9090         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
9091         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
9092         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
9093         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
9094         dirname.h; remove basename.c and stripslash.c.
9095         * modules/exclude (EXTRA_DIST): Add exclude.h.
9096         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
9097         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
9098         * modules/file-type (EXTRA_DIST): Add file-type.h.
9099         * modules/filemode (EXTRA_DIST): Add filemode.h.
9100         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
9101         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
9102         * modules/fpending (EXTRA_DIST): Add __fpending.h.
9103         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
9104         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
9105         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
9106         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
9107         * modules/getdate (EXTRA_DIST): Add getdate.c.
9108         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
9109         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
9110         * modules/getpass (EXTRA_DIST): Add getpass.h.
9111         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
9112         * modules/group-member (EXTRA_DIST): Add group-member.h.
9113         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
9114         * modules/hash (EXTRA_DIST): Add hash.h.
9115         * modules/human (EXTRA_DIST): Add human.h.
9116         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
9117         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
9118         * modules/lchown (EXTRA_DIST): Add lchown.h.
9119         * modules/long-options (EXTRA_DIST): Add long-options.h.
9120         * modules/lstat (EXTRA_DIST): Add lstat.h.
9121         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
9122         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
9123         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
9124         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
9125         * modules/memxor (EXTRA_DIST): Add memxor.h.
9126         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
9127         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
9128         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
9129         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
9130         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
9131         * modules/physmem (EXTRA_DIST): Add physmem.h.
9132         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
9133         * modules/posixver (EXTRA_DIST): Add posixver.h.
9134         * modules/quote (EXTRA_DIST): Add quote.h.
9135         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
9136         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
9137         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
9138         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
9139         regex_internal.h regexec.c.
9140         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
9141         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
9142         * modules/same (EXTRA_DIST): Add same.h.
9143         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
9144         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
9145         * modules/savedir (EXTRA_DIST): Add savedir.h.
9146         * modules/sha1 (EXTRA_DIST): Add sha1.h.
9147         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
9148         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
9149         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
9150         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
9151         * modules/strdup (EXTRA_DIST): Add strdup.h.
9152         * modules/strftime (EXTRA_DIST): Add strftime.h.
9153         * modules/strndup (EXTRA_DIST): Add strndup.h.
9154         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
9155         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
9156         * modules/time_r (EXTRA_DIST): Add time_r.h.
9157         * modules/timespec (EXTRA_DIST): Add timespec.h.
9158         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
9159         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
9160         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
9161         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
9162         * modules/userspec (EXTRA_DIST): Add userspec.h.
9163         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
9164         * modules/utimens (EXTRA_DIST): Add utimens.h.
9165         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
9166         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
9167         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
9168         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
9169         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
9170         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
9171         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
9172         * modules/yesno (EXTRA_DIST): Add yesno.h.
9173
9174 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
9175
9176         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
9177
9178         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
9179         * m4/dev-ino.m4, same-inode.m4: Remove.
9180
9181         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
9182         * m4/acl.m4 (AC_FUNC_ACL):
9183         * m4/backupfile.m4 (gl_BACKUPFILE):
9184         * m4/c-strtod.m4 (gl_C99_STRTOLD):
9185         * m4/canon-host.m4 (gl_CANON_HOST):
9186         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
9187         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
9188         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
9189         * m4/cloexec.m4 (gl_CLOEXEC):
9190         * m4/close-stream.m4 (gl_CLOSE_STREAM):
9191         * m4/closeout.m4 (gl_CLOSEOUT):
9192         * m4/dirfd.m4 (gl_FUNC_DIRFD):
9193         * m4/dirname.m4 (gl_DIRNAME):
9194         * m4/exclude.m4 (gl_EXCLUDE):
9195         * m4/exitfail.m4 (gl_EXITFAIL):
9196         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
9197         * m4/file-type.m4 (gl_FILE_TYPE):
9198         * m4/filemode.m4 (gl_FILEMODE):
9199         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
9200         * m4/fpending.m4 (gl_FUNC_FPENDING):
9201         * m4/fprintftime.m4 (gl_FPRINTFTIME):
9202         * m4/fts.m4 (gl_FUNC_FTS):
9203         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
9204         * m4/getdate.m4 (gl_GETDATE):
9205         * m4/gethrxtime.m4 (gl_GETHRXTIME):
9206         * m4/getpagesize.m4 (gl_GETPAGESIZE):
9207         * m4/getpass.m4 (gl_FUNC_GETPASS):
9208         * m4/gettime.m4 (gl_GETTIME):
9209         * m4/getugroups.m4 (gl_GETUGROUPS):
9210         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
9211         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
9212         * m4/hard-locale.m4 (gl_HARD_LOCALE):
9213         * m4/hash.m4 (gl_HASH):
9214         * m4/idcache.m4 (gl_IDCACHE):
9215         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
9216         * m4/lchown.m4 (gl_FUNC_LCHOWN):
9217         * m4/long-options.m4 (gl_LONG_OPTIONS):
9218         * m4/lstat.m4 (gl_FUNC_LSTAT):
9219         * m4/md5.m4 (gl_MD5):
9220         * m4/memcasecmp.m4 (gl_MEMCASECMP):
9221         * m4/memcoll.m4 (gl_MEMCOLL):
9222         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
9223         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
9224         * m4/memxor.m4 (gl_MEMXOR):
9225         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
9226         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
9227         * m4/modechange.m4 (gl_MODECHANGE):
9228         * m4/mountlist.m4 (gl_MOUNTLIST):
9229         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
9230         * m4/openat.m4 (gl_FUNC_OPENAT):
9231         * m4/pathmax.m4 (gl_PATHMAX):
9232         * m4/physmem.m4 (gl_PHYSMEM):
9233         * m4/posixtm.m4 (gl_POSIXTM):
9234         * m4/posixver.m4 (gl_POSIXVER):
9235         * m4/quote.m4 (gl_QUOTE):
9236         * m4/quotearg.m4 (gl_QUOTEARG):
9237         * m4/readtokens.m4 (gl_READTOKENS):
9238         * m4/readutmp.m4 (gl_READUTMP):
9239         * m4/regex.m4 (gl_REGEX):
9240         * m4/safe-read.m4 (gl_SAFE_READ):
9241         * m4/safe-write.m4 (gl_SAFE_WRITE):
9242         * m4/same.m4 (gl_SAME):
9243         * m4/save-cwd.m4 (gl_SAVE_CWD):
9244         * m4/savedir.m4 (gl_SAVEDIR):
9245         * m4/settime.m4 (gl_SETTIME):
9246         * m4/sha1.m4 (gl_SHA1):
9247         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
9248         * m4/stat-macros.m4 (gl_STAT_MACROS):
9249         * m4/stat-time.m4 (gl_STAT_TIME):
9250         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
9251         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
9252         * m4/strdup.m4 (gl_FUNC_STRDUP):
9253         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
9254         * m4/strndup.m4 (gl_FUNC_STRNDUP):
9255         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
9256         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
9257         * m4/time_r.m4 (gl_TIME_R):
9258         * m4/timespec.m4 (gl_TIMESPEC):
9259         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
9260         * m4/unlinkdir.m4 (gl_UNLINKDIR):
9261         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
9262         * m4/userspec.m4 (gl_USERSPEC):
9263         * m4/utimecmp.m4 (gl_UTIMECMP):
9264         * m4/utimens.m4 (gl_UTIMENS):
9265         * m4/xalloc.m4 (gl_XALLOC):
9266         * m4/xgetcwd.m4 (gl_XGETCWD):
9267         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
9268         * m4/xreadlink.m4 (gl_XREADLINK):
9269         * m4/xstrtod.m4 (gl_XSTRTOD):
9270         * m4/yesno.m4 (gl_YESNO):
9271         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
9272         to get the necessary .h files and whatnot.
9273
9274 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
9275             Bruno Haible  <bruno@clisp.org>
9276
9277         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
9278         /bin/sh understanding of '!' conditional negation.
9279
9280 2006-08-21  Jim Meyering  <jim@meyering.net>
9281
9282         * modules/openat (Depends-on): Really alphabetize.
9283
9284         * modules/acl (Depends-on): Add error and quote.
9285
9286         * check-module (find_included_lib_files): Add at-func.c to the
9287         ok-to-include-more-than-once white list.
9288
9289         * modules/openat (Depends-on): Add lstat.  Alphabetize.
9290
9291 2006-08-21  Bruno Haible  <bruno@clisp.org>
9292
9293         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9294         Emit a pkgdata_DATA variable only if some snippets add contents to it.
9295         Reported by Martin Lambers <marlam@marlam.de>.
9296
9297 2006-08-21  Bruno Haible  <bruno@clisp.org>
9298
9299         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
9300         specify an installation location, don't emit a noinst_LIBRARIES or
9301         noinst_LTLIBRARIES assignment.
9302
9303 2006-08-21  Bruno Haible  <bruno@clisp.org>
9304
9305         BeOS portability.
9306         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
9307         BeOS has mbrtowc() but no <wctype.h>.
9308
9309 2006-08-21  Bruno Haible  <bruno@clisp.org>
9310
9311         BeOS portability.
9312         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
9313         exist.
9314
9315 2006-08-21  Bruno Haible  <bruno@clisp.org>
9316
9317         BeOS portability.
9318         * lib/mbchar.h: Include <wctype.h> only if it exists.
9319
9320 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9321
9322         Remove files that are no longer needed by their respective modules.
9323         * m4/obstack.m4: Remove.
9324         * m4/strerror_r.m4: Remove.
9325         * m4/uint32_t.m4: Remove.
9326         * m4/uintptr_t.m4: Remove.
9327         * m4/ullong_max.m4: Remove.
9328         * m4/xstrtoimax.m4: Remove.
9329         * m4/xstrtoumax.m4: Remove.
9330
9331         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
9332         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
9333         dependencies now capture this.
9334
9335         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
9336         Do not use AC_LIBSOURCES, since gnulib modules now do this.
9337         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
9338         * m4/human.m4 (gl_HUMAN): Likewise.
9339         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
9340         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
9341
9342         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
9343
9344         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
9345         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
9346         stdint.
9347         * m4/human.m4 (gl_HUMAN): Likewise.
9348         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
9349         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
9350         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
9351         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
9352         * m4/xstrtol (gl_XSTRTOL): Likewise.
9353
9354         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
9355         AC_TYPE_LONG_LONG_INT.
9356         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
9357         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
9358         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
9359         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
9360
9361         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
9362         on stdbool.
9363
9364         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
9365         (gl_PREREQ_XSTRTOUL): Remove.
9366
9367         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
9368
9369         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
9370         mode.
9371
9372 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9373
9374         Add and change modules to make it easier for coreutils to use
9375         gnulib-tool.
9376         * modules/backupfile (Files): Remove m4/d-ino.m4.
9377         (Depends-on): Add d-ino.
9378         * modules/cycle-check (Depends-on): Add stdint.
9379         (lib_SOURCES): Add cycle-check.h.
9380         * modules/d-ino: New module.
9381         * modules/d-type: New module.
9382         * modules/error (Files): Remove m4/strerror_r.m4.
9383         * modules/filemode (Files): Add m4/st_dm_mode.m4.
9384         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
9385         m4/inttypes_h.m4, m4/uintmax_t.m4.
9386         (Depends-on): Add stdint.
9387         (lib_SOURCES): Add fsusage.h.
9388         * modules/getcwd (Files): Remove d-ino.m4.
9389         (Depends-on): Add d-ino.
9390         * modules/getndelim2 (Depends-on): Add stdint.
9391         * modules/glob (Files): Remove m4/d-type.m4.
9392         (Depends-on): Add d-type.
9393         * modules/host-os: New module.
9394         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
9395         m4/inttypes_h.m4, m4/uintmax_t.m4.
9396         * Depends-on: Add stdint.
9397         (lib_SOURCES): Add human.h.
9398         * modules/inttostr (Files): Remove m4/intmax_t.m4,
9399         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
9400         m4/uintmax_t.m4, m4/ulonglong.m4.
9401         (Depends-on): Add stdint.
9402         (EXTRA_DIST): Add inttostr.h.
9403         * modules/lchmod: New module.
9404         * modules/link-follow: New module.
9405         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
9406         (Depends-on): Add lchmod.
9407         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
9408         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
9409         (Depends-on): Add stdint.
9410         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
9411         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
9412         (Depends-on): Add stdint.
9413         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
9414         * modules/perl: New module.
9415         * modules/regex (Depends-on): Add stdint.
9416         * modules/rmdir-errno: New module.
9417         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
9418         m4/intmax_t.m4.
9419         (Depends-on): Add stdint.
9420         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
9421         m4/uintmax_t.m4.
9422         (Depends-on): Add stdint.
9423         * modules/unlink-busy: New module.
9424         * modules/utimecmp (Depends-on): Add stdint.
9425         * modules/uptime: New module.
9426         * modules/winsz-ioctl: New module.
9427         * modules/winsz-termios: New module.
9428         * modules/xnanosleep (Depends-on): Add nanosleep.
9429         * modules/ullong_max: Remove.
9430         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
9431         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
9432         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
9433         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
9434         (Depends-on): Add inttypes.
9435         (lib_SOURCES): Add xstrtol.h.
9436         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
9437         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
9438         * MODULES.html.sh: Move 'assert' into the assert section.
9439         Move 'dummy' into the linking section.
9440         Remove ullong_max.
9441         Add section for compatibility checks for POSIX:2001 functions,
9442         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
9443         winsz-ioctl, and winsz-termios into it.
9444         Add lchmod.
9445         Add top-level Misc section and put host-os, perl, and uptime
9446         into it.
9447
9448 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9449
9450         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
9451         now assume the stdint module.  Do not include inttypes.h.
9452         * lib/fsusage.h: Likewise.
9453         * lib/getndelim2.c: Likewise.
9454         * lib/human.h: Likewise.
9455         * lib/inttostr.h: Likewise.
9456         * lib/obstack.c: Likewise.
9457         * lib/regex_internal.h: Likewise.
9458         * lib/tempname.c: Likewise.
9459         * lib/utimecmp.c: Likewise.
9460         * lib/xstrtol.h: Likewise.
9461
9462         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
9463
9464         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
9465         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
9466         * lib/xtime.h: Likewise.
9467
9468 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9469
9470         * modules/openat (Files): Add lib/fchmodat.c.
9471         Fixes problem reported by Jay Youngman.
9472
9473 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9474
9475         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
9476         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
9477
9478 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
9479             Bruno Haible  <bruno@clisp.org>
9480
9481         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
9482         and is a script that invokes bison. Tighten the code. Add comments.
9483
9484 2006-08-18  Jim Meyering  <jim@meyering.net>
9485
9486         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
9487         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
9488         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
9489         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
9490
9491 2006-08-18  Bruno Haible  <bruno@clisp.org>
9492
9493         * modules/bison-i18n: New file.
9494         * MODULES.html.sh (Internationalization functions): Add it.
9495
9496 2006-08-18  Bruno Haible  <bruno@clisp.org>
9497
9498         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
9499         sys/statvfs.h. When getmntinfo was found, check its declaration and
9500         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
9501
9502 2006-08-18  Bruno Haible  <bruno@clisp.org>
9503
9504         * m4/bison-i18n.m4: New file, from bison.
9505
9506 2006-08-18  Bruno Haible  <bruno@clisp.org>
9507
9508         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
9509         (ME_DUMMY): Treat "kernfs" as a dummy.
9510         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
9511
9512 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
9513
9514         Update from coreutils.
9515
9516         2006-08-15  Jim Meyering  <jim@meyering.net>
9517
9518         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
9519
9520         2006-01-17  Jim Meyering  <jim@meyering.net>
9521
9522         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
9523
9524         2006-01-11  Jim Meyering  <jim@meyering.net>
9525
9526         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
9527         Check for the lchmod function.
9528
9529 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
9530
9531         Update from coreutils.
9532
9533         * lib/__fpending.h: Add copyright notice.
9534         * lib/fprintftime.h: Likewise.
9535         * lib/savedir.c: Use (C) in copyright notice.
9536         * lib/savedir.h: Likewise.
9537
9538         2006-08-15  Jim Meyering  <jim@meyering.net>
9539
9540         * lib/at-func.c: New file, with the logic of all emulated at-functions.
9541         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
9542         in support of the EXPECTED_ERRNO macro.
9543         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
9544         definitions.  Instead, define the appropriate symbols and include
9545         "at-func.c".
9546         * lib/mkdirat.c (mkdirat): Likewise.
9547         * lib/fchmodat.c (fchmodat): Likewise.
9548         (ENOSYS): Remove definition.
9549         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
9550         it.  Don't include "unistd--.h" -- it wasn't ever used.
9551
9552         2006-01-17  Jim Meyering  <jim@meyering.net>
9553
9554         Rewrite fts.c not to change the current working directory,
9555         by using openat, fstatat, fdopendir, etc..
9556
9557         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
9558         (HAVE_OPENAT_SUPPORT): Define.
9559         [_LIBC] (fchdir): Don't undef or define; no longer used.
9560         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
9561         Now, this `function' always succeeds, and consumes its file descriptor
9562         parameter -- so callers must not close such FDs.  Update callers.
9563         (diropen_fd, opendirat, cwd_advance_fd): New functions.
9564         (diropen): Add parameter, SP.  Adjust all callers.
9565         Implement using diropen_fd, rather than open.
9566         (fts_open): Initialize new member, fts_cwd_fd.
9567         Remove fts_rft-setting code.
9568         (fts_close): Close fts_cwd_fd, if necessary.
9569         (__opendir2): Define in terms of opendir or opendirat,
9570         depending on whether the FST_NOCHDIR flag is set.
9571         (fts_build): Since fts_safe_changedir consumes its FD, and since
9572         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
9573         and close the dup'd file descriptor upon failure.
9574         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
9575         (fts_safe_changedir): Tweak semantics to reflect that this function
9576         now calls cwd_advance_fd and hence consumes its FD argument.
9577         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
9578         [struct FTS] (fts_rft): Remove now-unused member.
9579         [struct FTS] (fts_cycle.state): Improve comment.
9580
9581         * lib/openat.c (openat_needs_fchdir): New function.
9582         * lib/openat.h (openat_needs_fchdir): Declare it.
9583
9584 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
9585
9586         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
9587         Problem and fix reported by Pádraig Brady in
9588         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
9589
9590 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
9591
9592         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
9593
9594 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
9595
9596         * lib/memcoll.c (memcoll): Optimize for the common case where the
9597         arguments are bytewise equal.
9598
9599 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
9600
9601         * doc/regexprops-generic.texi: Add a copyright notice.
9602
9603 2006-08-15  Bruno Haible  <bruno@clisp.org>
9604
9605         * modules/tmpdir (License): Change to LGPL.
9606
9607 2006-08-15  Bruno Haible  <bruno@clisp.org>
9608
9609         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
9610         module.
9611
9612 2006-08-14  Simon Josefsson  <jas@extundo.com>
9613
9614         * config/srclist.txt: Add gnupload.
9615
9616 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
9617
9618         Change copyright notice from LGPL 2 to GPL 2, since that's the
9619         standard form used in the gnulib repository.
9620         * tests/test-lock.c: Likewise.
9621         * tests/test-stdint.c: Likewise.
9622         * tests/test-tls.c: Likewise.
9623
9624         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
9625         prelude-manager.  User shorter URLs for GNU projects, without '?'.
9626         Add copyright notice.
9627
9628         * check-module: Add copyright notice.  Output a copyright
9629         notice if "--version" is specified.
9630         * modules/COPYING: New file.
9631         * tests/test-getaddrinfo.c: Add copyright notice.
9632         * tests/test-verify.c: Likewise.
9633
9634 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
9635
9636         Change copyright notice from LGPL 2 to GPL 2, since that's the
9637         standard form used in the gnulib repository.
9638         * lib/lock.c: LGPL -> GPL.
9639         * lib/lock.h: Likewise.
9640         * lib/strnlen1.c: Likewise.
9641         * lib/strnlen1.h: Likewise.
9642         * lib/tls.c: Likewise.
9643         * lib/tls.h: Likewise.
9644         * lib/tmpdir.c: Likewise.
9645
9646         * lib/TODO: Remove; this belongs only in coreutils.
9647
9648 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
9649
9650         Add copyright notices to long-enough files that lack them, since
9651         otherwise the files aren't clearly free.  Use the same notice that
9652         getdate.texi already uses.
9653         * doc/alloca-opt.texi: Add copyright notice.
9654         * doc/alloca.texi: Likewise.
9655         * doc/ctime.texi: Likewise.
9656         * doc/functions.texi: Likewise.
9657         * doc/gcd.texi: Likewise.
9658         * doc/gnulib-tool.texi: Likewise.
9659         * doc/inet_ntoa.texi: Likewise.
9660         * doc/visibility.texi: Likewise.
9661
9662         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
9663         * doc/quote.texi: Add copyright notice.
9664
9665         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
9666         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
9667         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
9668         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
9669         is now obsolete, and give a pointer to the Sun list.
9670         Add copyright notice.
9671
9672 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
9673
9674         * config/srclistvars.sh: Add copyright notice.
9675
9676 2006-08-14  Eric Blake  <ebb9@byu.net>
9677
9678         Import the following change from libc:
9679
9680         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
9681
9682         Upstream bug 2997.
9683         * lib/misc/error.c: Add space between program name and message if file
9684         name is missing.
9685
9686 2006-08-12  Karl Berry  <karl@gnu.org>
9687
9688         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
9689         remove, these originate in gnulib now.
9690
9691 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9692
9693         * doc/Makefile (standards.info standards.html standards.dvi):
9694         Also depend on make-stds.texi.
9695
9696 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
9697
9698         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
9699         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
9700
9701         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
9702         in wchar_t.  Problem reported by Eric Blake.
9703
9704         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
9705         LEN is smaller than SIZE.  Suggested by Bruno Haible.
9706         Also, help the compiler to keep LEN in a register.
9707
9708 2006-08-11  Eric Blake  <ebb9@byu.net>
9709
9710         * users.txt: Sort.  Add tar.
9711
9712 2006-08-11  Bruno Haible  <bruno@clisp.org>
9713
9714         * users.txt: New file.
9715
9716 2006-08-11  Bruno Haible  <bruno@clisp.org>
9717
9718         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
9719         before <wchar.h>. Needed for OSF/1 and BSD/OS.
9720
9721 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
9722
9723         * modules/snprintf (Depends-on): Remove minmax.
9724         (Maintainer): Add self and Bruno.
9725
9726 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
9727
9728         * lib/.cppi-disable: Add snprintf.h, socket_.h.
9729         * lib/snprintf.c: Include <errno.h> and <limits.h>.
9730         (EOVERFLOW): Define if the system does not.
9731         Do not include "minmax.h"; it wasn't used.
9732         (snprintf): Don't assume size_t promotes to an unsigned type.
9733         Fix bug when generated string was too long for the buffer: the
9734         buffer's contents are supposed to be the initial prefix of the
9735         output.  Don't assume vasnprintf returns EOVERFLOW if the size
9736         exceeds INT_MAX; do the check ourselves.
9737
9738         Import the following changes from libc:
9739
9740         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
9741
9742         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
9743         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
9744         set wc to the byte which couldn't be converted.
9745         (re_string_reconstruct): Don't clear valid_raw_len before calling
9746         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
9747         tip_context using re_string_context_at.
9748
9749         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
9750
9751         * lib/posix/regex.h: g++ still cannot handled [restrict].
9752
9753         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
9754
9755         * lib/posix/regex.h: Remove special handling for VMS.
9756
9757 2006-08-10  Jim Meyering  <jim@meyering.net>
9758
9759         * modules/same-inode: New module.
9760         * modules/dev-ino: New module.
9761         * modules/cycle-check: Depend on these modules, rather than simply
9762         including their .h files.
9763         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
9764         required via m4/cycle-check.m4.
9765         * modules/same: Depend on new same-inode module, rather than
9766         including same-inode.h.
9767         * modules/chdir-safer: New file.
9768
9769         * modules/chown (Depends-on): Add stat-macros.
9770
9771 2006-08-10  Jim Meyering  <jim@meyering.net>
9772
9773         * m4/cycle-check.m4: New file.
9774         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
9775         * m4/dev-ino.m4, m4/same-inode.m4: New files.
9776
9777 2006-08-10  Eric Blake  <ebb9@byu.net>
9778
9779         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
9780         in from original proposal.
9781
9782 2006-08-10  Eric Blake  <ebb9@byu.net>
9783         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9784
9785         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
9786         namespace.
9787
9788 2006-08-10  Bruno Haible  <bruno@clisp.org>
9789
9790         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
9791         as well.
9792
9793 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
9794
9795         Sync from coreutils.
9796
9797         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
9798
9799         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
9800         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
9801
9802 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
9803
9804         * modules/restrict: Remove; no longer needed now that we assume
9805         Autoconf 2.59 or later.
9806         * MODULES.html.sh: Remove 'restrict'.
9807         * modules/argp (Depends-on): Remove 'restrict'.
9808         * modules/base64 (Depends-on): Likewise.
9809         * modules/gc (Depends-on): Likewise.
9810         * modules/getaddrinfo (Depends-on): Likewise.
9811         * modules/glob (Depends-on): Likewise.
9812         * modules/inet_ntop (Depends-on): Likewise.
9813         * modules/inet_pton (Depends-on): Likewise.
9814         * modules/memxor (Depends-on): Likewise.
9815         * modules/regex (Depends-on): Likewise.
9816         * modules/strtok_r (Depends-on): Likewise.
9817         * modules/time_r (Depends-on): Likewise.
9818
9819 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
9820
9821         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
9822         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
9823         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
9824         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
9825         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
9826         * m4/memxor.m4 (gl_MEMXOR): Likewise.
9827         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
9828         gl_C_RESTRICT replaced by AC_C_RESTRICT.
9829
9830         Merge from coreutils.
9831         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
9832         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
9833         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
9834         * m4/time_r.m4 (gl_TIME_R): Likewise.
9835
9836 2006-08-09  Karl Berry  <karl@gnu.org>
9837
9838         * config/srclist.txt: no more gettext-tools, per Bruno.
9839
9840 2006-08-08  Eric Blake  <ebb9@byu.net>
9841
9842         * modules/verror: New module.
9843         * MODULES.html.sh: Document it.
9844
9845 2006-08-08  Eric Blake  <ebb9@byu.net>
9846
9847         * lib/verror.h, lib/verror.c: New files.
9848
9849 2006-08-08  Eric Blake  <ebb9@byu.net>
9850
9851         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
9852         verror_at_line output complies with GNU Coding Standards even when
9853         file is NULL.
9854
9855 2006-08-07  Bruno Haible  <bruno@clisp.org>
9856
9857         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
9858         versions of AIX.
9859         Reported by Ralf Wildenhues.
9860
9861 2006-08-07  Bruno Haible  <bruno@clisp.org>
9862
9863         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
9864         in an AC_DEFUN. Needed so that the autoconf snippets can use
9865         AC_REQUIRE.
9866
9867 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9868
9869         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9870         Initialize pkgdata_DATA.
9871         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
9872         overriding it.
9873
9874 2006-08-06  Eric Blake  <ebb9@byu.net>
9875
9876         * lib/error.h: Fold in some upstream changes from glibc.
9877         * lib/error.c: Likewise.
9878
9879 2006-08-04  Bruno Haible  <bruno@clisp.org>
9880
9881         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9882         Make the mostlyclean-local rule depend on mostlyclean-generic.
9883         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
9884
9885 2006-07-31  Bruno Haible  <bruno@clisp.org>
9886
9887         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
9888         <stdlib.h>, <string.h>.
9889
9890 2006-07-30  Bruno Haible  <bruno@clisp.org>
9891
9892         * modules/readlink (License): Change to LGPL.
9893
9894 2006-07-30  Bruno Haible  <bruno@clisp.org>
9895
9896         * modules/javaversion (Makefile.am): Distribute javaversion.java and
9897         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
9898         set PKGDATADIR to point to it.
9899
9900 2006-07-30  Bruno Haible  <bruno@clisp.org>
9901
9902         * modules/csharpexec (configure.ac): Comment out macro invocation.
9903         * modules/javaexec (configure.ac): Likewise.
9904         * modules/javacomp-script (configure.ac): Likewise.
9905
9906         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
9907
9908 2006-07-30  Bruno Haible  <bruno@clisp.org>
9909
9910         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
9911         linked-list.
9912
9913 2006-07-30  Bruno Haible  <bruno@clisp.org>
9914
9915         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
9916
9917 2006-07-30  Bruno Haible  <bruno@clisp.org>
9918
9919         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9920         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
9921         get removed.
9922
9923 2006-07-29  Bruno Haible  <bruno@clisp.org>
9924
9925         Make it possible for gnulib-tool to work with locally modified or
9926         augmented gnulib repositories.
9927         * gnulib-tool (func_usage): Document --local-dir option.
9928         (local_gnulib_dir): New variable.
9929         Handle --local-dir option.
9930         (func_lookup_file): New function.
9931         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
9932         (func_get_description, func_get_filelist, func_get_description,
9933         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
9934         func_get_automake_snippet, func_get_include_directive,
9935         func_get_license, func_get_maintainer): Use func_lookup_file.
9936         (func_import, func_create_testdir): Use func_lookup_file.
9937
9938 2006-07-29  Bruno Haible  <bruno@clisp.org>
9939
9940         * modules/setenv (Depends-on): Add unistd.
9941
9942 2006-07-29  Bruno Haible  <bruno@clisp.org>
9943
9944         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
9945
9946 2006-07-29  Bruno Haible  <bruno@clisp.org>
9947
9948         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
9949
9950 2006-07-29  Bruno Haible  <bruno@clisp.org>
9951
9952         * gnulib-tool (import, update): If there is no Makefile.am, look at
9953         aclocal.m4, instead of bailing out.
9954
9955 2006-07-29  Bruno Haible  <bruno@clisp.org>
9956
9957         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
9958         Categorize the options by when they are useful.
9959
9960 2006-07-29  Bruno Haible  <bruno@clisp.org>
9961
9962         * gnulib-tool (func_usage): Document option --no-libtool.
9963         Handle option --no-libtool.
9964         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
9965         for changed semantics of $libtool variable.
9966         (func_import): Likewise. If libtool is not used, show this through
9967         an option --no-libtool.
9968         (func_create_testdir): Update.
9969
9970 2006-07-29  Bruno Haible  <bruno@clisp.org>
9971
9972         * gnulib-tool (func_import): Extend error message about missing
9973         --doc-base.
9974
9975 2006-07-29  Bruno Haible  <bruno@clisp.org>
9976
9977         * gnulib-tool (func_import): Don't create the $docbase directory if
9978         there is no file to store there.
9979
9980 2006-07-29  Bruno Haible  <bruno@clisp.org>
9981
9982         * gnulib-tool (autoconf_minversion): If a --dir option is given and
9983         relevant, look for configure.ac there, not in the current directory.
9984         Also use a simple search for AC_PREREQ, not "autoconf --trace".
9985
9986 2006-07-29  Bruno Haible  <bruno@clisp.org>
9987
9988         * gnulib-tool (SORT): New variable.
9989         (func_usage): Undocument --assume-autoconf option.
9990         Remove --assume-autoconf option handling.
9991         (autoconf_minversion): Determine from the contents of configure.ac.
9992         (func_import): Remove autoconf_minversion handling.
9993         Suggested by Eric Blake.
9994
9995 2006-07-29  Bruno Haible  <bruno@clisp.org>
9996
9997         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
9998
9999 2006-07-29  Bruno Haible  <bruno@clisp.org>
10000
10001         * config/srclist.txt (*setenv.[ch]): Remove rules.
10002
10003 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
10004
10005         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
10006
10007 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
10008
10009         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
10010         arpa/inet.h.
10011
10012 2006-07-28  Simon Josefsson  <jas@extundo.com>
10013
10014         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
10015         * modules/inet_pton (Depends-on): Likewise.
10016
10017 2006-07-28  Simon Josefsson  <jas@extundo.com>
10018
10019         * m4/netinet_in_h.m4: New file.
10020
10021 2006-07-28  Simon Josefsson  <jas@extundo.com>
10022
10023         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
10024         #include's.
10025
10026 2006-07-28  Simon Josefsson  <jas@extundo.com>
10027
10028         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
10029         #include's.
10030
10031 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
10032
10033         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
10034         setgid on directories only if they set these bits.
10035         * lib/modechange.h: Remove obsolete comment about masks.
10036
10037 2006-07-28  Eric Blake  <ebb9@byu.net>
10038
10039         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
10040         macro expansion.
10041
10042 2006-07-28  Bruno Haible  <bruno@clisp.org>
10043
10044         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
10045
10046 2006-07-28  Bruno Haible  <bruno@clisp.org>
10047
10048         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
10049
10050 2006-07-28  Bruno Haible  <bruno@clisp.org>
10051
10052         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
10053         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
10054         Define fallbacks.
10055         Avoids link error on FreeBSD 4.x.
10056         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
10057
10058         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
10059         encoding.
10060         * lib/mbswidth.c (iswcntrl): Likewise.
10061
10062 2006-07-27  Bruno Haible  <bruno@clisp.org>
10063
10064         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
10065         test.
10066
10067 2006-07-27  Bruno Haible  <bruno@clisp.org>
10068
10069         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
10070         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
10071         defined.
10072
10073 2006-07-26  Eric Blake  <ebb9@byu.net>
10074
10075         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
10076
10077 2006-07-26  Eric Blake  <ebb9@byu.net>
10078
10079         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
10080         like mingw that lack mkstemp.
10081         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
10082         avoid compilation warning on mingw.
10083
10084 2006-07-26  Bruno Haible  <bruno@clisp.org>
10085
10086         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
10087         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
10088         INT_FAST*_MIN, INTPTR_MIN.
10089
10090 2006-07-25  Bruno Haible  <bruno@clisp.org>
10091
10092         * modules/version-etc (Depends-on): Add stdarg.
10093
10094 2006-07-25  Bruno Haible  <bruno@clisp.org>
10095
10096         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
10097         complex commands.
10098
10099 2006-07-25  Bruno Haible  <bruno@clisp.org>
10100
10101         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
10102         defined in <stdarg.h> or config.h.
10103
10104 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
10105
10106         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
10107         (gl_STDIO_SAFER): Remove.
10108
10109 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
10110
10111         * MODULES.html.sh (File stream based Input/Output):
10112         Add fopen-safer, tmpfile-safer; remove stdio-safer.
10113         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
10114         * modules/fopen-safer, modules/tmpfile-safer: New files.
10115         * modules/stdio-safer: Remove.
10116
10117 2006-07-24  Bruno Haible  <bruno@clisp.org>
10118
10119         * modules/tmpdir: New file.
10120         * MODULES.html.sh (File system functions): Add it.
10121
10122 2006-07-24  Bruno Haible  <bruno@clisp.org>
10123
10124         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
10125         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
10126
10127 2006-07-24  Bruno Haible  <bruno@clisp.org>
10128
10129         * modules/clean-temp: New file.
10130
10131 2006-07-24  Bruno Haible  <bruno@clisp.org>
10132
10133         * m4/tmpdir.m4: New file, from GNU gettext.
10134
10135 2006-07-24  Bruno Haible  <bruno@clisp.org>
10136
10137         * lib/tmpdir.h: New file, from GNU gettext.
10138         * lib/tmpdir.c: New file, from GNU gettext.
10139
10140 2006-07-24  Bruno Haible  <bruno@clisp.org>
10141
10142         * lib/clean-temp.h: New file, from GNU gettext.
10143         * lib/clean-temp.c: New file, from GNU gettext.
10144
10145 2006-07-23  Eric Blake  <ebb9@byu.net>
10146
10147         * modules/stdio-safer (Files): Add tmpfile-safer.c.
10148         (Depends-on): Add binary-io.
10149
10150 2006-07-23  Eric Blake  <ebb9@byu.net>
10151
10152         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
10153
10154 2006-07-23  Eric Blake  <ebb9@byu.net>
10155
10156         * lib/tmpfile-safer.c: New file.
10157         * lib/stdio-safer.h (fopen_safer): Add prototype.
10158         * lib/stdio--.h (tmpfile): Make safer.
10159
10160 2006-07-23  Bruno Haible  <bruno@clisp.org>
10161
10162         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
10163         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
10164         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
10165         gl_linked_remove_at): Use it.
10166
10167 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
10168         and Simon Josefsson <jas@extundo.com>
10169
10170         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
10171
10172         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
10173
10174 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
10175
10176         * modules/close-stream: New file.
10177         * modules/closeout (Description): Make it clear that it exits
10178         with a diagnostic on error.
10179         (Depends-on): Add close-stream.  Remove fpending, stdbool.
10180         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
10181
10182 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
10183
10184         * m4/close-stream.m4: New file.
10185
10186 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
10187
10188         * lib/close-stream.c, lib/close-stream.h: New files.
10189
10190 2006-07-22  Bruno Haible  <bruno@clisp.org>
10191
10192         Merge from GNU gettext 0.15.
10193
10194         2006-05-01  Bruno Haible  <bruno@clisp.org>
10195
10196                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
10197
10198         2006-07-22  Bruno Haible  <bruno@clisp.org>
10199
10200                 * modules/javaversion: New file.
10201                 * MODULES.html.sh (Java): Add javaversion.
10202
10203         2006-03-12  Bruno Haible  <bruno@clisp.org>
10204
10205                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
10206
10207         2005-12-04  Bruno Haible  <bruno@clisp.org>
10208
10209                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
10210                 (untested).
10211
10212         2006-06-21  Bruno Haible  <bruno@clisp.org>
10213
10214                 Avoid warnings from recent versions of mcs.
10215                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
10216                 -o, -L, -r any more. Use options documented since mcs-1.0
10217                 instead. Similarly for -g.
10218
10219         2005-12-04  Bruno Haible  <bruno@clisp.org>
10220
10221                 * build-aux/csharpcomp.sh.in: Suffix for resources is
10222                 .resources, not .resource.
10223
10224         2005-07-09  Bruno Haible  <bruno@clisp.org>
10225
10226                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
10227                 add a .dll suffix.
10228                 Reported by Mark Junker <mjscod@gmx.de>.
10229
10230         2006-07-22  Bruno Haible  <bruno@clisp.org>
10231
10232                 * modules/gettext: Upgrade to gettext-0.15.
10233                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
10234                 m4/visibility.m4.
10235                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
10236
10237 2006-07-22  Bruno Haible  <bruno@clisp.org>
10238
10239         Merge from GNU gettext 0.15.
10240
10241         2006-03-25  Bruno Haible  <bruno@clisp.org>
10242
10243                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
10244
10245         2006-07-21  Bruno Haible  <bruno@clisp.org>
10246
10247                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
10248                 "1.1".
10249
10250         2006-05-09  Bruno Haible  <bruno@clisp.org>
10251
10252                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
10253                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
10254                 for the conftestver execution.
10255
10256         2006-05-01  Bruno Haible  <bruno@clisp.org>
10257
10258                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
10259                 optional target-version argument. Verify that the compiler
10260                 groks source of the specified source-version, or add -source
10261                 option as necessary. Verify that the compiler produces
10262                 bytecode in the specified target-version, or add -target and
10263                 -source options as necessary. Make the result of the test
10264                 available as variable CONF_JAVAC. Also log error output in
10265                 config.log.
10266
10267         2006-03-11  Bruno Haible  <bruno@clisp.org>
10268
10269                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
10270
10271         2006-05-09  Bruno Haible  <bruno@clisp.org>
10272
10273                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
10274                 CLASSPATH_SEPARATOR to a semicolon.
10275
10276         2006-03-12  Bruno Haible  <bruno@clisp.org>
10277
10278                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
10279                 available as variable CONF_JAVA, for subsequent autoconf
10280                 tests. Also log error output in config.log.
10281
10282         2006-07-19  Bruno Haible  <bruno@clisp.org>
10283
10284                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
10285                 that getline works on glibc2 systems. Needed to avoid trouble
10286                 in relocatable.c.
10287                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
10288
10289         2005-12-04  Bruno Haible  <bruno@clisp.org>
10290
10291                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
10292                 launcher (untested).
10293
10294         2005-12-04  Bruno Haible  <bruno@clisp.org>
10295
10296                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
10297
10298         2006-07-22  Bruno Haible  <bruno@clisp.org>
10299
10300                 * gettext.m4: Update from GNU gettext-0.15.
10301                 * nls.m4: Likewise.
10302                 * po.m4: Likewise.
10303                 * inttypes-pri.m4: Likewise.
10304                 * inttypes-h.m4: Renamed from inttypes.m4.
10305                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
10306
10307 2006-07-22  Bruno Haible  <bruno@clisp.org>
10308
10309         Merge from GNU gettext 0.15.
10310
10311         2005-07-05  Bruno Haible  <bruno@clisp.org>
10312
10313                 * printf-args.c (printf_fetchargs): Work around broken
10314                 definition of wint_t on mingw.
10315
10316         2005-02-12  Bruno Haible  <bruno@clisp.org>
10317
10318                 * xallocsa.h: Add extern "C" for C++.
10319
10320         2006-05-17  Bruno Haible  <bruno@clisp.org>
10321
10322                 Cygwin portability.
10323                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
10324
10325         2006-04-30  Bruno Haible  <bruno@clisp.org>
10326
10327                 * progreloc.c: Include <mach-o/dyld.h> if available.
10328                 (find_executable): Use _NSGetExecutablePath when possible.
10329
10330         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
10331
10332                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
10333                 function.
10334
10335         2005-12-29  Bruno Haible  <bruno@clisp.org>
10336
10337                 * progreloc.c (set_program_name_and_installdir): Fix
10338                 compilation error.
10339
10340         2005-12-04  Bruno Haible  <bruno@clisp.org>
10341
10342                 Cygwin portability.
10343                 * progreloc.c: Include <windows.h> also on Cygwin.
10344                 (find_executable): Add support for Cygwin.
10345                 (set_program_name_and_installdir): Handle also platforms with
10346                 nonempty EXEEXT.
10347
10348         2006-07-11  Bruno Haible  <bruno@clisp.org>
10349
10350                 * javacomp.c: Fix a comment.
10351                 Reported by Jim Meyering.
10352
10353         2006-04-30  Bruno Haible  <bruno@clisp.org>
10354
10355                 * javacomp.h (compile_java_class): Add source_version,
10356                 target_version arguments.
10357                 * javacomp.c: Rewritten to choose only a compiler that
10358                 respects the specified source_version and target_version.
10359
10360         2006-06-27  Bruno Haible  <bruno@clisp.org>
10361
10362                 Assume correct S_ISDIR macro.
10363                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
10364
10365         2006-07-22  Bruno Haible  <bruno@clisp.org>
10366
10367                 * javaversion.h: New file, from GNU gettext.
10368                 * javaversion.c: New file, from GNU gettext.
10369                 * javaversion.java: New file, from GNU gettext.
10370                 * javaversion.class: New file, from GNU gettext.
10371
10372         2006-05-17  Bruno Haible  <bruno@clisp.org>
10373
10374                 Cygwin portability.
10375                 * javaexec.c (execute_java_class): Test for jview program
10376                 also on Cygwin.
10377
10378         2006-04-09  Bruno Haible  <bruno@clisp.org>
10379
10380                 * fatal-signal.c: Don't include string.h.
10381                 (at_fatal_signal): Use a copying loop instead of memcpy.
10382
10383         2005-12-04  Bruno Haible  <bruno@clisp.org>
10384
10385                 * csharpexec.c: Add support for 'clix' launcher (untested).
10386                 (execute_csharp_using_sscli): New function.
10387                 (execute_csharp_program): Call it.
10388
10389         2006-06-21  Bruno Haible  <bruno@clisp.org>
10390
10391                 Avoid warnings from recent versions of mcs.
10392                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
10393                 -o, -L, -r any more. Use options documented since mcs-1.0
10394                 instead. Similarly for -g.
10395
10396         2005-07-09  Bruno Haible  <bruno@clisp.org>
10397
10398                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
10399                 add a .dll suffix.
10400                 Reported by Mark Junker <mjscod@gmx.de>.
10401
10402         2006-06-17  Bruno Haible  <bruno@clisp.org>
10403
10404                 * config.charset: Update for NetBSD 3.0.
10405
10406         2006-05-17  Bruno Haible  <bruno@clisp.org>
10407
10408                 Cygwin portability.
10409                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
10410
10411         2006-05-16  Bruno Haible  <bruno@clisp.org>
10412
10413                 * localcharset.c [CYGWIN]: Include <windows.h>.
10414                 (get_charset_aliases): For Cygwin, return the same CPxxx
10415                 aliases list as under WIN32.
10416                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
10417                 the environment variables. Fall back to GetACP().
10418
10419         2006-04-05  Bruno Haible  <bruno@clisp.org>
10420
10421                 * config.charset: Update Juan Manuel Guerrero's address.
10422
10423         2005-02-12  Bruno Haible  <bruno@clisp.org>
10424
10425                 * allocsa.h: Add extern "C" for C++.
10426
10427         2005-02-10  Bruno Haible  <bruno@clisp.org>
10428
10429                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
10430                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
10431
10432         2006-07-22  Bruno Haible  <bruno@clisp.org>
10433
10434                 * gettext.h: Update to GNU gettext-0.15.
10435
10436 2006-07-22  Bruno Haible  <bruno@clisp.org>
10437
10438         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
10439         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
10440         lib-prefix.m4, longdouble.m4, ssize_t.m4.
10441
10442 2006-07-21  Eric Blake  <ebb9@byu.net>
10443
10444         * modules/stdlib-safer: New file.
10445         * MODULES.html.sh (File stream based Input/Output): Add
10446         stdlib-safer.
10447
10448 2006-07-21  Eric Blake  <ebb9@byu.net>
10449
10450         * lib/stdlib-safer.h: New file from coreutils, required by
10451         stdlib--.h.
10452
10453 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
10454
10455         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
10456
10457 2006-07-20  Bruno Haible  <bruno@clisp.org>
10458
10459         * gnulib-tool: Recognize new option --assume-autoconf.
10460         (autoconf_minversion): New variable.
10461         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
10462
10463 2006-07-20  Bruno Haible  <bruno@clisp.org>
10464
10465         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
10466
10467 2006-07-19  Derek R. Price  <derek@ximbiot.com>
10468
10469         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
10470         Reindent and repaginate.
10471
10472 2006-07-19  Derek Price  <derek@ximbiot.com>
10473
10474         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
10475         Correct grammar.
10476
10477 2006-07-17  Bruno Haible  <bruno@clisp.org>
10478
10479         * modules/list: New file.
10480         * modules/array-list: New file.
10481         * modules/carray-list, modules/carray-list-tests: New files.
10482         * modules/linked-list, modules/linked-list-tests: New files.
10483         * modules/avltree-list, modules/avltree-list-tests: New files.
10484         * modules/rbtree-list, modules/rbtree-list-tests: New files.
10485         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
10486         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
10487         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
10488         * modules/oset: New file.
10489         * modules/array-oset: New file.
10490         * modules/avltree-oset, modules/avltree-oset-tests: New files.
10491         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
10492         * tests/test-carray_list.c: New file.
10493         * tests/test-linked_list.c: New file.
10494         * tests/test-avltree_list.c: New file.
10495         * tests/test-rbtree_list.c: New file.
10496         * tests/test-linkedhash_list.c: New file.
10497         * tests/test-avltreehash_list.c: New file.
10498         * tests/test-rbtreehash_list.c: New file.
10499         * tests/test-avltree_oset.c: New file.
10500         * tests/test-rbtree_oset.c: New file.
10501         * MODULES.html.sh (Container data structures): New section.
10502
10503 2006-07-17  Bruno Haible  <bruno@clisp.org>
10504
10505         * m4/gl_list.m4: New file.
10506
10507 2006-07-17  Bruno Haible  <bruno@clisp.org>
10508
10509         * lib/gl_list.h: New file.
10510         * lib/gl_list.c: New file.
10511         * lib/gl_array_list.h: New file.
10512         * lib/gl_array_list.c: New file.
10513         * lib/gl_carray_list.h: New file.
10514         * lib/gl_carray_list.c: New file.
10515         * lib/gl_linked_list.h: New file.
10516         * lib/gl_linked_list.c: New file.
10517         * lib/gl_anylinked_list1.h: New file.
10518         * lib/gl_anylinked_list2.h: New file.
10519         * lib/gl_avltree_list.h: New file.
10520         * lib/gl_avltree_list.c: New file.
10521         * lib/gl_anyavltree_list1.h: New file.
10522         * lib/gl_anyavltree_list2.h: New file.
10523         * lib/gl_rbtree_list.h: New file.
10524         * lib/gl_rbtree_list.c: New file.
10525         * lib/gl_anyrbtree_list1.h: New file.
10526         * lib/gl_anyrbtree_list2.h: New file.
10527         * lib/gl_anytree_list1.h: New file.
10528         * lib/gl_anytree_list2.h: New file.
10529         * lib/gl_linkedhash_list.h: New file.
10530         * lib/gl_linkedhash_list.c: New file.
10531         * lib/gl_anyhash_list1.h: New file.
10532         * lib/gl_anyhash_list2.h: New file.
10533         * lib/gl_avltreehash_list.h: New file.
10534         * lib/gl_avltreehash_list.c: New file.
10535         * lib/gl_rbtreehash_list.h: New file.
10536         * lib/gl_rbtreehash_list.c: New file.
10537         * lib/gl_anytreehash_list1.h: New file.
10538         * lib/gl_anytreehash_list2.h: New file.
10539
10540         * lib/gl_oset.h: New file.
10541         * lib/gl_oset.c: New file.
10542         * lib/gl_array_oset.h: New file.
10543         * lib/gl_array_oset.c: New file.
10544         * lib/gl_avltree_oset.h: New file.
10545         * lib/gl_avltree_oset.c: New file.
10546         * lib/gl_rbtree_oset.h: New file.
10547         * lib/gl_rbtree_oset.c: New file.
10548         * lib/gl_anytree_oset.h: New file.
10549
10550 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
10551
10552         * m4/mkancesdirs.m4: New file.
10553         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
10554         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
10555         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
10556         it.
10557
10558 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
10559
10560         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
10561         * lib/mkancesdirs.h: New files.
10562         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
10563         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
10564         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
10565         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
10566         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
10567         callers changed.  Revamp internals significantly, by not
10568         attempting to create directories that are temporarily more
10569         permissive than the final results.  Do not attempt to use
10570         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
10571         This removes some race conditions, fixes some bugs, and simplifies
10572         things.  Use new dirchownmod function to do owner and mode changes.
10573         * lib/mkdir-p.h: Likewise.
10574         * lib/modechange.c (octal_to_mode): New function.
10575         (struct mode_change): New member mentioned.
10576         (make_node_op_equals): New arg mentioned.  All callers changed.
10577         (mode_compile): Keep track of which mode bits the user has explicitly
10578         mentioned.
10579         (mode_adjust): New arg DIR, so that we implement the X op correctly.
10580         New arg PMODE_BITS, to keep track of which mode bits the user
10581         mentioned; it treats S_ISUID and S_ISGID speciall.
10582         All callers changed.
10583         * lib/modechange.h: Likewise.
10584
10585 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
10586
10587         * MODULES.html.sh: Add mkancestors.
10588         * modules/mkancesdirs: New module.
10589         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
10590         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
10591         The chdir-safer and afs files are now orphans; I'll remove them
10592         unless someone speaks up.
10593         Add lib/dirchownmod.c, lib/dirchownmod.h.
10594         (Depends-on): Remove alloca, chown, save-cwd, dirname.
10595         Add lchown, mkancesdirs.
10596         (Maintainer): Add self.
10597
10598 2006-07-15  Karl Berry  <karl@gnu.org>
10599
10600         * gnulib-tool: help message wording/arrangement.
10601
10602 2006-07-14  Simon Josefsson  <jas@extundo.com>
10603
10604         * doc/gnulib.texi (Libtool and Windows): New section.
10605
10606 2006-07-12  Simon Josefsson  <jas@extundo.com>
10607
10608         * modules/gendocs (License): Fix license, approved by Karl.
10609
10610 2006-07-12  Eric Blake  <ebb9@byu.net>
10611
10612         * MODULES.html.sh: Add gendocs.
10613
10614 2006-07-11  Eric Blake  <ebb9@byu.net>
10615
10616         * modules/fdl: New module, to install doc/fdl.texi.
10617         * MODULES.html.sh: Add new section for documentation modules.
10618         * gnulib-tool: Avoid space-tab.
10619         (--doc-base): New option, to manage files from doc.
10620
10621 2006-07-11  Eric Blake  <ebb9@byu.net>
10622
10623         * m4/absolute-header.m4: Fix comments to match recent change.
10624
10625 2006-07-11  Eric Blake  <ebb9@byu.net>
10626
10627         * gnulib-tool: List --doc-base before --tests-base.
10628
10629 2006-07-11  Derek R. Price  <derek@ximbiot.com>
10630
10631         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
10632
10633 2006-07-11  Bruno Haible  <bruno@clisp.org>
10634
10635         * README: Mention where to put documentation.
10636
10637 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10638
10639         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
10640
10641 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
10642
10643         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
10644         to stdint.m4.
10645
10646 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
10647
10648         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
10649         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
10650         "no/such/file/stdint.h" when there is no such file, so that
10651         the resulting C code can be parsed by dodgy compilers.
10652         Problems reported by Bob Proulx.
10653
10654 2006-07-10  Derek R. Price  <derek@ximbiot.com>
10655
10656         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
10657         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
10658         macros into the GNU _D_EXACT_NAMLEN.
10659         * lib/savedir.c:  Likewise.
10660         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
10661
10662 2006-07-10  Derek R. Price  <derek@ximbiot.com>
10663         and Paul Eggert  <eggert@cs.ucla.edu>
10664
10665         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
10666         * m4/savedir.m4:
10667         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
10668         macros into the GNU _D_EXACT_NAMLEN.
10669
10670 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
10671
10672         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
10673         around the absolute name, to work around a problem with the HP-UX
10674         11.23 native C compiler, reported by Bob Proulx.
10675
10676 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
10677
10678         * doc/maintain.texi, make-stds.texi: Sync from
10679         <http://savannah.gnu.org/projects/gnustandards>.
10680
10681 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
10682
10683         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
10684
10685 2006-07-09  Jim Meyering  <jim@meyering.net>
10686
10687         * m4/glob.m4: Remove a doubled word in a comment.
10688
10689 2006-07-09  Jim Meyering  <jim@meyering.net>
10690
10691         * lib/argp-pv.c: Remove a doubled word in a comment.
10692         * lib/check-version.c (check_version): Likewise.
10693         * lib/javacomp.c (compile_java_class): Likewise.
10694
10695 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
10696
10697         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
10698         for the benefit of people using Autoconf 2.60.  If you want to
10699         support older Autoconf versions you can copy m4/onceonly_2_57.m4
10700         (or m4/onceonly.m4, if pre-2.57) manually.
10701
10702 2006-07-08  Jim Meyering  <jim@meyering.net>
10703
10704         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
10705         comment.
10706         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
10707         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
10708         comment.
10709
10710 2006-07-08  Jim Meyering  <jim@meyering.net>
10711
10712         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
10713
10714 2006-07-07  Simon Josefsson  <jas@extundo.com>
10715
10716         * tests/test-crc.c: Change expected crc value, the test vector
10717         were probably computed using the old broken crc.c?
10718
10719 2006-07-06  Simon Josefsson  <jas@extundo.com>
10720
10721         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
10722         now the canonical place for the M4 file).
10723
10724         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
10725         from the sys_socket dependency now.
10726
10727         * modules/inet_pton (Files): Ditto.
10728
10729         * modules/inet_ntop (Files): Ditto.
10730
10731 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10732
10733         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
10734         not gl_PREREQ_GETUSERSHELL.
10735
10736 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10737
10738         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
10739         with only one argument, for Autoconf 2.60.
10740         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
10741         expand to nothing, so add a shell command to avoid syntax error.
10742         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
10743
10744 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10745
10746         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
10747
10748 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
10749
10750         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
10751         no longer needed.  Check for isblank decl.
10752         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
10753         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
10754         of existence.
10755
10756 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
10757
10758         * lib/getloadavg.c: Use __VMS, not VMS.
10759         * lib/getopt.c: Likewise.
10760         * lib/getpagesize.h: Likewise.
10761         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
10762         and probably does not work.
10763
10764 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
10765
10766         * lib/.cppi-disable: Add wcwidth.
10767         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
10768         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
10769         (ISGRAPH): Remove.  All uses changed to isgraph.
10770         (FOLD) [!defined _LIBC]: Remove special case.
10771         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
10772         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
10773         HAVE_ISBLANK.
10774         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
10775         case.
10776
10777 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
10778
10779         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
10780         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
10781         brackets.  Other minor changes to suppress some compiler
10782         warnings.
10783
10784 2006-07-06  Derek R. Price  <derek@ximbiot.com>
10785         and Paul Eggert  <eggert@cs.ucla.edu>
10786
10787         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
10788         of invoking obsolescent AC_HEADER_DIRENT macro.
10789         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
10790         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
10791         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
10792         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
10793         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
10794         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
10795         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
10796         * m4/readdir.m4: Remove; no longer needed.
10797
10798 2006-07-06  Derek R. Price  <derek@ximbiot.com>
10799         and Paul Eggert  <eggert@cs.ucla.edu>
10800
10801         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
10802         Don't worry about this obsolete case any more.
10803         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
10804         directories.
10805         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
10806         worry about this obsolete case any more.
10807         * lib/fts.c: Likewise.
10808         * lib/getcwd.c: Likewise.
10809         * lib/glob.h: Likewise.
10810         * lib/savedir.c: Likewise.
10811
10812 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
10813
10814         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
10815         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
10816         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
10817         needed.
10818         All uses removed.
10819         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
10820         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
10821         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
10822         needed.
10823         * m4/getdate.m4 (gl_GETDATE): Likewise.
10824         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
10825         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
10826         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
10827         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
10828         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
10829         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
10830         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
10831         needed.
10832
10833 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
10834
10835         * lib/memcasecmp.c: Include <limits.h>.
10836         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
10837         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
10838         Don't assume isdigit succeeds only on '0' through '9'.
10839
10840 2006-07-05  Eric Blake  <ebb9@byu.net>
10841
10842         * modules/getaddrinfo (Depends-on): Add snprintf.
10843
10844 2006-07-05  Eric Blake  <ebb9@byu.net>
10845
10846         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
10847         to avoid 'header present but could not be compiled' on cygwin.
10848
10849 2006-07-05  Eric Blake  <ebb9@byu.net>
10850
10851         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
10852         missing from netdb.h.
10853         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
10854
10855 2006-07-05  Derek R. Price  <derek@ximbiot.com>
10856
10857         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
10858         no longer needed.
10859         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
10860         * m4/getdate.m4 (gl_GETDATE): Likewise.
10861         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
10862         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
10863         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
10864         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
10865         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
10866
10867 2006-07-05  Derek R. Price  <derek@ximbiot.com>
10868
10869         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
10870         All uses of is_space replaced by isspace.
10871         * lib/exit.h: Don't talk about STDC_HEADERS.
10872         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
10873         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
10874         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
10875         replaced by isprint etc.
10876         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
10877         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
10878         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
10879         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
10880         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
10881         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
10882
10883 2006-07-05  Bruno Haible  <bruno@clisp.org>
10884
10885         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
10886         the function exists, before testing against AIX.
10887         Reported by Martin Lambers <marlam@marlam.de>.
10888
10889 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
10890
10891         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
10892         From Mark D. Baushke.
10893
10894 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
10895
10896         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
10897         to the absolute name, not just one, to bypass Sun C 5.8's
10898         "warning: #include of /usr/include/... may be non-portable".
10899
10900 2006-07-04  Eric Blake  <ebb9@byu.net>
10901
10902         * modules/dirname-tests: New test module.
10903         * tests/test-dirname.c: New file, replacing dirname.c
10904         TEST_DIRNAME section that was recently deleted.
10905
10906 2006-07-04  Bruno Haible  <bruno@clisp.org>
10907
10908         Assume ANSI C header files and <ctype.h> functions.
10909         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
10910         (mbsnwidth): Use isprint, iscntrl instead.
10911
10912 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10913
10914         Merge from coreutils.
10915         * MODULES.html.sh: Add xstrtold.
10916         * modules/xstrtold: New file.
10917         * modules/cycle-check (Files): Add lib/same-inode.h.
10918         * modules/dirname (Files): Add m4/double-slash-root.m4.
10919         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
10920         * modules/mkdir-p (Files): Add lib/same-inode.h.
10921         * modules/same (Files): Add lib/same-inode.h.
10922
10923 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10924
10925         * m4/absolute-header.m4: Renamed from full-header-path.m4.
10926         This is to keep the terminology clean; POSIX talks about
10927         "absolute pathnames", not "full pathnames", but the GNU
10928         Coding Standards say to use "path" for something else;
10929         so use "absolute" to keep both sides happy.
10930         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
10931         Set gl_absolute_header, not gl_full_header_path.
10932         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
10933         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
10934         All uses changed.
10935
10936         Merge from coreutils.
10937
10938         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
10939
10940         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
10941         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
10942         want to require the building of c-strtod.o.
10943         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
10944         needs -lm directly.
10945         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
10946
10947         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
10948
10949         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
10950         --as-needed option if available.  Problem reported by Albert Chin in
10951         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
10952         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
10953         cc merely issues a bunch of annoying warnings for --as-needed
10954         (this problem was reported by Bob Proulx).  Also, try linking with
10955         -lm to detect a bug in binutils 2.16 (this problem was reported
10956         by Ralf Wildenhues).
10957
10958         2006-06-18  Jim Meyering  <jim@meyering.net>
10959
10960         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
10961         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
10962         macro.
10963         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
10964         also check for glibc-2.4's abort-inducing bug.
10965
10966         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
10967         Low-probability clean-up should be to use rmdir to get rid of
10968         the just-created directory, not unlink.
10969
10970         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
10971         configure fail, and request a bug report to inform us about it.
10972         Add a comment that, barring reports to the contrary, in 2007 we'll
10973         assume ftruncate is universally available.
10974
10975         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
10976
10977         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
10978
10979         2006-03-12  Jim Meyering  <jim@meyering.net>
10980
10981         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
10982         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
10983         * m4/same.m4 (gl_SAME): Likewise.
10984         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
10985
10986         2006-03-11  Eric Blake  <ebb9@byu.net>
10987
10988         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
10989         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
10990         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
10991         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
10992
10993 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10994
10995         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
10996         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
10997         reported by Mark D. Baushke, one in
10998         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
10999
11000         Merge from coreutils.
11001
11002         * lib/.cppi-disable: Add stdint_.h.
11003         * lib/.cvsignore: Add stdint.h.
11004
11005         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
11006
11007         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
11008         both double and long double versions.
11009         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
11010         * lib/xstrtold.c: New file.
11011         * lib/xstrtod.h (xstrtold): New decl.
11012
11013         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
11014
11015         * lib/filemode.c (setst): Remove.
11016         (strmode): Rewrite to avoid setst.  This makes the code shorter,
11017         (arguably) clearer, and the generated code is a bit smaller on my
11018         Debian GNU/Linux stable x86 host.
11019
11020         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
11021
11022         * lib/filemode.c: Include "filemode.h" first, to test the interface.
11023         Assume that filemode.h includes sys/types.h and sys/stat.h.
11024         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
11025         (ftypelet): Reorder to put common cases first, for efficiency.
11026         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
11027         to do 'M'.
11028         (strmode): Renamed from mode_string, and now stores 12 bytes instead
11029         of 10, for compatibility with FreeBSD.  All callers changed.
11030         (filemodestring): Now stores 12 bytes instead of 10, and sets file
11031         types that can't be deduced solely from st_mode.  First arg is now a
11032         const pointer.
11033         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
11034         (strmode): Renamed from mode_string.
11035         (filemodestring): New decl.
11036         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
11037         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
11038         needed.
11039         (S_ISPORT, S_ISWHT): New macros, if not already defined.
11040
11041         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
11042
11043         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
11044         fsusage.h now does that.  Include fsusage.h first, to test interface.
11045         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
11046         at most one method (the old code could have generated decls that
11047         didn't conform to C89, not that this was ever exercised).
11048         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
11049
11050         2006-03-19  Jim Meyering  <jim@meyering.net>
11051
11052         Work even in a chroot where d_ino values for entries in "/"
11053         don't match the stat.st_ino values for the same names.
11054         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
11055         number, iterate through all entries again, using lstat instead.
11056         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
11057         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
11058
11059         * lib/getcwd.c (__getcwd): Clarify a comment.
11060         Use memcpy in place of a call to strcpy.
11061
11062         2006-03-12  Jim Meyering  <jim@meyering.net>
11063
11064         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
11065         matches that of the current directory (which we're about to chdir ".."
11066         out of), then save the dev-ino of the parent, instead.
11067
11068         * lib/same-inode.h (SAME_INODE): New file/macro.
11069         * lib/chdir-safer.c (SAME_INODE): Remove definition.
11070         Include "same-inode.h", instead.
11071         * lib/same.c: Likewise.
11072         * lib/cycle-check.h: Include "same-inode.h".
11073         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
11074         * lib/cycle-check.c (SAME_INODE): Remove definition.
11075         * lib/root-dev-ino.h: Include "same-inode.h".
11076
11077         2006-03-11  Eric Blake  <ebb9@byu.net>
11078
11079         * lib/same.c (same_name): s/base_name/last_component/
11080         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
11081         * lib/filenamecat.c (file_name_concat): Likewise.
11082
11083         2006-03-11  Eric Blake  <ebb9@byu.net>,
11084                     Paul Eggert  <eggert@cs.ucla.edu>
11085
11086         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
11087         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
11088         drive prefix.
11089         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
11090         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
11091         (last_component): New method.
11092         * lib/dirname.c (dir_len): Determine when drive letters need a
11093         subsequent slash.  Preserve // when it is special.
11094         (dir_name): Don't append dot when drive letter is absolute.
11095         [TEST_DIRNAME]: Move into a full-blown gnulib test.
11096         * lib/basename.c (base_name): New semantics - malloc the result.
11097         Preserve // when it is special.  Preserve relative files that look
11098         like drive letters.
11099         (base_len): Preserve // when it is special.
11100         (last_component): New method, similar to old base_name semantics.
11101         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
11102         base_name.  Strip redundant slashes from ///.
11103
11104 2006-07-03  Jim Meyering  <jim@meyering.net>
11105
11106         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
11107         macro is used before the first cycle_check call.
11108
11109 2006-07-03  Eric Blake  <ebb9@byu.net>
11110
11111         * modules/dirname (Depends-on): Add xstrndup.
11112
11113 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
11114
11115         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
11116         test cases, so that config.log is a bit easier to follow.
11117
11118 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
11119
11120         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
11121         both are 64 bits, since this seems to be the tradition, and this
11122         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
11123         we ever run into a host that prefers long long to long in this
11124         case, we'll need another configure-time test.  Problem reported by
11125         Jim Meyering.
11126
11127 2006-07-02  Eric Blake  <ebb9@byu.net>
11128
11129         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
11130
11131 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
11132
11133         * modules/inttypes (Depends-on): No longer depends on stdint.
11134         * modules/stdint (Description): Say more about assumptions.
11135         Say that the fast types might differ.  Say macros are used.
11136         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
11137         (Makefile.am): Revise list of substituted symbols to match
11138         new stdint.m4.
11139         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
11140         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
11141         * tests/test-stdint.c (verify_same_types)
11142         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
11143         the code conforms to C99/C89.
11144         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
11145         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
11146
11147 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
11148
11149         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
11150         but fix a bug, by requiring at least 64 bits.
11151         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
11152         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
11153         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
11154         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
11155
11156         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
11157         changes.  Make 2.59 a prerequisite.  Check and substitute for
11158         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
11159         inttypes.h.  Do not use special include files; just use the
11160         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
11161         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
11162         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
11163         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
11164         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
11165         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
11166         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
11167         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
11168         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
11169         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
11170         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
11171         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
11172         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
11173         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
11174         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
11175         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
11176         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
11177         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
11178         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
11179         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
11180         WINT_MAX.  Check for C99 conformance more strictly, by detecting
11181         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
11182         not check for things that C99 does not require, e.g., int8_t.  If
11183         a test isn't needed unless <stdint.h> isn't working, and is
11184         unlikely to be needed for any other reason, then don't do it
11185         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
11186         size_t, since we assume C89 freestanding at least.  Do not check
11187         for sig_atomic_t, wchar_t, or wint_t, since the code now does
11188         the right thing even if the types are not defined.  Instead use:
11189         (gl_STDINT_TYPE_PROPERTIES): New macro.
11190         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
11191         testing whether <sys/types.h> clashes, as Autoconf does this for
11192         us now.  All uses removed.
11193         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
11194         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
11195         (gl_CHECK_TYPE_SAME):
11196         Remove; no longer needed.
11197         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
11198         exists, since we'll return 0 anyway in that case.
11199         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
11200
11201 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
11202
11203         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
11204         possible collision with system files.
11205         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
11206         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
11207         WCHAR_MIN and WCHAR_MAX in this case.
11208         (<stddef.h>): Do not include; no longer needed.
11209         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
11210         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
11211         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
11212         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
11213         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
11214         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
11215         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
11216         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
11217         !defined(__c99))]: Include in this case too, since it's harmless
11218         now.
11219         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
11220         dangerous to do so.
11221         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
11222         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
11223         (_STDINT_MIN, _STDINT_MAX): New macros.
11224         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
11225         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
11226         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
11227         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
11228         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
11229         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
11230         macros, not typedefs; this simplifies things quite a bit.
11231         Use long int for all types narrower than int64_t.
11232         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
11233         Define in terms of long long int or int64_t or long int,
11234         not int64_t or int32_t.  This saves some compile-time testing.
11235         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
11236         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
11237         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
11238         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
11239         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
11240         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
11241         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
11242         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
11243         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
11244         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
11245         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
11246         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
11247         undef any previous version and define our own version, for
11248         simplicity and consistency with the new macros for types.
11249         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
11250         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
11251         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
11252         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
11253         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
11254         @WINT_T_SUFFIX@ to keep things simple here.
11255         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
11256         Simplify by assuming typical 8/16/32/64 host, since we're
11257         already doing that elsewhere anyway.
11258         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
11259         and assume long long int is 64 bits if available.  This
11260         speeds up 'configure'.
11261
11262 2006-07-01  Eric Blake  <ebb9@byu.net>
11263
11264         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
11265         Reported by Andreas Buening.
11266
11267 2006-07-01  Eric Blake  <ebb9@byu.net>
11268
11269         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
11270
11271 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
11272
11273         * lib/getaddrinfo.c: fixed typo
11274
11275 2006-06-29  Jim Meyering  <jim@meyering.net>
11276
11277         * modules/strftime (Maintainer): Add my name, since with the
11278         FPRINTFTIME changes strftime.c has forked from glibc.
11279
11280 2006-06-29  Eric Blake  <ebb9@byu.net>
11281
11282         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
11283
11284 2006-06-29  Eric Blake  <ebb9@byu.net>
11285
11286         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
11287
11288 2006-06-29  Eric Blake  <ebb9@byu.net>
11289
11290         * lib/stat_.h: New file.
11291
11292 2006-06-29  Eric Blake  <ebb9@byu.net>
11293
11294         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
11295         unused static function.
11296
11297 2006-06-29  Eric Blake  <ebb9@byu.net>
11298
11299         * doc/functions.texi (Function Portability): Document missing lstat
11300         on mingw.
11301
11302 2006-06-29  Eric Blake  <ebb9@byu.net>
11303
11304         * MODULES.html.sh: Add sys_stat.
11305         * modules/sys_stat: New module.
11306         * modules/mkstemp (Depends-on): Add sys_stat.
11307
11308 2006-06-29  Derek R. Price  <derek@ximbiot.com>
11309
11310         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
11311
11312 2006-06-29  Derek R. Price  <derek@ximbiot.com>
11313
11314         * m4/c-bs-a.m4: Removed.
11315
11316 2006-06-29  Derek R. Price  <derek@ximbiot.com>
11317
11318         * lib/strftime.c: Assume strftime() exists.
11319
11320 2006-06-29  Derek Price  <derek@ximbiot.com>
11321
11322         * modules/c-bs-a: Removed - \a is C89.
11323         * MODULES.html.sh: Remove c-bs-a.
11324
11325 2006-06-29  Bruno Haible  <bruno@clisp.org>
11326
11327         * modules/wcwidth (License): Change to LGPL.
11328
11329 2006-06-28  Simon Josefsson  <jas@extundo.com>
11330
11331         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
11332         on _WIN32.
11333
11334         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
11335         getnameinfo.
11336
11337 2006-06-28  Simon Josefsson  <jas@extundo.com>
11338
11339         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
11340
11341 2006-06-28  Simon Josefsson  <jas@extundo.com>
11342
11343         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
11344         functions there.  It will succeed on Windows XP, but on Windows
11345         2000 and (presumably) earlier, it will fail, and use the internal
11346         re-implementation.
11347         (use_win32_p): New function.
11348         (getaddrinfo): Use strtoul on servname, to support numeric ports.
11349         Support AI_NUMERICSERV to disable getservbyname.
11350         (getnameinfo): New function, only supports
11351         NI_NUMERICHOST|NI_NUMERICSERV for now.
11352
11353         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
11354         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
11355         getnameinfo.
11356
11357 2006-06-28  Eric Blake  <ebb9@byu.net>
11358
11359         * modules/wcwidth: New file.
11360         * modules/mbchar (Depends-on): Add wcwidth.
11361         * modules/mbswidth (Depends-on): Add wcwidth.
11362         * MODULES.html.sh: Add wcwidth.
11363
11364 2006-06-28  Eric Blake  <ebb9@byu.net>
11365
11366         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
11367         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
11368
11369 2006-06-28  Eric Blake  <ebb9@byu.net>
11370
11371         * lib/xvasprintf.h: Fix comments.
11372
11373 2006-06-28  Eric Blake  <ebb9@byu.net>
11374
11375         * lib/mbchar.h (wcwidth): Include wcwidth.h.
11376         * lib/mbswidth.c (wcwidth): Move from here...
11377         * lib/wcwidth.h: ...to this new file.
11378
11379 2006-06-28  Derek R. Price  <derek@ximbiot.com>
11380
11381         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
11382
11383         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
11384         it's obsolete.
11385         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
11386
11387 2006-06-28  Derek R. Price  <derek@ximbiot.com>
11388
11389         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
11390         Autoconf 2.60 says this stuff was obsolete.
11391
11392 2006-06-28  Bruno Haible  <bruno@clisp.org>
11393
11394         * modules/wcwidth (Files): Add m4/wchar_t.m4.
11395
11396 2006-06-28  Bruno Haible  <bruno@clisp.org>
11397
11398         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
11399         gt_TYPE_WCHAR_T.
11400
11401 2006-06-28  Bruno Haible  <bruno@clisp.org>
11402
11403         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
11404         declaration for wcwidth.
11405         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
11406
11407 2006-06-28  Bruno Haible  <bruno@clisp.org>
11408
11409         * lib/mkdtemp.c [MINGW]: Include <io.h>.
11410         (mkdir): Define using _mkdir.
11411
11412 2006-06-28  Bruno Haible  <bruno@clisp.org>
11413
11414         * lib/getaddrinfo.h: Fix POSIX URL.
11415         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
11416         _WIN32.
11417         (use_win32_p): Make static.
11418         (getaddrinfo): Reject service name if it is empty or does not consist
11419         solely of decimal digits, or if its value is > 65535.
11420         (getnameinfo): Remove useless casts.
11421
11422 2006-06-27  Simon Josefsson  <jas@extundo.com>
11423
11424         * modules/sys_select: New file, suggested by Bruno Haible, Paul
11425         Eggert and Martin Lambers.
11426
11427 2006-06-27  Simon Josefsson  <jas@extundo.com>
11428
11429         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
11430         Eggert and Martin Lambers.
11431
11432 2006-06-27  Bruno Haible  <bruno@clisp.org>
11433
11434         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
11435         result to 0, not to empty.
11436         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
11437
11438 2006-06-27  Bruno Haible  <bruno@clisp.org>
11439
11440         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
11441
11442 2006-06-26  Simon Josefsson  <jas@extundo.com>
11443
11444         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
11445         present.
11446
11447 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
11448
11449         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
11450         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
11451         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
11452
11453 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
11454
11455         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
11456
11457 2006-06-26  Bruno Haible  <bruno@clisp.org>
11458
11459         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
11460
11461 2006-06-26  Bruno Haible  <bruno@clisp.org>
11462
11463         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
11464
11465 2006-06-26  Bruno Haible  <bruno@clisp.org>
11466
11467         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
11468         SGI C compiler in pre-C99 mode.
11469         Suggested by Mark D. Baushke and Larry Jones.
11470
11471 2006-06-26  Bruno Haible  <bruno@clisp.org>
11472
11473         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
11474         WCHAR_MAX.
11475         Reported by Mark D. Baushke and Larry Jones.
11476
11477 2006-06-26  Bruno Haible  <bruno@clisp.org>
11478
11479         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
11480         in pre-C99 mode.
11481         Suggested by Mark D. Baushke and Larry Jones.
11482
11483 2006-06-23  Simon Josefsson  <jas@extundo.com>
11484             Bruno Haible  <bruno@clisp.org>
11485
11486         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
11487         Emit mostlyclean-local rule.
11488         (func_emit_tests_Makefile_am): Likewise.
11489         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
11490
11491 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
11492
11493         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
11494
11495 2006-06-23  Bruno Haible  <bruno@clisp.org>
11496
11497         * tests/test-stdint.c: Update to match ISO C 99 Technical
11498         Corrigendum 1.
11499
11500 2006-06-23  Bruno Haible  <bruno@clisp.org>
11501
11502         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
11503
11504 2006-06-23  Bruno Haible  <bruno@clisp.org>
11505
11506         * lib/stdint_.h: Treat IRIX like OpenBSD.
11507
11508 2006-06-23  Bruno Haible  <bruno@clisp.org>
11509
11510         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
11511         ISO C 99 Technical Corrigendum 1.
11512
11513 2006-06-22  Simon Josefsson  <jas@extundo.com>
11514
11515         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
11516         MinGW.
11517
11518 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
11519
11520         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
11521         needed.  Some compiler complained about some of them.  Problem reported
11522         by Larry Jones in
11523         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
11524
11525 2006-06-21  Simon Josefsson  <jas@extundo.com>
11526
11527         * tests/test-getaddrinfo.c: New file.
11528
11529         * modules/getaddrinfo-tests: New file.
11530
11531         * MODULES.html.sh: Add inet_pton.
11532
11533         * modules/inet_pton: New file.
11534
11535 2006-06-21  Simon Josefsson  <jas@extundo.com>
11536
11537         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
11538         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
11539         of using the (limited) gnulib implementation on Windows XP.
11540
11541         * m4/inet_pton.m4: New file.
11542
11543 2006-06-21  Simon Josefsson  <jas@extundo.com>
11544
11545         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
11546         variable.
11547
11548         * lib/socket_.h: Don't define WINVER.
11549
11550         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
11551         slightly modified to work in gnulib.
11552
11553 2006-06-21  Simon Josefsson  <jas@extundo.com>
11554
11555         * doc/gnulib.texi (Windows sockets): Add.
11556
11557 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
11558
11559         * lib/read-file.c (fread_file): Start with buffer allocation of
11560         0 bytes rather than 1 byte; this simplifies the code.
11561         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
11562         code to free buffer and save/restore errno.
11563         (internal_read_file): Remove unused local.
11564
11565 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
11566
11567         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
11568         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
11569         Problem reported by Denis Excoffier in
11570         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
11571
11572 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11573
11574         * modules/sys_socket, modules/socklen: Include sys/types since
11575         FreeBSD 4.x's sys/socket.h needs it.
11576
11577 2006-06-19  Simon Josefsson  <jas@extundo.com>
11578
11579         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
11580
11581 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
11582
11583         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
11584
11585 2006-06-19  Bruno Haible  <bruno@clisp.org>
11586
11587         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
11588         and FULL_PATH_INTTYPES_H in angle brackets.
11589         Reported by Mark D. Baushke <mdb@gnu.org>.
11590
11591 2006-06-17  Eric Blake  <ebb9@byu.net>
11592
11593         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
11594         errno.
11595
11596 2006-06-17  Bruno Haible  <bruno@clisp.org>
11597
11598         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
11599         <sys/inttypes.h>.
11600
11601 2006-06-17  Bruno Haible  <bruno@clisp.org>
11602
11603         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
11604         whether errno is declared. Assume <errno.h> declares errno.
11605
11606 2006-06-17  Bruno Haible  <bruno@clisp.org>
11607
11608         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
11609
11610 2006-06-17  Bruno Haible  <bruno@clisp.org>
11611
11612         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
11613         problem on Solaris 2.5.1.
11614
11615 2006-06-16  Eric Blake  <ebb9@byu.net>
11616
11617         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
11618         * lib/unicodeio.c [!defined errno]: Likewise.
11619         * lib/strtol.c [!defined errno]: Likewise.
11620         * lib/strtod.c [!defined errno]: Likewise.
11621
11622 2006-06-15  Eric Blake  <ebb9@byu.net>
11623
11624         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
11625
11626 2006-06-15  Eric Blake  <ebb9@byu.net>
11627
11628         * config/srclist.txt (ssize_t.m4): Lose sync.
11629
11630 2006-06-15  Bruno Haible  <bruno@clisp.org>
11631
11632         * modules/stdint (Files): Include m4/full-header-path.m4,
11633         m4/size_max.m4, m4/wchar_t.m4.
11634         (Makefile.am): Many more substitutions.
11635         * modules/stdint-tests: New file.
11636         * tests/test-stdint.c: New file.
11637
11638 2006-06-15  Bruno Haible  <bruno@clisp.org>
11639
11640         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
11641         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
11642         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
11643         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
11644         gl_CHECK_TYPE_SAME): New macros.
11645
11646 2006-06-15  Bruno Haible  <bruno@clisp.org>
11647
11648         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
11649
11650 2006-06-15  Bruno Haible  <bruno@clisp.org>
11651
11652         * lib/stdint_.h: Rewritten to be fully auto-configured.
11653         Fixes bug on HP-UX/IA64.
11654
11655 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
11656
11657         * lib/getdate.y (__attribute__): Don't define if already defined.
11658         Problem reported by Larry Jones.
11659         * lib/utimens.c (__attribute__): Likewise.
11660
11661 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
11662
11663         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
11664         reported by Andreas Schwab.
11665
11666 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11667             Bruno Haible  <bruno@clisp.org>
11668
11669         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
11670         check for the declaration of strnlen and a run test that exposes the
11671         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
11672         rpl_strndup.
11673
11674 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11675             Bruno Haible  <bruno@clisp.org>
11676
11677         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
11678
11679 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11680
11681         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
11682         compile test, for Tru64 4.0D.
11683
11684 2006-05-28  Karl Berry  <karl@gnu.org>
11685
11686         * config/srclist.txt (printf-args.c): lose sync.
11687
11688 2006-05-26  Martin Lambers  <marlam@marlam.de>
11689
11690         * lib/getpass.c: Updates the test for the native W32 API, and adds
11691         missing includes, thus fixing compilation warnings.
11692
11693 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
11694
11695         * lib/exclude.c (exclude_fnmatch): New function.
11696         (excluded_file_name): Call exclude_fnmatch.
11697         * lib/exclude.h (excluded_file_name): New prototype
11698
11699 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
11700
11701         * lib/tempname.c (small_open, large_open): New macros.
11702         (__open, __open64) [!_LIBC]: Remove.
11703         (__gen_tempname): Use small_open and large_open instead of __open
11704         and __open64.  This fixes a portability bug on HP-UX 11.11i
11705         reported by Simon Wing-Tang in
11706         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
11707
11708 2006-05-24  Bruno Haible  <bruno@clisp.org>
11709
11710         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
11711         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
11712         Reported by Thorsten Maerz <torte@netztorte.de> via
11713         Aaron Stone <aaron@serendipity.cx>.
11714
11715 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
11716
11717         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
11718         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
11719         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
11720         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
11721         not really conditional on the cache.
11722         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
11723
11724 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
11725
11726         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
11727         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
11728         (my_usleep): Don't mishandle maximum value.
11729
11730 2006-05-19  Jim Meyering  <jim@meyering.net>
11731
11732         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
11733
11734 2006-05-17  Bruno Haible  <bruno@clisp.org>
11735
11736         Cygwin portability.
11737         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
11738
11739 2006-05-17  Bruno Haible  <bruno@clisp.org>
11740
11741         * lib/stdint_.h: Fix recognition of Cygwin.
11742
11743 2006-05-15  Bruno Haible  <bruno@clisp.org>
11744
11745         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
11746         on libtool patch by Ralf Wildenhues.
11747
11748 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11749
11750         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
11751         test for C99 conformance; (bool) 0.5 is an integer constant
11752         expression, but (bool) -0.5 is not.  Problem reported by Fedor
11753         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
11754
11755 2006-05-11  Simon Josefsson  <jas@extundo.com>
11756
11757         * m4/xvasprintf.m4: Fix obvious typo.
11758
11759 2006-05-11  Jim Meyering  <jim@meyering.net>
11760
11761         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
11762         James Lemley.
11763
11764 2006-05-10  Simon Josefsson  <jas@extundo.com>
11765
11766         * lib/md4.c: Typo fix, update copyright years.
11767         (K1, K2): Don't use L because it turn computations into 64-bit on
11768         64-bit platforms.
11769
11770 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
11771
11772         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
11773         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
11774         unwanted sign propagation, e.g., on hosts with 64-bit int.
11775         There still are some problems with reeelly weird theoretical hosts
11776         (e.g., 33-bit int) but it's not worth worrying about now.
11777         * lib/sha1.c (rol): Likewise.
11778         (K1, K2, K3, K4): Remove unnecessary L suffix.
11779
11780 2006-05-10  Bruno Haible  <bruno@clisp.org>
11781
11782         * lib/des.c: Cast to avoid warnings.
11783
11784 2006-05-09  Bruno Haible  <bruno@clisp.org>
11785
11786         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
11787         (Depends-on): Depend also on xsize, stdarg.
11788         (configure.ac): Add gl_XVASPRINTF.
11789
11790 2006-05-09  Bruno Haible  <bruno@clisp.org>
11791
11792         * m4/xvasprintf.m4: New file.
11793
11794 2006-05-09  Bruno Haible  <bruno@clisp.org>
11795
11796         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
11797         (EOVERFLOW): Define fallback value.
11798         (xstrcat): New function.
11799         (xvasprintf): Recognize the special case of a string concatenation.
11800
11801 2006-05-08  Eric Blake  <ebb9@byu.net>
11802
11803         * gnulib-tool (func_version): Base copyright year on CVS date.
11804         (func_emit_copyright_notice): New function.
11805         (func_emit_lib_Makefile_am): Use it.
11806         (func_emit_tests_Makefile_am): Likewise.
11807         (func_import): Likewise.
11808
11809 2006-05-08  Bruno Haible  <bruno@clisp.org>
11810
11811         * modules/stdarg: New file.
11812         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
11813
11814 2006-05-08  Bruno Haible  <bruno@clisp.org>
11815
11816         * m4/stdarg.m4: New file, from GNU gettext.
11817
11818 2006-05-08  Bruno Haible  <bruno@clisp.org>
11819
11820         * config/srclist.txt (build-aux/config.rpath): different from latest
11821         release.
11822
11823 2006-05-08  Bruno Haible  <bruno@clisp.org>
11824
11825         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
11826
11827 2006-05-05  Jim Meyering  <jim@meyering.net>
11828
11829         * m4/warning.m4: New file, derived from bison's file by the same name.
11830
11831 2006-05-03  Bruno Haible  <bruno@clisp.org>
11832
11833         * lib/stdint_.h: Shorter URL.
11834         * lib/inttypes.h: Likewise.
11835
11836 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
11837
11838         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
11839
11840 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
11841
11842         * lib/verify.h: Document the internals better.  Most of this change
11843         was written by Bruno Haible.
11844
11845 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
11846
11847         * doc/verify.texi: New file, partly based on a proposal by
11848         Bruno Haible.
11849
11850 2006-05-02  Bruno Haible  <bruno@clisp.org>
11851
11852         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
11853         test from here...
11854         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
11855
11856 2006-04-29  Bruno Haible  <bruno@clisp.org>
11857
11858         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
11859         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
11860
11861 2006-04-29  Bruno Haible  <bruno@clisp.org>
11862
11863         * gnulib-tool: Make --update option actually work.
11864
11865 2006-04-29  Bruno Haible  <bruno@clisp.org>
11866
11867         * doc/gcd.texi: New file.
11868         * doc/gnulib.texi: Include it.
11869
11870 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
11871
11872         * lib/getdate.y (get_date): When adding relative date, start with the
11873         initial time, not with the result of the first mktime call.
11874
11875 2006-04-25  Bruno Haible  <bruno@clisp.org>
11876
11877         * gnulib-tool (func_import): Output the include directives in three
11878         blocks, sorted separately.
11879         Reported by Ben Pfaff <blp@cs.stanford.edu>.
11880
11881 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
11882
11883         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
11884         to define main with arguments, for C++.  Reported by Eric Blake.
11885         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
11886         Prefer 'int main ()' to 'int main (void)', for C++.
11887         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
11888         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
11889         for 'main', for C99 and C++.
11890
11891 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
11892
11893         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
11894         Don't assume that exit status -1 is valid.
11895         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
11896         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
11897         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
11898         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
11899         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
11900         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
11901         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
11902         functions can be used without declaring them, or that you can
11903         exit with status -1.
11904         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
11905
11906 2006-04-24  Karl Berry  <karl@gnu.org>
11907
11908         * config/srclist.txt (longdouble.m4): sync lost.
11909
11910 2006-04-24  Eric Blake  <ebb9@byu.net>
11911
11912         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
11913
11914 2006-04-24  Bruno Haible  <bruno@clisp.org>
11915
11916         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
11917         poll() implementation in AIX.
11918         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11919
11920 2006-04-24  Bruno Haible  <bruno@clisp.org>
11921
11922         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
11923         assigned exactly once.
11924
11925 2006-04-23  Claudio Fontana  <claudio@gnu.org>
11926             Bruno Haible  <bruno@clisp.org>
11927
11928         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
11929         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
11930         for AM_CPPFLAGS.
11931
11932 2006-04-23  Bruno Haible  <bruno@clisp.org>
11933
11934         * modules/copy-file: Depend on unistd.
11935         * modules/execute: Likewise.
11936         * modules/fatal-signal: Likewise.
11937         * modules/findprog: Likewise.
11938         * modules/mkdtemp : Likewise.
11939         * modules/pipe: Likewise.
11940         * modules/wait-process: Likewise.
11941
11942 2006-04-23  Bruno Haible  <bruno@clisp.org>
11943
11944         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
11945         condition was already detected.
11946         Reported by Ben Pfaff <blp@cs.stanford.edu>.
11947
11948 2006-04-23  Bruno Haible  <bruno@clisp.org>
11949
11950         * lib/copy-file.c: Include <unistd.h> unconditionally.
11951         * lib/execute.c: Likewise.
11952         * lib/fatal-signal.c: Likewise.
11953         * lib/findprog.c: Likewise.
11954         * lib/mkdtemp.c: Likewise.
11955         * lib/pipe.h: Likewise.
11956         * lib/pipe.c: Likewise.
11957         * lib/wait-process.h: Likewise.
11958
11959 2006-04-23  Bruno Haible  <bruno@clisp.org>
11960
11961         * gnulib-tool (func_usage): Fix --import description. Document
11962         --update.
11963         (func_import): Create temporary file in a temporary directory, if
11964         --dry-run is specified. Silence errors from 'grep' when there are no
11965         m4 files in $m4dir.
11966         (func_create_testdir): Silence errors from 'grep' when there are no
11967         m4 files in $m4dir.
11968         Reported by Karl Berry <karl@freefriends.org>.
11969
11970 2006-04-20  Bruno Haible  <bruno@clisp.org>
11971
11972         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
11973         one argument, so that the code will be portable to Autoconf 2.60.
11974         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
11975         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
11976         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
11977
11978 2006-04-19  Derek Price  <derek@ximbiot.com>
11979             Eric Blake  <ebb9@byu.net>
11980
11981         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
11982         rather than "/full/path.h".  Update comment to match.  Shorten &
11983         generalize m4_translit call via AS_TR_CPP.
11984
11985 2006-04-19  Derek Price  <derek@ximbiot.com>
11986             Eric Blake  <ebb9@byu.net>
11987
11988         * lib/inttypes.h: Correct grammar in comment.
11989
11990 2006-04-18  Derek Price  <derek@ximbiot.com>
11991             Paul Eggert  <eggert@cs.ucla.edu>
11992
11993         * modules/inttypes: New file.
11994         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
11995
11996 2006-04-18  Derek Price  <derek@ximbiot.com>
11997             Paul Eggert  <eggert@cs.ucla.edu>
11998
11999         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
12000         New files.
12001
12002 2006-04-18  Derek Price  <derek@ximbiot.com>
12003             Paul Eggert  <eggert@cs.ucla.edu>
12004
12005         * lib/inttypes.h: New file.
12006         * lib/strtoimax.c: Assume <inttypes.h>.
12007
12008 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
12009
12010         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
12011         isn't mounted.  Problem reported by Kir Kolyshkin.
12012
12013 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
12014
12015         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
12016         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
12017         Derek R. Price.
12018         * lib/regex.h (RE_DUP_MAX): Update comment to match current
12019         implementation.
12020
12021 2006-04-12  Eric Blake  <ebb9@byu.net>
12022
12023         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
12024         is now done automatically by the corresponding Autoconf macro.
12025
12026 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
12027
12028         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
12029         time_r.h.
12030
12031 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
12032
12033         Merge regex changes from libc, removing some of our
12034         POSIX-conformance changes that were rejected and redoing them in a
12035         less-intrusive way.
12036
12037         * lib/regcomp.c (re_compile_internal, init_dfa):
12038         Length arg is now size_t, not Idx.  All uses changed.
12039         (peek_token): Forward decl now says internal_function.
12040         (__re_error_msgid, __re_error_msgid_idx):
12041         Now static rather than extern with attribute_hidden.
12042         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
12043         For some reason libc prefers K&R style defns for external functions.
12044         (regerror) [!defined _LIBC]: Likewise.
12045         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
12046         (seek_collating_symbol_entry, lookup_collation_sequence_value):
12047         (build_range_exp, build_collating_symbol):
12048         Use K&R-style defn.
12049         (re_compile_fastmap): Use '\0' to memset, not 0.
12050         (utf8_sb_map): Make the calculations more obvious.
12051         (init_dfa, parse_bracket_exp, build_charclass_op):
12052         Call calloc and cast result, as glibc does.
12053         (init_word_char, fetch_token, peek_token, peek_token_bracket):
12054         (build_range_exp, build_collating_symbol):
12055         Now internal functions.
12056
12057         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
12058
12059         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
12060         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
12061         Don't depend on VMS; depend on __VMS instead, for POSIX
12062         namespace cleanness.
12063         (regoff_t): Define to ssize_t, not long int.
12064
12065         Remove the REG_ macros named below.  Instead, make the old names
12066         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
12067         __USE_GNU_REGEX.
12068         (REG_BACKSLASH_ESCAPE_IN_LISTS):
12069         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
12070         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
12071         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
12072         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
12073         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
12074         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
12075         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
12076         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
12077         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
12078         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
12079         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
12080         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
12081         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
12082         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
12083         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
12084         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
12085         (REG_NREGS):
12086         Remove.  All uses replaced by the old RE_* names.
12087         (RE_BACKSLASH_ESCAPE_IN_LISTS):
12088         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
12089         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
12090         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
12091         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
12092         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
12093         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
12094         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
12095         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
12096         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
12097         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
12098         Don't bother having these macros be independent of each others'
12099         values, since they no longer exist in the POSIX name space.
12100
12101         Rename the following member names back to their old names,
12102         unless !__USE_GNU_REGEX.  All uses changed back.
12103         (buffer): Renamed from re_buffer.
12104         (allocated): Renamed from re_allocated.
12105         (used): Renamed from re_used.
12106         (syntax): Renamed from re_syntax.
12107         (fastmap): Renamed from re_fastmap.
12108         (translate): Renamed from re_translate.
12109         (can_be_null): Renamed from re_can_be_null.
12110         (regs_allocated): Renamed from re_regs_allocated.
12111         (fastmap_accurate): Renamed from re_fastmap_accurate.
12112         (no_sub): Renamed from re_no_sub.
12113         (not_bol): Renamed from re_not_bol.
12114         (not_eol): Renamed from re_not_eol.
12115         (newline_anchor): Renamed from re_newline_anchor.
12116         (num_regs): Renamed from rm_num_regs.
12117         (start): Renamed from rm_start.
12118         (end): Renamed from rm_end.
12119
12120         (free_state): Move up a bit.
12121
12122         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
12123         #define to be empty.
12124         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
12125         when that is what is intended.
12126         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
12127         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
12128         (MAX): New macro.
12129         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
12130         All uses changed back to re_malloc, etc.  It's now the caller's
12131         responsibility to check for overflow; all callers changed.
12132         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
12133         (re_x2nrealloc): Remove.
12134         (free_state): Remove decl.
12135
12136         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
12137         (re_set_registers, re_exec):
12138         Use K&R-style defn.
12139
12140         2006-01-31  Roland McGrath  <roland@redhat.com>
12141
12142         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
12143         Reported by Mike Frysinger <vapier@gentoo.org>.
12144
12145         2006-01-15  Andreas Jaeger  <aj@suse.de>
12146
12147         [BZ #1950]
12148         * lib/regex_internal.c (re_string_reconstruct): Adjust for
12149         build_wcs_upper_buffer change.
12150         (build_wcs_upper_buffer): Change return type.
12151
12152         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
12153
12154         * lib/regex_internal.h: Include <stdint.h> if available.
12155
12156         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
12157
12158         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
12159
12160         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
12161
12162         * lib/regcomp.c: Adjust for changed secondary hash function.
12163
12164         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
12165
12166         * lib/regex.h: Pretty printing.
12167         Clean up namespace a bit.
12168
12169         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
12170
12171         * lib/regexec.c (update_cur_sifted_state, check_arrival,
12172         check_arrival_add_next_nodes): Avoid using uninitialized variable.
12173
12174         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12175                     Ulrich Drepper  <drepper@redhat.com>
12176
12177         [BZ #1302]
12178         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
12179         changed.
12180         (bitset_word_t): Renamed from bitset_word.  All uses changed.
12181
12182         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
12183
12184         [BZ #281]
12185         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
12186         * lib/regcomp.c: Remove unnecessary uses of
12187         unsigned RE_TRANSLATE_TYPE.
12188         * lib/regex_internal.h: Likewise.
12189         * lib/regex_internal.c: Likewise.
12190         * lib/regexec.c: Likewise.
12191         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
12192
12193         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
12194
12195         * lib/regexec.c (find_recover_state): Remove unnecessary
12196         initialization.
12197         (transit_state_bkref): Make DFA a const pointer.
12198         (get_subexp): Likewise.
12199         (check_arrival): Likewise.
12200         (update_cur_sifted_state): Likewise.
12201         (re_search_internal): Likewise.
12202         (prune_impossible_nodes): Likewise.
12203         (acquire_init_state_context): Likewise.
12204         (proceed_next_node): Likewise.
12205         (set_regs): Likewise.
12206         (free_fail_stack_return): Likewise.
12207         (check_arrival_expand_ecl): Mark DFA parameter as const.
12208         (check_arrival_expand_ecl_sub): Likewise.
12209         (check_subexp_limits): Likewise.
12210         (sub_epsilon_src_nodes):  Likewise.
12211         (add_epsilon_src_nodes):  Likewise.
12212         (merge_state_array): Likewise.
12213         (update_regs): Likewise.
12214         (build_trtable): Likewise.
12215         (sift_states_backward): Mark MCTX parameter as const.
12216         (build_sifted_states): Likewise.
12217         (update_cur_sifted_state): Likewise.
12218         (sift_states_mkref): Likewise.
12219         (check_arrival_expand_ecl): Mark eclosure as const.
12220         (check_dst_limits_calc_pos_1): Likewise.
12221         * lib/regex_internal.h (re_match_context_t): Make dfa a const
12222         pointer.
12223
12224         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
12225
12226         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
12227         (transit_state_sb): Likewise.
12228         (transit_state_mb): Likewise.
12229         (sift_states_iter_mb): Likewise.
12230         (check_arrival_add_next_nodes): Likewise.
12231         (check_node_accept_bytes): Change first parameter to pointer-to-const.
12232         [_LIBC] (re_search_2_stub): Use mempcpy.
12233
12234         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
12235         mbrtowc for very simple UTF-8 case.
12236
12237         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
12238         a pointer-to-const.
12239         (re_acquire_state_context): Likewise.
12240         * lib/regex_internal.h: Adjust prototypes.
12241
12242         * lib/regex.c: Prevent using C++ compilers.
12243
12244         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
12245         (re_acquire_state_context): Likewise.
12246
12247 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
12248
12249         * modules/regex (Depends-on): Add ssize_t.
12250
12251 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
12252
12253         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
12254         translation table.
12255
12256 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
12257
12258         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
12259
12260 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
12261             Bruno Haible  <bruno@clisp.org>
12262
12263         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
12264         <sys/types.h> and <inttypes.h>.
12265
12266 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12267
12268         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
12269         `__error_t_defined', so argp.h will not typedef the former.
12270
12271 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
12272
12273         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
12274         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
12275         glibc names.  Even if glibc is changed to conform to POSIX, the
12276         traditional names will be available anyway, since regex depends on
12277         the extensions module.  Also, fix a longstanding typo in the
12278         implementation of Spencer ERE test #75 from grep 2.3.  Problems
12279         reported by Emanuele Giaquinta.  Also, change sense of cached
12280         variable, so that the message makes sense.
12281
12282 2006-03-24  Simon Josefsson  <jas@extundo.com>
12283
12284         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
12285         including some doc fixes.
12286         (base64_encode_alloc): Fix +1 bug on allocation failures.
12287
12288 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12289
12290         * lib/base64.c (base64_encode): Do not read past end of array with
12291         unsanitized input on systems with CHAR_BIT > 8.
12292
12293 2006-03-24  Eric Blake  <ebb9@byu.net>
12294
12295         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
12296
12297 2006-03-22  Karl Berry  <karl@gnu.org>
12298
12299         * config/srclist.txt (*setenv.[ch]): get from coreutils.
12300         * config/srclistvars.sh (COREUTILS): new var.
12301
12302 2006-03-17  Jim Meyering  <jim@meyering.net>
12303
12304         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
12305         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
12306
12307 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
12308
12309         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
12310         no longer needs it.  Instead, check that regoff_t is as least
12311         as wide as ptrdiff_t.
12312
12313         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
12314         so that our regex.h stays compatible with the installed regex.
12315         This is helpful for installers who configure --without-included-regex.
12316         Problem reported by Emanuele Giaquinta.
12317
12318 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
12319
12320         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
12321         Typedef to long int, not to off_, as POSIX will likely change
12322         in that direction.
12323
12324 2006-03-15  Eric Blake  <ebb9@byu.net>
12325
12326         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
12327
12328 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
12329
12330         * lib/argp-help.c (validate_uparams): Fix typo
12331         * lib/argp-parse.c (argp_default_options): Consistently begin help
12332         messages with a lowercase letter.
12333
12334 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
12335
12336         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
12337         overrun buffers and shouldn't be used (much as gets shouldn't be
12338         used).
12339         * lib/time_r.c (asctime_r, ctime_r): Likewise.
12340
12341 2006-03-08  Simon Josefsson  <jas@extundo.com>
12342
12343         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
12344         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12345
12346 2006-03-08  Simon Josefsson  <jas@extundo.com>
12347
12348         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
12349         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12350
12351 2006-03-08  Simon Josefsson  <jas@extundo.com>
12352
12353         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
12354         signal that configure disabled the device.
12355
12356 2006-03-08  Simon Josefsson  <jas@extundo.com>
12357
12358         * build-aux/maint.mk: Fix refresh-po, to handle no translated
12359         languages.
12360
12361 2006-03-07  Simon Josefsson  <jas@extundo.com>
12362
12363         * modules/getopt (Depends-on): Add unistd.
12364
12365         * modules/unistd: New file.
12366
12367 2006-03-07  Simon Josefsson  <jas@extundo.com>
12368
12369         * modules/gc-random: New file.
12370
12371 2006-03-07  Simon Josefsson  <jas@extundo.com>
12372
12373         * m4/unistd_h.m4: New file.
12374
12375 2006-03-07  Simon Josefsson  <jas@extundo.com>
12376
12377         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
12378         test to be side-effect free by storing the result in the cache
12379         variable gl_cv_lib_readline, and moving the assignment of
12380         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
12381         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12382
12383 2006-03-07  Simon Josefsson  <jas@extundo.com>
12384
12385         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
12386         error on missing devices (the functions will return an error).
12387
12388         * m4/gc.m4: Move random stuff to gc-random.m4
12389
12390 2006-03-07  Simon Josefsson  <jas@extundo.com>
12391
12392         * lib/unistd_.h: New file.
12393
12394 2006-03-07  Simon Josefsson  <jas@extundo.com>
12395
12396         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
12397
12398 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
12399
12400         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
12401         Problem reported by Juan Manuel Guerrero.
12402
12403 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
12404
12405         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
12406         the unistd module.
12407         * lib/getlogin_r.c: Likewise.
12408         * lib/getlogin_r.h: Likewise.
12409         * lib/glob.c: Likewise.
12410         * lib/pagealign_alloc.c: Likewise.
12411         * lib/unistd_.h: Remove; no longer needed.
12412
12413 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
12414
12415         * MODULES.html.sh (Support for systems lacking POSIX:2001):
12416         Add unistd.
12417         * modules/c-stack (Depends-on): Add unistd.
12418         * modules/getlogin_r: Likewise.
12419         * modules/glob: Likewise.
12420         * modules/pagealign_alloc: Likewise.
12421         * modules/unistd (Files): Remove lib/unistd_.h.
12422         (EXTRA_DIST): Remove.
12423         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
12424         need unistd_.h.
12425         (MOSTLYCLEANFILES): Remove unistd.h-t.
12426
12427 2006-03-03  Simon Josefsson  <jas@extundo.com>
12428
12429         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
12430
12431 2006-03-03  Simon Josefsson  <jas@extundo.com>
12432
12433         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
12434         libidn and bison.
12435
12436 2006-03-03  Simon Josefsson  <jas@extundo.com>
12437
12438         * build-aux/maint.mk: Add indent target.
12439
12440 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
12441
12442         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
12443         our replacement poll.h in any case, to avoid a differing
12444         declaration from a system header.  Seen on AIX.
12445
12446 2006-03-01  Simon Josefsson  <jas@extundo.com>
12447
12448         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
12449         <kasal@ucw.cz>.
12450
12451 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12452
12453         * modules/gettime (Depends-on): Add extensions module.
12454         * modules/nanosleep (Depends-on): Likewise.
12455         * modules/settime (Depends-on): Likewise.
12456
12457 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12458
12459         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
12460         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
12461         pedantically.
12462         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
12463         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
12464
12465         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
12466         not "==".  Reported by Ralf Wildenhues.
12467
12468 2006-03-01  Karl Berry  <karl@gnu.org>
12469
12470         * doc/Copyright/request-*: new files, synced from gnuorg.
12471
12472 2006-03-01  Karl Berry  <karl@gnu.org>
12473
12474         * config/srclist.txt (Copyright/*): new entries.
12475
12476 2006-02-28  Simon Josefsson  <jas@extundo.com>
12477
12478         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
12479
12480 2006-02-27  Simon Josefsson  <jas@extundo.com>
12481
12482         * lib/base64.h: Indent #define's.  From Jim Meyering
12483         <jim@meyering.net>.
12484
12485 2006-02-27  Jim Meyering  <jim@meyering.net>
12486
12487         Revert the change of 2006-02-24, so these files can continue
12488         to be sync'd from gettext.
12489         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
12490         of `config.h'.
12491
12492 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
12493
12494         * modules/intprops: New file.
12495         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
12496         Add intprops.
12497         * modules/getloadavg (Files): Remove lib/intprops.h.
12498         (Depends-on): Add intprops.
12499         * modules/human: Likewise.
12500         * modules/inttostr: Likewise.
12501         * modules/openat: Likewise.
12502         * modules/sig2str: Likewise.
12503         * modules/userspec: Likewise.
12504         * modules/utimecmp: Likewise.
12505         * modules/xnanosleep: Likewise.
12506         * modules/xstrtol: Likewise.
12507
12508 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
12509
12510         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
12511         * modules/lock-tests (TESTS): Use $(EXEEXT).
12512         * modules/tls-tests: Likewise.
12513         * modules/argp-tests: Likewise.
12514         (check_PROGRAMS): New var, replacing...
12515         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
12516
12517 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12518
12519         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
12520         `config.h'.
12521
12522 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
12523
12524         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
12525
12526 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12527
12528         Sync from coreutils.
12529         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
12530         gl_CHDIR_SAFER.
12531
12532 2006-02-22  Jim Meyering  <jim@meyering.net>
12533
12534         Sync from coreutils.
12535         * m4/chdir-safer.m4: New file.
12536
12537 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
12538
12539         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
12540         AT_FDCWD exceeds INT_MAX.
12541         * lib/openat.h (AT_FDCWD): Likewise.
12542
12543 2006-02-17  Eric Blake  <address@hidden>
12544
12545         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
12546
12547 2006-02-16  Simon Josefsson  <jas@extundo.com>
12548
12549         * modules/getaddrinfo (Depends-on): Add sys_socket.
12550
12551 2006-02-15  Simon Josefsson  <jas@extundo.com>
12552
12553         * build-aux/maint.mk: Add dsyntax-check rule.
12554
12555 2006-02-15  Eric Blake  <ebb9@byu.net>
12556
12557         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
12558         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
12559         'present but cannot compile' warnings on cygwin.
12560         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
12561         use ws2tcpip.h if sys/socket.h works.
12562         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
12563         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
12564
12565 2006-02-14  Simon Josefsson  <jas@extundo.com>
12566
12567         * modules/maintainer-makefile (Files): Rename.
12568
12569         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
12570         and (the local) Makefile.cfg to maint-cfg.mk.
12571
12572         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
12573         to the latter.
12574
12575         * modules/maintainer-makefile: New module.
12576
12577         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
12578         severaly stripped to make it possible to build it up from scratch
12579         with reliable tests.
12580
12581         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
12582         fixes to permit overriding the default actions when configure and
12583         makefile are not available.
12584
12585 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
12586
12587         Sync from coreutils.
12588         * modules/lstat (Depends-on): Don't depend on xalloc.
12589         (License): Change from GPL to LGPL, since this is now simply a
12590         replacement for a libc function.
12591
12592 2006-02-14  Jim Meyering  <jim@meyering.net>
12593
12594         Sync from coreutils.
12595
12596         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
12597         failure on deficient systems, and simplify gnulib lgpl dependencies.
12598         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
12599         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
12600
12601         * lib/xalloc-die.c: Remove unused definition of N_.
12602
12603 2006-02-14  Jim Meyering  <jim@meyering.net>
12604
12605         Sync from coreutils.
12606         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
12607         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
12608         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
12609         double-quote uses of that variable, to accommodate the rare case in
12610         which getmntent is available in none of the libraries checked.  This
12611         happens at least on FreeBSD 5.0.
12612
12613 2006-02-13  Simon Josefsson  <jas@extundo.com>
12614
12615         * gnulib-tool (Usage): Fix --import, from
12616         karl@freefriends.org (Karl Berry).
12617
12618 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
12619
12620         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
12621
12622 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
12623
12624         * lib/argp-namefrob.h: Restore changes accidentally lost during the
12625         "autoupdate" on 2005-12-12.
12626
12627 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
12628
12629         * modules/closeout (Depends-on): Remove atexit.
12630
12631 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
12632
12633         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
12634         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
12635
12636 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
12637
12638         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
12639         __EXTENSIONS__ if this causes compilation to fail.  Problem
12640         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
12641         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
12642
12643 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
12644
12645         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
12646         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
12647         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
12648         All uses changed.
12649
12650 2006-01-26  Simon Josefsson  <jas@extundo.com>
12651
12652         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
12653         prototype is visible on mingw32.
12654
12655         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
12656         for mingw32.
12657
12658         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
12659         mingw32).
12660
12661 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
12662
12663         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
12664         attempt to open for write; this always fails, at least on POSIX
12665         hosts.  This reinstates the 2006-01-09 change, which was
12666         inadvertently removed.
12667
12668 2006-01-26  Bruno Haible  <bruno@clisp.org>
12669
12670         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
12671         Reported by Paul Eggert.
12672
12673 2006-01-26  Bruno Haible  <bruno@clisp.org>
12674             Paul Eggert  <eggert@cs.ucla.edu>
12675
12676         * lib/stdbool_.h (_Bool)
12677         [(! (defined __cplusplus || defined __BEOS__)
12678           && !defined __GNUC__
12679           && !(defined __HP_cc || defined __xlc__
12680                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
12681                || defined __sgi))]:
12682         #define to signed char in these cases too; this simplifies
12683         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
12684         etc., separately) and makes it more conservative.
12685
12686 2006-01-25  Simon Josefsson  <jas@extundo.com>
12687
12688         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
12689         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
12690         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
12691
12692 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
12693
12694         * lib/argp-namefrob.h: Bugfix. Remove stray #
12695
12696 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
12697
12698         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
12699         so that we test the test.
12700         Check for yet another HP-UX cc bug involving *bool |= bool.
12701
12702 2006-01-25  Karl Berry  <karl@gnu.org>
12703
12704         * config/srclist.txt (vasnprintf.c): sync lost.
12705
12706 2006-01-25  Jim Meyering  <jim@meyering.net>
12707
12708         Sync from the stable (b5) branch of coreutils:
12709
12710         * lib/fts.c (fts_children): Don't let close() clobber errno from
12711         failed fchdir().
12712
12713         * lib/fts.c (fts_stat): When following a symlink-to-directory,
12714         don't necessarily interpret stat-fails+lstat-succeeds as indicating
12715         a dangling symlink.  That can also happen at least for ELOOP.
12716         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
12717         FYI, this bug predates the inclusion of fts.c in coreutils.
12718
12719         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
12720         in their own block, so pre-c99 compilers don't object.
12721
12722         Avoid the double-free (first in fts_read, second in fts_close) that
12723         would occur when an `active' directory is made inaccessible (e.g.,
12724         via chmod a-x) during a traversal.
12725         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
12726         before returning.  Reproduce this failure by
12727         mkdir -p a/b; cd a; chmod a-x . b
12728         Reported by Stavros Passas.
12729
12730 2006-01-25  Jim Meyering  <jim@meyering.net>
12731
12732         * lib/fileblocks.c: Remove more useless parentheses.
12733         * lib/readutmp.h: Likewise.
12734
12735 2006-01-25  Bruno Haible  <bruno@clisp.org>
12736
12737         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
12738         warnings.
12739         Reported by Paul Eggert.
12740
12741 2006-01-25  Bruno Haible  <bruno@clisp.org>
12742
12743         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
12744         rid of a trap command. For Solaris sh.
12745         Reported by Mark D. Baushke <mdb@gnu.org>.
12746
12747 2006-01-24  Simon Josefsson  <jas@extundo.com>
12748
12749         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
12750         Bruno.
12751
12752 2006-01-24  Karl Berry  <karl@gnu.org>
12753
12754         * config/srclist.txt (argp-namefrob.h): sync lost.
12755
12756 2006-01-24  Jim Meyering  <jim@meyering.net>
12757
12758         * modules/openat (Files): Add lib/intprops.h.
12759         From Mark D. Baushke.
12760
12761 2006-01-24  Jim Meyering  <jim@meyering.net>
12762
12763         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
12764         Reported by Mark D. Baushke.
12765
12766 2006-01-24  Jim Meyering  <jim@meyering.net>
12767
12768         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
12769
12770 2006-01-24  Bruno Haible  <bruno@clisp.org>
12771
12772         * modules/strnlen (Maintainer): Change from glibc to all.
12773
12774 2006-01-24  Bruno Haible  <bruno@clisp.org>
12775
12776         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
12777         Patch by Paul Eggert.
12778
12779 2006-01-24  Bruno Haible  <bruno@clisp.org>
12780
12781         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
12782         already has it.
12783         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
12784         2005-11-26.
12785
12786         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
12787         'signed char' to avoid problems with the built-in _Bool type.
12788         Reported by Paul Eggert on 2005-11-26.
12789
12790 2006-01-24  Bruno Haible  <bruno@clisp.org>
12791
12792         * gnulib-tool (func_import): Avoid constructing complicated sed
12793         expressions inside backquote.
12794         Report and solution by Mark D. Baushke <mdb@gnu.org>.
12795
12796 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
12797
12798         These changes imported from libc.
12799         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
12800         test and two separate function calls.
12801         * lib/strndup.c (__strndup): Add libc_hidden_def.
12802
12803 2006-01-23  Simon Josefsson  <jas@extundo.com>
12804
12805         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
12806         Remove the test_*_SOURCES variable: automake infers it by default.
12807         * modules/tls-tests: Likewise.
12808
12809 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
12810
12811         Work around porting bugs reported by Dieter in
12812         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
12813         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
12814         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
12815         Include "getopt.h" first, to check interface.
12816         (getenv): Declare only if defined HAVE_DECL_GETENV &&
12817         !HAVE_DECL_GETENV.
12818         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
12819         (__strndup): Revert to K&R-style function dfns, the glibc style.
12820         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
12821         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
12822         Include strnlen.h first, to get prototype properly.
12823         (strnlen): Renamed from __strnlen.
12824         Remove weak alias.
12825
12826 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
12827
12828         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
12829
12830 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
12831
12832         * config/srclist.txt: Adjust to reflect glibc reorganization.
12833         This affects only comments.
12834
12835 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12836
12837          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
12838          Reported by Bruce Korb <bkorb@gnu.org>.
12839
12840 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
12841
12842         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
12843         to pacify gcc -Wswitch-default.
12844
12845 2006-01-22  Bruno Haible  <bruno@clisp.org>
12846
12847         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
12848         temporary buffer for sprintf, take into account the precision also
12849         for 'd', 'i', 'u', 'o', 'x', 'X'.
12850
12851 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
12852
12853         * modules/argp-tests: New module
12854         * tests/test-argp.c: New file
12855         * tests/test-argp-2.sh: New file
12856
12857 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
12858
12859         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
12860         (__argp_base_name): Removed
12861         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
12862         typo.
12863         (__argp_base_name): Provide macro definition or extern declaration
12864         depending on the configuration
12865
12866 2006-01-20  Simon Josefsson  <jas@extundo.com>
12867
12868         * modules/inet_ntop (Depends-on): Depend on sys_socket.
12869
12870 2006-01-20  Simon Josefsson  <jas@extundo.com>
12871
12872         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
12873
12874 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12875
12876         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
12877         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
12878         Suggested by Bruno Haible.
12879
12880 2006-01-20  Karl Berry  <karl@gnu.org>
12881
12882         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
12883         until changes propagate, I guess.
12884
12885 2006-01-19  Simon Josefsson  <jas@extundo.com>
12886
12887         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
12888
12889 2006-01-19  Simon Josefsson  <jas@extundo.com>
12890
12891         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
12892
12893 2006-01-19  Simon Josefsson  <jas@extundo.com>
12894
12895         * gnulib-tool: Set check_PROGRAMS.
12896
12897         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
12898         modules/des-tests, modules/gc-arcfour-tests,
12899         modules/gc-arctwo-tests, modules/gc-des-tests,
12900         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
12901         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
12902         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
12903         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
12904         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
12905         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
12906         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
12907         test_*_SOURCES.
12908
12909 2006-01-18  Simon Josefsson  <jas@extundo.com>
12910
12911         * modules/socklen (Depends-on): Depend on sys_socket.
12912
12913 2006-01-18  Simon Josefsson  <jas@extundo.com>
12914
12915         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
12916         modules/des-tests, modules/gc-arcfour-tests,
12917         modules/gc-arctwo-tests, modules/gc-des-tests,
12918         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
12919         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
12920         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
12921         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
12922         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
12923         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
12924         $(EXEEXT) to automake TESTS variable, for mingw32.
12925
12926 2006-01-17  Simon Josefsson  <jas@extundo.com>
12927
12928         * modules/socklen (Include): Need sys/socket.h.
12929
12930 2006-01-17  Bruno Haible  <bruno@clisp.org>
12931
12932         * modules/ssize_t (Include): Add <sys/types.h>.
12933
12934 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
12935
12936         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
12937         it's not portable and it doesn't work with cross-compiles.
12938         Problem reported by Bruno Haible.  Fix missing-$ typo in
12939         'test "gl_cv_ignore_unused_libraries" ...' that prevented
12940         -zignore from being used with Sun's C compiler.
12941
12942 2006-01-12  Simon Josefsson  <jas@extundo.com>
12943
12944         * lib/base64.c: Fix warning, reported by Bruno Haible
12945         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
12946
12947 2006-01-12  Bruno Haible  <bruno@clisp.org>
12948
12949         * modules/ldd: New file.
12950         * build-aux/ldd.sh.in: New file.
12951         * MODULES.html.sh (Support for building libraries and executables): Add
12952         ldd.
12953
12954 2006-01-12  Bruno Haible  <bruno@clisp.org>
12955
12956         * m4/ldd.m4: New file.
12957
12958 2006-01-12  Bruno Haible  <bruno@clisp.org>
12959
12960         * gnulib-tool (func_import, func_create_testdir): Don't go into an
12961         endless loop while replacing $auxdir with build-aux.
12962
12963 2006-01-11  Simon Josefsson  <jas@extundo.com>
12964
12965         * lib/stdint_.h (SIZE_MAX): Add missing (.
12966
12967 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
12968
12969         Sync from coreutils.
12970         * lib/md5.c: Fix commentary typos.
12971         (alignof, UNALIGNED_P): No need for a GCC-specific version.
12972         * lib/md5.h (__attribute__): Remove; unused.
12973         * lib/sha1.c: Fix commentary to match md5 better.
12974         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
12975         so that we don't need to worry about alignment.  All uses changed.
12976         This merges the 2005-10-28 md5 change into sha1.
12977
12978 2006-01-11  Jim Meyering  <jim@meyering.net>
12979
12980         Sync from coreutils.
12981         * lib/md5.c (OP): Fix spacing.
12982
12983 2006-01-11  Bruno Haible  <bruno@clisp.org>
12984
12985         Ensure automatic ordering between gl_LOCK and gl_ARGP.
12986         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
12987         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
12988
12989 2006-01-11  Bruno Haible  <bruno@clisp.org>
12990
12991         Ensure automatic ordering between gl_LOCK and gl_ARGP.
12992         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
12993         the "early" section as well.
12994
12995 2006-01-11  Bruno Haible  <bruno@clisp.org>
12996
12997         Avoid "ar: no archive members specified" error on MacOS X.
12998         * gnulib-tool (func_modules_add_dummy): New function.
12999         (func_import, func_create_testdir): Invoke it.
13000
13001 2006-01-11  Bruno Haible  <bruno@clisp.org>
13002
13003         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
13004         with $auxdir in AC_CONFIG_FILES statements.
13005
13006 2006-01-11  Bruno Haible  <bruno@clisp.org>
13007
13008         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13009         Initialize also noinst_HEADERS to empty.
13010
13011 2006-01-11  Bruno Haible  <bruno@clisp.org>
13012
13013         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
13014         variables.
13015         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
13016         autoreconf.
13017
13018 2006-01-11  Bruno Haible  <bruno@clisp.org>
13019
13020         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
13021         overridable by the user.
13022         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
13023
13024 2006-01-10  Simon Josefsson  <jas@extundo.com>
13025
13026         * modules/sys_socket: New file.
13027
13028 2006-01-10  Simon Josefsson  <jas@extundo.com>
13029
13030         * m4/sys_socket_h.m4: New file.
13031
13032 2006-01-10  Simon Josefsson  <jas@extundo.com>
13033
13034         * lib/socket_.h: New file.
13035
13036 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
13037
13038         * modules/readutmp (Maintainer): Add myself.
13039
13040 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
13041
13042         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
13043         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
13044         People who are still concerned with buggy memcmp implementations
13045         can invoke gl_FUNC_MEMCMP themselves.
13046
13047 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
13048
13049         * lib/regex_internal.h (BITSET_WORD_BITS):
13050         Work around a bug in 64-bit PGC (before version 6.1-2), where the
13051         preprocessor mishandles large unsigned values as if they were signed.
13052         Problem reported by Claudio Fontana in
13053         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
13054
13055 2006-01-10  Jim Meyering  <jim@meyering.net>
13056
13057         Avoid the double-free (first in fts_read, second in fts_close) that
13058         would occur when an `active' directory is made inaccessible (e.g.,
13059         via chmod a-x) during a traversal.
13060         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
13061         before returning.  Reproduce this failure by
13062         mkdir -p a/b; cd a; chmod a-x . b
13063         Reported by Stavros Passas.
13064
13065         Sync from coreutils.
13066         * lib/sha1.c: Tweak grammar in a comment.
13067
13068 2006-01-10  Jim Meyering  <jim@meyering.net>
13069
13070         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
13071         Patch by Joerg Sonnenberger.
13072
13073 2006-01-10  Bruno Haible  <bruno@clisp.org>
13074
13075         * modules/readutmp: Depend on module free.
13076         * modules/strtok_r: Depend on module restrict.
13077
13078 2006-01-10  Bruno Haible  <bruno@clisp.org>
13079
13080         * modules/gettext (configure.ac): Add an invocation of
13081         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
13082
13083 2006-01-10  Bruno Haible  <bruno@clisp.org>
13084
13085         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
13086         Reported by Werner Lemberg <wl@gnu.org>.
13087
13088 2006-01-10  Bruno Haible  <bruno@clisp.org>
13089
13090         * lib/localcharset.c: Update from GNU gettext.
13091
13092 2006-01-10  Bruno Haible  <bruno@clisp.org>
13093
13094         * lib/argp.h (__const): Remove macro. Use const instead.
13095         * lib/argp-fmtstream.h (__const): Likewise.
13096         * lib/glob_.h (__const): Remove macro.
13097         * lib/glob-libc.h: Use const instead of __const.
13098
13099 2006-01-10  Bruno Haible  <bruno@clisp.org>
13100
13101         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
13102         variable.
13103         Needed to avoid an automake error regarding the 'gettext' module.
13104
13105 2006-01-09  Simon Josefsson  <jas@extundo.com>
13106
13107         * modules/inet_ntop (Depends-on): Add restrict.
13108
13109 2006-01-09  Simon Josefsson  <jas@extundo.com>
13110
13111         * modules/gc-rijndael-tests (License): Put under LGPL.
13112
13113         * modules/gc-des-tests (License): Likewise.
13114
13115         * modules/gc-arcfour-tests (License): Likewise.
13116
13117         * modules/gc-arctwo-tests (License): Likewise.
13118
13119         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
13120
13121         * modules/gc-hmac-sha1-tests (Files): Likewise.
13122
13123         * modules/gc-hmac-md5-tests (License): Likewise.
13124
13125         * modules/gc-sha1-tests (License): Likewise.
13126
13127         * modules/gc-md5-tests (License): Likewise.
13128
13129         * modules/gc-md4-tests (License): Likewise.
13130
13131         * modules/gc-md2-tests (License): Likewise.
13132
13133         * modules/gc-tests (License): Likewise.
13134
13135         * modules/des-tests (License): Likewise.
13136
13137         * modules/md4-tests (License): Likewise.
13138
13139         * modules/md2-tests (License): Likewise.
13140
13141 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
13142
13143         Sync from coreutils:
13144
13145         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
13146         * modules/lib-ignore: New file.
13147         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
13148         chdir-safer.m4, lchmod.m4.
13149         * modules/openat: Add mkdirat.c, openat-priv.h.
13150
13151 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
13152
13153         Sync from coreutils.
13154         * m4/lib-ignore.m4: New file.
13155         * m4/lchmod.m4: New file.
13156
13157 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
13158
13159         Sync from coreutils.
13160         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
13161         for write access: POSIX says that must fail.
13162         * lib/fts.c (diropen): Likewise.
13163         * lib/save-cwd.c (save_cwd): Likewise.
13164         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
13165         well, for minor improvements on hosts that lack O_DIRECTORY.
13166         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
13167         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
13168         Fall back on chown if open failed with EACCES.
13169
13170         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
13171         Report an error at compile-time if only a 1-second nominal clock
13172         resolution is found.
13173
13174         * lib/lchmod.h: New file.
13175         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
13176         (make_dir_parents): Use lchown rather than chown, and
13177         lchmod rather than chmod.
13178
13179         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
13180         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
13181         "proc" reported by n0dalus.
13182
13183         * lib/mountlist.c: Include <limits.h>.
13184         (dev_from_mount_options)
13185         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
13186         New function.  It no longer assumes "dev=" has the System V meaning
13187         on Linux (since it doesn't).  It also parses "dev=" more carefully.
13188         (read_file_system_list)
13189         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
13190         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
13191         dev= in that case.
13192
13193         * lib/posixtm.h (PDS_PRE_2000): New macro.
13194         * lib/posixtm.c (year): Arg is now syntax_bits rather than
13195         allow_century.  All usages changed.  Reject dates outside the range
13196         1969-1999 if PDS_PRE_2000 is used.
13197
13198 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
13199
13200         Sync from coreutils.
13201         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
13202         (Time of day items): Mention the possibility of leap seconds.
13203         Problem reported by Dr. David Alan Gilbert.
13204
13205 2006-01-09  Jim Meyering  <jim@meyering.net>
13206
13207         Sync from coreutils.
13208
13209         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
13210
13211         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
13212
13213         * lib/modechange.c (mode_compile): Reject an invalid mode string
13214         that starts with an octal digit.  From Andreas Gruenbacher.
13215
13216         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
13217         and dup to open_safer and dup_safer, respectively.
13218         (openat_permissive): Fix typo in comment.
13219
13220         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
13221         "gettext.h"; either no longer needed or are guaranteed by openat.h.
13222         (_): Remove; no longer needed.
13223         (openat): Renamed from rpl_openat; no need for rpl_openat
13224         since openat.h renames openat for us.
13225         Replace most of the body with a call to openat_permissive,
13226         to avoid duplicate code.
13227         Port to (probably hypothetical) environments were mode_t is
13228         wider than int.
13229         (openat_permissive): Require mode arg, so that we can check
13230         types better.  Put it just after flags.  Change cwd failure
13231         indicator from pointer-to-bool to pointer-to-errno-value.
13232         All callers changed.
13233         Invoke openat_save_fail and/or openat_restore_fail if
13234         cwd_errno is null, so that openat can call us.
13235         (openat_permissive, fdopendir, fstatat, unlinkat):
13236         Simplify errno handling to avoid some duplicate code,
13237         as it's OK to set errno on success.
13238         * lib/openat.h: Revamp code so that function macros depend on
13239         __OPENAT_PREFIX only, not also on AT_FDCWD.
13240         (openat_ro): Remove.  Caller changed to use openat_permissive.
13241         (openat_permissive): Now a macro, if not a function.
13242         (openat_restore_fail, openat_save_fail): Now always functions,
13243         since mkdirat needs them even if __OPENAT_PREFIX is defined.
13244
13245         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
13246         and openat.c.
13247         * lib/mkdirat.c: Include openat-priv.h.
13248         Remove definitions of macros defined therein.
13249         * lib/openat.c: Likewise.
13250
13251         * lib/mkdirat.c (mkdirat): New file and function.
13252         * lib/openat.h (mkdirat): Declare.
13253
13254         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
13255
13256         * lib/openat.h (openat_permissive): Declare.
13257         (openat_ro): Define.
13258
13259         * lib/openat.c (EXPECTED_ERRNO): New macro.
13260         (openat_permissive): New function -- used in remove.c rewrite.
13261         (all functions): Set errno just before returning, only if there
13262         was an actual failure.
13263         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
13264
13265         Emulate openat-family functions using Linux's procfs, if possible.
13266         Idea and some code based on Ulrich Drepper's glibc changes.
13267
13268         * lib/openat.c: (BUILD_PROC_NAME): New macro.
13269         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
13270         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
13271         before falling back on save_cwd and restore_cwd.
13272         (fdopendir, fstatat, unlinkat): Likewise.
13273
13274         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
13275         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
13276
13277         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
13278         as second argument to va_arg.  Otherwise, some versions of gcc
13279         warn that `if this code is reached, the program will abort'.
13280
13281 2006-01-09  Jim Meyering  <jim@meyering.net>
13282
13283         Sync from coreutils.
13284         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
13285         Require openat-priv.h.
13286
13287 2006-01-09  Bruno Haible  <bruno@clisp.org>
13288
13289         * modules/strnlen (Include): Use strnlen.h.
13290
13291 2006-01-09  Bruno Haible  <bruno@clisp.org>
13292
13293         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
13294
13295 2006-01-09  Bruno Haible  <bruno@clisp.org>
13296
13297         * lib/sysexit_.h (EX_OK): New macro.
13298         Suggested by Martin Lambers <marlam@marlam.de>.
13299
13300 2006-01-09  Bruno Haible  <bruno@clisp.org>
13301
13302         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
13303         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
13304
13305 2006-01-09  Bruno Haible  <bruno@clisp.org>
13306
13307         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
13308         numbers.
13309
13310 2006-01-09  Bruno Haible  <bruno@clisp.org>
13311
13312         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
13313         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
13314         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
13315         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
13316
13317 2006-01-09  Bruno Haible  <bruno@clisp.org>
13318
13319         * build-aux/javacomp.sh.in: New file, moved from lib/.
13320         * modules/javacomp-script (Files): Update.
13321         (configure.ac): Add AC_CONFIG_FILES invocation.
13322         (EXTRA_DIST): Remove variable.
13323
13324         * build-aux/javaexec.sh.in: New file, moved from lib/.
13325         * modules/javaexec (Files): Update.
13326         (configure.ac): Add AC_CONFIG_FILES invocation.
13327         (EXTRA_DIST): Remove javaexec.sh.in.
13328
13329         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
13330         * modules/csharpcomp-script (Files): Update.
13331         (configure.ac): Add AC_CONFIG_FILES invocation.
13332         (EXTRA_DIST): Remove variable.
13333
13334         * build-aux/csharpexec.sh.in: New file, moved from lib/.
13335         * modules/csharpexec (Files): Update.
13336         (configure.ac): Add AC_CONFIG_FILES invocation.
13337         (EXTRA_DIST): Remove csharpexec.sh.in.
13338
13339 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
13340
13341         Sync from coreutils.
13342
13343         Add POSIX ACL support
13344         * lib/acl.h (copy_acl, set_acl): Add declarations.
13345         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
13346         systems other than Linux.
13347         (chmod_or_fchmod): New function: use fchmod when possible,
13348         and chmod otherwise.
13349         (file_has_acl): Add a POSIX ACL implementation, with a
13350         Linux-specific subcase.
13351         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
13352         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
13353         acls are unsupported.
13354         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
13355         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
13356         are unsupported.
13357
13358 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
13359
13360         Sync from coreutils.
13361         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
13362
13363 2006-01-07  Bruno Haible  <bruno@clisp.org>
13364
13365         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
13366         gl_EARLY.
13367
13368 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
13369
13370         * lib/strftime.c (tzname): Don't declare if it is already #defined.
13371         Problem reported for Mingw by Mark Junker.
13372
13373 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
13374
13375         * README: Gnulib normally doesn't generate a tarball.
13376
13377 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
13378
13379         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
13380         long int, not int, for nanosecond counts, so that people who are
13381         used to POSIX struct timespec won't be surprised.  Reported by Jim
13382         Meyering.
13383
13384 2005-12-28  Bruno Haible  <bruno@clisp.org>
13385
13386         * build-aux/config.rpath: Update from GNU gettext.
13387
13388 2005-12-16  Jim Meyering  <jim@meyering.net>
13389
13390         * modules/fprintftime: New module.
13391         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
13392
13393 2005-12-16  Jim Meyering  <jim@meyering.net>
13394
13395         * m4/fprintftime.m4: New file.
13396
13397 2005-12-16  Jim Meyering  <jim@meyering.net>
13398
13399         * lib/fprintftime.c, lib/fprintftime.h: New files.
13400
13401 2005-12-15  Simon Josefsson  <jas@extundo.com>
13402
13403         * modules/socklen (configure.ac): Fix M4 macro name, to align with
13404         new m4/socklen.m4.
13405
13406 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
13407
13408         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
13409         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
13410
13411 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
13412
13413         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
13414         * lib/argp-help.c (fill_in_uparams): Check if the constructed
13415         struct uparams is valid. Fall back to the default values if it is
13416         not.
13417
13418 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13419
13420         * modules/argp (Files): Add argp-pin.c
13421         (Depends-on): dirname
13422         (lib_SOURCES): Add argp-pin.c
13423
13424 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13425
13426         * m4/argp.m4:  Check if program_invocation_name and
13427         program_invocation_short_name are declared and define appropriate
13428         macros if they are not.
13429
13430 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13431
13432         * lib/argp-help.c (__argp_base_name): New function
13433         (__argp_short_program_name): Rewrite using __argp_base_name
13434         * lib/argp-namefrob.h: Define program_invocation_name and
13435         program_invocation_short_name if requested
13436         (__argp_base_name): Add prototype
13437         * lib/argp-parse.c (argp_def): Use gettext wrappers
13438         (argp_default_parser): Use __argp_base_name
13439         * lib/argp-pin.c: New file. Defines program_invocation_name and
13440         program_invocation_short_name on systems that lack them.
13441
13442 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
13443
13444         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
13445         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
13446         porting problem reported by Georg Schwarz in
13447         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
13448
13449 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
13450
13451         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
13452         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
13453         porting problem reported by Georg Schwarz in
13454         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
13455
13456 2005-12-05  Bruno Haible  <bruno@clisp.org>
13457
13458         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
13459         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
13460         Reported by Mark Junker <mjscod@gmx.de>.
13461
13462 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
13463
13464         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
13465         Use implementation from Albert Chin, with some
13466         comments/corrections by Stepan Kasal and myself.
13467
13468 2005-12-02  Bruno Haible  <bruno@clisp.org>
13469
13470         * gnulib-tool (func_import): Accept GPLed build tool modules when
13471         --lgpl is given.
13472         * modules/csharpcomp-script: New file.
13473         * modules/csharpcomp: Depend on it.
13474         * modules/javacomp-script: New file.
13475         * modules/javacomp: Depend on it.
13476         Suggested by Simon Josefsson.
13477
13478 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
13479
13480         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
13481         statement, to work around an HP-UX 10.20 compiler bug reported by
13482         Peter O'Gorman.
13483
13484 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
13485
13486         * modules/savedir (Depends-on): Add openat.
13487
13488 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
13489
13490         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
13491         (uintmax_t) [defined uintmax_t]: Do not declare.
13492         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
13493         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
13494         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
13495         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
13496         sake of portability to weird hosts that C allows (though we don't
13497         know of any practical examples).
13498
13499         * lib/savedir.h (fdsavedir): New decl.
13500         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
13501         contains most of the former guts of savedir.
13502         (savedir): Use savedirstream.
13503         Include "openat.h".
13504
13505 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
13506
13507         * modules/obstack (Files): Add m4/ulonglong.m4.
13508         Problem reported by Davide Angelocola.
13509
13510 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
13511
13512         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
13513         coreutils no longer futzes with rounding modes.
13514
13515 2005-11-14  Jim Meyering  <jim@meyering.net>
13516
13517         * lib/mkstemp-safer.c: Include <config.h>, required for possible
13518         replacement of mkstemp.
13519
13520 2005-11-10  Simon Josefsson  <jas@extundo.com>
13521
13522         * lib/readline.c: Remove EOL.
13523
13524 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13525
13526         * modules/gethrxtime (Depends-on): Add gettime.
13527
13528 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13529
13530         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
13531         or gettimeofday; no longer needed.
13532
13533 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13534
13535         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
13536         time business.
13537         (gethrxtime) [! (HAVE_NANOUPTIME
13538         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
13539         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
13540         our own approximation.
13541
13542 2005-11-08  Eric Blake  <ebb9@byu.net>
13543
13544         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
13545
13546 2005-11-08  Eric Blake  <ebb9@byu.net>
13547
13548         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
13549
13550 2005-11-04  Bruno Haible  <bruno@clisp.org>
13551
13552         * gnulib-tool: Implement --update mode.
13553
13554 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
13555
13556         Fix porting problem reported by Theodoros V. Kalamatianos.
13557         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
13558         Don't assume that futimes failing means we must fail.
13559
13560 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
13561
13562         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
13563         variables to suggest the intended function of the PATH_MAX check.
13564
13565 2005-10-30  Kean Johnston  <jkj@sco.com>
13566
13567         Trivial changes to support SCO systems.
13568         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
13569         as PATH_MAX.
13570         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
13571         where __ptr is null when no I/O is pending.
13572
13573 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13574
13575         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
13576         leave errno alone.  Problem reported by Dmitry V. Levin.
13577
13578 2005-10-28  Simon Josefsson  <jas@extundo.com>
13579
13580         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
13581         Test more.
13582
13583         * tests/test-gc-md2.c, tests/test-md2.c: New files.
13584
13585         * modules/md2, modules/md2-tests: New files.
13586
13587 2005-10-28  Simon Josefsson  <jas@extundo.com>
13588
13589         * m4/inet_ntop.m4: More tests.
13590
13591         * m4/gc-md2.m4, md2.m4: New file.
13592
13593 2005-10-28  Simon Josefsson  <jas@extundo.com>
13594
13595         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
13596         "restrict" keywords, as per POSIX.  Protect the function
13597         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
13598         Don't use K&R prototypes.  Check the sprintf return values.
13599         Re-define EAFNOSUPPORT if not present.  Indent.
13600
13601         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
13602         suggested by Bruno Haible <bruno@clisp.org>.
13603
13604         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
13605
13606         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
13607
13608         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
13609         libgcrypt).
13610
13611         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
13612
13613         * lib/md2.h, lib/md2.c: New files.
13614
13615 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
13616
13617         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
13618         errno alone.  Problem reported by Frederic Jolliton.
13619
13620 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
13621
13622         * modules/verify (License): Change from GPL to LGPL.  This is a
13623         tiny module and there are apparently near-equivalents that are
13624         under the BSD license.
13625
13626 2005-10-24  Simon Josefsson  <jas@extundo.com>
13627
13628         * modules/sha1: Relicense to LGPL.
13629
13630 2005-10-24  Simon Josefsson  <jas@extundo.com>
13631
13632         * lib/md4.h: Shrink buffer size, now that we changed the type.
13633
13634 2005-10-23  Simon Josefsson  <jas@extundo.com>
13635
13636         * gnulib-tool (func_import): Fix --tests-base.
13637
13638 2005-10-22  Simon Josefsson  <jas@extundo.com>
13639
13640         * modules/arcfour (Depends-on): Need stdint.
13641
13642 2005-10-22  Simon Josefsson  <jas@extundo.com>
13643
13644         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
13645         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
13646
13647 2005-10-22  Simon Josefsson  <jas@extundo.com>
13648
13649         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
13650         suggested by Bruno Haible <bruno@clisp.org>.
13651
13652 2005-10-22  Simon Josefsson  <jas@extundo.com>
13653
13654         * lib/crc.h: Include stddef.h, for size_t.
13655
13656 2005-10-22  Simon Josefsson  <jas@extundo.com>
13657
13658         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
13659         arcfour_context struct (simplify test vector testing in GNU
13660         Shishi).
13661
13662 2005-10-21  Simon Josefsson  <jas@extundo.com>
13663
13664         * modules/des, modules/des-tests: New files.
13665
13666         * modules/gc-des, modules/gc-des-tests: New files.
13667
13668         * tests/test-des.c, tests/test-gc-des.c: New file.
13669
13670 2005-10-21  Simon Josefsson  <jas@extundo.com>
13671
13672         * modules/arctwo, modules/arctwo-tests: New files.
13673
13674         * tests/test-arctwo.c: New file.
13675
13676         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
13677
13678         * tests/test-gc-arctwo.c: New file.
13679
13680 2005-10-21  Simon Josefsson  <jas@extundo.com>
13681
13682         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
13683         Bruno Haible <bruno@clisp.org>.
13684
13685         * m4/gc-des.m4: New file.
13686
13687 2005-10-21  Simon Josefsson  <jas@extundo.com>
13688
13689         * m4/arctwo.m4: New file.
13690
13691         * m4/gc-arctwo.m4: New file.
13692
13693 2005-10-21  Simon Josefsson  <jas@extundo.com>
13694
13695         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
13696         block.
13697
13698 2005-10-21  Simon Josefsson  <jas@extundo.com>
13699
13700         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
13701         <bruno@clisp.org>.
13702
13703         * lib/hmac-sha1.c (hmac_sha1): Likewise.
13704
13705         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
13706         Bruno Haible <bruno@clisp.org>.
13707
13708         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
13709         <bruno@clisp.org>.
13710
13711 2005-10-21  Simon Josefsson  <jas@extundo.com>
13712
13713         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
13714
13715 2005-10-21  Simon Josefsson  <jas@extundo.com>
13716
13717         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
13718
13719 2005-10-21  Simon Josefsson  <jas@extundo.com>
13720
13721         * lib/des.h, lib/des.c: New files.
13722
13723         * lib/gc-gnulib.c: Support DES.c
13724
13725 2005-10-21  Simon Josefsson  <jas@extundo.com>
13726
13727         * lib/arctwo.h, lib/arctwo.c: New files.
13728
13729         * lib/gc-gnulib.c: Support ARCTWO.
13730
13731 2005-10-21  Simon Josefsson  <jas@extundo.com>
13732
13733         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
13734         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
13735
13736 2005-10-21  Simon Josefsson  <jas@extundo.com>
13737
13738         * gnulib-tool (func_import, func_create_testdir): Define automake
13739         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
13740         Makefile.am snippet),
13741         suggested by Bruno Haible <bruno@clisp.org>.
13742
13743         * modules/gc (Makefile.am): Use it.
13744
13745 2005-10-21  Bruno Haible  <bruno@clisp.org>
13746
13747         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
13748         patch.
13749
13750 2005-10-19  Simon Josefsson  <jas@extundo.com>
13751
13752         * tests/test-gc-rijndael.c: New file.
13753
13754         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
13755
13756 2005-10-19  Simon Josefsson  <jas@extundo.com>
13757
13758         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
13759         interface too.
13760
13761 2005-10-19  Simon Josefsson  <jas@extundo.com>
13762
13763         * tests/test-gc-arcfour.c: New file.
13764
13765         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
13766
13767 2005-10-19  Simon Josefsson  <jas@extundo.com>
13768
13769         * modules/gc-md4, modules/gc-md4-tests: New file.
13770
13771         * tests/test-gc-md4.c: New file.
13772
13773 2005-10-19  Simon Josefsson  <jas@extundo.com>
13774
13775         * m4/gc-md4.m4: New file.
13776
13777 2005-10-19  Simon Josefsson  <jas@extundo.com>
13778
13779         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
13780         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
13781         <kasal@ucw.cz>.
13782
13783 2005-10-19  Simon Josefsson  <jas@extundo.com>
13784
13785         * m4/gc-arcfour.m4: New file.
13786
13787         * m4/gc-rijndael.m4: New file.
13788
13789 2005-10-19  Simon Josefsson  <jas@extundo.com>
13790
13791         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
13792
13793 2005-10-19  Simon Josefsson  <jas@extundo.com>
13794
13795         * lib/gc-gnulib.c: Support ARCFOUR.
13796
13797 2005-10-19  Simon Josefsson  <jas@extundo.com>
13798
13799         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
13800         support.
13801
13802         * lib/gc.h: Add ECB enum type.
13803
13804         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
13805
13806 2005-10-18  Simon Josefsson  <jas@extundo.com>
13807
13808         * tests/test-md5.c: New file.
13809
13810         * modules/md5-tests: New file.
13811
13812 2005-10-18  Simon Josefsson  <jas@extundo.com>
13813
13814         * tests/test-md4.c: New file.
13815
13816         * modules/md4, modules/md4-tests: New files.
13817
13818 2005-10-18  Simon Josefsson  <jas@extundo.com>
13819
13820         * m4/md4.m4: New file.
13821
13822 2005-10-18  Simon Josefsson  <jas@extundo.com>
13823
13824         * lib/md4.h, lib/md4.c: New files, based on md5.?.
13825
13826 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
13827
13828         * gnulib-tool (func_create_testdir): Omit the second check whether
13829         BUILT_SOURCES in nonempty.
13830
13831 2005-10-17  Simon Josefsson  <jas@extundo.com>
13832
13833         * tests/test-rijndael.c: New file.
13834
13835 2005-10-17  Simon Josefsson  <jas@extundo.com>
13836
13837         * modules/sha1: Depend on stdint instead of md5.
13838
13839         * modules/md5: Depend on stdint, remove uint32_t.
13840
13841 2005-10-17  Simon Josefsson  <jas@extundo.com>
13842
13843         * modules/gc-sha1-tests: New file.
13844
13845         * tests/test-gc-sha1.c: New file.
13846
13847 2005-10-17  Simon Josefsson  <jas@extundo.com>
13848
13849         * m4/md5.m4: Remove call to uint32_t.m4.
13850
13851 2005-10-17  Simon Josefsson  <jas@extundo.com>
13852
13853         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
13854
13855         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
13856         md5.h.
13857
13858         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
13859
13860         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
13861
13862 2005-10-17  Simon Josefsson  <jas@extundo.com>
13863
13864         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
13865
13866 2005-10-17  Simon Josefsson  <jas@extundo.com>
13867
13868         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
13869
13870 2005-10-17  Simon Josefsson  <jas@extundo.com>
13871
13872         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
13873
13874         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
13875
13876 2005-10-17  Bruno Haible  <bruno@clisp.org>
13877
13878         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
13879         that it can also be used in a test.
13880
13881 2005-10-16  Bruno Haible  <bruno@clisp.org>
13882
13883         * gnulib-tool (func_emit_tests_Makefile_am): Also define
13884         TESTS_ENVIRONMENT, so that individual tests can augment it.
13885
13886         * gnulib-tool (func_create_testdir): Use an intermediate target for
13887         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
13888         macros, like $(ALLOCA_H), which cannot be passed through the command
13889         line.
13890
13891 2005-10-15  Simon Josefsson  <jas@extundo.com>
13892
13893         * modules/rijndael-tests: New file.
13894
13895         * modules/rijndael: New file.
13896
13897 2005-10-15  Simon Josefsson  <jas@extundo.com>
13898
13899         * m4/rijndael.m4: New file.
13900
13901 2005-10-15  Simon Josefsson  <jas@extundo.com>
13902
13903         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
13904
13905         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
13906
13907 2005-10-14  Simon Josefsson  <jas@extundo.com>
13908
13909         * tests/test-arcfour.c: New file.
13910
13911         * modules/arcfour, modules/arcfour-tests: New files.
13912
13913 2005-10-14  Simon Josefsson  <jas@extundo.com>
13914
13915         * m4/arcfour.m4: New file.
13916
13917 2005-10-14  Simon Josefsson  <jas@extundo.com>
13918
13919         * lib/arcfour.h, lib/arcfour.c: New files.
13920
13921 2005-10-14  Roland McGrath  <roland@redhat.com>
13922
13923         Import from libc.  [BZ #1331]
13924         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
13925         macro argument.
13926         Reported by Matej Vela <vela@debian.org>.
13927
13928 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
13929
13930         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
13931         include <wchar.h>; no longer needed.
13932
13933 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
13934
13935         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
13936
13937 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
13938         and  Ulrich Drepper  <drepper@redhat.com>
13939
13940         Import from libc.
13941         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
13942         instead of inline stream orientation test and two separate
13943         function calls.  Pay no attention to USE_IN_LIBIO.
13944
13945 2005-10-13  Simon Josefsson  <jas@extundo.com>
13946
13947         * modules/gc-hmac-md5-tests: New file.
13948
13949         * tests/test-gc-hmac-sha1.c: New file.
13950
13951         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
13952
13953         * modules/gc-hmac-md5-tests: New file.
13954
13955         * tests/test-gc-md5.c: New file.
13956
13957         * modules/gc-md5-tests: New file.
13958
13959 2005-10-13  Simon Josefsson  <jas@extundo.com>
13960
13961         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
13962         Move memory allocation outside of loop.
13963
13964 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
13965
13966         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
13967         intermediate directory is in a read-only file system.  Problem
13968         reported by Eric Blake.
13969
13970 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
13971
13972         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
13973
13974 2005-10-12  Simon Josefsson  <jas@extundo.com>
13975
13976         * tests/test-hmac-sha1.c: New file.
13977
13978         * modules/hmac-sha1-tests: New file.
13979
13980         * modules/hmac-sha1: New file.
13981
13982 2005-10-12  Simon Josefsson  <jas@extundo.com>
13983
13984         * modules/gc-sha1: New file.
13985
13986 2005-10-12  Simon Josefsson  <jas@extundo.com>
13987
13988         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
13989
13990         * tests/test-gc-pbkdf2-sha1.c: New file.
13991
13992 2005-10-12  Simon Josefsson  <jas@extundo.com>
13993
13994         * modules/gc-md5, modules/gc-hmac-md5: New files.
13995
13996         * modules/gc (Files): Remove md5, memxor and hmac files.
13997
13998 2005-10-12  Simon Josefsson  <jas@extundo.com>
13999
14000         * m4/gc-pbkdf2-sha1.m4: New file.
14001
14002         * m4/gc-hmac-sha1.m4: New file.
14003
14004         * m4/gc-sha1: New file.
14005
14006         * m4/hmac-sha1.m4: New file.
14007
14008 2005-10-12  Simon Josefsson  <jas@extundo.com>
14009
14010         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
14011
14012         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
14013
14014 2005-10-12  Simon Josefsson  <jas@extundo.com>
14015
14016         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
14017         suggested by Bruno Haible <bruno@clisp.org>.
14018
14019 2005-10-12  Simon Josefsson  <jas@extundo.com>
14020
14021         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
14022
14023 2005-10-12  Simon Josefsson  <jas@extundo.com>
14024
14025         * lib/gc-pbkdf2-sha1.c: New file.
14026
14027         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
14028
14029 2005-10-12  Simon Josefsson  <jas@extundo.com>
14030
14031         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
14032
14033         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
14034
14035 2005-10-12  Simon Josefsson  <jas@extundo.com>
14036
14037         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
14038         GC_USE_HMAC_MD5, respectively.
14039
14040         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
14041         (gc_md5): Fix typo.
14042
14043         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
14044
14045         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
14046
14047         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
14048
14049 2005-10-12  Bruno Haible  <bruno@clisp.org>
14050
14051         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
14052         Reported by Stepan Kasal <kasal@ucw.cz>.
14053
14054 2005-10-11  Simon Josefsson  <jas@extundo.com>
14055
14056         * tests/test-crc.c: New file.
14057
14058         * modules/crc, modules/crc-tests: New files.
14059
14060 2005-10-11  Simon Josefsson  <jas@extundo.com>
14061
14062         * m4/crc.m4: New file.
14063
14064 2005-10-11  Simon Josefsson  <jas@extundo.com>
14065
14066         * lib/gc.h: Add gc_hash and gc_hash_buffer.
14067
14068         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
14069
14070         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
14071
14072 2005-10-11  Simon Josefsson  <jas@extundo.com>
14073
14074         * lib/crc.h, lib/crc.c: New files.
14075
14076         * lib/gc.h (gc_hash_buffer): Add doc.
14077
14078 2005-10-11  Bruno Haible  <bruno@clisp.org>
14079
14080         * modules/c-strcasestr: New file.
14081         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
14082
14083 2005-10-11  Bruno Haible  <bruno@clisp.org>
14084
14085         * modules/c-strcase: New file.
14086         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
14087
14088 2005-10-11  Bruno Haible  <bruno@clisp.org>
14089
14090         * lib/strcasecmp.c: Include limits.h.
14091         (strcasecmp): Avoid integer overflow on exotic platforms.
14092         * lib/strncasecmp.c: Include limits.h.
14093         (strncasecmp): Avoid integer overflow on exotic platforms.
14094         Reported by Paul Eggert.
14095
14096 2005-10-11  Bruno Haible  <bruno@clisp.org>
14097
14098         * lib/c-strcasestr.h: New file, from GNU gettext.
14099         * lib/c-strcasestr.c: New file, from GNU gettext.
14100
14101 2005-10-11  Bruno Haible  <bruno@clisp.org>
14102
14103         * lib/c-strcase.h: New file, from GNU gettext.
14104         * lib/c-strcasecmp.c: New file, from GNU gettext.
14105         * lib/c-strncasecmp.c: New file, from GNU gettext.
14106
14107 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
14108
14109         * modules/mempcpy (License): GPL -> LGPL.
14110         * modules/strchrnul (License): Likewise.
14111         * modules/sysexits (License): Likewise.
14112
14113 2005-10-08  Simon Josefsson  <jas@extundo.com>
14114
14115         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
14116
14117 2005-10-07  Simon Josefsson  <jas@extundo.com>
14118
14119         * m4/memxor.m4: Remove gl_C_RESTRICT call.
14120
14121 2005-10-06  Simon Josefsson  <jas@extundo.com>
14122
14123         * tests/test-hmac-md5.c: New file.
14124
14125         * modules/hmac-md5-tests: New file.
14126
14127         * modules/hmac-md5: New file.
14128
14129 2005-10-06  Simon Josefsson  <jas@extundo.com>
14130
14131         * m4/hmac-md5.m4: New file.
14132
14133         * m4/memxor.m4: Require gl_C_RESTRICT.
14134
14135 2005-10-06  Simon Josefsson  <jas@extundo.com>
14136
14137         * lib/memxor.c (memxor): Avoid casts and warnings.
14138
14139 2005-10-06  Simon Josefsson  <jas@extundo.com>
14140
14141         * lib/hmac-md5.c: New file.
14142
14143         * lib/hmac.h: New file.
14144
14145 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
14146
14147         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
14148         promotes to int, not unsigned int, to catch the AIX 5.3
14149         compiler bug.
14150
14151 2005-10-05  Simon Josefsson  <jas@extundo.com>
14152
14153         * modules/memxor: New file.
14154
14155         * modules/iconv (Files): Move config.rpath to havelib, it is used
14156         there.
14157
14158         * modules/havelib (Files): Add config.rpath.
14159
14160 2005-10-05  Simon Josefsson  <jas@extundo.com>
14161
14162         * m4/memxor.m4: New file.
14163
14164 2005-10-05  Simon Josefsson  <jas@extundo.com>
14165
14166         * lib/memxor.c (memxor): Fix compiler error.
14167
14168         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
14169         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
14170
14171         * lib/memxor.h, lib/memxor.c: New files.
14172
14173         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
14174         we assume all systems have it, suggested by Jim Meyering
14175         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
14176         any systems lack sys/socket.h; mingw32 is known to lack it, but we
14177         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
14178         same reasons.
14179
14180 2005-10-05  Simon Josefsson  <jas@extundo.com>
14181
14182         * config/srclist.txt: Add glibc bug 1423 for md5.h.
14183
14184 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
14185
14186         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
14187         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
14188         needed, since the source code now assumes these .h files.
14189
14190 2005-10-05  Derek Price  <derek@ximbiot.com>
14191
14192         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
14193
14194 2005-10-05  Bruno Haible  <bruno@clisp.org>
14195
14196         * modules/stdint (License): Change to LGPL.
14197
14198 2005-10-04  Simon Josefsson  <jas@extundo.com>
14199
14200         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
14201         D. Baushke" <mdb@gnu.org>.
14202
14203 2005-10-04  Bruno Haible  <bruno@clisp.org>
14204
14205         * lib/verify.h (verify_true): Provide alternative definition for C++.
14206
14207 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
14208
14209         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
14210         (SSIZE_MAX): New macro, if not already defined.
14211         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
14212         than 2 GiB.
14213
14214 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
14215
14216         Sync from coreutils.
14217         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
14218         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
14219         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
14220         ULLONG_MAX doesn't work with 2.7.2.1.
14221
14222 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
14223
14224         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
14225         From Ben Pfaff.
14226
14227         * modules/exclude (Depends-on): Depend on verify.
14228         * modules/strtoimax (Depends-on): Likewise.
14229         * modules/utimecmp (Depends-on): Likewise.
14230
14231 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
14232
14233         * lib/exclude.c: Include verify.h.
14234         (verify): Remove.  All callers changed to use verify.h's version.
14235         * lib/strtoimax.c: Likewise.
14236         * lib/utimecmp.c: Likewis.e
14237
14238         Sync from coreutils.
14239         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
14240         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
14241         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
14242         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
14243         bother returning ENOSYS if settimeofday or stime fails; just let
14244         them return whatever errno they want to return.
14245         * lib/utimens.c: Include unistd.h, for dup2.
14246         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
14247         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
14248
14249 2005-10-02  Jim Meyering  <jim@meyering.net>
14250
14251         Sync from coreutils.
14252         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
14253         from glibc-2.2.5 that fails for read-only files.
14254
14255 2005-10-02  Jim Meyering  <jim@meyering.net>
14256
14257         Sync from coreutils.
14258         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
14259         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
14260         `#if HAVE_CONFIG_H'.
14261         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
14262         Remove AT_FDCWD test.
14263         Do not consume the fd unless successful.
14264         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
14265         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
14266         block, so that we don't even try to compile it if settimeofday is
14267         available.  This works around a compilation failure on OSF1 V5.1,
14268         due to stime requiring a `long int*' while tv_sec is `int'.
14269
14270 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
14271
14272         Sync from coreutils.
14273         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
14274         against `yes', rather than just testing for nonempty.
14275
14276 2005-10-01  Simon Josefsson  <jas@extundo.com>
14277
14278         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
14279         and Darwin.
14280
14281         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
14282         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
14283         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
14284         freeaddrinfo and gai_strerror are declared by the POSIX headers.
14285         Check if struct addrinfo is declared.
14286
14287 2005-10-01  Simon Josefsson  <jas@extundo.com>
14288
14289         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
14290         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
14291         AI_* and EAI_* definitions.  Protect function declarations.
14292
14293 2005-10-01  Jim Meyering  <jim@meyering.net>
14294
14295         Sync from coreutils.
14296
14297         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
14298         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
14299         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
14300         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
14301         in the inet and nsl libraries.  Required on Solaris 5.7.
14302
14303 2005-10-01  Jim Meyering  <jim@meyering.net>
14304
14305         Sync from coreutils.
14306         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
14307         in the inet and nsl libraries.  Required on Solaris 5.7.
14308
14309 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
14310
14311         * lib/getdelim.c (getdelim): Remove unused variables.
14312
14313 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
14314
14315         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
14316         so that the code works even with ancient cpp.  Portability problem
14317         with GCC 2.7.2.1 reported by Thomas M.Ott.
14318
14319 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
14320
14321         * modules/regex (Depends-on): Add strcase.
14322
14323         * modules/gethostname (Licence): Change from GPL to LGPL, since
14324         gethostname.c is a trivial implementation of a standard library
14325         function.
14326         * modules/poll (License): Change from GPL to LGPL, since it's
14327         derived from LGPL code.
14328
14329 2005-09-27  Jim Meyering  <jim@meyering.net>
14330
14331         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
14332         HAVE_CONFIG_H.
14333
14334         * lib/intprops.h (signed_type_or_expr__): Define.
14335         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
14336         for unsigned types.
14337
14338 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
14339
14340         * lib/verify.h (verify_expr): Remove, replacing with:
14341         (verify_true): New macro that returns true instead of void.
14342         (verify_type__): Remove.
14343         (verify): Use verify_true rather than verify_type__.
14344
14345 2005-09-26  Bruno Haible  <bruno@clisp.org>
14346
14347         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
14348         is necessary.
14349         (lib_SOURCES): Remove mbchar.c.
14350         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
14351         (Files): Add m4/mbrtowc.m4.
14352         * modules/mbiter: Likewise.
14353         * modules/mbuiter: Likewise.
14354
14355 2005-09-26  Bruno Haible  <bruno@clisp.org>
14356
14357         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
14358         compile mbchar.c if they are not both present.
14359         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
14360         * m4/mbiter.m4 (gl_MBITER): Likewise.
14361         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
14362         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
14363         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
14364
14365 2005-09-25  Jim Meyering  <jim@meyering.net>
14366
14367         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
14368         also uses socklen_t.
14369
14370 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
14371
14372         * lib/utimens.c (ENOSYS): Define if not already defined.
14373         (futimens): Support having a null PATH if the file descriptor
14374         is nonnegative.
14375
14376         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
14377         Remove.
14378         (__attribute): Define to empty unless GCC 3.1 or later.
14379         This works around a core dump on OpenBSD 3.4, which has GCC
14380         2.95.3, which dumps core when given __attribute__(()).  It also
14381         simplifies other tests, since we really don't want to bother with
14382         worrying about which ancient version of GCC supported what.
14383         Original problem reported by Yoann Vandoorselaere, with part of
14384         the fix suggested by Derek Price.
14385
14386 2005-09-24  Jim Meyering  <jim@meyering.net>
14387
14388         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
14389         so we can once again use a positive bitfield width of 1 -- now we
14390         don't have to explain why we were using a bitfield width of 2.
14391
14392 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
14393
14394         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
14395         and similarly for the other external symbols.  Problem reported
14396         by James Gallager.
14397
14398         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
14399         bug reported by Jim Meyering.
14400
14401         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
14402         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
14403         not needed, since socklen is a prerequisite module.
14404
14405 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
14406
14407         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
14408         Problem reported by Eric Blake.
14409         (getaddrinfo): Initialize se so that it's not garbage.
14410         Redo internal storage allocation so that it doesn't make unportable
14411         assumptions about alignment.
14412         Fix a memory leak.
14413
14414         * lib/utimens.c (futimens): Use futimesat if available.
14415         Prefer it to futimes since it doesn't have the futimes bug.
14416
14417         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
14418         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
14419         Instead, declare a function that returns a pointer to an array,
14420         and use verify_type__ to declare the size of the array.
14421         Problem and germ of a solution reported by Bruno Haible.
14422         (verify_type__): Use 2, not 1, for bitfield size, to avoid
14423         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
14424
14425 2005-09-23  Jim Meyering  <jim@meyering.net>
14426
14427         Sync from coreutils.
14428         Correct build failure (socklen_t not defined) on at least
14429         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
14430         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
14431
14432 2005-09-23  Jim Meyering  <jim@meyering.net>
14433
14434         * modules/getaddrinfo (Depends-on): Add socklen.
14435
14436 2005-09-23  Bruno Haible  <bruno@clisp.org>
14437
14438         * tests/test-verify.c: New file.
14439
14440 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14441
14442         Sync from coreutils.
14443
14444         * modules/argmatch (Depends-on): Add verify.
14445         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
14446         unistd-safer.
14447         * modules/save-cwd (Depends-on): Likewise.
14448
14449         * modules/openat (Files): Add lib/openat-die.c.
14450         (Depends-on): Remove error, exitfail.
14451         Add dirname.
14452
14453         * modules/verify: New file.
14454         * MODULES.html.sh (Diagnostics <assert.h>): New section,
14455         with "verify" module.
14456
14457 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14458
14459         Sync from coreutils.
14460
14461         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
14462         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
14463         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
14464         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
14465         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
14466         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
14467         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
14468         Don't bother checking for string.h, stdlib.h, unistd.h.
14469         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
14470         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
14471         module's job.
14472         * m4/jm-macros.m4 (gl_MACROS): Likewise.
14473         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
14474
14475         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
14476         (gl_GETDATE): Use it.
14477
14478         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
14479
14480 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14481
14482         Sync from coreutils.
14483
14484         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
14485         stat-time.h.
14486         * lib/argmatch.h: Include verify.h
14487         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
14488         (ARGMATCH_ASSERT): Remove; unused.
14489         * lib/canonicalize.c: Assume STDC_HEADERS.
14490         * lib/exclude.c: Include "strcase.h".
14491         * lib/regex_internal.h [!defined _LIBC]: Likewise.
14492         * lib/getusershell.c: Include stdio--.h rather than stdio.h
14493         and stdio-safer.h.
14494         (getusershell): Call fopen, not fopen_safer.
14495         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
14496         Do not include unistd-safer.h.
14497         (save_cwd): Don't call fd_safer; no longer needed
14498         now that we include fcntl--.h.
14499
14500         * lib/getdate.y (relative_time): New type.
14501         (RELATIVE_TIME_0): New constant.
14502         (parser_control): Use relative_time instead of doing it ourselves.
14503         (%union): Add new relative_time rel member.
14504         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
14505         Now typeless.
14506         (relunit, relunit_snumber): Now of type rel.
14507         (zone, rel, relunit, get_date): Adjust to above changes.
14508
14509         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
14510         Do not include unistd-safer.h.
14511         (getloadavg): Don't call fd_safer; no longer needed
14512         now that we include fcntl--.h.
14513
14514         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
14515         (make_dir_parents): Treat ENOSYS like EEXIST.
14516
14517         Improve quality of diagnostics on restore_cwd failure.
14518         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
14519         (make_dir_parents): Last arg is now int * (for errno), not bool *.
14520         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
14521         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
14522         each time through the loop.  Do not diagnose restore_cwd failure;
14523         that is the caller's job (and perhaps the caller does not care).
14524
14525         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
14526         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
14527         If the file already exists but is not a directory, don't bother
14528         to try to make its parents.
14529         Close potential file descriptor leak if we can't chdir("/") (!).
14530         Don't always return true if chdir($PWD) fails; return true only
14531         if the requested action was done successfully (except for the
14532         chdir($PWD)).
14533         Don't log final directory unless we actually made it.
14534         Refactor to avoid duplicate code to fix up permissions.
14535         Don't attempt to fix up parent permissions if chdir($PWD) fails.
14536
14537         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
14538         to make it a bit faster and (I hope) clearer.
14539         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
14540         Fix bug in formats like %2N.
14541
14542         * lib/verify.h: New file.
14543
14544 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14545
14546         Sync from coreutils.
14547         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
14548
14549 2005-09-22  Jim Meyering  <jim@meyering.net>
14550
14551         Sync from coreutils.
14552
14553         * m4/lstat.m4 (gl_FUNC_LSTAT):
14554         Use AC_LIBSOURCES to require lstat.c and lstat.h.
14555         Remove obsolete comment.
14556         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
14557         * m4/xstrtod.m4: Likewise.
14558
14559         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
14560
14561 2005-09-22  Jim Meyering  <jim@meyering.net>
14562
14563         Sync from coreutils.
14564
14565         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
14566
14567         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
14568         the .tm_year member, since otherwise gcc-4.0 would now warn about
14569         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
14570
14571         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
14572         order to avoid an unsuppressible warning from gcc on 64-bit systems.
14573
14574         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
14575         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
14576         when run in a time zone for which daylight savings time is in effect
14577         for the starting date.
14578
14579         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
14580         stop us from restricting permissions of just-created absolute-named
14581         directories.
14582         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
14583         to restore initial working directory.
14584         * lib/mkdir-p.c (make_dir_parents): New parameter:
14585         different_working_dir, to tell caller if/when we change the working
14586         directory and are unable to return to the initial one.
14587         * lib/mkdir-p.h (make_dir_parents): Update prototype.
14588         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
14589         `return false'.  This fixes a bug introduced on 2004-07-30.
14590
14591         * lib/openat.c (fdopendir): Be sure to close the supplied
14592         file descriptor before returning.  This makes our replacement
14593         implementation a little closer to Solaris's, where fdopendir
14594         ties the file descriptor to the returned DIR* pointer.
14595         * lib/openat.c (unlinkat): New function.
14596         * lib/openat.h (unlinkat): Add prototype.
14597         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
14598         (openat_restore_fail): Rename from openat_restore_die.
14599         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
14600
14601         Provide an alternative to exiting immediately upon save_cwd or
14602         restore_cwd failure.  Now, an application can arrange e.g.,
14603         to perform a longjump in that case.
14604         * lib/openat.c: Include dirname.h.
14605         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
14606         (rpl_openat, fdopendir, fstatat): Call openat_save_die
14607         and openat_restore_die rather than calling error directly.
14608         Don't include "error.h" or "exitfail.h"; they're no longer needed.
14609
14610         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
14611         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
14612         define.
14613
14614         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
14615         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
14616                             int utc, int nanoseconds);
14617         Background:
14618         date should not have to allocate a megabyte of virtual memory to
14619         handle a format argument like +%1048575T.  When implemented with
14620         strftime, it must allocate such a buffer, use strftime to fill it
14621         in, print it, then free it.
14622         With fprintftime, it simply prints everything and exits.
14623         With no need for memory allocation, that's one fewer way to fail.
14624         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
14625         optional field width, not before, so we accept %9:z, not %:9z.
14626         (my_strftime): Be sure to use L_('x') for literals.
14627
14628         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
14629         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
14630         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
14631         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
14632         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
14633         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
14634         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
14635         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
14636         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
14637         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
14638         * lib/xgethostname.c, lib/xreadlink.c:
14639         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
14640
14641         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
14642         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
14643         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
14644         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
14645         and don't include <sys/file.h>).
14646
14647 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
14648
14649         Sync from coreutils.
14650
14651         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
14652         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
14653         [!LDAV_DONE]: Avoid unused variable warning.
14654
14655 2005-09-21  Bruno Haible  <bruno@clisp.org>
14656
14657         * lib/unicodeio.h (unicode_to_mb): New declaration.
14658
14659 2005-09-20  Derek Price  <derek@ximbiot.com>
14660
14661         * lib/getaddrinfo.c: Don't include <netdb.h> included from
14662         getaddrinfo.h.
14663
14664 2005-09-20  Bruno Haible  <bruno@clisp.org>
14665
14666         * gnulib-tool: Remove trailing slashes from the values specified for
14667         --source-base, --m4-base, --tests-base, --aux-dir.
14668         Suggested by Simon Josefsson <jas@extundo.com>.
14669
14670 2005-09-20  Bruno Haible  <bruno@clisp.org>
14671
14672         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
14673         func_modules_to_filelist, func_import, func_create_testdir): Make all
14674         sorting results locale-independent, so that gnulib-cache.m4 doesn't
14675         change when gnulib-tool is invoked in a different locale.
14676
14677 2005-09-19  Simon Josefsson  <jas@extundo.com>
14678
14679         * m4/socklen.m4: Fix typo.
14680
14681 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14682
14683         Use a consistent style for including <config.h>.
14684         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
14685         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
14686         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
14687         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
14688         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
14689         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
14690         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
14691         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
14692         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
14693         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
14694         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
14695         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
14696         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
14697         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
14698         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
14699         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
14700         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
14701         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
14702         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
14703         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
14704         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
14705         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
14706         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
14707         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
14708         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
14709         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
14710         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
14711         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
14712         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
14713         lib/xstrtoumax.c, lib/yesno.c:
14714         Standardize inclusion of config.h.
14715         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
14716         lib/inttostr.h:  Removed inclusion of config.h from header files.
14717         * lib/inttostr.c:  Adjusted in-tree users.
14718         * lib/timespec.h: Remove superfluous warning to include config.h.
14719         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
14720         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
14721         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
14722         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
14723         config.h with HAVE_CONFIG_H.
14724
14725 2005-09-19  Jim Meyering  <jim@meyering.net>
14726
14727         * modules/pathmax (License): Change to LGPL.
14728
14729 2005-09-19  Derek Price  <derek@ximbiot.com>
14730
14731         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
14732
14733 2005-09-19  Bruno Haible  <bruno@clisp.org>
14734
14735         * gnulib-tool (import): Provide default for --tests-base.
14736
14737 2005-09-19  Bruno Haible  <bruno@clisp.org>
14738
14739         * doc/quote.texi: New file, extracted from gnulib.texi.
14740         * doc/ctime.texi: New file, extracted from gnulib.texi.
14741         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
14742         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
14743         * doc/gnulib.texi: Include them.
14744
14745 2005-09-18  Bruno Haible  <bruno@clisp.org>
14746
14747         Portability fix.
14748         * gnulib-tool (func_readlink): New function.
14749         (func_ln_if_changed): Use it.
14750
14751 2005-09-18  Bruno Haible  <bruno@clisp.org>
14752
14753         * gnulib-tool: Support --with-tests also with --import.
14754         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
14755         (func_import): Use variables $testsbase and $inctests. Emit a
14756         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
14757         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
14758         SUBDIRS += $testsdir.
14759         (func_create_testdir): Update.
14760
14761 2005-09-18  Bruno Haible  <bruno@clisp.org>
14762
14763         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
14764         instead of $dry_run.
14765         (func_cp_if_changed, func_mv_if_changed): Remove functions.
14766         (func_ln_if_changed): Don't handle dry-run here.
14767         (func_import): In dry-run mode, detect more precisely which actions
14768         would be performed, and don't use "...ing" verbs.
14769
14770 2005-09-18  Bruno Haible  <bruno@clisp.org>
14771
14772         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
14773         (func_import): Use join on two temporary files instead of three nested
14774         loops, in order to determine which files are new or old.
14775
14776 2005-09-18  Bruno Haible  <bruno@clisp.org>
14777
14778         * gnulib-tool (func_import): Comment out code that spits out the
14779         new files with --dry-run.
14780
14781 2005-09-18  Bruno Haible  <bruno@clisp.org>
14782
14783         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
14784
14785 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
14786
14787         * lib/stat-time.h: New file.
14788         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
14789         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
14790         in a different way.
14791         (timespec_cmp): New function.
14792         * lib/utimecmp.c: Include stat-time.h.
14793         (SYSCALL_RESOLUTION): Depend on whether various struct stat
14794         members exist, not on the obsolescent ST_MTIM_NSEC.
14795         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
14796
14797 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
14798
14799         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
14800
14801 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
14802
14803         * MODULES.html.sh (File system functions): Add stat-time.
14804         * modules/stat-time: New file.
14805         * modules/timespec (Files): Remove m4/st_mtim.m4; this
14806         is now done in a different way, by the stat-time module.
14807         * modules/utimecmp (Depends-on): Add stat-time.
14808
14809 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
14810
14811         * m4/st_mtim.m4: Remove.  Superseded by...
14812         * m4/stat-time.m4: New file.
14813         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
14814         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
14815
14816 2005-09-15  Derek Price  <derek@ximbiot.com>
14817
14818         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
14819
14820 2005-09-15  Derek Price  <derek@ximbiot.com>
14821
14822         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
14823         * lib/regex_internal.c: Ditto, using this...
14824         (__GNUC_PREREQ): ...new macro.
14825         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
14826         using...
14827         (__GNUC_PREREQ): ...this new macro.
14828
14829         * lib/strstr.h: Include string.h. Define strstr as a macro here.
14830
14831 2005-09-15  Derek Price  <derek@ximbiot.com>
14832             Paul Eggert  <eggert@cs.ucla.edu>
14833
14834         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
14835         changes, consolidating in...
14836         * lib/regex_internal.h: ...this file.
14837
14838 2005-09-13  Jim Meyering  <jim@meyering.net>
14839
14840         * lib/canon-host.c: Filter through gnu indent and reword comments
14841         slightly.
14842         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
14843
14844 2005-09-13  Derek Price  <derek@ximbiot.com>
14845
14846         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
14847         failure.
14848         Reported by Jim Meyering  <jim@meyering.net>.
14849
14850 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
14851
14852         * lib/base64.c: Typo.
14853         (base64_encode): Put b64str in initialized data section.
14854
14855 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
14856
14857         Merge glibc and coreutils changes into gnulib, plus a few
14858         extra fixes.
14859         * lib/md5.c: Use #error rather than a string.
14860         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
14861         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
14862         (__attribute__): Define to empty for non recent-GCC.
14863         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
14864         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
14865         Renamed from their non-__ counterparts, with new macros replacing
14866         them if not _LIBC.  Add __THROW attribute.
14867         (rol): Remove.
14868         (struct md5_ctx): Align buffer if using GCC.
14869         * lib/sha1.h (struct sha1_ctx): Likewise.
14870         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
14871         The old name was backwards.
14872         (NOTSWAP): Remove; not used.
14873         (rol): New macro, moved here from md5.h.
14874         (sha1_process_block): Remove a FIXME that doesn't make sense.
14875
14876 2005-09-12  Derek Price  <derek@ximbiot.com>
14877
14878         Return usable errors from canon-host.
14879         * lib/canon-host.h: New file.
14880         * lib/canon-host.c (canon_host): Wrap...
14881         (canon_host_r): ...this new function, which now relies exclusively on
14882         getaddrinfo.
14883         (ch_strerror): New function.
14884         (last_cherror): New global.
14885         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
14886         interface.
14887         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
14888         void *.
14889         (freeaddrinfo): Free ai->ai_canonname when set.
14890
14891 2005-09-12  Derek Price  <derek@ximbiot.com>
14892
14893         Make canon-host require getaddrinfo.
14894         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
14895         AC_LIBSOURCE canon-host.h.  Call...
14896         (gl_PREREQ_CANON_HOST): ...this new function, which requires
14897         gl_GETADDRINFO.
14898         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
14899
14900 2005-09-12  Derek Price  <derek@ximbiot.com>
14901
14902         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
14903         LGPL.
14904         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
14905
14906 2005-09-12  Derek Price  <derek@ximbiot.com>
14907
14908         * lib/gai_strerror.c: Include config.h when available.  Include
14909         getaddrinfo.h before other headers to test interface.
14910         Reported by Larry Jones <lawrence.jones@ugs.com>.
14911
14912 2005-09-12  Derek Price  <derek@ximbiot.com>
14913             Paul Eggert  <eggert@cs.ucla.edu>
14914
14915         * modules/glob (Files): Add glob-libc.h.
14916
14917 2005-09-12  Derek Price  <derek@ximbiot.com>
14918             Paul Eggert  <eggert@cs.ucla.edu>
14919
14920         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
14921         glob_.h, glob-libc.h.
14922         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
14923
14924 2005-09-12  Derek Price  <derek@ximbiot.com>
14925             Paul Eggert  <eggert@cs.ucla.edu>
14926
14927         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
14928         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
14929         protecting things that should be done only in gnulib contexts.
14930         * lib/glob_.h: New file, containing only the glob things needed for
14931         gnulib.
14932         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
14933         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
14934         (glob, globfree, glob_pattern_p): Now defined simply in terms of
14935         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
14936         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
14937         and to respect the namespace rules better.
14938
14939 2005-09-08  Simon Josefsson  <jas@extundo.com>
14940
14941         * modules/socklen: New file.
14942
14943 2005-09-08  Simon Josefsson  <jas@extundo.com>
14944
14945         * m4/socklen.m4: New file.
14946
14947 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
14948
14949         * modules/utimens (Files): Add m4/utimbuf.m4, since
14950         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
14951         Reported by Sergey Poznyakoff.
14952
14953 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
14954
14955         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
14956         definitions, since that's the preferred style in glibc.
14957         Fix a minor spacing issue, and update copyright notice to match
14958         glibc's.
14959
14960 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
14961
14962         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
14963
14964 2005-09-06  Simon Josefsson  <jas@extundo.com>
14965
14966         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
14967         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
14968
14969 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
14970
14971         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
14972         warning.
14973
14974 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
14975
14976         * config/srclist.txt: Add glibc bug 1302.
14977
14978 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
14979
14980         Change bitset word type from unsigned int to unsigned long int,
14981         as this has better performance on typical 64-bit hosts.
14982         Port bitset code to hosts with unusual word sizes.
14983         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
14984         (build_collating_symbol):
14985         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
14986         argument is a bitset.  This is merely a style issue, but it makes
14987         it clearer that an entire array is expected.
14988         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
14989         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
14990         Port to the case where bitset_word is not the same as unsigned int.
14991         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
14992         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
14993         Likewise.
14994         * lib/regexec.c (check_dst_limits_calc_pos_1,
14995         check_subexp_matching_top):
14996         (build_trtable, group_nodes_into_DFAstates):
14997         Likewise.
14998         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
14999         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
15000         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
15001         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
15002         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
15003         * lib/regcomp.c (optimize_subexps, lower_subexp):
15004         Work even if bitset_word has holes in its bitwise representation.
15005         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
15006         * lib/regexec.c (check_dst_limits_calc_pos_1,
15007         check_subexp_matching_top):
15008         Likewise.
15009         * lib/regex_internal.c (re_string_reconstruct):
15010         Don't assume UCHAR_MAX == 255.
15011         * lib/regex_internal.h (bitset_set_all): Likewise.
15012         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
15013         All uses changed.
15014         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
15015         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
15016         All uses changed.
15017         (BITSET_WORD_MAX): New macro.
15018         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
15019         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
15020         (bitset_empty, bitset_copy):
15021         Prefer sizeof (bitset) to multiplying it out ourselves.
15022         (bitset_not_merge): Remove; unused.
15023         (bitset_contain): Return bool, not unsigned int with one bit on.
15024         All callers changed.
15025         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
15026         alignment than re_node_set; do this by defining a new internal
15027         type struct dests_alloc and using it to allocate memory.
15028
15029 2005-09-05  Bruno Haible  <bruno@clisp.org>
15030
15031         * gnulib-tool (func_import): Fix comparison in handling of symbolic
15032         links.
15033
15034 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
15035
15036         * modules/size_max (Makefile.am): Add size_max.h
15037
15038 2005-09-04  Derek Price  <derek@ximbiot.com>
15039
15040         * gnulib-tool (func_import): Fix reversed $symbolic logic.
15041
15042 2005-09-03  Simon Josefsson  <jas@extundo.com>
15043
15044         * gnulib-tool: Fix typo.
15045
15046 2005-09-03  Simon Josefsson  <jas@extundo.com>
15047
15048         * config/srclist.txt: Add glibc bug 1293.
15049
15050 2005-09-03  Derek Price  <derek@ximbiot.com>
15051
15052         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
15053         From Larry Jones <lawrence.jones@ugs.com>.
15054
15055 2005-09-02  Simon Josefsson  <jas@extundo.com>
15056
15057         * modules/socklen: New file.
15058
15059 2005-09-02  Simon Josefsson  <jas@extundo.com>
15060
15061         * modules/havelib: New module.
15062
15063         * modules/gettext, modules/iconv, modules/lock, modules/readline:
15064         Use havelib.
15065
15066 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
15067
15068         Check for arithmetic overflow when calculating sizes, to prevent
15069         some buffer-overflow issues.  These patches are conservative, in the
15070         sense that when I couldn't determine whether an overflow was possible,
15071         I inserted a run-time check.
15072         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
15073         macros.
15074         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
15075         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
15076         (re_xnrealloc, re_x2nrealloc): New inline functions.
15077         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
15078         parse_bracket_exp):
15079         (build_equiv_class, build_charclass): Check for arithmetic overflow
15080         in size expression calculations.
15081         * lib/regex_internal.c (re_string_realloc_buffers):
15082         (build_wcs_upper_buffer, re_node_set_add_intersect):
15083         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
15084         (re_dfa_add_node, register_state): Likewise.
15085         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
15086         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
15087         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
15088         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
15089
15090 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
15091
15092         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
15093         m4/ulonglong.m4.  Problem reported by Martin Lambers.
15094
15095 2005-09-02  Bruno Haible  <bruno@clisp.org>
15096
15097         Support for lib vs. lib64 distinction on biarch platforms.
15098         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
15099         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
15100         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
15101
15102 2005-09-02  Bruno Haible  <bruno@clisp.org>
15103
15104         * gnulib-tool (import): In the other first-use case, provide defaults
15105         as well.
15106
15107 2005-09-02  Bruno Haible  <bruno@clisp.org>
15108
15109         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
15110         patches not yet found in the latest gettext release.
15111
15112 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
15113
15114         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
15115         to avoid a collision with bits/local_lim.h in glibc.
15116         All uses changed.  Problem reported by Dmitry V. Levin in
15117         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
15118
15119         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
15120         bugs in int versus size_t comparisons.
15121         (re_string_context_at): Fix bug where the code assumed that
15122         Idx is signed.
15123
15124         Use bool where appropriate.
15125         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
15126         All callers changed.
15127         (calc_eclosure_iter): Likewise, for ROOT arg.
15128         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
15129         (build_charclass_op): Likewise, for NON_MATCH arg.
15130         * lib/regex_internal.c (re_string_allocate, re_string_construct):
15131         (re_string_construct_common): Likewise, for ICASE arg.
15132         * lib/regexec.c (re_search_2_stub, re_search_stub):
15133         Likewise, for RET_LEN arg.
15134         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
15135         (set_regs): Likewise, for FL_BACKTRACK arg.
15136         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
15137         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
15138         (calc_eclosure_iter, parse_bracket_exp):
15139         Use bool for internal variables that are booleans.
15140         * lib/regexec.c (re_search_internal, check_matching,
15141         proceed_next_node):
15142         (set_regs, build_sifted_states, sift_states_bkref):
15143         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
15144         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
15145         (find_collation_sequence_value):
15146         Likewise.
15147         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
15148         (re_node_set_compare):
15149         Return bool, not int. All callers changed.
15150         * lib/regexec.c (check_halt_node_context, check_dst_limits):
15151         (build_trtable, check_node_accept): Likewise.
15152         * lib/regex_internal.h: Include stdbool.h.
15153
15154         Fix bugs uncovered when converting to bool.
15155         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
15156         failure instead of charging ahead blindly.
15157         * lib/regex_internal.c (register_state): Likewise.
15158         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
15159         for freeing internal storage.
15160         (group_nodes_into_DFA_states): Use unsigned int, not int, for
15161         bitset pieces used as boolean, to avoid undefined behavior
15162         on hosts that do int overflow checking.
15163
15164 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
15165
15166         * config/srclist.txt: Add glibc bugs 1285-1287.
15167
15168 2005-09-01  Jim Meyering  <jim@meyering.net>
15169
15170         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
15171         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
15172         Require gl_STAT_MACROS, too.
15173
15174 2005-09-01  Bruno Haible  <bruno@clisp.org>
15175
15176         * gnulib-tool (import): In the first-use case, provide defaults.
15177
15178 2005-09-01  Bruno Haible  <bruno@clisp.org>
15179
15180         * gnulib-tool (func_import): Remove the .tmp files.
15181
15182 2005-09-01  Bruno Haible  <bruno@clisp.org>
15183
15184         * gnulib-tool (func_import): Fix handling of symbolic links.
15185
15186 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
15187
15188         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
15189         old glibc regex code mishandles strings longer than 2**31 bytes.
15190         This patch fixes this when the regex code is used in gnulib
15191         (i.e., outside glibc).
15192
15193         This patch should not affect the use of the regex code inside
15194         glibc.  No doubt this problem also needs to be handled for glibc
15195         as well, but the result will be an incompatible change to the
15196         glibc ABI, and the old ABI will have to be supported too.  That
15197         can be the the subject for another patch.
15198
15199         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
15200         governing whether the rest of this patch is active.  By default,
15201         the macro is disabled and the patch has no effect.
15202         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
15203         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
15204         (struct re_pattern_buffer, re_search, re_search_2, re_match):
15205         (re_match_2, re_set_registers): Use the new types.
15206         * lib/regex_internal.h (Idx, re_hashval_t): New types.
15207         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
15208         New macros.
15209         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
15210         (re_string_context_at, bin_tree_t, re_dfastate_t):
15211         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
15212         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
15213         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
15214         (re_string_char_size_at, re_string_wchar_at):
15215         (re_string_elem_size_at):
15216         Use the new types and macros to port to 64-bit hosts.
15217         Use unsigned types for internal values, so that the code
15218         mostly works even for arrays larger than SSIZE_MAX.
15219         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
15220         (search_duplicated_node, calc_eclosure_iter, fetch_number):
15221         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
15222         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
15223         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
15224         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
15225         (calc_inveclosure, parse_dup_op, build_range_exp):
15226         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
15227         (fetch_number, create_token_tree, mark_opt_subexp):
15228         Likewise.
15229         * lib/regex_internal.c (re_string_construct_common,
15230         create_ci_newstate):
15231         (create_cd_newstate, re_string_allocate, re_string_construct):
15232         (re_string_realloc_buffers, build_wcs_upper_buffer):
15233         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
15234         (re_string_reconstruct, re_string_peek_byte_case):
15235         (re_string_fetch_byte_case, re_string_context_at):
15236         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
15237         (re_node_set_init_copy, re_node_set_add_intersect):
15238         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
15239         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
15240         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
15241         (re_acquire_state, re_acquire_state_context, register_state):
15242         Likewise.
15243         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
15244         search_cur_bkref_entry):
15245         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
15246         (re_search_internal, re_search_2_stub, re_search_stub)
15247         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
15248         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
15249         (update_cur_sifted_state, check_dst_limits):
15250         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
15251         (check_subexp_limits, sift_states_bkref, merge_state_array):
15252         (check_subexp_matching_top, get_subexp, get_subexp_sub):
15253         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
15254         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
15255         (expand_bkref_cache, check_node_accept_bytes):
15256         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
15257         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
15258         (acquire_init_state_context, check_halt_node_context):
15259         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
15260         (sift_states_backward, clean_state_log_if_needed):
15261         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
15262         (find_recover_state, transit_state_sb, transit_state_mb):
15263         (transit_state_bkref, build_trtable, match_ctx_clean):
15264         Likewise.
15265         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
15266         to work around an assumption that REG_MISSING is negative.
15267
15268         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
15269         (seek_collating_symbol_entry) [defined _LIBC]:
15270         (lookup_collation_sequence_value) [defined _LIBC]:
15271         (build_range_exp, build_collating_symbol) [defined _LIBC]:
15272         Use prototypes rather than old-style function definitions.
15273         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
15274         (transit_state_sb) [0]:
15275         (find_collation_sequence_value) [defined _LIBC]: Likewise.
15276
15277         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
15278         rm_eo.
15279
15280         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
15281         (optimize_subexps, lower_subexp):
15282         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
15283         since the signed shift might overflow.  Use 1u<<31 instead.
15284         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
15285         Likewise.
15286         * lib/regexec.c (check_dst_limits_calc_pos_1,
15287         check_subexp_matching_top): Likewise.
15288
15289         * lib/regcomp.c (optimize_subexps, lower_subexp):
15290         Use CHAR_BIT rather than 8, for clarity.
15291         * lib/regexec.c (check_dst_limits_calc_pos_1):
15292         (check_subexp_matching_top): Likewise.
15293         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
15294         have to worry about portability issues when shifting it left.
15295         Remove no-longer-needed test for table_size > 0.
15296         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
15297         in a word, as the resulting behavior is undefined.
15298         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
15299         in one case, a <= should have been an <, and in another case the
15300         whole test was missing.
15301         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
15302         the standard name CHAR_BIT.
15303         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
15304         this is not true on one's complement and signed-magnitude hosts.
15305
15306         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
15307         next_last_offset.
15308         (struct re_dfa_t): Remove unused member states_alloc.
15309         * lib/regcomp.c (init_dfa): Don't initialize unused members.
15310
15311 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
15312
15313         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
15314         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
15315         and large-file glibc and in 32-bit large-file Solaris.
15316
15317 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
15318
15319         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
15320         lengths fit in regoff_t; this isn't true if regoff_t is the same
15321         width as size_t.
15322         * lib/regex.c (re_search_internal): 5th arg is LAST_START
15323         (= START + RANGE) instead of RANGE.  This avoids overflow
15324         problems when regoff_t is the same width as size_t.
15325         All callers changed.
15326         (re_search_2_stub): Check for overflow when adding the
15327         sizes of the two strings.
15328         (re_search_stub): Check for overflow when adding START
15329         to RANGE; if it occurs, substitute the extreme value.
15330
15331 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
15332
15333         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
15334
15335 2005-08-31  Jim Meyering  <jim@meyering.net>
15336
15337         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
15338         a pointer-to-const.
15339         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
15340         (register_state): Likewise.
15341         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
15342         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
15343         (group_nodes_into_DFAstates): Likewise.
15344
15345 2005-08-31  Jim Meyering  <jim@meyering.net>
15346
15347         * check-module: Add a FIXME comment.
15348
15349 2005-08-31  Eric Blake  <ebb9@byu.net>
15350
15351         * modules/unistd-safer (Files): Add unistd--.h.
15352         * modules/stdio-safer (Files): Add stdio--.h.
15353
15354 2005-08-31  Derek Price  <derek@ximbiot.com>
15355
15356         * lib/getdelim.c (getdelim): Return EOF on EOF.
15357         Reported by Larry Jones <lawrence.jones@ugs.com>.
15358
15359 2005-08-31  Bruno Haible  <bruno@clisp.org>
15360
15361         Avoid unnecessary diffs in the generated lib/Makefile.am.
15362         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
15363         the generated files.
15364         (func_import): Don't set cmd.
15365
15366 2005-08-31  Bruno Haible  <bruno@clisp.org>
15367
15368         * lib/strstr.c: Include <stddef.h>, for NULL.
15369         * lib/strcasestr.c: Likewise.
15370         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
15371
15372 2005-08-31  Bruno Haible  <bruno@clisp.org>
15373
15374         * gnulib-tool: New option --macro-prefix.
15375         (func_import): Use macro_prefix.
15376         (import): Handle option --macro-prefix.
15377
15378 2005-08-31  Bruno Haible  <bruno@clisp.org>
15379
15380         * gnulib-tool (import): Rename most ac_* variables to cached_*.
15381         Also use new variables cached_lgpl, cached_libtool.
15382
15383 2005-08-31  Bruno Haible  <bruno@clisp.org>
15384
15385         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
15386         always instantiating them.
15387
15388 2005-08-31  Bruno Haible  <bruno@clisp.org>
15389
15390         * gnulib-tool (func_import): Read the previous cached settings
15391         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
15392         earlier added by gnulib but are now dropped. Warn when a gnulib file
15393         overwrites a non-gnulib file.
15394
15395 2005-08-31  Bruno Haible  <bruno@clisp.org>
15396
15397         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
15398         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
15399         projects that don't keep autogenerated files in CVS. Put into
15400         actioncmd only the specified modules, not the transitive closure.
15401
15402 2005-08-31  Bruno Haible  <bruno@clisp.org>
15403
15404         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
15405         Create directories that shall be filled.
15406         (import): Don't look for gl_* macros in configure.ac. Recurse across
15407         all directories containing a gnulib-cache.m4 files, if meaningful.
15408
15409 2005-08-31  Bruno Haible  <bruno@clisp.org>
15410
15411         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
15412         (import): Set seen_libtool when we see gl_LIBTOOL.
15413
15414 2005-08-31  Bruno Haible  <bruno@clisp.org>
15415
15416         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
15417         declaration macro definitions from generated gnulib.m4.
15418
15419 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
15420
15421         * lib/iconvme.h: Add prototype for iconv_alloc.
15422
15423 2005-08-29  Simon Josefsson  <jas@extundo.com>
15424
15425         * lib/iconvme.c: Fix errno.
15426
15427 2005-08-29  Bruno Haible  <bruno@clisp.org>
15428
15429         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
15430         that it works when the directory contains spaces.
15431
15432 2005-08-29  Bruno Haible  <bruno@clisp.org>
15433
15434         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
15435
15436 2005-08-29  Bruno Haible  <bruno@clisp.org>
15437
15438         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
15439         Emit more advice.
15440
15441 2005-08-29  Bruno Haible  <bruno@clisp.org>
15442         and Stepan Kasal  <kasal@ucw.cz>
15443
15444         * check-module: If more parameters are given, check each of them
15445         separately; add more exceptions, as noted by Jim Meyering.
15446         (check_module): New procedure.
15447         (%exempt_header): Now contains all exceptions.
15448
15449 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
15450
15451         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
15452
15453 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
15454
15455         * lib/iconvme.c: Split iconv_string into iconv_alloc.
15456
15457 2005-08-28  Bruno Haible  <bruno@clisp.org>
15458
15459         * m4/gnulib-tool.m4: New file.
15460
15461 2005-08-27  Jim Meyering  <jim@meyering.net>
15462
15463         * modules/unistd-safer (Files): Add pipe-safer.c.
15464         * modules/fcntl-safer (Files): Add creat-safer.c.
15465
15466 2005-08-27  Jim Meyering  <jim@meyering.net>
15467
15468         * m4/stdlib-safer.m4: New file.  From coreutils.
15469         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
15470         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
15471         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
15472         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
15473         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
15474
15475 2005-08-27  Jim Meyering  <jim@meyering.net>
15476
15477         * lib/fopen-safer.c: Merge minor changes from coreutils.
15478         * lib/dup-safer.c: Likewise.
15479         * lib/fd-safer.c: Likewise.
15480
15481         Merge from coreutils.
15482         * lib/stdio--.h: New file.
15483         * lib/stdlib--.h: New file.
15484         * lib/mkstemp-safer.c: New file.
15485
15486         GNU tar needs these.
15487         * lib/pipe-safer.c: New file.
15488         * lib/creat-safer.c: New file.
15489         * lib/fcntl--.h (creat): Define to creat_safer.
15490         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
15491         * lib/unistd--.h (pipe): Define to pipe_safer.
15492         * lib/unistd-safer.h: Declare pipe_safer.
15493
15494 2005-08-26  Simon Josefsson  <jas@extundo.com>
15495
15496         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
15497         Haible <bruno@clisp.org>.
15498
15499 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
15500
15501         * lib/regex_internal.h: Remove all references to
15502         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
15503         or better.
15504         (bitset_not, bitset_merge, bitset_not_merge):
15505         (bitset_mask, re_string_allocate, re_string_construct):
15506         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
15507         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
15508         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
15509         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
15510         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
15511         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
15512         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
15513         (re_acquire_state_context):
15514         Remove unnecessary forward decls.
15515         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
15516         Put __attribute at function definition,
15517         now that the function decl has been removed.
15518         * lib/regex_internal.c (re_string_peek_byte_case):
15519         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
15520         Likewise.
15521
15522 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
15523
15524         * m4/regex.m4: Add AC_PREREQ(2.50).
15525         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
15526
15527 2005-08-25  Simon Josefsson  <jas@extundo.com>
15528
15529         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
15530         __fsetlocking.
15531
15532 2005-08-25  Simon Josefsson  <jas@extundo.com>
15533
15534         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
15535         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
15536         GLIBC specific code.
15537
15538 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15539
15540         Make regex safe for g++.  This fixes one real bug (an "err"
15541         that should have been "*err").  g++ problem reported by
15542         Sam Steingold.
15543         * lib/regex_internal.h (re_calloc): New macro, consistent with
15544         re_malloc etc.  All callers of calloc changed to use re_calloc.
15545         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
15546         not int.  All callers changed.
15547         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
15548         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
15549         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
15550         (find_recover_state): Change "err" to "*err"; this fixes what
15551         appears to be a real bug.
15552         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
15553         versus int.
15554
15555 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15556
15557         * modules/regex (Depends-on): Add malloc, since the code
15558         assumes that !malloc(0) means failure.
15559
15560 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15561
15562         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
15563
15564         alloca modernization/simplification for regex.
15565         * lib/regex.c: Remove portability cruft for alloca.  This no longer
15566         needs to be at the start of the file, and can be moved into
15567         regex_internal.h and simplified.
15568         * lib/regex_internal.h: Include <alloca.h>.
15569         (__libc_use_alloca) [!defined _LIBC]: New macro.
15570         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
15571         now works outside glibc.
15572
15573 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15574
15575         * config/srclist.txt: Add glibc bugs 1241, 1245.
15576
15577 2005-08-25  Jim Meyering  <jim@meyering.net>
15578
15579         * lib/open-safer.c: Include <config.h>.
15580         Otherwise, we'd lose LARGEFILE support in any file using
15581         e.g. "fcntl--.h"
15582
15583 2005-08-25  Bruno Haible  <bruno@clisp.org>
15584
15585         * m4/minmax.m4: Require autoconf 2.52.
15586         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
15587         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
15588         alternatives of translit over the alphabet.
15589         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
15590
15591 2005-08-24  Simon Josefsson  <jas@extundo.com>
15592
15593         * tests/test-getpass.c: New file.
15594
15595 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
15596
15597         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
15598         for GNU regex features.
15599
15600 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
15601
15602         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
15603         * lib/regex.h (regerror): Likewise.
15604
15605         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
15606         requires this.  (The code never needed it.)
15607
15608         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
15609         All uses of recently-renamed identifiers changed to use the new,
15610         POSIX-compliant names.  The code will build and run just fine
15611         without these changes, but it's better to eat our own dog food
15612         and use the standard-conforming names.
15613
15614         * lib/regex.h: Fix a multitude of POSIX name space violations.
15615         These changes have an effect only for programs that define
15616         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
15617         do not change anything for programs compiled in the normal way.
15618         Also, there is no effect on the ABI.
15619
15620         (_REGEX_SOURCE): New macro.
15621         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
15622         defined and _GNU_SOURCE is not; this fixes a name space violation.
15623
15624         Rename the following macros to obey POSIX requirements.
15625         The old names are still visible as macros if _REGEX_SOURCE is defined.
15626         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
15627         RE_BACKSLASH_ESCAPE_IN_LISTS.
15628         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
15629         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
15630         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
15631         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
15632         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
15633         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
15634         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
15635         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
15636         (REG_INTERVALS): renamed from RE_INTERVALS.
15637         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
15638         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
15639         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
15640         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
15641         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
15642         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
15643         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
15644         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
15645         RE_UNMATCHED_RIGHT_PAREN_ORD.
15646         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
15647         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
15648         (REG_DEBUG): renamed from RE_DEBUG.
15649         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
15650         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
15651         unusual, since we can't clash with the POSIX REG_ICASE.
15652         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
15653         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
15654         (REG_NO_SUB): renamed from RE_NO_SUB.
15655         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
15656         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
15657         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
15658         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
15659         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
15660         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
15661         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
15662         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
15663         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
15664         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
15665         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
15666         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
15667         RE_SYNTAX_POSIX_MINIMAL_BASIC.
15668         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
15669         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
15670         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
15671         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
15672         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
15673         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
15674         (REG_FIXED): Renamed from REGS_FIXED.
15675         (REG_NREGS): Renamed from RE_NREGS.
15676
15677         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
15678         of other REG_* macros, since POSIX says the user is allowed to
15679         #undef these macros selectively.
15680
15681         (reg_errcode_t): Update comment stating what other tables need
15682         to be consistent.
15683
15684         Rename the following enum values to obey POSIX requirements.
15685         The old names are still visible as macros.
15686         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
15687         is not defined, since GNU is supposed to be a superset of POSIX as
15688         much as possible, and since we want reg_errcode_t to be a signed
15689         type for implementation consistency.
15690         (_REG_NOERROR): Renamed from REG_NOERROR.
15691         (_REG_NOMATCH): Renamed from REG_NOMATCH.
15692         (_REG_BADPAT): Renamed from REG_BADPAT.
15693         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
15694         (_REG_ECTYPE): Renamed from REG_ECTYPE.
15695         (_REG_EESCAPE): Renamed from REG_EESCAPE.
15696         (_REG_ESUBREG): Renamed from REG_ESUBREG.
15697         (_REG_EBRACK): Renamed from REG_EBRACK.
15698         (_REG_EPAREN): Renamed from REG_EPAREN.
15699         (_REG_EBRACE): Renamed from REG_EBRACE.
15700         (_REG_BADBR): Renamed from REG_BADBR.
15701         (_REG_ERANGE): Renamed from REG_ERANGE.
15702         (_REG_ESPACE): Renamed from REG_ESPACE.
15703         (_REG_BADRPT): Renamed from REG_BADRPT.
15704         (_REG_EEND): Renamed from REG_EEND.
15705         (_REG_ESIZE): Renamed from REG_ESIZE.
15706         (_REG_ERPAREN): Renamed from REG_ERPAREN.
15707         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
15708         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
15709         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
15710         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
15711
15712         (_REG_RE_NAME, _REG_RM_NAME): New macros.
15713         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
15714         changed.  But support the old name if the new one is not defined
15715         and if _REGEX_SOURCE.
15716
15717         Change the following member names in struct re_pattern_buffer.
15718         The old names are still supported if !_REGEX_SOURCE.
15719         The new names are always supported, regardless of _REGEX_SOURCE.
15720         (re_buffer): Renamed from buffer.
15721         (re_allocated): Renamed from allocated.
15722         (re_used): Renamed from used.
15723         (re_syntax): Renamed from syntax.
15724         (re_fastmap): Renamed from fastmap.
15725         (re_translate): Renamed from translate.
15726         (re_can_be_null): Renamed from can_be_null.
15727         (re_regs_allocated): Renamed from regs_allocated.
15728         (re_fastmap_accurate): Renamed from fastmap_accurate.
15729         (re_no_sub): Renamed from no_sub.
15730         (re_not_bol): Renamed from not_bol.
15731         (re_not_eol): Renamed from not_eol.
15732         (re_newline_anchor): Renamed from newline_anchor.
15733
15734         Change the following member names in struct re_registers.
15735         The old names are still supported if !_REGEX_SOURCE.
15736         The new names are always supported, regardless of _REGEX_SOURCE.
15737         (rm_num_regs): Renamed from num_regs.
15738         (rm_start): Renamed from start.
15739         (rm_end): Renamed from end.
15740
15741         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
15742         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
15743         Prepend __ to parameter names.
15744
15745         Undo yesterday's changes.
15746
15747 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
15748
15749         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
15750         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
15751         lib/regex.c.
15752
15753 2005-08-24  Jim Meyering  <jim@meyering.net>
15754
15755         Sync from coreutils.
15756         * m4/fcntl-safer.m4: New file.
15757
15758         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
15759         and object files for this module.
15760
15761 2005-08-24  Jim Meyering  <jim@meyering.net>
15762
15763         Sync from coreutils.
15764         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
15765
15766 2005-08-24  Jim Meyering  <jim@meyering.net>
15767
15768         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
15769         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
15770
15771 2005-08-24  Jim Meyering  <jim@meyering.net>
15772
15773         * modules/fcntl-safer: New module.
15774         * modules/fts (Depends-on): Add fcntl-safer.
15775         * MODULES.html.sh (File descriptor based Input/Output):
15776         Add fcntl-safer.
15777
15778 2005-08-24  Bruno Haible  <bruno@clisp.org>
15779
15780         Support for unit test modules.
15781         * modules/README: Mention tests modules.
15782         * modules/TEMPLATE-TESTS: New file.
15783         * gnulib-tool: New options --extract-tests-module, --with-tests and
15784         --tests-base (unused for the moment).
15785         (testsbase, inctests): New variables.
15786         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
15787         (func_verify_module): Exclude TEMPLATE-TESTS.
15788         (func_verify_nontests_module, func_verify_tests_module): New functions.
15789         (func_get_dependencies): Add implicit dependency for tests modules.
15790         (func_get_tests_module): New function.
15791         (func_modules_transitive_closure): When --with-tests was specified,
15792         include the unit tests as well, unless explicitly avoided.
15793         (func_emit_lib_Makefile_am): Ignore the tests modules here.
15794         (func_emit_tests_Makefile_am): New function.
15795         (func_create_testdir): When --with-tests was specified, emit a
15796         tests/ directory.
15797         * MODULES.html.sh (Future developments): Update.
15798
15799 2005-08-24  Bruno Haible  <bruno@clisp.org>
15800
15801         * modules/tls-tests: New file.
15802         * tests/test-tls.c: New file, from GNU gettext.
15803
15804 2005-08-24  Bruno Haible  <bruno@clisp.org>
15805
15806         * modules/lock-tests: New file.
15807         * tests/test-lock.c: New file, from GNU gettext.
15808
15809 2005-08-24  Bruno Haible  <bruno@clisp.org>
15810
15811         * lib/lock.h: Add multiple inclusion guard.
15812         * lib/tls.h: Add multiple inclusion guard.
15813
15814 2005-08-24  Bruno Haible  <bruno@clisp.org>
15815
15816         * gnulib-tool: Add support for the --aux-dir option to
15817         --create-testdir, --create-megatestdir, --test, --megatest.
15818         (func_create_testdir, func_create_megatestdir): Optionally emit a
15819         AC_CONFIG_AUX_DIR directive.
15820         (create-testdir, create-megatestdir, test, megatest): Provide a
15821         default value for $auxdir.
15822
15823 2005-08-24  Bruno Haible  <bruno@clisp.org>
15824
15825         * gnulib-tool (import): Use compound statement instead of subshell
15826         where possible.
15827
15828 2005-08-24  Bruno Haible  <bruno@clisp.org>
15829
15830         * gnulib-tool (import): Change --aux-dir default to "build-aux".
15831
15832 2005-08-24  Bruno Haible  <bruno@clisp.org>
15833
15834         * gnulib-tool (func_version): Update.
15835
15836 2005-08-24  Bruno Haible  <bruno@clisp.org>
15837
15838         * gnulib-tool (func_import, func_create_testdir,
15839         func_create_megatestdir): Quote all autoconf macro arguments.
15840
15841 2005-08-24  Bruno Haible  <bruno@clisp.org>
15842
15843         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
15844         option --force, because --force causes the aclocal.m4 of each
15845         subdirectory to be newer than the corresponding config.h.in.
15846
15847 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
15848
15849         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
15850         All contents moved to gl_REGEX.
15851         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
15852         assume that it does.
15853
15854 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
15855
15856         * lib/regex.h (REG_NOSYS)
15857         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
15858         Define, since POSIX requires it as of 2001.
15859         (_REG_ENOSYS)
15860         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
15861         New private symbol, used to keep the enum signed in all cases.
15862         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
15863         Youngman in
15864         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
15865
15866         * lib/regex_internal.c (re_string_skip_chars, register_state):
15867         (calc_state_hash):
15868         Remove forward decls; no longer needed now that we use prototypes.
15869         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
15870         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
15871         (clean_state_log_if_needed): Likewise.
15872
15873 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
15874
15875         * config/srclist.txt: Add glibc bugs 1231-1233.
15876
15877 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
15878
15879         Fix problems reported by Sam Steingold in
15880         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
15881         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
15882         assumed that reg_errcode_t is a signed type, which is not
15883         necessarily true if _XOPEN_SOURCE is not defined.
15884         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
15885         since some compilers warn about it otherwise.
15886
15887 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
15888
15889         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
15890         (init_word_char, create_initial_state, duplicate_node_closure):
15891         (fetch_token, peek_token_bracket, build_range_exp):
15892         (build_collating_symbol): Remove forward decls; no longer needed
15893         now that we use prototypes.
15894
15895         * lib/regcomp.c:
15896         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
15897         (re_compile_fastmap_iter, regcomp, regerror, regfree):
15898         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
15899         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
15900         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
15901         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
15902         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
15903         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
15904         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
15905         (build_range_exp, build_collating_symbol, parse_bracket_exp):
15906         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
15907         (build_charclass, build_charclass_op, fetch_number, create_tree):
15908         (create_token_tree, mark_opt_subexp, duplicate_tree):
15909         Use prototypes rather than old-style definitions.
15910
15911         * lib/regex_internal.c:
15912         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
15913         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
15914         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
15915         (re_string_reconstruct, re_string_peek_byte_case):
15916         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
15917         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
15918         (re_node_set_init_copy, re_node_set_add_intersect):
15919         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
15920         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
15921         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
15922         (re_acquire_state, re_acquire_state_context, register_state):
15923         (create_ci_newstate, create_cd_newstate, free_state):
15924         Likewise.
15925         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
15926         re_search_2):
15927         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
15928         (re_search_internal, prune_impossible_nodes):
15929         (acquire_init_state_context, check_matching, static):
15930         (check_halt_node_context, check_halt_state_context, proceed_next_node):
15931         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
15932         (update_regs, sift_states_backward, build_sifted_states):
15933         (clean_state_log_if_needed, merge_state_array):
15934         (update_cur_sifted_state, add_epsilon_src_nodes):
15935         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
15936         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
15937         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
15938         (find_recover_state, check_subexp_matching_top, transit_state_mb):
15939         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
15940         (check_arrival, check_arrival_add_next_nodes):
15941         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
15942         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
15943         (check_node_accept_bytes, check_node_accept, extend_buffers):
15944         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
15945         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
15946         (sift_ctx_init):
15947         Likewise.
15948
15949         * lib/regex_internal.h:
15950         (re_string_allocate, re_string_construct, re_string_reconstruct):
15951         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
15952         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
15953         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
15954         (re_string_context_at, re_string_peek_byte_case):
15955         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
15956         is defined, since we now use prototypes always.
15957
15958         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
15959         C89 or better.  All uses removed.
15960
15961 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
15962
15963         * config/srclist.txt: Add glibc bugs 1220-1227.
15964
15965 2005-08-20  Jim Meyering  <jim@meyering.net>
15966
15967         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
15968         of unused local, dfa.
15969
15970 2005-08-20  Bruno Haible  <bruno@clisp.org>
15971
15972         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
15973
15974 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15975
15976         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
15977         (re_node_set_insert_last, re_dfa_add_node):
15978         Rename local variables to avoid GCC shadowing warnings.
15979
15980 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15981
15982         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
15983         [defined lint]: Suppress bogus uninitialized-variable warnings.
15984
15985         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
15986         and let the caller return REG_ESPACE if out of space.  This
15987         removes an uninitialied-variable warning with GCC 4.0.1, and also
15988         avoids taking the address of a local variable.  All callers
15989         changed.
15990
15991 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15992
15993         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
15994         $LIBCSRC/posix/regexec.c.
15995         Add glibc bug 1217 for regcomp.c.
15996
15997 2005-08-19  Jim Meyering  <jim@meyering.net>
15998
15999         * lib/regexec.c (proceed_next_node): Redo local variables to
16000         avoid GCC shadowing warnings.
16001
16002 2005-08-18  Bruno Haible  <bruno@clisp.org>
16003
16004         * lib/strstr.c (strstr): Fix return value in multibyte case.
16005         * lib/strcasestr.c (strcasestr): Likewise.
16006
16007 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
16008
16009         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
16010
16011 2005-08-17  Jim Meyering  <jim@meyering.net>
16012
16013         Make the %s format (seconds since the epoch) work for a negative
16014         number and when used with a zero-padded field width, e.g. %015s.
16015
16016         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
16017         label so that it precedes the code to set `digits'.  Otherwise,
16018         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
16019         print `00-22'.  Now, it prints `-0022', as it should.
16020
16021 2005-08-17  Bruno Haible  <bruno@clisp.org>
16022
16023         * modules/strstr (Files): Add m4/mbrtowc.m4.
16024         (Depends-on): Add mbuiter.
16025
16026 2005-08-17  Bruno Haible  <bruno@clisp.org>
16027
16028         * modules/strcasestr: New file.
16029         * MODULES.html.sh (String handling, based on ANSI C 89): Add
16030         strcasestr.
16031
16032 2005-08-17  Bruno Haible  <bruno@clisp.org>
16033
16034         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
16035
16036 2005-08-17  Bruno Haible  <bruno@clisp.org>
16037
16038         * modules/mbuiter: New file.
16039         * MODULES.html.sh (Extended multibyte and wide character utilities):
16040         Add mbuiter.
16041
16042 2005-08-17  Bruno Haible  <bruno@clisp.org>
16043
16044         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
16045         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
16046
16047 2005-08-17  Bruno Haible  <bruno@clisp.org>
16048
16049         * m4/strcasestr.m4: New file.
16050
16051 2005-08-17  Bruno Haible  <bruno@clisp.org>
16052
16053         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
16054         * lib/strstr.c: Completely rewritten, with multibyte locale support.
16055
16056 2005-08-17  Bruno Haible  <bruno@clisp.org>
16057
16058         * lib/strcasestr.h: New file.
16059         * lib/strcasestr.c: New file.
16060
16061 2005-08-17  Bruno Haible  <bruno@clisp.org>
16062
16063         * lib/strcasecmp.c: Use mbuiter.h.
16064
16065 2005-08-17  Bruno Haible  <bruno@clisp.org>
16066
16067         * lib/mbuiter.h: New file.
16068
16069 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
16070
16071         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
16072         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
16073         and gl_GETOPT are both invoked via different paths (as happens
16074         with GNU tar CVS because it uses both argp and getopt), the former
16075         wins.
16076
16077 2005-08-16  Bruno Haible  <bruno@clisp.org>
16078
16079         * modules/tls: New file.
16080         * MODULES.html.sh (Multithreading): Add tls.
16081
16082 2005-08-16  Bruno Haible  <bruno@clisp.org>
16083
16084         * modules/strnlen1: New file.
16085         * MODULES.html.sh (String handling): Add strnlen1.
16086
16087 2005-08-16  Bruno Haible  <bruno@clisp.org>
16088
16089         * modules/strcase (Files): Add m4/mbrtowc.m4.
16090         (Depends-on): Add strnlen1, mbchar.
16091
16092 2005-08-16  Bruno Haible  <bruno@clisp.org>
16093
16094         * modules/mbiter: New file.
16095         * MODULES.html.sh (Extended multibyte and wide character utilities):
16096         Add mbiter.
16097
16098 2005-08-16  Bruno Haible  <bruno@clisp.org>
16099
16100         * modules/mbfile: New file.
16101         * MODULES.html.sh (Extended multibyte and wide character utilities):
16102         Add mbfile.
16103
16104 2005-08-16  Bruno Haible  <bruno@clisp.org>
16105
16106         * modules/mbchar: New file.
16107         * MODULES.html.sh (Extended multibyte and wide character utilities):
16108         New section.
16109
16110 2005-08-16  Bruno Haible  <bruno@clisp.org>
16111
16112         * m4/tls.m4: New file, from GNU gettext.
16113
16114 2005-08-16  Bruno Haible  <bruno@clisp.org>
16115
16116         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
16117         always.
16118         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
16119
16120 2005-08-16  Bruno Haible  <bruno@clisp.org>
16121
16122         * m4/mbiter.m4: New file.
16123
16124 2005-08-16  Bruno Haible  <bruno@clisp.org>
16125
16126         * m4/mbfile.m4: New file.
16127
16128 2005-08-16  Bruno Haible  <bruno@clisp.org>
16129
16130         * m4/mbchar.m4: New file.
16131
16132 2005-08-16  Bruno Haible  <bruno@clisp.org>
16133
16134         * lib/tls.h: New file, from GNU gettext.
16135         * lib/tls.c: New file, from GNU gettext.
16136
16137 2005-08-16  Bruno Haible  <bruno@clisp.org>
16138
16139         * lib/strnlen1.h: New file.
16140         * lib/strnlen1.c: New file.
16141
16142 2005-08-16  Bruno Haible  <bruno@clisp.org>
16143
16144         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
16145         (mbi_init): Update.
16146         (mbi_avail, mbi_advance): Let the iteration end before the terminating
16147         NUL byte, not after it.
16148
16149 2005-08-16  Bruno Haible  <bruno@clisp.org>
16150
16151         * lib/strcase.h (strcasecmp): Add note in comments.
16152         * lib/strncasecmp.c: Use code from strcasecmp.c.
16153         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
16154         (strcasecmp): Work correctly in multibyte locales.
16155
16156 2005-08-16  Bruno Haible  <bruno@clisp.org>
16157
16158         * lib/mbiter.h: New file.
16159
16160 2005-08-16  Bruno Haible  <bruno@clisp.org>
16161
16162         * lib/mbfile.h: New file.
16163
16164 2005-08-16  Bruno Haible  <bruno@clisp.org>
16165
16166         * lib/mbchar.h: New file.
16167         * lib/mbchar.c: New file.
16168
16169 2005-08-16  Bruno Haible  <bruno@clisp.org>
16170
16171         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
16172         the valid ones. Makes the comparison operations transitive:
16173         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
16174         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
16175
16176 2005-08-15  Simon Josefsson  <jas@extundo.com>
16177
16178         * modules/ssize_t (License): Change to 'unlimited'.
16179
16180         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
16181
16182 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
16183
16184         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
16185         Add comments for each pending glibc patch.
16186
16187 2005-08-15  Bruno Haible  <bruno@clisp.org>
16188
16189         * lib/regex.h (__restrict_arr): Don't define to __restrict if
16190         __cplusplus is defined.
16191
16192 2005-08-14  Jim Meyering  <jim@meyering.net>
16193
16194         Sync from coreutils.
16195
16196         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
16197         Use the hash-table-based cycle-detection code not just when
16198         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
16199         Reported by James Youngman in
16200         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
16201         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
16202         FTS_TIGHT_CYCLE_CHECK.
16203         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
16204         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
16205         once again.
16206         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
16207         * lib/fts.c (fd_safer): Remove decl.
16208         Include fcntl--.h rather than unistd-safer.h
16209         (fts_safe_changedir): Don't call fd_safer; no longer needed
16210         now that we include fcntl--.h.
16211
16212 2005-08-12  Simon Josefsson  <jas@extundo.com>
16213
16214         * modules/getndelim2: Use ssize_t module.
16215         * modules/getnline: Likewise.
16216         * modules/safe-read: Likewise.
16217         * modules/xreadlink: Likewise.
16218
16219         * modules/ssize_t: New file.
16220
16221 2005-08-12  Simon Josefsson  <jas@extundo.com>
16222
16223         * m4/readline.m4: Look for termcap, curses or ncurses if required.
16224
16225 2005-08-12  Simon Josefsson  <jas@extundo.com>
16226
16227         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16228         ssize_t.
16229
16230 2005-08-12  Simon Josefsson  <jas@extundo.com>
16231
16232         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
16233         readline, getdelim and check_version.
16234         (Support for systems lacking ISO C 99: Sizes of integer types):
16235         Add size_max.
16236
16237 2005-08-12  Bruno Haible  <bruno@clisp.org>
16238
16239         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
16240
16241 2005-08-11  Simon Josefsson  <jas@extundo.com>
16242
16243         * modules/readline: New file.
16244
16245         * modules/strnlen (Files): Add strnlen.h.
16246
16247 2005-08-11  Simon Josefsson  <jas@extundo.com>
16248
16249         * m4/readline.m4: New file.
16250
16251 2005-08-11  Simon Josefsson  <jas@extundo.com>
16252
16253         * lib/readline.h, readline.c: New file.
16254
16255 2005-08-11  Simon Josefsson  <jas@extundo.com>
16256
16257         * doc/gnulib.texi (Initial import, Finishing touches): Mention
16258         gl_AVOID.
16259
16260 2005-08-11  Bruno Haible  <bruno@clisp.org>
16261
16262         * lib/strnlen.h (strnlen): Change parameter name to match comment.
16263
16264 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
16265
16266         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
16267
16268 2005-08-10  Simon Josefsson  <jas@extundo.com>
16269
16270         * tests/test-iconvme.c: New file.
16271
16272 2005-08-10  Simon Josefsson  <jas@extundo.com>
16273
16274         * m4/strnlen.m4: New file.
16275
16276         * m4/strndup.m4: Don't check for strnlen declaration, done in
16277         strnlen.m4.
16278
16279 2005-08-10  Simon Josefsson  <jas@extundo.com>
16280
16281         * lib/strndup.c: Use strnlen.h.
16282
16283         * lib/strnlen.h: New file.
16284
16285 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
16286
16287         * README: Typos.
16288
16289 2005-08-02  Simon Josefsson  <jas@extundo.com>
16290
16291         * modules/readline: New file.
16292
16293 2005-08-02  Simon Josefsson  <jas@extundo.com>
16294
16295         * modules/getdelim: New file.
16296
16297         * modules/getline: Rewrite, don't use getndelim2.
16298
16299 2005-08-02  Simon Josefsson  <jas@extundo.com>
16300
16301         * m4/getline.m4: Separate out getdelim stuff into separate module.
16302
16303         * m4/getdelim.m4: New file.
16304
16305 2005-08-02  Simon Josefsson  <jas@extundo.com>
16306
16307         * lib/getline.h, getline.c: Rewrite.
16308
16309         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
16310
16311 2005-07-31  Bruno Haible  <bruno@clisp.org>
16312
16313         * lib/lock.h (gl_lock_initializer): New macro.
16314         (gl_lock_define_initialized): Use it.
16315         (gl_rwlock_initializer): New macro.
16316         (gl_rwlock_define_initialized): Use it.
16317         (gl_recursive_lock_initializer): New macro.
16318         (gl_recursive_lock_define_initialized): Use it.
16319
16320 2005-07-30  Karl Berry  <karl@gnu.org>
16321
16322         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
16323         Report from Ben Pfaff, regarding getopt.
16324
16325 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
16326
16327         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
16328         normal way.
16329         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
16330         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
16331         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
16332         (gl_GETOPT): Use the new macros.  Most of the implementation
16333         is moved to the new macros.  This is for programs like Emacs
16334         that don't want all the functionality of gl_GETOPT.
16335
16336 2005-07-26  Bruno Haible  <bruno@clisp.org>
16337
16338         * m4/lock.m4: Update from GNU gettext.
16339
16340 2005-07-26  Bruno Haible  <bruno@clisp.org>
16341
16342         * lib/lock.h: Update from GNU gettext.
16343         * lib/lock.c: Update from GNU gettext.
16344
16345 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
16346
16347         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
16348         obsolescent AC_TRY_RUN.  Include the default includes files, for
16349         'exit'.
16350
16351 2005-07-24  Bruno Haible  <bruno@clisp.org>
16352
16353         * modules/visibility: New file.
16354         * MODULES.html.sh (Misc): Add visibility.
16355
16356 2005-07-24  Bruno Haible  <bruno@clisp.org>
16357
16358         * m4/visibility.m4: New file.
16359
16360 2005-07-24  Bruno Haible  <bruno@clisp.org>
16361
16362         * doc/visibility.texi: New file.
16363
16364 2005-07-22  Bruno Haible  <bruno@clisp.org>
16365
16366         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
16367         $(ALLOCA_H), redundant through BUILT_SOURCES.
16368         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
16369         redundant through BUILT_SOURCES.
16370         * modules/byteswap (Makefile.am): Remove explicit dependency on
16371         $(BYTESWAP_H), redundant through BUILT_SOURCES.
16372         * modules/fnmatch (Makefile.am): Remove explicit dependency on
16373         $(FNMATCH_H), redundant through BUILT_SOURCES.
16374         * modules/getopt (Makefile.am): Remove explicit dependency on
16375         $(GETOPT_H), redundant through BUILT_SOURCES.
16376         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
16377         redundant through BUILT_SOURCES.
16378         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
16379         redundant through BUILT_SOURCES.
16380         * modules/stdbool (Makefile.am): Remove explicit dependency on
16381         $(STDBOOL_H), redundant through BUILT_SOURCES.
16382         * modules/stdint (Makefile.am): Remove explicit dependency on
16383         $(STDINT_H), redundant through BUILT_SOURCES.
16384         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
16385         Remove explicit dependency on $(SYSEXITS_H).
16386         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
16387
16388 2005-07-18  Simon Josefsson  <jas@extundo.com>
16389
16390         * lib/check-version.c (check_version): Accept identical versions too.
16391
16392 2005-07-18  Bruno Haible  <bruno@clisp.org>
16393
16394         * modules/lock: New file.
16395         * MODULES.html.sh (Multithreading): New section.
16396
16397 2005-07-18  Bruno Haible  <bruno@clisp.org>
16398
16399         * m4/lock.m4: New file, from GNU gettext.
16400
16401 2005-07-18  Bruno Haible  <bruno@clisp.org>
16402
16403         * lib/lock.h: New file, from GNU gettext.
16404         * lib/lock.c: New file, from GNU gettext.
16405
16406 2005-07-18  Bruno Haible  <bruno@clisp.org>
16407
16408         * lib/lock.h (gl_once_t): New type.
16409         (gl_once_define, gl_once): New macros.
16410         * lib/lock.c (fresh_once): New variable.
16411         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
16412         functions.
16413
16414 2005-07-16  Simon Josefsson  <jas@extundo.com>
16415
16416         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
16417         workaround, suggested by Bruno.
16418
16419 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
16420
16421         * modules/xalloc (Depends-on): Add xalloc-die.
16422         * modules/xvasprintf (Depends-on): Add xalloc-die.
16423
16424 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
16425
16426         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
16427         with a minor change.
16428
16429 2005-07-15  Bruno Haible  <bruno@clisp.org>
16430
16431         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
16432         When using lib/poll.c, define poll as rpl_poll.
16433
16434 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
16435
16436         * modules/argp (Depends-on): Remove unlocked-io.
16437
16438 2005-07-14  Derek Price  <derek@ximbiot.com>
16439
16440         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
16441         for glob symlink bug.
16442
16443 2005-07-14  Bruno Haible  <bruno@clisp.org>
16444
16445         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
16446         Instead, test for *_unlocked function declarations directly.
16447
16448 2005-07-11  Simon Josefsson  <jas@extundo.com>
16449
16450         * modules/size_max: New file.
16451
16452         * modules/xsize: Depend on size_max module for size_max.m4.
16453
16454 2005-07-11  Simon Josefsson  <jas@extundo.com>
16455
16456         * lib/size_max.h: New file.
16457
16458 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
16459
16460         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
16461         copyright symbol and the year.
16462         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
16463         (version_etc_va): Use parameterized copyright notice.
16464         Reword to conform to the current GNU coding standards.
16465
16466 2005-07-11  Karl Berry  <karl@gnu.org>
16467
16468         * doc/gnulib.texi (Quoting): new node.
16469         (Initial import): more info, from Patrice.
16470
16471 2005-07-11  Bruno Haible  <bruno@clisp.org>
16472
16473         * gnulib-tool (func_usage): Document option --avoid.
16474         (Command line options): Handle --avoid.
16475         (func_acceptable): New function.
16476         (func_modules_transitive_closure): Use it.
16477
16478 2005-07-11  Bruno Haible  <bruno@clisp.org>
16479
16480         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
16481         Reported by Jim Meyering.
16482
16483 2005-07-10  Bruno Haible  <bruno@clisp.org>
16484
16485         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
16486         Needed when size_t is smaller than 'unsigned int'.
16487         Reported by Paul Eggert.
16488
16489 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16490
16491         * modules/argp (Depends-on): Add unlocked-io
16492
16493 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16494
16495         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
16496         block of defines.
16497
16498 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
16499
16500         * config/srclist.txt: Comment out regcomp.c, since we have a porting
16501         fix now.
16502
16503 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
16504         and Paul Eggert  <eggert@cs.ucla.edu>
16505
16506         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
16507         in wint_t, not wchar_t.  Remove now-unnecessary cast.
16508
16509 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16510
16511         * modules/regex (Files): Add lib/regex_internal.c,
16512         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
16513         (Depends-on): Add extensions.
16514         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
16515
16516 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16517
16518         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
16519         pathconf.
16520         * m4/same.m4 (gl_SAME): Likewise.
16521         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
16522
16523         * m4/regex.m4: Adjust to new libc regex implementation.
16524         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
16525         all the .c and .h parts of (the new) regex.
16526         Quote the m4 stuff better.
16527         Check for RE_ICASE bug of old gnulib.
16528         Check for REG_STARTEND of recent libc.
16529         Rename local variables from jm_* to gl_*.
16530         Quote operand of "test -f".
16531         Say "recent enough" version of libc, not "version 2".
16532         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
16533         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
16534         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
16535         Remove check for btowc, isascii.
16536         Require AM_LANGINFO_CODESET.
16537
16538 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16539
16540         * lib/regex.c, regex.h: Sync from libc.
16541         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
16542         * lib/regexec.c:
16543         New files, synced from libc, except that regex_internal.h
16544         currently has a small porting fix.
16545
16546 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16547
16548         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
16549         regex_internal.c, regexec.c.
16550         Add regex_internal.h too, but as a comment, since the libc version
16551         is currently broken in gnulib mode.
16552
16553 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
16554
16555         Support programs like Emacs that use gnulib but not gettext.
16556         * MODULES.html.sh (Internationalization functions): Add gettext-h.
16557         * modules/gettext-h: New file.
16558         * modules/gettext (Files): Remove lib/gettext.h.
16559         (Depends-on): Add gettext-h.
16560         (Makefile.am): Remove lib_SOURCES.
16561         * modules/argmatch, modules/c-stack, modules/closeout:
16562         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
16563         * modules/execute, modules/file-type, modules/getaddrinfo:
16564         * modules/getopt, modules/human, modules/javacomp:
16565         * modules/javaexec, modules/mkdir-p, modules/obstack:
16566         * modules/openat, modules/pagealign_alloc, modules/pipe:
16567         * modules/quotearg, modules/regex, modules/rpmatch:
16568         * modules/unicodeio, modules/userspec, modules/version-etc:
16569         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
16570         * modules/xsetenv:
16571         Depend on gettext-h, not gettext.
16572
16573 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
16574
16575         * gnulib-tool (func_import): Add support for 'public domain' license.
16576         * modules/alloca, modules/atexit, modules/memmove:
16577         Now public domain, not GPL.
16578         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
16579         * modules/realloc, modules/strerror, modules/strtod:
16580         Now LGPL, not GPL.
16581
16582 2005-07-05  Bruno Haible  <bruno@clisp.org>
16583
16584         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
16585         autoconf CVS. Needed for mingw.
16586
16587 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
16588
16589         Remove the dependency of the strftime module on the tzset module.
16590         * modules/strftime (Depends-on): Remove dependency on tzset.
16591
16592 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
16593
16594         Remove the dependency of the strftime module on the tzset module.
16595         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
16596         gl_FUNC_TZSET_CLOBBER.
16597
16598 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
16599
16600         Remove the dependency of the strftime module on the tzset module.
16601         * lib/strftime.c (my_strftime)
16602         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
16603         Copy the input structure, to work around some of the bug with
16604         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
16605         Solaris releases, you should also use the tzset module, but we won't
16606         require it as a dependency any more since we don't want LGPLed code
16607         to depend on GPLed code.
16608
16609 2005-07-02  Jim Meyering  <jim@meyering.net>
16610
16611         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
16612         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
16613         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
16614         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
16615
16616 2005-07-02  Jim Meyering  <jim@meyering.net>
16617
16618         * lib/backupfile.c (backup_args): Change a `0' to NULL.
16619
16620 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
16621
16622         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
16623         declares only 'struct timespec;' (!).
16624
16625 2005-07-01  Jim Meyering  <jim@meyering.net>
16626
16627         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
16628         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
16629         * lib/save-cwd.c, tempname.c:
16630         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
16631         and don't include <sys/file.h>).
16632
16633 2005-06-29  Jim Meyering  <jim@meyering.net>
16634
16635         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
16636         type name.  Use the variable name instead.
16637         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
16638         Likewise.
16639
16640 2005-06-28  Simon Josefsson  <jas@extundo.com>
16641
16642         * modules/check-version (Files): Add check-version.m4.
16643
16644 2005-06-28  Simon Josefsson  <jas@extundo.com>
16645
16646         * m4/check-version.m4: New file, suggested by Jim Meyering
16647         <jim@meyering.net>.
16648
16649 2005-06-28  Simon Josefsson  <jas@extundo.com>
16650
16651         * lib/check-version.h, lib/check-version.c: New files.
16652
16653 2005-06-28  Simon Josefsson  <jas@extundo.com>
16654
16655         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
16656         collision with global variable.  Better indentation.  Don't
16657         increment buffer pointer beyond buffer end.  Based on comments
16658         from Paul Eggert <eggert@cs.ucla.edu>.
16659
16660         * lib/base64.h: Indent.
16661
16662 2005-06-28  Simon Josefsson  <jas@extundo.com>
16663
16664         * doc/gnulib.texi (Library version handling): New section.
16665
16666 2005-06-28  Jim Meyering  <jim@meyering.net>
16667
16668         * check-module (find_included_lib_files): Hard-code another
16669         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
16670         but modules/fts-lgpl (correctly) does not list those files.
16671
16672         * modules/canonicalize (Files): Add lib/pathmax.h.
16673
16674 2005-06-25  Simon Josefsson  <jas@extundo.com>
16675
16676         * modules/check-version: New file.
16677
16678 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
16679
16680         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
16681         initializer of struct addrinfo, as an indication that we don't
16682         care how many members the structure has.
16683
16684 2005-06-24  Derek Price  <derek@ximbiot.com>
16685         and Bruno Haible  <bruno@clisp.org>
16686
16687         Remove stat module & update lstat.
16688         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
16689         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
16690         * m4/stat.m4: Remove this file.
16691
16692 2005-06-24  Derek Price  <derek@ximbiot.com>
16693         and Bruno Haible  <bruno@clisp.org>
16694
16695         Remove stat module & update lstat.
16696         * lib/stat.c: Remove this file...
16697         (slash_aware_lstat): ...moving this content and its support...
16698         * lib/lstat.c (rpl_lstat): ...into here.
16699         * lib/lstat.h: New file.
16700
16701 2005-06-24  Derek Price  <derek@ximbiot.com>
16702         and Bruno Haible  <bruno@clisp.org>
16703
16704         Remove stat module & update lstat.
16705         * config/srclist.txt (libc sources): Remove stat.
16706
16707 2005-06-24  Derek Price  <derek@ximbiot.com>
16708         and Bruno Haible  <bruno@clisp.org>
16709
16710         Remove stat module & update lstat.
16711         * MODULES.html.sh (stat): Remove.
16712         * MODULES.html: Regenerated.
16713         * modules/lstat (Description): Correct function name.
16714         (Files): Add "lstat.h".
16715         (Depends-on): Remove stat, add xalloc, stat-macros.
16716         * modules/stat: Remove this file.
16717         (Include): Add "lstat.h", remove <sys/stat.h>.
16718
16719 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
16720
16721         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
16722         (ranged_convert): Don't save conversion in a temporary struct.
16723         This causes a warning with GCC 4.0.0, and anyway in the typical
16724         case it's not worth the extra 100 bytes or so of code.
16725         (ranged_convert, __mktime_internal): When calling a function via a
16726         pointer P, use P () rather than (*P) (), as we now assume C89 or
16727         better.
16728
16729 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16730
16731         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
16732         "who -r" failed to give output.  Problem reported by Tim Waugh.
16733
16734         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
16735         (xcalloc): Use it to avoid needless tests.
16736         Problem reported by Jim Meyering.
16737
16738 2005-06-20  Derek Price  <derek@ximbiot.com>
16739
16740         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
16741         unnecessary for Autoconfs > 2.59c.
16742
16743 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16744
16745         * lib/argp.h (__option_is_short): Check upper limit of
16746         __key. Isprint() requires its argument to have the value
16747         of an unsigned char or EOF.
16748
16749 2005-06-16  Jim Meyering  <jim@meyering.net>
16750
16751         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
16752         when either N or S is zero.
16753
16754 2005-06-16  Derek Price  <derek@ximbiot.com>
16755
16756         * m4/bison.m4: Declare YACC & YFLAGS precious.
16757
16758 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
16759
16760         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
16761         multibyte string or pattern, fall back on unibyte matching.
16762         Problem reported by James Youngman.
16763
16764 2005-06-08  Bruno Haible  <bruno@clisp.org>
16765
16766         * modules/csharpcomp: New file.
16767         * MODULES.html.sh (C#): Add csharpcomp.
16768
16769 2005-06-08  Bruno Haible  <bruno@clisp.org>
16770
16771         * m4/csharpcomp.m4: New file, from GNU gettext.
16772
16773 2005-06-08  Bruno Haible  <bruno@clisp.org>
16774
16775         * lib/csharpcomp.h: New file, from GNU gettext.
16776         * lib/csharpcomp.c: New file, from GNU gettext.
16777         * lib/csharpcomp.sh.in: New file, from GNU gettext.
16778
16779 2005-06-08  Bruno Haible  <bruno@clisp.org>
16780
16781         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
16782         warning on mingw.
16783
16784 2005-06-07  Derek Price  <derek@ximbiot.com>
16785
16786         Sync from CVS.
16787         * lib/glob_.h: Indent nested #ifdef.
16788
16789 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
16790
16791         Sync from coreutils.
16792         Use "file name" when talking about file names, instead of "filename"
16793         or "path", as per the GNU coding standards.
16794         * lib/mkdir-p.c: Renamed from makepath.c.
16795         (make_dir_parents): Renamed from make_path.  All callers changed.
16796         * lib/mkdir-p.h: Likewise.  All includers changed.
16797         * lib/filenamecat.c: Renamed from path-concat.c.
16798         (file_name_concat): Renamed from path_concat.  All callers changed.
16799         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
16800         * lib/filenamecat.h: Likewise.  All includers changed.
16801         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
16802         in comments or local variable names.
16803         * lib/basename.c: Likewise.
16804         * lib/canonicalize.c, canonicalize.h: Likewise.
16805         * lib/dirname.c, dirname.h: Likewise.
16806         * lib/euidaccess.c: Likewise.
16807         * lib/exclude.c: Likewise
16808         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
16809         * lib/fsusage.c, fsuage.h: Likewise.
16810         * lib/fts.c, fts_.h: Likewise.
16811         * lib/getcwd.c: Likewise.
16812         * lib/getloadavg.c: Likewise.
16813         * lib/mkstemp.c: Likewise.
16814         * lib/mountlist.c, mountlist.h: Likewise.
16815         * lib/openat.c, openat.h: Likewise.
16816         * lib/readlink-stub.c: Likewise.
16817         * lib/readutmp.c, readutmp.h: Likewise.
16818         * lib/rename.c: Likewise.
16819         * lib/rmdir.c: Likewise.
16820         * lib/same.c: Likewise.
16821         * lib/savedir.c: Likewise.
16822         * lib/stripslash.c: Likewise.
16823         * lib/tempname.c: Likewise.
16824         * lib/xreadlink.c: Likewise.
16825         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
16826         All uses changed.
16827         * lib/exclude.h: Likewise.
16828
16829         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
16830         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
16831         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
16832         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
16833         * lib/pathmax.h: Include <limits.h> unconditionally, since other
16834         files have been getting away with it for years (MORE/BSD 4.3
16835         is extinct now).
16836         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
16837         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
16838
16839         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
16840         Define to 256, not 255, as per modern POSIX.
16841
16842 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
16843
16844         Sync from coreutils.
16845         Use "file name" when talking about file names, instead of "filename"
16846         or "path", as per the GNU coding standards.
16847         * MODULES.html.sh: mkdir-p renamed from makepath.
16848         filenamecat renamed from path-concat.
16849         * modules/filenamecat: Renamed from modules/path-concat.
16850         (Files): filenamecat.h and filenamecat.c renamed from
16851         path-concat.h and path-concat.c.
16852         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
16853         (Include): filenamecat.h, not path-concat.h.
16854         * modules/mkdir-p: Renamed from modules/makepath.
16855         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
16856         makepath.c.
16857         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
16858         (Include): mkdir-p.h, not makepath.h.
16859
16860 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
16861
16862         Sync from coreutils.
16863         * m4/mkdir-p.m4: Renamed from makepath.m4.
16864         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
16865         Rename files from makepath.c to mkdir-p.c, and from
16866         makepath.h to mkdir-p.h.
16867         * m4/filenamecat.m4: Renamed from path-concat.m4.
16868         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
16869         Rename files from path-concat.c to filenamecat.c,
16870         and from path-concat.h to filenamecat.h.
16871         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
16872         "file name" in local variables or comments.
16873         * m4/rename.m4: Likewise.
16874
16875 2005-06-01  Bruno Haible  <bruno@clisp.org>
16876
16877         * modules/csharpexec: New file.
16878         * MODULES.html.sh (C#): New section.
16879
16880 2005-06-01  Bruno Haible  <bruno@clisp.org>
16881
16882         * m4/csharp.m4: New file, from GNU gettext.
16883         * m4/csharpexec.m4: New file, from GNU gettext.
16884
16885 2005-06-01  Bruno Haible  <bruno@clisp.org>
16886
16887         * lib/csharpexec.h: New file, from GNU gettext.
16888         * lib/csharpexec.c: New file, from GNU gettext.
16889         * lib/csharpexec.sh.in: New file, from GNU gettext.
16890
16891 2005-05-31  Derek Price  <derek@ximbiot.com>
16892             Paul Eggert  <eggert@cs.ucla.edu>
16893
16894         Sync from cvs.
16895         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
16896
16897 2005-05-31  Derek Price  <derek@ximbiot.com>
16898             Paul Eggert  <eggert@cs.ucla.edu>
16899
16900         Sync from cvs.
16901         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
16902
16903 2005-05-29  Derek Price  <derek@ximbiot.com>
16904
16905         * config/srclist.txt (glob_.h, glob.c): Add these files.
16906
16907 2005-05-29  Derek Price  <derek@ximbiot.com>
16908
16909         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
16910         * modules/glob: New file.
16911         * modules/getlogin_r: Add link to POSIX spec in description.
16912
16913 2005-05-29  Derek Price  <derek@ximbiot.com>
16914             Paul Eggert  <eggert@cs.ucla.edu>
16915
16916         * m4/glob.m4: New file.
16917
16918 2005-05-29  Derek Price  <derek@ximbiot.com>
16919             Paul Eggert  <eggert@cs.ucla.edu>
16920
16921         * lib/glob_.h, lib/glob.c: New files.
16922
16923 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
16924
16925         * modules/fts (Files): Remove m4/inttypes-pri.m4.
16926         * modules/fts-lgpl (Depends-on): Remove gettext.
16927
16928 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
16929
16930         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
16931         and don't require gt_INTTYPES_PRI.
16932
16933 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
16934
16935         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
16936
16937         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
16938         the configuration hassle isn't worth it.
16939         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
16940         (LONGEST_MODIFIER, PRIuMAX): Remove.
16941
16942 2005-05-27  Bruno Haible  <bruno@clisp.org>
16943
16944         * lib/getlogin_r.h: Remove second include of <stddef.h>.
16945
16946 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
16947
16948         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
16949         _POSIX_PTHREAD_SEMANTICS for Solaris.
16950
16951 2005-05-25  Derek Price  <derek@ximbiot.com>
16952
16953         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
16954
16955 2005-05-25  Derek Price  <derek@ximbiot.com>
16956             Paul Eggert  <eggert@cs.ucla.edu>
16957
16958         * modules/getlogin_r, m4/getlogin_r.m4: New files.
16959         * lib/getlogin_r.c, getlogin_r.h: New files.
16960
16961 2005-05-25  Bruno Haible  <bruno@clisp.org>
16962             Derek Price  <derek@ximbiot.com>
16963
16964         * lib/getlogin_r.h: Simplify API documentation.
16965
16966 2005-05-23  Derek Price  <derek@ximbiot.com>
16967
16968         * modules/minmax (Files): Add m4/minmax.m4.
16969         (configure.ac): Add gl_MINMAX.
16970
16971 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
16972
16973         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
16974         so that unistd-safer.h (GPL'ed code) need not be included.
16975
16976 2005-05-22  Bruno Haible  <bruno@clisp.org>
16977
16978         * m4/minmax.m4: New file.
16979         Based on a patch by Derek Price <derek@ximbiot.com>.
16980
16981 2005-05-22  Bruno Haible  <bruno@clisp.org>
16982
16983         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
16984         (INT64_MIN): Fix definition.
16985         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
16986
16987         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
16988         NEED_SIGNED_INT_TYPES.
16989
16990         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
16991         HAVE_SYSTEM_INTTYPES.
16992
16993 2005-05-22  Bruno Haible  <bruno@clisp.org>
16994
16995         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
16996         Also include <sys/param.h> if it defines MIN, MAX.
16997         Based on a patch by Derek Price <derek@ximbiot.com>.
16998
16999 2005-05-21  Jim Meyering  <jim@meyering.net>
17000
17001         * modules/fts (Files): Add m4/inttypes-pri.m4.
17002         (Depends-on): Add lstat and remove gettext.  Alphabetize.
17003
17004 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17005
17006         New fts module.
17007         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
17008         (setup_dir, free_dir): New functions.
17009         (enter_dir, leave_dir): Define trivial
17010         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
17011         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
17012         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
17013         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
17014         Move to fts-cycle.c.
17015         (fts_open): Use setup_dir.
17016         (fts_close): Use free_dir.
17017         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
17018         This adds a label and some gotos, but the alternatives were messier.
17019         Check for memory allocation failure when entering a dir.
17020         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
17021         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
17022         (FTS): New member fts_cycle, that is a union that contains the
17023         old active_dir_ht and cycle_state.  All uses changed to mention
17024         fts_cycle.ht and fts_cycle.state.
17025         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
17026         fts.c, with the following changes:
17027         (setup_dir, free_dir): New functions.
17028         (enter_dir): Now returns bool.  Return true if successful, false
17029         if memory exhausted.  All callers changed.
17030         Do not bother partly cleaning up on
17031         memory allocation failure; that is free_dir's job.
17032         However, free ad if hash_insert fails, to avoid memory leak.
17033         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
17034         fts->fts_options to see which union member to use.
17035
17036 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17037
17038         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
17039         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
17040
17041 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17042
17043         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
17044
17045 2005-05-20  Jim Meyering  <jim@meyering.net>
17046
17047         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
17048         Now a macro, to pacify GCC.
17049
17050 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
17051
17052         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
17053         of -1.
17054
17055 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
17056
17057         * lib/chown.c (rpl_chown): Return -1 on failure.
17058
17059 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
17060
17061         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
17062         Don't check for stddef.h.
17063         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
17064         don't use its results.
17065         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
17066         since we include them unconditionally.  Don't require
17067         AM_STDBOOL_H, since stdbool is a prerequisite.
17068         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
17069         since we assume C89 or better.
17070         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
17071         as we don't use their results.
17072         Don't check for fchdir, memmove, memset, strrchr, as we use
17073         them unconditionally.
17074         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
17075         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
17076
17077 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
17078
17079         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
17080         Include <stddef.h> unconditionally, since we assume C89 now.
17081         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
17082         * lib/fts.c: Include fts_.h first, to check interface.
17083         Do not include intprops.h; no longer needed.
17084         Include cycle-check.h and hash.h, since fts_.h no longer does.
17085         Remove unnecessary casts of closedir to void.
17086         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
17087         decide whether to decrement nlinks.
17088         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
17089         (FTS): Use struct hash_table * instead of Hash_table, so that
17090         we no longer need to include hash.h here.
17091
17092 2005-05-18  Jim Meyering  <jim@meyering.net>
17093
17094         * modules/dirfd (License): Change to LGPL.  Most of the code
17095         is already in the public domain.
17096
17097 2005-05-18  Jim Meyering  <jim@meyering.net>
17098
17099         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
17100         Reported by Yoann Vandoorselaere.
17101
17102 2005-05-17  Jim Meyering  <jim@meyering.net>
17103
17104         * m4/fts.m4: New file, from coreutils.
17105
17106 2005-05-17  Jim Meyering  <jim@meyering.net>
17107
17108         * lib/fts.c, lib/fts_.h: New files, from coreutils.
17109
17110 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
17111
17112         Sync from coreutils.
17113         * m4/unlinkdir.m4: New file.
17114
17115 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
17116
17117         Sync from coreutils.
17118         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
17119         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
17120         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
17121         White space changes only.
17122         * lib/makepath.c (make_path): Port to hosts where leading "//" is
17123         special.
17124         * lib/yesno.c: Include getline.h, not ctype.h.
17125         (yesno): Don't remove leading white space; POSIX doesn't allow it.
17126         Use getline to remove arbitrary restriction on response length.
17127
17128 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
17129
17130         * config/srclist-update: Spell out "Street" in FSF postal
17131         mail address; this is the style the FSF seems to prefer.
17132
17133         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
17134         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
17135         this updates FSF postal mail address.
17136
17137         Sync from coreutils.
17138         * modules/unlinkdir: New file.
17139         * modules/yesno (Depends-on): Add getline.
17140         * MODULES.html.sh (File system functions): Add unlinkdir.
17141
17142 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17143
17144         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
17145         lib/strsep.h:
17146         Change the initial comment to refer to GPL, not LGPL.
17147         gnulib-tool will change it to LGPL as needed.
17148
17149         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
17150         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
17151         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
17152         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
17153         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
17154         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
17155         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
17156         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
17157         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
17158         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
17159         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
17160         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
17161         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
17162         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
17163         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
17164         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
17165         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
17166         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
17167         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
17168         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
17169         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
17170         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
17171         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
17172         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
17173         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
17174         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
17175         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
17176         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
17177         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
17178         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
17179         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
17180         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
17181         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
17182         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
17183         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
17184         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
17185         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
17186         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
17187         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
17188         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
17189         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
17190         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
17191         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
17192         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
17193         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
17194         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
17195         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
17196         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
17197         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
17198         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
17199         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
17200         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
17201         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
17202         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
17203         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
17204         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
17205         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
17206         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
17207         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
17208         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
17209         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
17210         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
17211         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
17212         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
17213         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
17214         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
17215         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
17216         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
17217         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
17218         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
17219         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
17220         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
17221         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
17222         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
17223         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
17224         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
17225         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
17226         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
17227         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
17228         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
17229         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
17230         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
17231         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
17232         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
17233         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
17234         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
17235         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
17236         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
17237         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
17238         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
17239         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
17240         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
17241         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
17242         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
17243         lib/yesno.c, lib/yesno.h:
17244         Update FSF postal mail address.
17245
17246 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17247
17248         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
17249         tests/test-memmem.c, tests/test-stpncpy.c:
17250         Update FSF postal mail address.
17251
17252 2005-05-13  Bruno Haible  <bruno@clisp.org>
17253
17254         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
17255         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
17256         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
17257         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
17258         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
17259         Add support for 64-bit integers in the MSVC compiler.
17260
17261 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17262
17263         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
17264
17265 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
17266
17267         * gnulib-tool (func_import): Sort and uniquify recommended includes.
17268
17269 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
17270
17271         * doc/getdate.texi (General date syntax): Don't say that date
17272         date --iso-8601=ns generates acceptable dates; it doesn't yet.
17273         Problem reported by Nic Ferrier.
17274
17275 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
17276
17277         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
17278         specified in ai_socktype. Fix invalid ai_protocol
17279         check. ai_protocol is usually set to 0 or depending on
17280         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
17281         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
17282         ai_socktype / ai_protocol in the returned addrinfo structure.
17283
17284 2005-05-10  Simon Josefsson  <jas@extundo.com>
17285
17286         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
17287         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
17288
17289 2005-05-10  Karl Berry  <karl@gnu.org>
17290
17291         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
17292         (from http://www.gnu.org/licenses).
17293         * doc/COPYING.LIB: also rename to COPYING.LESSER.
17294         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
17295         fdl.texi suffices.
17296
17297 2005-05-10  Karl Berry  <karl@gnu.org>
17298
17299         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
17300         (COPYING.DOC): remove.
17301
17302         * config/srclist-update: new FSF address.
17303
17304 2005-05-10  Derek Price  <derek@ximbiot.com>
17305
17306         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
17307         possible.
17308
17309 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
17310             Bruno Haible  <bruno@clisp.org>
17311
17312         * modules/inet_ntop: New file.
17313         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17314         inet_ntop.
17315
17316 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
17317             Bruno Haible  <bruno@clisp.org>
17318
17319         * m4/inet_ntop.m4: New file.
17320
17321 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
17322             Bruno Haible  <bruno@clisp.org>
17323
17324         * lib/inet_ntop.h: New file.
17325         * lib/inet_ntop.c: New file, from glibc with modifications.
17326
17327 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
17328
17329         * modules/time_r (License): Change to LGPL.
17330         * modules/extensions (License): Change to LGPL.  Actually,
17331         the license is more permissive than that, but currently gnulib-tool
17332         doesn't know how to handle more-permissive licenses.
17333
17334         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
17335         Problem reported by Dave Love.
17336
17337 2005-05-08  Jim Meyering  <jim@meyering.net>
17338
17339         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
17340         blank.
17341
17342 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
17343
17344         * modules/argmatch (Depends-on): Add stdbool.
17345         * modules/backupfile (Depends-on): Likewise.
17346         * modules/chdir-long (Depends-on): Likewise.
17347         * modules/closeout (Depends-on): Likewise.
17348         * modules/cycle-check (Depends-on): Likewise.
17349         * modules/dirname (Depends-on): Likewise.
17350         * modules/fnmatch (Depends-on): Likewise.
17351         * modules/fsusage (Depends-on): Likewise.
17352         * modules/fwriteerror (Depends-on): Likewise.
17353         * modules/getcwd (Depends-on): Likewise.
17354         * modules/getloadavg (Depends-on): Likewise.
17355         * modules/hard-locale (Depends-on): Likewise.
17356         * modules/makepath (Depends-on): Likewise.
17357         * modules/mountlist (Depends-on): Likewise.
17358         * modules/nanosleep (Depends-on): Likewise.
17359         * modules/posixtm (Depends-on): Likewise.
17360         * modules/quotearg (Depends-on): Likewise.
17361         * modules/readtokens (Depends-on): Likewise.
17362         * modules/readtokens0 (Depends-on): Likewise.
17363         * modules/readutmp (Depends-on): Likewise.
17364         * modules/save-cwd (Depends-on): Likewise.
17365         * modules/strftime (Depends-on): Likewise.
17366         * modules/userspec (Depends-on): Likewise.
17367         * modules/utimecmp (Depends-on): Likewise.
17368         * modules/xgetcwd (Depends-on): Likewise.
17369         * modules/xnanosleep (Depends-on): Likewise.
17370         * modules/xstrtod (Depends-on): Likewise.
17371         * modules/yesno (Depends-on): Likewise.
17372
17373 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
17374
17375         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
17376         needless checks.
17377
17378 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17379
17380         Merge from coreutils.  Among other things,
17381         add bulletproofing for cases where stdin, stdout, or stderr are closed.
17382         * lib/fd-safer.c: New file.
17383         * lib/fcntl-safer.h, open-safer.c: Remove.
17384         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
17385         * lib/dup-safer.c: Include unistd-safer.h first.
17386         Don't include errno.h.
17387         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
17388         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
17389         * lib/file-type.c: Rely on file-type.h change.
17390         * lib/getloadavg.c: Include unistd-safer.h.
17391         (getloadavg): Use safer open.
17392         * lib/getusershell.c: Include "stdio-safer.h".
17393         (getusershell): Use safer fopen.
17394         * lib/long-options.c (long_options): Use NULL rather than 0.
17395         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
17396         'free'.
17397         * lib/modechange.c: Likewise.
17398         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
17399         (MODE_DONE): New constant.
17400         (struct mode_change): Remove 'next' member.
17401         (make_node_op_equals): New function; like the old one of the
17402         same name, except it allocates an array.
17403         (mode_compile, mode_create_from_ref): Use it.
17404         (mode_compile): Allocate result as an array, not a linked list.
17405         Parse octal string ourself, so that we catch mistakes like "+0".
17406         (mode_adjust): Arg is an array, not a linked list.
17407         * lib/modechange.c: Include stat-macros.h, xalloc.h.
17408         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
17409         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
17410         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
17411         Remove.  This is now stat-macros.h's job.
17412         (talloc): Remove.  All callers replaced by xalloc, so that
17413         our invokers don't have to worry about reporting memory failures.
17414         (make_node_op_equals): Remove.
17415         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
17416         New constants.
17417         (struct mode_change): Moved here from modechange.h.
17418         (mode_append_entry): Remove.
17419         (mode_compile): Remove MASKED_OPS arg, since it encouraged
17420         apps to have incorrect behavior.  Use simpler algorithm for head
17421         and tail.  Don't futz with umask; that's now the job of mode_adjust.
17422         Detect more invalid usages rather than having somewhat-random behavior.
17423         Don't insert an "a=" action, as that leads to incorrect behavior.
17424         (mode_compile, mode_create_from_ref): Return NULL on error instead
17425         of an enum, since now there's only one way to have an error.  All
17426         callers changed.
17427         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
17428         at the correct time.  Simplify calculation of "+u" and its ilk.
17429         Don't mishandle "+X".
17430         (mode_free): Remove "register" and localize decls.
17431         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
17432         (struct mode_change): Move to modechange.c; callers don't
17433         need to see this stuff.
17434         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
17435         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
17436         (mode_change, mode_adjust): Reflect the new signatures noted above.
17437         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
17438         that might redefine system include files.
17439         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
17440         (my_usleep): Use NULL rather than (void *) 0.
17441         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
17442         Use siginterrupt to specify that system calls should be interrupted.
17443         (rpl_nanosleep): Move initialization of suspended closer to call of
17444         my_usleep.
17445         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
17446         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
17447         (desirable_utmp_entry): New function.
17448         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
17449         using x2nrealloc, to simplify logic.
17450         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
17451         size calculation.  Do not assume utmp file is a regular file.
17452         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
17453         (READ_UTMP_CHECK_PIDS): New constant.
17454         * lib/save-cwd.c: Include unistd-safer.h.
17455         (save_cwd): Use fd_safer.
17456         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
17457         [!_LIBC] Include "stat-macros.h" instead.
17458         * lib/unistd-safer.h (fd_safer): New decl.
17459
17460 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17461
17462         * modules/getloadavg (Depends-on): Add unistd-safer.
17463         * modules/getusershell (Depends-on): Add stdio-safer.
17464         * modules/lstat (Depends-on): Remove xalloc.
17465         * modules/mkstemp (Depends-on): Add stat-macros.
17466         * modules/modechange (Depends-on): Remove xstrtol.
17467         Add stat-macros, xalloc.
17468         * modules/save-cwd (Depends-on): Add unistd-safer.
17469         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
17470         * modules/unistd-safer (Files): Add lib/fd-safer.c
17471         (Makefile.am): Remove lib_SOURCES.
17472
17473         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
17474         Remove fcntl-safer; unistd-safer supersedes it.
17475
17476 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17477
17478         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
17479         AC_HEADER_STAT.
17480         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
17481         (gl_PREREQ_CHOWN): Remove.
17482         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
17483         it.  Don't require AC_HEADER_STAT.
17484         (gl_PREREQ_LSTAT): Remove.
17485         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
17486         Don't require AC_HEADER_STAT.
17487         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
17488         (gl_PREREQ_RMDIR): Remove.
17489         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
17490         mention stat-macros.h or AC_HEADER_STAT, since we'll make
17491         the stat-macros module a prerequisite.
17492         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
17493         * m4/filemode.m4 (gl_FILEMODE): Likewise.
17494         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
17495         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
17496         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
17497         variable names.
17498         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
17499         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
17500         variable prefixes.
17501         * m4/fcntl-safer.m4: Remove.
17502         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
17503         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
17504         Invoke gl_PREREQ_FD_SAFER.
17505         (gl_PREREQ_FD_SAFER): New macro.
17506         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
17507         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
17508         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
17509         Remove duplicate call to AC_LIBOBJ(readutmp).
17510         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
17511
17512         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
17513         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
17514
17515 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17516
17517         * MODULES.html.sh (Misc): Add byteswap.
17518
17519 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17520
17521         * modules/getcwd (Depends-on): Add extensions.
17522         * modules/openat (Depends-on): Likewise.
17523
17524 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17525
17526         * modules/byteswap: New file.
17527
17528 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17529
17530         * m4/byteswap.m4: New file.
17531
17532 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17533
17534         * lib/byteswap_.h: New file.
17535
17536 2005-04-25  Karl Berry  <karl@gnu.org>
17537
17538         * m4/gettext.m4: Update from GNU gettext 0.14.4.
17539
17540 2005-04-25  Albert Chin  <china@thewrittenword.com>
17541
17542         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
17543         Toolkit C bug.
17544
17545 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
17546
17547         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
17548         (func_ln_if_changed) Remove forcibly for no error message
17549         in case file does not exist.
17550
17551 2005-04-19  Simon Josefsson  <jas@extundo.com>
17552
17553         * gnulib-tool (Options): Make --symlink mean --symbolic.
17554
17555 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
17556
17557         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
17558
17559 2005-04-16  Simon Josefsson  <jas@extundo.com>
17560
17561         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
17562
17563 2005-04-15  Simon Josefsson  <jas@extundo.com>
17564
17565         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
17566
17567 2005-04-15  Simon Josefsson  <jas@extundo.com>
17568
17569         * gnulib-tool: Rename --symlink to --symbolic.
17570
17571 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
17572
17573         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
17574         symbolic links to files instead of copying/moving.  Add --aux-dir,
17575         specifying directory relative --dir where auxiliary build tools
17576         are placed.
17577
17578 2005-04-14  Bruno Haible  <bruno@clisp.org>
17579
17580         * modules/allocsa (License): Change to LGPL.
17581         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
17582
17583 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
17584
17585         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
17586         that "UTC +1 second" continues to work.  Problem reported
17587         by Dmitry V. Levin.
17588         (relunit_snumber): New rule.
17589         (relunit): Use it.
17590
17591 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
17592
17593         * lib/getdate.y (universal_time_zone_table): New constant.
17594         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
17595         universal_time_zone_table.
17596         (lookup_zone): Prefer universal_time_zone_table to
17597         local_time_zone_table, so that "GMT" time stamps are allowed in
17598         London during the summer.  Problem reported by Ian Abbott.
17599
17600 2005-04-12  Jim Meyering  <jim@meyering.net>
17601
17602         * lib/human.c (humblock): Set *options even when returning due to
17603         xstrtoumax conversion failure.  Thanks to a used-uninitialized
17604         warning from gcc-4.
17605
17606 2005-04-09  Jim Meyering  <jim@meyering.net>
17607
17608         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
17609         -Wuninitialized: initialize tm0.tm_year.
17610
17611 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
17612
17613         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
17614         count, since there's no maximum.  All uses changed.
17615         Add member dsts_seen.
17616         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
17617         not being INT_MAX.
17618         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
17619         Use pc_rels_seen to decide whther a date is absolute.
17620
17621         * lib/getdate.y (number): Don't overwrite year.
17622         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
17623         check.
17624
17625 2005-04-02  Simon Josefsson  <jas@extundo.com>
17626
17627         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
17628         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
17629
17630 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
17631
17632         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
17633         where no absolute path name can be longer than PATH_MAX.
17634
17635 2005-03-27  Jim Meyering  <jim@meyering.net>
17636
17637         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
17638
17639 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
17640
17641         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
17642         "one's complement" -> "ones' complement" in comment, as per Knuth.
17643         "value of type" -> "type or expression" in comment.
17644         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
17645
17646 2005-03-26  Jim Meyering  <jim@meyering.net>
17647
17648         Comment nits.
17649         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
17650         Correct typos: s/or/of/.
17651
17652 2005-03-26  Jim Meyering  <jim@meyering.net>
17653
17654         * modules/check-include-files: Move to ../ and rename to...
17655         * check-module: ...this.
17656
17657 2005-03-25  Jim Meyering  <jim@meyering.net>
17658
17659         * modules/xvasprintf (Files): Add xalloc.h.
17660
17661 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
17662
17663         * modules/gettext (Files): config/config.rpath ->
17664         build-aux/config.rpath
17665         * modules/iconv (Files): Likewise.
17666         Problem reported by Oskar Liljeblad.
17667
17668 2005-03-23  Jim Meyering  <jim@meyering.net>
17669
17670         * modules/check-include-files: New script to check for
17671         missing dependencies, multiple includes, etc.
17672
17673         * modules/c-strtold (Depends-on): Add xalloc.
17674         * modules/c-strtod (Depends-on): Add xalloc.
17675         * modules/hash (Depends-on): Add xalloc.
17676         (Files): Remove lib/xalloc.h.
17677
17678         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
17679         * modules/userspec (Files): Add lib/inttostr.h.
17680
17681 2005-03-23  Jim Meyering  <jim@meyering.net>
17682
17683         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
17684
17685 2005-03-22  Jim Meyering  <jim@meyering.net>
17686
17687         * modules/stat-macros: New module.
17688         * modules/canonicalize, modules/euidaccess, modules/file-type,
17689         * modules/filemode, modules/lchown, modules/makepath,
17690         * modules/rmdir, modules/stat: Depend on new stat-macros module
17691         rather than listing lib/stat-macros.h manually.
17692         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
17693
17694 2005-03-22  Jim Meyering  <jim@meyering.net>
17695
17696         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
17697
17698 2005-03-22  Bruno Haible  <bruno@clisp.org>
17699
17700         * config/srclist.txt: Replace target directory 'config' with
17701         'build-aux'.
17702         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
17703         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
17704         ../build-aux/.
17705
17706 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
17707
17708         * modules/chdir-long (Depends-on): Add mempcpy.
17709
17710         * modules/acl, modules/backupfile, modules/c-strtod,
17711         modules/c-strtold, modules/canon-host, modules/canonicalize,
17712         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
17713         modules/exclude, modules/exitfail, modules/file-type,
17714         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
17715         modules/getdate, modules/getline, modules/getpagesize,
17716         modules/getpass, modules/getugroups, modules/group-member,
17717         modules/hard-locale, modules/hash, modules/human, modules/idcache,
17718         modules/inttostr, modules/long-options, modules/makepath,
17719         modules/md5, modules/memcasecmp, modules/memcoll,
17720         modules/modechange, modules/mountlist, modules/path-concat,
17721         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
17722         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
17723         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
17724         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
17725         modules/strftime, modules/strndup, modules/strverscmp,
17726         modules/timespec, modules/unlocked-io, modules/userspec,
17727         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
17728         modules/yesno:
17729         Remove lib_SOURCES line from Makefile.am section, as this is now
17730         done automatically by the corresponding Autoconf macro.
17731
17732 2005-03-21  Jim Meyering  <jim@meyering.net>
17733
17734         Changes imported from coreutils.
17735
17736         * lib/cycle-check.c: Don't include xalloc.h.
17737
17738         * lib/path-concat.c: Don't include assert.h.
17739         (path_concat): Remove assertion that would have triggered
17740         for ABASE starting with more than one slash.
17741         Reported by Andreas Schwab.
17742
17743         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
17744         properly when ABASE is an absolute file name.
17745         Correct the description of this function.
17746         Include <assert.h>.
17747         Add an assertion and a test driver.
17748         This fixes a bug introduced on 2004-07-02.
17749         Andreas Schwab reported the resulting failure of cp --parents:
17750         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
17751
17752 2005-03-21  Jim Meyering  <jim@meyering.net>
17753
17754         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
17755         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
17756
17757 2005-03-21  Jim Meyering  <jim@meyering.net>
17758         and  Paul Eggert  <eggert@cs.ucla.edu>
17759
17760         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
17761         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
17762         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
17763         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
17764         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
17765         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
17766         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
17767         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
17768         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
17769         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
17770         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
17771         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
17772         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
17773         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
17774         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
17775         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
17776         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
17777         for these modules.
17778
17779 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
17780
17781         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
17782         (which shouldn't happen), generate nothing instead of returning 0
17783         immediately, so that nstrftime (NULL, ...) doesn't return 0.
17784
17785 2005-03-16  Bruno Haible  <bruno@clisp.org>
17786
17787         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
17788         HAVE_LONGLONG_64BIT.
17789
17790 2005-03-16  Bruno Haible  <bruno@clisp.org>
17791
17792         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
17793         HAVE_LONGLONG_64BIT.
17794
17795 2005-03-16  Bruno Haible  <bruno@clisp.org>
17796
17797         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
17798         HAVE_LONGLONG_64BIT.
17799
17800 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
17801
17802         * lib/strftime.c (my_strftime): Prepend space to format so that we can
17803         reliably distinguish strftime failure from empty output on POSIX
17804         hosts.
17805
17806 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
17807
17808         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
17809         (iconv_string): Don't guess a size-zero buffer, as that might cause
17810         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
17811         result would be 'too large', where 'too large' is (heuristically)
17812         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
17813         overflow concerns.  This will prevent some unwanted malloc failures
17814         when the inputs are very large.
17815
17816 2005-03-15  Karl Berry  <karl@gnu.org>
17817
17818         * config/srclist.txt (config.rpath): from gettext.
17819         * config/config.rpath: update.
17820
17821 2005-03-15  Bruno Haible  <bruno@clisp.org>
17822
17823         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
17824         to 'negate'.
17825
17826         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
17827         variable.
17828
17829         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
17830         results.
17831
17832 2005-03-14  Simon Josefsson  <jas@extundo.com>
17833
17834         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
17835         <fx@gnu.org>.
17836
17837 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
17838
17839         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
17840         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
17841         intprops.h.
17842         * lib/strtol.c: Likewise.
17843
17844 2005-03-14  Jim Meyering  <jim@meyering.net>
17845
17846         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
17847         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
17848         to be nonzero so that we (and caller) can detect the difference
17849         between a valid zero-length expansion and an error return, even
17850         when the underlying strftime fails before writing anything into
17851         that location.
17852
17853 2005-03-14  Bruno Haible  <bruno@clisp.org>
17854
17855         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
17856         Update from GNU gettext 0.14.3.
17857
17858 2005-03-10  Jim Meyering  <jim@meyering.net>
17859
17860         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
17861
17862 2005-03-10  Jim Meyering  <jim@meyering.net>
17863
17864         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
17865         so that this module works on systems without fchdir.
17866
17867 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
17868
17869         Factor int-properties macros into a single file, except for
17870         glibc-related files.
17871         * lib/intprops.h: New file.
17872         * lib/getloadavg.c: Include it instead of limits.h.
17873         (INT_STRLEN_BOUND): Remove.
17874         * lib/human.c: Include intprops.h.
17875         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
17876         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
17877         302/1000.
17878         * lib/inttostr.h: Include intprops.h instead of limits.h.
17879         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
17880         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
17881         for consistency with intprops.h.
17882         (time_t_is_integer, twos_complement_arithmetic): Use them.
17883         * lib/sig2str.h: Include <signal.h>, intprops.h.
17884         (INT_STRLEN_BOUND): Remove.
17885         * lib/strftime.c (TYPE_SIGNED): Remove.
17886         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
17887         * lib/strtol.c: Adjust comments to match intprops.h.
17888         * lib/userspec.c: Include intprops.h.
17889         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
17890         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
17891         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
17892         instead of rolling our own expressions.
17893         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
17894
17895         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
17896         instead of int.
17897         (my_strftime): Do not mishandle years close to INT_MAX, by doing
17898         the right thing even if adding 1900 would overflow.  Similarly
17899         for tm_mon + 1 and tm_yday + 1.
17900         Make %Y always equivalent to %C%y, and similarly for %G and %g.
17901         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
17902         (DO_SIGNED_NUMBER): New macro.
17903         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
17904
17905 2005-03-07  Bruno Haible  <bruno@clisp.org>
17906
17907         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
17908
17909 2005-03-07  Bruno Haible  <bruno@clisp.org>
17910
17911         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
17912
17913 2005-03-04  Derek R. Price  <derek@ximbiot.com>
17914
17915         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
17916         (func_import): Only replace files via --import when they have actually
17917         changed.
17918
17919 2005-03-03  Derek R. Price  <derek@ximbiot.com>
17920
17921         * m4/mmap-anon.m4: New file.
17922         * m4/pagealign_alloc.m4: New file.
17923
17924 2005-03-03  Derek R. Price  <derek@ximbiot.com>
17925             Bruno Haible  <bruno@clisp.org>
17926
17927         * modules/pagealign_alloc: New file.
17928         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
17929
17930 2005-03-03  Derek R. Price  <derek@ximbiot.com>
17931             Bruno Haible  <bruno@clisp.org>
17932
17933         * lib/pagealign_alloc.h: New file.
17934         * lib/pagealign_alloc.c: New file.
17935
17936 2005-03-03  Bruno Haible  <bruno@clisp.org>
17937
17938         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
17939         Use an all-permissive copyright notice, recommended by RMS.
17940
17941 2005-03-02  Bruno Haible  <bruno@clisp.org>
17942
17943         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
17944         of AIX, the replacement has to be done only after <string.h> is
17945         included, therefore not in config.h. stpncpy.h does the replacement,
17946         and stpncpy.c uses it.
17947
17948 2005-03-02  Bruno Haible  <bruno@clisp.org>
17949
17950         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
17951         stpncpy.c uses it.
17952
17953 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
17954
17955         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
17956         The workaround isn't strictly needed for POSIX conformance, and
17957         it's too much of a pain to configure and maintain.  We'll ask
17958         people to fix their kernels instead.
17959         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
17960         (NANOSLEEP_BUG_WORKAROUND): Remove.
17961         (xnanosleep): Remove the workaround.
17962
17963 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
17964
17965         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
17966         Reported by Derek Price.
17967         (Include): Add "timespec.h".
17968
17969         * modules/xnanosleep (Depends-on): Remove gethrxtime.
17970
17971 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
17972
17973         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
17974         to detect nanosleep bug.
17975
17976 2005-03-01  Bruno Haible  <bruno@clisp.org>
17977
17978         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
17979
17980 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
17981
17982         * modules/gethrxtime: New file.
17983         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
17984         (Depends-on): Add gethrxtime.
17985         (configure.ac): Add gl_XNANOSLEEP.
17986         (Makefile.am): Remove lib_SOURCES line.
17987
17988 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
17989
17990         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
17991         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
17992
17993 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
17994
17995         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
17996         * lib/timespec.h (gettime): Return void, since it always
17997         succeeds now.  All uses changed.
17998         * lib/gettime.c (gettime) Likewise.
17999         [HAVE_NANOTIME]: Prefer nanotime.
18000         Assume gettimeofday succeeds, as POSIX requires.
18001         Assime time () succeeds, since other code already does.
18002         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
18003         (timespec_subtract): Remove.
18004         (NANOSLEEP_BUG_WORKAROUND): New constant.
18005         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
18006         things considerably.  Use it only on GNU/Linux hosts, since the
18007         workaround shouldn't be needed elsewhere.
18008
18009 2005-02-24  Bruno Haible  <bruno@clisp.org>
18010
18011         * modules/gettext (Files): Add m4/glibc2.m4.
18012
18013 2005-02-24  Bruno Haible  <bruno@clisp.org>
18014
18015         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
18016         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
18017         * m4/progtest.m4:
18018         Update from GNU gettext 0.14.2.
18019         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
18020
18021 2005-02-24  Bruno Haible  <bruno@clisp.org>
18022
18023         * lib/localcharset.c: Update from GNU gettext 0.14.2.
18024         * lib/config.charset: Update from GNU gettext 0.14.2.
18025
18026 2005-02-24  Bruno Haible  <bruno@clisp.org>
18027
18028         * lib/gettext.h: Update from GNU gettext 0.14.2.
18029
18030 2005-02-23  Simon Josefsson  <jas@extundo.com>
18031
18032         * m4/iconvme.m4: New file.
18033
18034 2005-02-23  Jim Meyering  <jim@meyering.net>
18035
18036         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
18037         change.
18038         Thanks to Bruno Haible for catching it.
18039
18040 2005-02-22  Simon Josefsson  <jas@extundo.com>
18041
18042         * modules/iconvme: New file.
18043
18044         * MODULES.html.sh: Add iconvme.
18045
18046 2005-02-22  Simon Josefsson  <jas@extundo.com>
18047
18048         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
18049
18050 2005-02-22  Simon Josefsson  <jas@extundo.com>
18051
18052         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
18053
18054 2005-02-22  Jim Meyering  <jim@meyering.net>
18055
18056         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
18057         s/ifndef/ifdef/.
18058
18059 2005-02-20  Neil Conway  <neilc@samurai.com>
18060
18061         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
18062         returned by OSX/Darwin if the specified buffer is not large
18063         enough for the hostname.
18064
18065 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18066
18067         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
18068         pass it to _help, otherwise the latter coredumps trying to
18069         dereference state.root_argp.
18070
18071 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
18072
18073         * modules/chdir-long (Depends-on): Add memrchr.
18074         * modules/memrchr (Files): Add lib/memrchr.h.
18075         (Include): "memrchr.h".
18076
18077 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
18078
18079         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
18080
18081 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
18082
18083         * lib/memrchr.h: New file.
18084         * lib/chdir-long.c: Include it.
18085         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
18086         Don't bother including stddef.h.
18087
18088 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
18089
18090         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
18091         inclusion.
18092         Include <sys/types.h>, for dev_t.
18093         (ME_DUMMY, ME_REMOTE): Move from here....
18094         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
18095         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
18096         Dmitry V. Levin.
18097         Include mountlist.h first, to test the interface.
18098
18099 2005-01-29  Bruno Haible  <bruno@clisp.org>
18100
18101         * lib/progname.c (program_name): Initialize.
18102         Needed when linking statically on MacOS X.
18103
18104 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
18105
18106         Sync from coreutils.
18107         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
18108         (Depends-on): Add c-strtod.
18109         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
18110
18111 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
18112
18113         Sync from coreutils.
18114         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
18115
18116         Remove files that are specific to coreutils.
18117         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
18118
18119 2005-01-28  Bruno Haible  <bruno@clisp.org>
18120
18121         * modules/javacomp: New file.
18122         * MODULES.html.sh (Java): Add javacomp.
18123
18124 2005-01-28  Bruno Haible  <bruno@clisp.org>
18125
18126         * m4/javacomp.m4: New file, from GNU gettext.
18127
18128 2005-01-28  Bruno Haible  <bruno@clisp.org>
18129
18130         * lib/javacomp.sh.in: New file, from GNU gettext.
18131         * lib/javacomp.h: New file, from GNU gettext.
18132         * lib/javacomp.c: New file, from GNU gettext.
18133
18134 2005-01-26  Simon Josefsson  <jas@extundo.com>
18135
18136         * lib/gai_strerror.c: Use GPL in header.
18137
18138 2005-01-26  Bruno Haible  <bruno@clisp.org>
18139
18140         * modules/javaexec: New file.
18141         * MODULES.html.sh (Java): Add javaexec.
18142
18143 2005-01-26  Bruno Haible  <bruno@clisp.org>
18144
18145         * m4/javaexec.m4: New file, from GNU gettext.
18146
18147 2005-01-26  Bruno Haible  <bruno@clisp.org>
18148
18149         * lib/javaexec.sh.in: New file, from GNU gettext.
18150         * lib/javaexec.h: New file, from GNU gettext.
18151         * lib/javaexec.c: New file, from GNU gettext.
18152
18153 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18154
18155         * modules/lchown (Depends-on): Remove lchown.h
18156
18157 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18158
18159         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
18160         must be defined if the header file was not found, in order
18161         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
18162
18163 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18164
18165         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
18166         initializers for struct pentry_state.
18167         (__argp_error): Check return value of __asprintf
18168         (__argp_failure): Translate error message
18169
18170         * lib/argp-parse.c: Removed braces around the expansion of N_()
18171
18172 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
18173
18174         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
18175         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
18176         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
18177         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
18178         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
18179         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
18180         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
18181         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
18182         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
18183         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
18184         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
18185         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
18186         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
18187         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
18188         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
18189         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
18190         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
18191         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
18192         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
18193         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
18194         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
18195         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
18196         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
18197         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
18198         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
18199         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
18200         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
18201         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
18202         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
18203         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
18204         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
18205         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
18206         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
18207         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
18208         xstrtol.m4, xstrtoumax.m4, yesno.m4:
18209         Use an all-permissive copyright notice, recommended by RMS.
18210
18211 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
18212
18213         * modules/chdir-long (Depends-on): Remove mempcpy.
18214
18215 2005-01-21  Jim Meyering  <jim@meyering.net>
18216
18217         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
18218         same value as for Solaris 9.
18219
18220         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
18221         component length.  This included changing the parameter to be
18222         of type `char *' rather than `char const *'.
18223         * lib/chdir-long.h (chdir_long): Update prototype.
18224
18225         * lib/openat.c (fdopendir, fstatat): New functions.
18226         * lib/openat.h: Include headers required for use of DIR and struct
18227         stat.
18228         [AT_SYMLINK_NOFOLLOW]: Define.
18229         (fdopendir, fstatat): Add prototypes.
18230
18231 2005-01-21  Bruno Haible  <bruno@clisp.org>
18232
18233         * modules/classpath: New file.
18234         * MODULES.html.sh (Java): Add classpath.
18235
18236 2005-01-21  Bruno Haible  <bruno@clisp.org>
18237
18238         * lib/classpath.h: New file, from GNU gettext.
18239         * lib/classpath.c: New file, from GNU gettext.
18240
18241 2005-01-20  Simon Josefsson  <jas@extundo.com>
18242
18243         * modules/version-etc-fsf: New file.
18244
18245 2005-01-20  Simon Josefsson  <jas@extundo.com>
18246
18247         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
18248         * lib/version-etc.c: Remove version_etc_copyright.
18249         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
18250         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
18251
18252 2005-01-20  Simon Josefsson  <jas@extundo.com>
18253
18254         * lib/base64.h (isbase64): Add.
18255
18256         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
18257         using a unsigned prototype, don't inline.
18258         (base64_decode): Use it.
18259
18260 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
18261
18262         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
18263         it.
18264
18265 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
18266
18267         * lib/save-cwd.c (save_cwd): Remove code to support the case
18268         where fchdir is missing or flaky.
18269
18270 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
18271
18272         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
18273
18274 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
18275
18276         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
18277         AC_LIBSOURCES now does this.
18278         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
18279         with new ullong_max module.
18280
18281 2005-01-19  Bruno Haible  <bruno@clisp.org>
18282
18283         * modules/sh-quote: New file.
18284         * MODULES.html.sh (Executing programs): Add sh-quote.
18285
18286 2005-01-19  Bruno Haible  <bruno@clisp.org>
18287
18288         * lib/sh-quote.h: New file, from GNU gettext.
18289         * lib/sh-quote.c: New file, from GNU gettext.
18290
18291 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
18292
18293         Merge from coreutils.
18294         * m4/ullong_max.m4: New file.
18295         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
18296         (gl_MACROS): Assume localeconv exists.
18297
18298 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
18299
18300         Merge changes from coreutils, as described below in several
18301         changelogs dated today.
18302
18303         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
18304         (O_DIRECTORY): Remove; not needed here, since "." must be
18305         a directory.  All uses removed.
18306         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
18307         universal on Suns, and we also need to test for IRIX.
18308         Revamp code to use 'if' rather than '#if'.
18309         Avoid unnecessary comparison of cwd->desc to 0.
18310
18311         * lib/utimens.c (futimens): Robustify the previous patch, by checking
18312         for known valid error numbers rather than observed invalid ones.
18313
18314 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
18315
18316         * modules/ullong_max: New file.
18317
18318         * modules/chdir-long, modules/openat: New files.
18319         * modules/save-cwd (Depends-on): Depend on chdir-long.
18320         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
18321
18322 2005-01-18  Jim Meyering  <jim@meyering.net>
18323
18324         Merge from coreutils.
18325         * m4/chdir-long.m4, m4/openat.m4: New files.
18326         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
18327         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
18328         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
18329         is sane and DOES follow symlinks.  Besides, testing 20 different
18330         systems found no broken chown implementations.
18331         Prompted by a change in rsync's copy of this macro.
18332         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
18333
18334         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
18335
18336         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
18337         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
18338         NULL-means-set-to-current-time semantics.
18339         Remove temporary file immediately, rather than waiting
18340         for configure's at-exit trap code to do it.
18341
18342 2005-01-18  Jim Meyering  <jim@meyering.net>
18343
18344         * lib/version-etc.c (version_etc_copyright): Update copyright date.
18345
18346         * lib/utimens.c (futimens): Account for the fact that futimes
18347         can also fail with errno == ENOSYS or errno == ENOENT.
18348         Patch from Dmitry V. Levin.
18349
18350         Change the name of the robust chdir function from chdir to chdir_long.
18351         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
18352         (restore_cwd): Use chdir_long, not chdir.
18353         * lib/chdir-long.c: Renamed from chdir.c.
18354         * lib/chdir-long.h: Renamed from chdir.h.
18355         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
18356         Hurd.
18357
18358 2005-01-18  Bruno Haible  <bruno@clisp.org>
18359
18360         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
18361         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
18362         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
18363         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
18364         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
18365         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
18366         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
18367         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
18368         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
18369         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
18370         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
18371         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
18372         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
18373         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
18374         Use an all-permissive copyright notice, recommended by RMS.
18375
18376 2005-01-18  Bob Proulx  <bob@proulx.com>
18377
18378         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
18379         simplify offsetof() macro construct to avoid compile failure with
18380         native HP-UX 11.0 ANSI C compiler.
18381
18382 2005-01-17  Bruno Haible  <bruno@clisp.org>
18383
18384         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
18385         redundant because stpncpy.m4 takes care of it.
18386
18387 2005-01-17  Bruno Haible  <bruno@clisp.org>
18388
18389         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
18390
18391 2005-01-17  Bruno Haible  <bruno@clisp.org>
18392
18393         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
18394         used.
18395
18396 2005-01-17  Bruno Haible  <bruno@clisp.org>
18397
18398         * lib/fwriteerror.h (fwriteerror): Change specification to include
18399         fclose.
18400         * lib/fwriteerror.c: Include <stdbool.h>.
18401         (fwriteerror): At the end, close the file stream. Record whether
18402         stdout was already closed.
18403
18404 2005-01-17  Bruno Haible  <bruno@clisp.org>
18405
18406         * lib/execute.c (environ): Declare if needed.
18407         * lib/pipe.c (environ): Likewise.
18408         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
18409
18410 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18411
18412         * modules/argp: Depend on vsnprintf
18413
18414 2005-01-10  Jim Meyering  <jim@meyering.net>
18415
18416         * modules/closeout (Depends-on): Add atexit.
18417
18418 2005-01-06  Bruno Haible  <bruno@clisp.org>
18419
18420         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
18421
18422 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
18423
18424         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
18425         definitions to be after all include files, to avoid collisions.
18426         Problem reported by Bob Proulx.
18427
18428 2005-01-04  Jim Meyering  <jim@meyering.net>
18429
18430         Changes imported from coreutils.
18431         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
18432         as the mkstemp template, use a temporary directory and an
18433         8.3-friendly template to avoid trouble on systems like DJGPP.
18434         Reported by Juan M. Guerrero via Stepan Kasal.
18435         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
18436         close. Remove the temporary directory right away, rather than waiting
18437         for configure's at-exit trap code to do it.
18438         Suggestion from Stepan Kasal.
18439
18440 2005-01-01  Simon Josefsson  <jas@extundo.com>
18441
18442         * gnulib-tool: Print #include directives when --import'ing.
18443
18444 2004-12-28  Simon Josefsson  <jas@extundo.com>
18445
18446         * tests/test-base64.c: Include required header files.  Remove
18447         unused variables.
18448
18449 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
18450
18451         * modules/error (Depends-on): Remove gettext.
18452
18453 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
18454
18455         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
18456         not needed.  This removes a dependency on the gettext module.
18457         [defined _LIBC]: Do not include <libintl.h>; not needed.
18458
18459 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
18460
18461         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
18462         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
18463
18464 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
18465
18466         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
18467         HAVE_DECL_STRTOLD.
18468
18469 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
18470
18471         * modules/getdate (Depends-on): Remove alloca-opt.
18472
18473 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
18474
18475         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
18476
18477 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
18478
18479         * lib/argp-parse.c: Include <stddef.h>.
18480         (alignof, alignto): New macros.
18481         (parser_init): Don't assume that void * is aligned sufficiently
18482         for struct option.
18483
18484         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
18485         need to extend the stack.
18486         (YYINITDEPTH): New macro, so that the initial stack isn't overly
18487         large.
18488
18489 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18490
18491         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
18492
18493 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
18494
18495         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
18496         (2004-10-24) change.  Apparently this was a false alarm.
18497
18498         * modules/getdate: Depend on alloca-opt, not alloca.
18499
18500 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
18501
18502         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
18503         Remove now-obsolete comment about AIX.
18504         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
18505         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
18506         (YYMAXDEPTH): New macro.
18507
18508 2004-12-18  Simon Josefsson  <jas@extundo.com>
18509
18510         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
18511
18512 2004-12-18  Bruno Haible  <bruno@clisp.org>
18513
18514         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
18515
18516 2004-12-18  Bruno Haible  <bruno@clisp.org>
18517
18518         * lib/fatal-signal.c (fatal_signals): Make non-const.
18519         (init_fatal_signals): New function.
18520         (uninstall_handlers, install_handlers): Ignore signals that were set to
18521         SIG_IGN.
18522         (at_fatal_signal): Call init_fatal_signals.
18523         (init_fatal_signal_set): Likewise. Ignore signals that were set to
18524         SIG_IGN.
18525         Reported by Paul Eggert.
18526
18527 2004-12-18  Bruno Haible  <bruno@clisp.org>
18528
18529         * doc/alloca.texi: New file.
18530         * doc/alloca-opt.texi: New file.
18531
18532 2004-12-17  Jim Meyering  <jim@meyering.net>
18533
18534         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
18535         Otherwise, install-sh could exit with improper exit status when
18536         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
18537
18538 2004-12-16  Simon Josefsson  <jas@extundo.com>
18539
18540         * tests/test-base64.c: Add license.
18541
18542 2004-12-15  Stepan Kasal  <address@hidden>
18543
18544         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
18545
18546 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
18547
18548         * modules/getcwd (Files): Add m4/d-ino.m4.
18549         Suggested by Mark D. Baushke.
18550
18551 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
18552
18553         * lib/getdate.y (textint): New member "negative".
18554         (time_zone_hhmm): New function.
18555         Expect 14 shift-reduce conflicts, not 13.
18556         (o_colon_minutes): New rule.
18557         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
18558         (yylex): Set the "negative" member of signed numbers.
18559
18560 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
18561
18562         * doc/getdate.texi (Time of day items, Time zone items):
18563         Describe new formats +00:00, UTC+00:00.
18564
18565 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
18566
18567         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
18568         spurious "-l"s.  Problem reported by Stepan Kasal.
18569
18570 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
18571
18572         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
18573         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
18574
18575 2004-12-04  Simon Josefsson  <jas@extundo.com>
18576
18577         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
18578         Vandoorselaere <yoann@prelude-ids.org>.
18579
18580 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
18581
18582         Changes imported from coreutils.
18583         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
18584         exist.
18585         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
18586
18587 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
18588
18589         Changes imported from coreutils.
18590         * lib/hard-locale.c: Assume <locale.h> exists.
18591         Include "strdup.h".
18592         (GLIBC_VERSION): New macro.
18593         (hard_locale): Assume setlocale exists.
18594         Rewrite to avoid #ifdef.
18595         Use strdup rather than malloc + strcpy.
18596         * lib/human.c: Assume <locale.h> exists.
18597         (human_readable): Assume localeconv exists.
18598
18599 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
18600
18601         * modules/hard-locale (Depends-on): Add strdup.
18602
18603 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
18604
18605         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
18606         convert T2, not T.  (Imported from libc.)
18607
18608 2004-11-30  Simon Josefsson  <jas@extundo.com>
18609
18610         * modules/restrict (License): Change to LGPL.
18611
18612 2004-11-30  Simon Josefsson  <jas@extundo.com>
18613
18614         * m4/restrict.m4: Add copyright and copying conditions.
18615
18616 2004-11-30  Simon Josefsson  <jas@extundo.com>
18617
18618         * m4/base64.m4: New file.
18619
18620 2004-11-30  Simon Josefsson  <jas@extundo.com>
18621
18622         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
18623         base64.
18624
18625         * tests/test-base64.c: New file.
18626
18627         * modules/base64: New file.
18628
18629 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
18630
18631         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
18632         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
18633
18634         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
18635
18636 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
18637
18638         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
18639         (__getcwd.c): Don't restore errno; glibc doesn't.
18640         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
18641         first, falling back to our code only if its results look suspicious.
18642         Ensure that the resulting buffer is only as large as necessary.
18643
18644         * lib/readutmp.c: Include readutmp.h first.
18645         Include <errno.h>, since readutmp.h no longer does that.
18646         * lib/readutmp.h: Don't include <errno.h>,
18647         <sys/param.h>, <time.h>; not needed to establish interface.
18648         (errno): Remove decl.
18649         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
18650         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
18651         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
18652
18653 2004-11-28  Simon Josefsson  <jas@extundo.com>
18654
18655         * lib/base64.h, base64.c: New file.
18656
18657 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
18658
18659         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
18660
18661 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
18662
18663         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
18664         (Depends-on): Remove pathmax, same.  Add mempcpy.
18665         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
18666         (Makefile.am): Append getcwd.h to lib_SOURCES.
18667         (Include): Add getcwd.h.
18668         (Maintainer): Change from Jim Meyering to "all, glibc",
18669         since getdate now uses intended-for-glibc code.
18670         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
18671         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
18672
18673 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
18674
18675         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
18676         HP's ANSI C compiler.
18677         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
18678         Declaring int functions causes warnings on some modern systems and
18679         shouldn't be needed to compile on ancient ones.
18680         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
18681         defined.
18682
18683         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
18684         with the following changes.
18685         (__set_errno): Parenthesize properly.
18686         Include <stdbool.h>.
18687         (MIN, MAX, MATCHING_INO): New macros.
18688         (__getcwd): Define with prototype, not K&R form.
18689         Use heuristics to allocate default buffer on stack if possible.
18690         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
18691         behavior, and to avoid the PATH_MAX limit when computing
18692         ../../../../...
18693         Use MATCHING_INO to compare inode number to file.
18694         Check for arithmetic overflow in size calculations.
18695         Fix bug in reallocation of dot array that caused getcwd to fail
18696         on directories nested deeper than 75.
18697         Be more careful about saving errno on error.
18698         Do not use realloc; use only free+malloc, as this is a bit
18699         more flexible and avoids a needless copy operation.
18700         Do not inspect st_dev and st_ino for symbolic links; POSIX
18701         doesn't specify the latter.
18702         Check for closedir errors.
18703         Avoid needless casts.
18704         Use "#ifdef weak_alias" around weak_alias, to be like other
18705         glibc code.
18706         The following changes to getcwd.c have effect only when used in
18707         gnulib; they have no effect inside glibc proper.
18708         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
18709         as alloca isn't used.
18710         (alloca, __alloca): Likewise.
18711         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
18712         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
18713         unconditionally, as gnulib assumes C89 or better.
18714         Do not include <sys/param.h>.
18715         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
18716         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
18717         better.
18718         (NULL) [!defined NULL]: Remove; we assume C89 or better.
18719         Include <dirent.h> in a way that is compatible with modern Autoconf.
18720         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
18721         New macros, if not already defined.
18722         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
18723         Use "_LIBC", not "defined _LIBC", for consistency.
18724         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
18725         a mempcpy module.
18726         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
18727         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
18728         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
18729         credit only to Jim Meyering and adjust the copyright dates.
18730         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
18731         <stdlib.h>, <unistd.h>, "pathmax.h".
18732         Instead, include "xgetcwd.h" (first) and "getcwd.h".
18733         (INITIAL_BUFFER_SIZE): Remove.
18734         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
18735
18736 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
18737
18738         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
18739         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
18740         Use the _ONCE methods, for efficiency.
18741         Check for fcntl.h.  In test program, include <errno.h>
18742         and <fcntl.h> if available.  Remove old K&R cruft from
18743         test program.  Check for common errors in GNU/Linux,
18744         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
18745         don't do AC_LIBOBJ, as that's getcwd.m4's job.
18746         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
18747         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
18748         name accordingly.
18749         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
18750         accommodate new getcwd.c.
18751         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
18752         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
18753         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
18754         that's all we need now.
18755
18756 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18757
18758         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
18759         argp-parse.c depends on getopt internals, that means we should
18760         always use our getopt, to be on the safe side.
18761         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
18762         order not to spoil the result of an eventual previous invocation
18763         of gl_GETOPT_SUBSTITUTE.
18764
18765 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18766
18767         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
18768         redefinition warnings. To avoid them, include the defines
18769         in `#if !defined __need_getopt ... #endif'. The only place
18770         where __getopt_argv_const is used is in definitions
18771         of getopt_long and getopt_long_only below, which are as well
18772         protected by `#ifndef __need_getopt'.
18773         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
18774         __need_getopt after including <stdio.h> and <unistd.h> These
18775         headers might have defined it.
18776
18777 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
18778
18779         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
18780
18781 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
18782
18783         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
18784         (futimens): New function, which uses futimes if available.
18785         (futimens, utimens): Support timespec==NULL, with same semantics
18786         as utime and utimens.
18787         * lib/utimens.h (futimens): New decl.
18788
18789 2004-11-23  Jim Meyering  <jim@meyering.net>
18790
18791         * lib/getopt_.h: Remove trailing blanks.
18792
18793 2004-11-23  Jim Meyering  <jim@meyering.net>
18794
18795         * lib/__fpending.c: Add comment.
18796
18797 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
18798
18799         * modules/canonicalize (Depends-on): Add xreadlink.
18800         Problem reported by James Youngman.
18801
18802 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
18803
18804         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
18805         New macros.
18806         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
18807         optopt): Use them instead of invoking ## directly; otherwise, the
18808         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
18809
18810 2004-11-19  Bruno Haible  <bruno@clisp.org>
18811
18812         * lib/strtok_r.c: Move comments from here...
18813         * lib/strtok_r.h: ... to here.
18814
18815 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
18816
18817         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
18818         implementations that mishandle size_t overflow.
18819
18820 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
18821
18822         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
18823         might fail.  Problem reported by Yoann Vandoorselaere.
18824         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
18825         implementations that mishandle size_t overflow.
18826
18827 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
18828
18829         * modules/canon-host (Depends-on): Add strdup.
18830
18831 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
18832
18833         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
18834
18835 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
18836
18837         * lib/canon-host.c: Include "strdup.h".
18838         (canon_host): Use getaddrinfo if available, so that IPv6 works.
18839         Use strdup instead of malloc/strcpy to duplicate strings.
18840
18841         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
18842         (human_space_before_unit): New constant.
18843         * lib/human.c (human_readable): Support it.
18844
18845         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
18846         (xgetcwd): Set errno correctly when failing.
18847         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
18848         the failure is actually due to a PATH_MAX problem.
18849
18850         Further getopt changes to make it more likely that glibc will
18851         buy the changes back.
18852         * lib/getopt.c (POSIXLY_CORRECT): New constant.
18853         (getopt): Use it, so to preserve glibc semantic
18854         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
18855         when compiling for libc.
18856         * lib/getopt_.h (__getopt_argv_const): Bring it back.
18857         (getopt_long, getopt_long_only): Use it.
18858
18859         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
18860         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
18861         (getopt): Argv is now char * const *, as per standard.
18862         (_getopt_internal_r, _getopt_internal): Argv is now char **,
18863         not char *__getopt_argv_const *.
18864         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
18865         _getopt_long_only_r): Likewise.
18866         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
18867         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
18868         _getopt_long_r, _getopt_long_only_r): Likewise.
18869         * lib/getopt_.h (__getopt_argv_const): Remove.
18870         (getopt): Argv is now char * const *, as per standard.
18871
18872         * lib/getdate.y (tORDINAL): New token.
18873         (day, relunit): Allow it for relative times.
18874         (relative_time_table): Use tORDINAL for ordinals.
18875
18876 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
18877
18878         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
18879         Document that "second" isn't allowed as an ordinal number.
18880
18881 2004-11-16  Jim Meyering  <jim@meyering.net>
18882
18883         * modules/closeout (Depends-on): Add fpending.
18884
18885 2004-11-15  Jim Meyering  <jim@meyering.net>
18886
18887         * lib/closeout.c: Include "__fpending.h" once again.
18888         Include <stdbool.h>.
18889         (close_stdout): Don't fail just because stdout was closed initially,
18890         since some programs don't write to stdout in the normal course of
18891         operation (other than --version and --help), and we don't want this
18892         function to make e.g. `touch file >&-' fail.
18893         But do fail if it was closed and someone has tried to write to it.
18894         E.g., `printf foo >&-' must fail.
18895
18896 2004-11-13  Jim Meyering  <jim@meyering.net>
18897
18898         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
18899
18900 2004-11-12  Simon Josefsson  <jas@extundo.com>
18901
18902         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
18903         small doc fix is still pending.
18904
18905 2004-11-11  Simon Josefsson  <jas@extundo.com>
18906
18907         * modules/strtok_r: New file.
18908
18909         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18910         strtok_r.
18911
18912 2004-11-11  Simon Josefsson  <jas@extundo.com>
18913
18914         * m4/strtok_r.m4: New file.
18915
18916         * m4/getopt.m4: Replace opterr.
18917
18918 2004-11-11  Simon Josefsson  <jas@extundo.com>
18919
18920         * lib/strtok_r.h, strtok_r.c: New file.
18921
18922 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
18923
18924         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
18925         of replacing opterr, getopt, etc.  This should handle the
18926         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
18927
18928 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
18929
18930         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
18931         we can stop lying to compilers about the constness of argv when we
18932         are compiled outside glibc.
18933         (getopt, getopt_long, getopt_long_only): Use it.
18934         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
18935         _getopt_internal, getopt): Likewise.
18936         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
18937         _getopt_long_only_r): Likewise.
18938         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
18939         _getopt_long_r, _getopt_long_only_r): Likewise.
18940
18941         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
18942         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
18943         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
18944         the other external symbols.
18945         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
18946         declaration, since the above renaming now works around collisions.
18947
18948 2004-11-11  Jim Meyering  <jim@meyering.net>
18949
18950         * lib/linebreak.c: Remove trailing blanks.
18951         * lib/alloca_.h: Likewise.
18952         * lib/acosl.c: Likewise.
18953         * lib/euidaccess.c: Likewise.
18954         * lib/allocsa.h: Likewise.
18955
18956 2004-11-10  Simon Josefsson  <jas@extundo.com>
18957
18958         * m4/getaddrinfo.m4: New file.
18959
18960 2004-11-10  Simon Josefsson  <jas@extundo.com>
18961
18962         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
18963
18964 2004-11-10  Simon Josefsson  <jas@extundo.com>
18965
18966         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18967         getaddrinfo.
18968
18969         * modules/getaddrinfo: New file.
18970
18971 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
18972
18973         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
18974
18975 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
18976
18977         * lib/mktime.c (SHR): New macro, which is a portable
18978         substitute for >> that should work even on Crays.
18979         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
18980         Problem reported by Mark D. Baushke in
18981         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
18982         * lib/getdate.y (SHR): Likewise.
18983         (tm_diff): Use it.
18984         * lib/strftime.c (SHR): Likewise.
18985         (tm_diff): Use it.
18986         * lib/quotearg.c (struct quoting_options): Use unsigned int for
18987         quote_these_too, so that right shifts are well defined.  All uses
18988         changed.
18989
18990 2004-11-10  Jim Meyering  <jim@meyering.net>
18991
18992         Ensure that no close failure goes unreported.
18993         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
18994         return early when it seems there's nothing to flush.
18995         Don't include __fpending.h.
18996
18997 2004-11-10  Jim Meyering  <jim@meyering.net>
18998
18999         * modules/closeout (Depends-on): Remove fpending.
19000
19001 2004-11-10  Jim Meyering  <jim@meyering.net>
19002
19003         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
19004
19005 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
19006
19007         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
19008         gl_FUNC_STRFTIME.
19009         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
19010         and AC_REQUIRE when possible, to avoid duplicate checks.
19011         Check for <wchar.h>.
19012
19013 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
19014
19015         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
19016
19017 2004-11-09  Bruno Haible  <bruno@clisp.org>
19018
19019         * m4/sockpfaf.m4: New file.
19020
19021 2004-11-05  Bruno Haible  <bruno@clisp.org>
19022
19023         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
19024         Reported by Mark D. Baushke <mdb@cvshome.org>.
19025
19026 2004-11-04  Bruno Haible  <bruno@clisp.org>
19027
19028         2004-09-11  Bruno Haible  <bruno@clisp.org>
19029                 * allocsa.valgrind: New file.
19030         2004-02-06  Bruno Haible  <bruno@clisp.org>
19031                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
19032                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
19033                 Reported by Christopher Seip <chris.seip@hp.com>.
19034
19035 2004-11-04  Bruno Haible  <bruno@clisp.org>
19036
19037         * modules/allocsa (Files): Add lib/allocsa.valgrind.
19038         (Makefile.am): Distribute it.
19039
19040 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
19041
19042         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
19043         with errno == ERANGE if the buffer is too small.
19044         Problem reported by Mark D. Baushke.
19045
19046 2004-11-03  Albert Chin  <china@thewrittenword.com>
19047             Paul Eggert  <eggert@cs.ucla.edu>
19048
19049         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
19050         equivalent, substitute $ac_type for equivalent type rather than
19051         blindly using uint32_t *always* which won't work if uint32_t is not
19052         available.  Define _UINT32_T to work around typedef of uint32_t if
19053         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
19054         2.5.1.
19055
19056 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
19057
19058         * m4/jm-macros.m4: Sync from coreutils.
19059         (gl_MACROS): Check for mbrlen, for pathchk.
19060         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
19061
19062 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
19063
19064         * lib/xreadlink.c (MAXSIZE): New macro.
19065         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
19066         size does not exceed MAXSIZE.  Avoid cast.
19067         As suggested by Mark D. Baushke in
19068         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
19069         if readlink fails with buffer size just under MAXSIZE, try again
19070         with MAXSIZE.
19071
19072 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
19073
19074         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
19075
19076 2004-11-02  Derek R. Price  <derek@ximbiot.com>
19077         and  Paul Eggert  <eggert@cs.ucla.edu>
19078
19079         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
19080         (get_date): Overparenthesize to avoid GCC warning.
19081
19082 2004-11-02  Bruno Haible  <bruno@clisp.org>
19083
19084         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
19085         returns void.
19086
19087 2004-11-02  Bruno Haible  <bruno@clisp.org>
19088
19089         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
19090         function returns void.
19091
19092 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
19093
19094         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
19095         fflush_unlocked, flockfile, funlockfile, funlockfile,
19096         fputs_unlocked, putc_unlocked.
19097
19098 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
19099
19100         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
19101         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
19102         already declared.
19103
19104 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
19105
19106         * modules/getdate (Files): Add doc/getdate.texi.
19107         (Depends-on): Add setenv, xalloc.
19108
19109 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
19110
19111         * lib/getdate.y: Add support for TZ="foo" within a date string.
19112         Fix some bugs near time_t boundaries.  Reject dates with
19113         out-of-range components, e.g., "Sept 31".
19114         Include <stdlib.h>, "setenv.h", "xalloc.h".
19115         (ISDIGIT_LOCALE): Remove; unused.
19116         Note that the TZ and time functions used here are not reentrant.
19117         (mktime_ok, get_tz): New functions.
19118         (TZBUFSIZE): New constant.
19119         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
19120         This requires that we sometimes generate our own TZ="XXX..." setting.
19121
19122 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
19123
19124         * doc/getdate.texi: New file, from coreutils with modifications for
19125         the new TZ parsing.
19126
19127 2004-10-27  Derek R. Price  <derek@ximbiot.com>
19128
19129         * lib/mktime.c (not_equal_tm): Remove redundant check.
19130
19131 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
19132
19133         * modules/regex (lib_SOURCES): Add regex.c.
19134         Reported by James Youngman in
19135         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
19136
19137 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
19138
19139         * lib/getdate.y: Use Bison 1.875 features, and some minor
19140         code cleanups.  This change does not affect semantics.
19141         Don't include <stdlib.h>; no longer needed.
19142         Don't include unlocked-io.h; only the "#if TEST" code uses
19143         stdio, and performance isn't crucial there.
19144         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
19145         Bison 1.875 features as described below.
19146         All uses of "PC." replaced by "pc->".
19147         (YYSTYPE): Add a forward declaration.
19148         (yylex, yyerror): Use full prototypes in forward decls.
19149         Use "%pure-parser" rather than obsolescent "%pure_parser".
19150         Use %parse-param and %lex-param instead of obsolescent
19151         YYPARSE_PARAM and YYLEX_PARAM.
19152         (meridian_table, month_and_day_table, time_units_table,
19153         relative_time_table, time_zone_table, military_table,
19154         lookup_zone, lookup_word, get_date):
19155         Use NULL instead of 0 where appropriate.
19156         (to_hour): Avoid abort (), to avoid a dependency on
19157         stdlib.h.
19158         (yyerror, yylex): Now accepts parser_control * arg.
19159         (main) [TEST]: Use '\0' rather than 0 for char.
19160
19161 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
19162
19163         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
19164
19165 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
19166
19167         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
19168         It's now the caller's responsibility to handle the case where
19169         !HAVE_GETPAGESIZE && !defined getpagesize.
19170
19171         * lib/mktime.c (leapyear): Arg is long int, not int.
19172
19173 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
19174
19175         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
19176
19177 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
19178
19179         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
19180         missing.  Problem reported by James Youngman.
19181
19182 2004-10-16  Simon Josefsson  <jas@extundo.com>
19183
19184         * gnulib-tool: Fix comments.  Fix parse problem.
19185         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
19186
19187 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
19188
19189         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
19190         implementation of getopt_long.  Problem reported by Alexander Taler in:
19191         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
19192
19193 2004-10-15  Bruno Haible  <bruno@clisp.org>
19194
19195         * gnulib-tool: Untabify. Initialize supplied_libname.
19196         (func_usage): More homogenous output.
19197         (func_modules_transitive_closure, func_modules_to_filelist,
19198         func_emit_lib_Makefile_am): New functions.
19199         (func_import): New function, extracted from big case statement. Use
19200         func_get_license, func_modules_transitive_closure,
19201         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
19202         opt_lgpl. Don't use test -a, as it's not portable.
19203         (func_create_testdir): Use func_modules_transitive_closure,
19204         func_modules_to_filelist, func_emit_lib_Makefile_am.
19205
19206 2004-10-15  Bruno Haible  <bruno@clisp.org>
19207
19208         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
19209
19210 2004-10-15  Bruno Haible  <bruno@clisp.org>
19211
19212         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
19213         the portions belonging to each module.
19214         Suggested by Derek Robert Price <derek@ximbiot.com>.
19215
19216 2004-10-12  Simon Josefsson  <jas@extundo.com>
19217
19218         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
19219         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
19220         to real functions.
19221
19222 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19223
19224         * modules/vsnprintf: New file.
19225
19226 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19227
19228         * m4/vsnprintf.m4: New file.
19229
19230 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19231
19232         * lib/vsnprintf.h: New file.
19233         * lib/vsnprintf.c: New file.
19234
19235 2004-10-11  Bruno Haible  <bruno@clisp.org>
19236
19237         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
19238         vsnprintf.
19239
19240 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
19241
19242         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
19243
19244 2004-10-07  Bruno Haible  <bruno@clisp.org>
19245
19246         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
19247         fits into the provided buffer.
19248
19249 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
19250
19251         * lib/diacrit.c, diacrit.h: Add GPL notice.
19252
19253         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
19254         notice.
19255         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
19256         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
19257         This avoids a potential constant-folding bug.
19258
19259 2004-10-05  Bruno Haible  <bruno@clisp.org>
19260
19261         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
19262         for the declaration of strsep.
19263
19264 2004-10-05  Bruno Haible  <bruno@clisp.org>
19265
19266         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
19267
19268 2004-10-04  Simon Josefsson  <jas@extundo.com>
19269
19270         * modules/memmem: New file.
19271         * tests/test-memmem.c: New file.
19272         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
19273
19274 2004-10-04  Simon Josefsson  <jas@extundo.com>
19275
19276         * m4/memmem.m4: New file.
19277
19278 2004-10-04  Simon Josefsson  <jas@extundo.com>
19279
19280         * lib/memmem.h: New file.
19281         * lib/memmem.c: New file, taken from glibc.
19282
19283 2004-10-04  Simon Josefsson  <jas@extundo.com>
19284
19285         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
19286         '#ifdef USE_UNLOCKED_IO'.
19287
19288 2004-10-04  Simon Josefsson  <jas@extundo.com>
19289
19290         * config/srclist.txt: Add memmem from glibc.
19291
19292 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
19293
19294         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
19295
19296         * modules/argmatch, modules/argp, modules/closeout, modules/error,
19297         modules/exclude, modules/getdate, modules/getline,
19298         modules/getndelim2, modules/getpass, modules/getpass-gnu,
19299         modules/getusershell, modules/linebuffer, modules/md5,
19300         modules/mountlist, modules/posixtm, modules/readtokens,
19301         modules/readutmp, modules/regex, modules/sha1,
19302         modules/version-etc, modules/yesno:
19303         Remove dependency on unlocked-io.
19304
19305 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
19306
19307         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
19308
19309         * m4/unlocked-io.m4: Add copyright notice.
19310         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
19311
19312 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
19313
19314         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
19315         * lib/xmalloc.c (xmemdup): Likewise.
19316         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
19317         XFREE): Remove these long-obsolescent macros.
19318         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
19319         * lib/xstrdup.c: Remove.
19320
19321         * lib/regex.c (re_comp): Cast gettext return value to char *,
19322         Problem reported by Martin Neitzel via Mark D. Baushke.
19323
19324 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
19325
19326         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
19327         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
19328         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
19329         regex.c, sha1.c, version-etc.c, yesno.c:
19330         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
19331         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
19332         the includer's responsibility.
19333
19334         Sync from coreutils.
19335
19336         * lib/modechange.c (mode_compile): Don't decrement a pointer that
19337         points to the start of a string, as the C Standard says the
19338         resulting behavior is undefined.
19339
19340         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
19341         simple -> simple_backups, numbered_existing ->
19342         numbered_existing_backups, numbered -> numbered_backups
19343         to avoid shadowing problems.  All uses changed.
19344         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
19345         * lib/backupfile.c (check_extension, numbered_backup):
19346         Rename locals to avoid shadowing 'basename'.
19347         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
19348         once.
19349
19350         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
19351         * lib/.cvsignore: Add getopt.h.
19352
19353 2004-10-04  Bruno Haible  <bruno@clisp.org>
19354
19355         * modules/README: New file.
19356         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
19357         not a module.
19358
19359 2004-10-02  Jim Meyering  <jim@meyering.net>
19360
19361         * lib/dirfd.h, getpagesize.h: Add copyright notice.
19362
19363 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19364
19365         * modules/strsep: New file.
19366
19367 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19368
19369         * m4/strsep.m4: New file.
19370
19371 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19372
19373         * lib/strsep.h: New file.
19374         * lib/strsep.c: New file.
19375
19376 2004-10-01  Simon Josefsson  <jas@extundo.com>
19377
19378         * lib/snprintf.c (snprintf): Handle size==0.
19379
19380 2004-10-01  Simon Josefsson  <jas@extundo.com>
19381             Bruno Haible  <bruno@clisp.org>
19382
19383         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
19384         (snprintf): Declare 'args'.
19385
19386 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
19387
19388         * lib/snprintf.c: Remove comments as to why each header is needed.
19389
19390 2004-10-01  Bruno Haible  <bruno@clisp.org>
19391
19392         * MODULES.html.sh: Add strsep.
19393
19394 2004-09-30  Simon Josefsson  <jas@extundo.com>
19395
19396         * modules/snprintf: New file.
19397
19398 2004-09-30  Simon Josefsson  <jas@extundo.com>
19399
19400         * m4/snprintf.m4: New file.
19401
19402 2004-09-30  Simon Josefsson  <jas@extundo.com>
19403
19404         * lib/snprintf.h, lib/snprintf.c: New files.
19405
19406 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19407
19408         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
19409         (hol_entry_help): Never translate an empty string.
19410         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
19411         * lib/argp.h (OPTION_NO_TRANS): New option.
19412
19413 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
19414
19415         * modules/argp (Maintainer): Replace Simon Josefsson
19416         by Sergey Poznyakoff.
19417
19418 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
19419
19420         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
19421         changes merged back into glibc.
19422
19423 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
19424
19425         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
19426
19427 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
19428
19429         * lib/xvasprintf.c: Include xalloc.h.
19430         (xvasprintf): Use xalloc_die, not xmalloc_die.
19431
19432 2004-09-29  Bruno Haible  <bruno@clisp.org>
19433
19434         * modules/alloca-opt: New file, derived from modules/alloca.
19435         * modules/allocsa: Depend on alloca-opt instead of alloca.
19436         * modules/setenv: Likewise.
19437         * modules/vasnprintf: Likewise.
19438         * MODULES.html.sh: Add alloca-opt.
19439
19440 2004-09-28  Simon Josefsson  <jas@extundo.com>
19441
19442         * gnulib-tool: New parameter --lgpl, to asseert that modules are
19443         LGPL, and to replace license template from GPL to LGPL.
19444
19445 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
19446
19447         * modules/dummy: Change license to LGPL.
19448
19449 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
19450
19451         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
19452
19453 2004-09-24  Simon Josefsson  <jas@extundo.com>
19454
19455         * modules/minmax (License): Change from GPL to LGPL.
19456
19457 2004-09-23  Simon Josefsson  <jas@extundo.com>
19458
19459         * gnulib-tool (--import): Typo.
19460
19461 2004-09-23  Simon Josefsson  <jas@extundo.com>
19462
19463         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
19464
19465 2004-09-22  Bruno Haible  <bruno@clisp.org>
19466
19467         * modules/*: Add 'License' field.
19468         * gnulib-tool: Accept --extract-license option.
19469         (func_get_license): New function.
19470
19471 2004-09-21  Bruno Haible  <bruno@clisp.org>
19472
19473         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
19474         Reported by Simon Josefsson.
19475
19476 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
19477
19478         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
19479         gl_AC_TYPE_LONG_LONG.
19480
19481 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
19482
19483         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
19484
19485 2004-09-18  Simon Josefsson  <jas@extundo.com>
19486         and  Paul Eggert  <eggert@cs.ucla.edu>
19487
19488         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
19489         calls with autoreconf.  Define GL_LIB.
19490
19491 2004-09-14  Karl Berry  <karl@gnu.org>
19492
19493         * config/srclist.txt: unsync setenv.c, sigh.
19494
19495 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
19496
19497         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
19498         Problem reported by Bruno Haible in:
19499         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
19500
19501 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
19502
19503         * config/srclist.txt: Comment out argp-pvh.c.
19504
19505 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
19506
19507         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
19508         in case some system header has #define'd it.  Problem reported by
19509         Soeren D. Schulze in
19510         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
19511
19512 2004-09-09  Karl Berry  <karl@gnu.org>
19513
19514         * regex.[ch]: delete from the root.  These were supposed to be
19515                 synced with emacs cvs, but this has not happened for about
19516                 a year, and anyway nothing else uses emacs regex.[ch].
19517                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
19518                 lib/regex[.ch] is untouched.
19519
19520 2004-09-09  Bruno Haible  <bruno@clisp.org>
19521
19522         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
19523
19524 2004-09-09  Bruno Haible  <bruno@clisp.org>
19525
19526         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
19527         modifications.
19528         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
19529
19530 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
19531
19532         * modules/xvasprintf: New file.
19533         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
19534
19535 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
19536
19537         * lib/xvasprintf.h: New file.
19538         * lib/xvasprintf.c: New file.
19539         * lib/xasprintf.c: New file.
19540
19541 2004-09-08  Bruno Haible  <bruno@clisp.org>
19542
19543         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
19544
19545 2004-09-08  Bruno Haible  <bruno@clisp.org>
19546
19547         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
19548         length is > INT_MAX.
19549         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
19550         more.
19551
19552 2004-09-08  Bruno Haible  <bruno@clisp.org>
19553
19554         * lib/stdint_.h: New file, taken from GNU clisp.
19555
19556 2004-09-08  Bruno Haible  <bruno@clisp.org>
19557             Oskar Liljeblad  <oskar@osk.mine.nu>
19558
19559         * modules/stdint: New file.
19560         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
19561
19562 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19563
19564         Import from coreutils.
19565         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
19566         strings on unbounded length.  alloca's performance benefits aren't
19567         that important here.
19568         (V_STRDUP): Remove.
19569         (parse_with_separator): New function, with most of the internals
19570         of the old parse_user_spec.  Allow user to omit both user and group,
19571         for compatibility with FreeBSD.
19572         Clone only the user name, not the entire spec.
19573         Do not set *uid, *gid unless entirely successful.
19574         Avoid memory leak in some failing cases.
19575         Fix regression for USER.GROUP reported by Dmitry V. Levin in
19576         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
19577         (parse_user_spec): Rewrite to use parse_with_separator.
19578
19579 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19580
19581         * modules/userspec: Don't depend on alloca.
19582
19583 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19584
19585         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
19586
19587 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
19588
19589         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
19590         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
19591         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
19592
19593 2004-08-16  Simon Josefsson  <jas@extundo.com>
19594
19595         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
19596         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
19597         Add --dry-run for --import.
19598         Let user provided command line parameters override configure.ac
19599         settings.
19600
19601 2004-08-12  Simon Josefsson  <jas@extundo.com>
19602
19603         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
19604         as discussed with Paul Eggert in threads rooted at
19605         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
19606         and
19607         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
19608         Before, the test was empty, and relied on ELIDE_CODE in source
19609         code.)
19610         (gl_PREREQ_GETOPT): New macro.
19611         (gl_GETOPT): Use them.
19612
19613 2004-08-12  Simon Josefsson  <jas@extundo.com>
19614
19615         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
19616         * lib/getopt_.h: Renamed from getopt.h.
19617
19618 2004-08-12  Simon Josefsson  <jas@extundo.com>
19619
19620         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
19621         Change default library name from libfoo to libgnu.
19622         Now, if you have a configure.ac that says:
19623                 gl_SOURCE_BASE(gl)
19624                 gl_M4_BASE(gl/m4)
19625                 gl_MODULES(error getopt etcetera)
19626                 gl_INIT
19627         you can import all you need by running:
19628                 ../gnulib/gnulib-tool --import
19629
19630         * modules/getopt (Files): Rename getopt.h to getopt_.h.
19631         (Makefile.am): Rewrite, use logic from argz.
19632         (Include): Use <getopt.h> instead of "getopt.h".
19633
19634 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
19635
19636         * modules/argp (Files): Add m4/unlocked-io.m4.
19637         (Depends-on): Add extensions.
19638
19639 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
19640
19641         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
19642         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
19643         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
19644         Check for program_invocation_name, program_invocation_short_name,
19645         flockfile, funlockfile, features.h, _getopt_long_only_r.
19646
19647 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
19648
19649         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
19650         its complicated substitute.
19651         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
19652         and program_invocation_name.
19653         (__argp_basename) [!_LIBC]: Remove; the only use was
19654         replaced by its body.
19655         (__argp_short_program_name): Change condition from
19656         !defined __argp_short_program_name to
19657         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
19658         to match argp-namefrob.h.
19659         (__argp_failure): Don't assume strerror_r returns char *.
19660         * lib/argp-parse.c (N_): Define unconditionally.
19661         (argp_default_options): Fill out initializers with 0 to avoid
19662         gcc warnings.
19663
19664 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
19665
19666         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
19667         getopt1.c.
19668
19669 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
19670
19671         Merge from coreutils.
19672
19673         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
19674
19675         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
19676         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
19677
19678 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
19679
19680         Merge from coreutils.
19681
19682         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
19683         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
19684         for Reliant Unix 5.43.
19685
19686         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
19687         (union fooround): Use uintmax_t, not long int.
19688         The rest is a merge from libc:
19689         [defined _LIBC]: Include <shlib-compat.h>.
19690         (_obstack) [defined _LIBC]: Remove after 2.3.4.
19691
19692         * lib/settime.c (settime): Recode to avoid warning with
19693         Sun Forte C 6U2.
19694
19695         * lib/strverscmp.c: Convert to UTF-8.
19696
19697 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
19698
19699         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
19700         m4/uintmax_t.m4.
19701
19702 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
19703
19704         * modules/xalloc-die: New file.
19705         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
19706
19707         * modules/md5 (Files): Add m4/uint32_t.m4.
19708         * modules/sha1: Renamed from modules/sha.
19709         (Files):
19710         Rename lib/sha.h to lib/sha1.h.
19711         Rename lib/sha.c to lib/sha1.c.
19712         Rename m4/sha.m4 to m4/sha1.m4.
19713         (lib_SOURCES): Likewise.
19714         (configure.ac): Rename gl_SHA to gl_SHA1.
19715         (Include): sha.h -> sha1.h.
19716
19717 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
19718
19719         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
19720         * m4/sha1.m4: Renamed from sha.m4.
19721         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
19722
19723 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
19724
19725         * lib/obstack.h (obstack_empty_p):
19726         Don't assume that chunk->contents is suitably aligned.
19727         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
19728         Likewise. Problem reported by Benno in
19729         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
19730
19731         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
19732         readable.  This could be improved further but it'd take some work.
19733
19734 2004-08-08  Simon Josefsson  <jas@extundo.com>
19735
19736         * modules/xgethostname (Depends-on): Remove exit and error (not
19737         used).
19738
19739         * modules/getpass-gnu: Add getpass.h.
19740         (Depends-on): Add stdbool.
19741         * modules/getpass: Add getpass.h.
19742
19743 2004-08-08  Simon Josefsson  <jas@extundo.com>
19744
19745         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
19746         Check getpass declaration.
19747
19748 2004-08-08  Simon Josefsson  <jas@extundo.com>
19749
19750         * lib/xgethostname.c: Don't include error.h (not used).
19751
19752         * lib/getpass.h: Add.
19753         * lib/getpass.c: Include getpass.h first.
19754
19755 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
19756
19757         * lib/xalloc-die.c: New file.
19758         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
19759         All uses removed.
19760         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
19761         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
19762         xalloc-die.c.
19763         (_, N_, xalloc_die): Move to xalloc-die.c.
19764         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
19765         so that we needn't mess with xalloc_msg_memory_exhausted.
19766
19767         * lib/sha1.h: Renamed from sha.h.
19768         (SHA1_H): Renamed from _SHA_H.
19769         (sha1_ctx): Renamed from sha_ctx.
19770         (sha1_init_ctx): Renamed from sha_init_ctx.
19771         (sha1_process_block): Renamed from sha_process_block.
19772         (sha1_process_bytes): Renamed from sha_process_bytes.
19773         (sha1_finish_ctx): Renamed from sha_finish_ctx.
19774         (sha1_read_ctx): Renamed from sha_read_ctx.
19775         (sha1_stream): Renamed from sha_stream.
19776         (sha1_buffer): Renamed from sha_buffer.
19777         * lib/sha1.c: Likewise; renamed from sha.c.
19778         Do not include <sys/types.h>.
19779         Include <stddef.h> rather than <stdlib.h>.
19780
19781 2004-08-08  Bruno Haible  <bruno@clisp.org>
19782
19783         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
19784         FILESYSTEM_PREFIX_LEN.
19785         * lib/progreloc.c: Likewise.
19786         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
19787
19788 2004-08-06  Simon Josefsson  <jas@extundo.com>
19789
19790         * modules/progname (Depends-on): Don't depend on stdbool.
19791
19792 2004-08-06  Simon Josefsson  <jas@extundo.com>
19793
19794         * modules/getsubopt: New file.
19795         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19796         getsubopt.
19797
19798 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
19799
19800         More merge from coreutils.
19801
19802         * m4/utimens.m4, m4/utimecmp.m4: New files.
19803         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
19804         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
19805         prereq.m4, sha.m4: Import changes from coreutils.
19806
19807 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
19808
19809         More merge from coreutils.
19810         * modules/raise, modules/readtokens0, modules/utimens:
19811         * modules/utimecmp, module/xnanosleep: New files.
19812         * modules/strftime: Add lib/strftime.h.
19813         Change include from <time.h> to "strftime.h".
19814         * modules/yesno: Add lib/yesno.h.
19815         * modules/backupfile: Remove lib/addext.c.
19816         * modules/euidaccess: Add stat-macros.h.
19817         * modules/canonicalize, modules/euidaccess,
19818         modules/filemode, modules/lchown, modules/makepath,
19819         modules/rmdir, modules/stat: Likewise.
19820
19821 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
19822
19823         Merge from tar.
19824         * lib/argp-help.c (make_hol, hol_append): Don't assume that
19825         SIZE_MAX is a valid preprocessor constant.
19826         (__argp_basename): Change from "#ifndef _LIBC"
19827         to "#ifndef __argp_short_program_name", so that
19828         we don't compile these functions for tar.
19829
19830         More merges from coreutils.
19831         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
19832         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
19833         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
19834         * lib/addext.c: Remove; no longer needed.
19835         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
19836         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
19837         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
19838         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
19839         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
19840         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
19841         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
19842         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
19843         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
19844         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
19845         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
19846         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
19847         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
19848         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
19849         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
19850         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
19851         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
19852         Import changes from coreutils.
19853
19854 2004-08-05  Simon Josefsson  <jas@extundo.com>
19855
19856         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
19857
19858 2004-08-05  Simon Josefsson  <jas@extundo.com>
19859
19860         * m4/getsubopt.m4: New file.
19861
19862 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
19863
19864         Merge from coreutils.
19865
19866         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
19867         * m4/getcwd-path-max.m4: New files.
19868
19869         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
19870         FILESYSTEM_PREFIX_LEN ->
19871         FILE_SYSTEM_PREFIX_LEN.
19872         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
19873         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
19874         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
19875         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
19876
19877         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
19878         prerequisite modules now handle the DOS stuff.
19879         Don't check for unistd.h.
19880
19881 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
19882
19883         Merge from coreutils.
19884
19885         * lib/.gdb-history: Remove; this doesn't belong here.
19886
19887         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
19888         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
19889         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
19890         * lib/getcwd.c: New files.
19891
19892         * lib/dirname.h: Include <stdbool.h>.
19893         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
19894         for consistency with POSIX terminology.  All uses changed.
19895         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
19896         (strip_trailing_slashes): Use bool for booleans.
19897         * lib/stripslash.c (strip_trailing_slashes): Likewise.
19898
19899         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
19900         sometimes returns a positive errno value even when it succeeds.
19901         (print_errno_message) [!LIBC]: Fall back on strerror if
19902         __strerror_r fails.
19903
19904         * lib/path-concat.c (mempcpy): Don't define if a system header defines
19905         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
19906         (longest_relative_suffix): New function.
19907         (path_concat): Use it.  Assume first argument is not NULL.
19908         Port to DOS.  Omit redundant separators.
19909         Report an error instead of returning NULL.
19910         Use mempcpy instead of memcpy.
19911         (xpath_concat): Remove: not declared or used.
19912
19913         * lib/same.h: Include <stdbool.h>
19914         (same_name): Return bool, not int.
19915         * lib/same.c (same_name): Likewise.
19916         (errno): Don't declare; we assume C89 or better now.
19917
19918         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
19919         if not already defined.
19920
19921         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
19922         * lib/dup-safer.c (errno): Likewise.
19923
19924 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
19925
19926         Merge from coreutils.
19927         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
19928         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
19929         * modules/path-concat: Don't depend on strdup.
19930
19931 2004-08-03  Simon Josefsson  <jas@extundo.com>
19932
19933         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
19934         * lib/progname.h: Don't include stdbool.h.
19935
19936 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
19937
19938         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
19939         * MODULES.html.sh (func_all_modules): Remove fatal.
19940
19941 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
19942
19943         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
19944
19945 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
19946
19947         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
19948         working.
19949
19950 2004-08-02  Simon Josefsson  <jas@extundo.com>
19951
19952         * lib/getsubopt.h: New file, with comments from Bruno Haible.
19953         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
19954         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
19955
19956 2004-08-01  Simon Josefsson  <jas@extundo.com>
19957
19958         * lib/xgetdomainname.c: Include stdlib.h, for free().
19959
19960 2004-07-19  Bruno Haible  <bruno@clisp.org>
19961
19962         * MODULES.html.sh (func_all_modules): Add dummy.
19963
19964 2004-07-16  Simon Josefsson  <jas@extundo.com>
19965
19966         * modules/dummy: New file.
19967
19968 2004-07-16  Simon Josefsson  <jas@extundo.com>
19969
19970         * lib/dummy.c: New file.
19971
19972 2004-07-16  Bruno Haible  <bruno@clisp.org>
19973
19974         * lib/backupfile.h: Add extern "C" for C++.
19975         * lib/closeout.h: Likewise.
19976         * lib/copy-file.h: Likewise.
19977         * lib/findprog.h: Likewise.
19978         * lib/full-write.h: Likewise.
19979         * lib/pathname.h: Likewise.
19980         * lib/progname.h: Likewise.
19981         * lib/stpcpy.h: Likewise.
19982         * lib/stpncpy.h: Likewise.
19983         * lib/strcase.h: Likewise.
19984         * lib/strstr.h: Likewise.
19985         * lib/xalloc.h: Likewise.
19986
19987         * lib/mbswidth.h: Add extern "C" for C++.
19988         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
19989
19990 2004-07-13  Robert Millan  <robertmh@gnu.org>
19991
19992         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
19993
19994 2004-07-09  Simon Josefsson  <jas@extundo.com>
19995
19996         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
19997         failed without this.)
19998
19999 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
20000
20001         * modules/chown (Files): Add lib/fchown-stub.c, since
20002         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
20003
20004 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
20005
20006         * lib/fchown-stub.c: New file.
20007
20008 2004-06-24  Jim Meyering  <jim@meyering.net>
20009
20010         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
20011
20012 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
20013
20014         * modules/argz: Omit "#include".
20015
20016         * MODULES.html.sh (func_all_modules): Add calloc, to match
20017         2004-06-01 addition of calloc module.
20018
20019 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
20020
20021         * m4/argz.m4: New file, which is autoupdated from libtool.
20022
20023 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
20024
20025         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
20026         libtool.
20027
20028 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
20029
20030         * config/srclist-update: Don't insist on "USA." before the
20031         close-comment, as libtool omits the period and puts the */ on a
20032         separate line.
20033         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
20034         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
20035
20036 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
20037
20038         * modules/argz: New file.
20039         * MODULES.html.sh (func_all_modules): Add argz.
20040
20041 2004-06-12  Jim Meyering  <jim@meyering.net>
20042         and  Paul Eggert  <eggert@cs.ucla.edu>
20043
20044         * modules/hash (Files): Add lib/xalloc.h.
20045         * modules/pipe (Depends-on): Add wait-process.
20046         * modules/stat (Depends-on): Add xalloc.
20047         * modules/userspec (Files): Add lib/userspec.h.
20048         * modules/xstrto
20049
20050         Upgrade from gettext-0.13.
20051         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
20052         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
20053         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
20054
20055 2004-06-10  Jim Meyering  <jim@meyering.net>
20056
20057         * lib/calloc.c: New file.
20058
20059 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
20060
20061         * lib/getdate.y (yylex): Allow space between sign and number.
20062         Problem reported by Dan Jacobson.
20063
20064 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
20065
20066         Merge from coreutils CVS.
20067
20068         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
20069         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
20070         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
20071         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
20072         xstrtol.m4: Fix copyright date and/or serial number.
20073
20074         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
20075         See if we need an fchown replacement.
20076         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
20077         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
20078         and use the replacement function if we detect either defect.
20079
20080         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
20081         gl_UTIMECMP.
20082
20083 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
20084         and  Jim Meyering  <jim@meyering.net>
20085
20086         Merge from coreutils CVS.
20087
20088         * lib/stat-macros.h: New file, with contents from file-type.h
20089         and coreutils' system.h.
20090         * lib/file-type.c: Include "stat-macros.h".
20091         * lib/file-type.h (file_type): Move all macro definitions to new file,
20092         stat-macros.h.
20093
20094         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
20095         Wrap old code with this conditional.
20096         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
20097         function that does not dereference symlinks.
20098         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
20099
20100         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
20101         dependency problems.
20102         (xreadlink): Accept new arg SIZE, for efficiency.
20103         All decls and uses changed.
20104         * lib/xreadlink.h: Include <stddef.h>, for size_t.
20105
20106         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
20107         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
20108
20109         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
20110         sysexits.h.
20111
20112 2004-06-01  Jim Meyering  <jim@meyering.net>
20113
20114         * m4/calloc.m4: New file.
20115
20116 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
20117
20118         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
20119         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
20120         Also, fix a typo in a diagnostic.
20121
20122 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
20123
20124         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
20125         or AC_FUNC_REALLOC.
20126
20127 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
20128
20129         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
20130         macros to be defined.
20131         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
20132         the allocator returns NULL because the requested size is zero.
20133
20134 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20135
20136         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
20137         var.  Add comment explaining why libc still defines it.  This
20138         merges the following patch from glibc:
20139         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
20140
20141 2004-05-20  Andreas Schwab  <schwab@suse.de>
20142
20143         * m4/free.m4: Replace free if it not known to work, not the other
20144         way round.
20145
20146 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
20147
20148         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
20149         present in glibc since revision 1.1 of this file.
20150         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
20151         obstack_alignment_mask, obstack_alloc, obstack_base,
20152         obstack_blank, obstack_blank_fast, obstack_chunk_size,
20153         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
20154         obstack_grow0, obstack_init, obstack_int_grow,
20155         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
20156         obstack_next_free, obstack_object_size, obstack_ptr_grow,
20157         obstack_ptr_grow_fast, obstack_room): Remove declarations of
20158         nonexistent functions.
20159
20160 2004-05-18  Karl Berry  <karl@gnu.org>
20161
20162         * config/srclist.txt: break link for vasnprintf.c.
20163
20164 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
20165
20166         Port obstack to the AS/400, where pointers are 16 bytes wide and
20167         you cannot cast an integer to a valid pointer.  This patch is
20168         currently waiting to be integrated into glibc; see
20169         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
20170
20171         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
20172         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
20173         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
20174         (struct obstack): temp member is now a union of a pointer and
20175         an integer, instead of an integer.  All integer uses changed.
20176         This does not affect the physical layout of struct obstack,
20177         except on hosts (like the AS/400) where the size or alignment of
20178         void * is greater than that of ptrdiff_t.
20179         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
20180         __STDC__)]: Store temporary in pointer member of union, not
20181         integer member.
20182         * lib/obstack.c: Include <stddef.h>, for offsetof.
20183         (struct fooalign): Remove; it doesn't need a name.
20184         (union fooround): Change double to long double, and add void *.
20185         (DEFAULT_ALIGNMENT): Use offsetof to compute.
20186         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
20187         not a macro.  Hence the values are always int; so remove all
20188         casts-to-int in uses.
20189
20190 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
20191
20192         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
20193         we can get this patch merged into glibc.
20194
20195 2004-05-17  Derek R. Price  <derek@ximbiot.com>
20196             Paul Eggert  <eggert@cs.ucla.edu>
20197
20198         * m4/argp: Depend on alloca.
20199
20200 2004-05-17  Derek R. Price  <derek@ximbiot.com>
20201             Paul Eggert  <eggert@cs.ucla.edu>
20202
20203         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
20204         freecoding.
20205
20206 2004-05-17  Bruno Haible  <bruno@clisp.org>
20207
20208         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
20209         precision that consists of a '.' followed by an empty digit string.
20210         Patch by Tor Lillqvist <tml@iki.fi>.
20211
20212 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
20213
20214         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
20215         for backward compatibility with older code.  We need our own
20216         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
20217         it under some other name, and our alloca.h will define it.
20218
20219 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
20220             Derek Price  <derek@ximbiot.com>
20221
20222         * lib/alloca.c: Include <alloca.h>, to get our interface.
20223         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
20224         include <alloca.h> first.  Use C89 prototype for alloca; this
20225         requires including <stddef.h> for size_t.  Use extern "C" if C++.
20226         Use #elif for simplicity, since we can assume C89 now.
20227         Don't try to source the system alloca.h since it will not be found
20228         and to prevent recursively including its replacement.
20229         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
20230         * lib/regex.c: Likewise.
20231
20232 2004-05-16  Derek Price  <derek@ximbiot.com>
20233             Paul Eggert  <eggert@cs.ucla.edu>
20234
20235         getline cleanup.  This changes the getndelim2 API: both order of
20236         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
20237         no delimiter).
20238
20239         * lib/getline.c: Don't include stddef.h or stdio.h, since our
20240         interface does that.
20241         (getline): Always use getdelim, so that we don't have two
20242         copies of this code.
20243         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
20244         if available.
20245         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
20246         (GETNDELIM2_MAXIMUM): New macro.
20247         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
20248         instead of the old practice of delim2==0.  All callers changed.
20249         Return -1 on overflow, instead of returning junk.
20250         Do not set *linesize unless allocation succeeds.
20251         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
20252         that we include sys/types.h.
20253         * lib/getnline.h: Likewise.
20254         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
20255         (getndelim2): Reorder arguments.
20256         * lib/getnline.c (getnline, getndelim):
20257         Don't discard the NMAX argument.
20258         (getnline): Invoke getndelim, to avoid code duplication.
20259         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
20260         of (size_t) -1 by callers of the getnline family.
20261
20262 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20263
20264         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
20265         Check for gettimeofday.
20266         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
20267         Check for settimeofday, stime.
20268
20269 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20270
20271         * lib/nanosleep.c (suspended): Change its type from int to
20272         sig_atomic_t volatile.
20273         (first_call): Make it private to rpl_nanosleep, and have it
20274         be zero initially as that's a bit faster.
20275         (my_usleep): Round up fractional times instead of truncating them,
20276         as this is the usual meaning for 'sleep'.
20277
20278         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
20279         doesn't work.
20280         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
20281         (ENOSYS): Define if not defined.
20282         (settime): Fall back on stime if it exists and settimeofday fails.
20283         But don't bother with fallbacks if a method fails with errno == EPERM.
20284
20285 2004-05-11  Jim Meyering  <jim@meyering.net>
20286
20287         Prior to this change, the save_cwd caller required read access to the
20288         current directory on most systems (ones with the fchdir function).
20289
20290         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
20291         fails, try write-only, and finally, resort to using xgetcwd.
20292
20293 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
20294
20295         * lib/obstack.c, obstack.h: Import changes from libc.
20296
20297 2004-04-28  Bruno Haible  <bruno@clisp.org>
20298
20299         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
20300         also implicitly appends .exe to executables.
20301         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
20302         accepts Windows pathnames.
20303         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
20304         Treat Cygwin like Windows, since it now accepts Windows pathnames.
20305         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
20306         Treat Cygwin like Windows, since it now accepts Windows pathnames.
20307         Reported by Derek Robert Price <derek@ximbiot.com>.
20308
20309 2004-04-21  Karl Berry  <karl@gnu.org>
20310
20311         * config/srclist.txt (localcharset.c): break sync.
20312
20313 2004-04-20  Paul Eggert  <eggert@twinsun.com>
20314
20315         * m4/host-os.m4: Add a copyright notice.
20316
20317 2004-04-20  Jim Meyering  <jim@meyering.net>
20318
20319         Change UTILS_ to gl_ in AC_DEFINE'd names.
20320         Change utils_- and jm_-prefixed variables, too.
20321         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
20322         UTILS_FUNC_MKDIR_TRAILING_SLASH.
20323         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
20324
20325         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
20326         Don't emit trailing blanks.
20327         Also rename jm_-prefixed variables to have gl_ prefix.
20328
20329         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
20330         Also rename jm_-prefixed variables to have gl_ prefix.
20331
20332         * m4/jm-macros.m4: Reflect the renamings.
20333         * m4/prereq.m4: Likewise.
20334
20335 2004-04-20  Jim Meyering  <jim@meyering.net>
20336
20337         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
20338         memory.
20339
20340 2004-04-20  Jim Meyering  <jim@meyering.net>
20341             Bruno Haible  <bruno@clisp.org>
20342
20343         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
20344         memory when realloc fails.
20345
20346 2004-04-19  Jim Meyering  <jim@meyering.net>
20347
20348         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
20349         now that readutmp.c may call `free (0)'.
20350
20351 2004-04-19  Bruno Haible  <bruno@clisp.org>
20352
20353         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
20354         * m4/inttypes_h.m4: Likewise.
20355         * m4/stdint_h.m4: Likewise.
20356         * m4/intmax_t.m4: Likewise.
20357         * m4/uintmax_t.m4: Likewise.
20358
20359 2004-04-18  Jim Meyering  <jim@meyering.net>
20360
20361         * m4/prereq.m4: Don't forbid jm_ prefix.
20362
20363         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
20364         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
20365         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
20366         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
20367         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
20368         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
20369         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
20370         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
20371         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
20372         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
20373         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
20374         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
20375         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
20376         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
20377         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
20378         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
20379         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
20380         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
20381         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
20382
20383 2004-04-18  Jim Meyering  <jim@meyering.net>
20384
20385         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
20386         failure, don't leak memory and do call END_UTMP_ENT.
20387
20388 2004-04-16  Jim Meyering  <jim@meyering.net>
20389
20390         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
20391         coreutils' stat program.
20392         (gl_PREREQ): Don't require jm_PREREQ_STAT.
20393
20394 2004-04-11  Paul Eggert  <eggert@twinsun.com>
20395
20396         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
20397         C89.
20398         (CHAR_BIT): Remove, since we assume C89.
20399         Include <stdint.h> if available, as per current Autoconf CVS advice.
20400
20401 2004-03-31  Jim Meyering  <jim@meyering.net>
20402
20403         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
20404         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
20405         * m4/xalloc.m4: Likewise.
20406
20407 2004-03-30  Paul Eggert  <eggert@twinsun.com>
20408
20409         Merge from coreutils.
20410
20411         * m4/inttostr.m4: New file.
20412         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
20413         Require AM_STDBOOL_H and gl_TIMESPEC instead.
20414         Require gl_CLOCK_TIME.
20415         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
20416
20417 2004-03-30  Paul Eggert  <eggert@twinsun.com>
20418
20419         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
20420         not bool, to be more consistent with Unix conventions.
20421         Suggested by Bruno Haible.
20422
20423         Merge from coreutils.
20424
20425         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
20426         * lib/umaxtostr.c: New files.
20427
20428         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
20429         the usual <time.h> dance.
20430         (get_date): Change signature to support fractional time stamps.
20431         All callers changed.
20432         * lib/getdate.y: Include "getdate.h" first, as we can now
20433         assume C89 and don't need to worry about 'const'.
20434         Similarly, include "unlocked-io.h" near start, not in middle.
20435         Include <limits.h>.
20436         (textint.value): Use long int rather than int.
20437         (textint.digits): Use size_t rather than int.
20438         (BILLION, LOG10_BILLION): New constants.
20439         (parser_control): New member rel_ns.  Members day_ordinal,
20440         time_zone, month, day, hour, minutes, rel_year, rel_month,
20441         rel_day, rel_hour, rel_minutes, rel_seconds
20442         are now long int, not int.  Member seconds is now struct timespec,
20443         not int.  New member timespec_seen.  Members dates_seen, days_seen,
20444         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
20445         not int.
20446         (%union.intval): Now long int, not int.
20447         New member timespec.
20448         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
20449         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
20450         (spec): Now is a timespec or an item list.
20451         (timespec, items): New nonterminals.
20452         (time, rel, relunit, number, get_date):
20453         Add support for fractional seconds.
20454         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
20455         (gmtime, localtime, mktime): Remove decls; not needed with C89.
20456         (to_hour): First arg is now long int, not int.
20457         (to_year): Returns long int, not int.
20458         Don't treat year -70 like 70.
20459         (tm_diff): Returns long int, not int.
20460         (lookup_word): Use bool instead of int when appropriate.
20461         (yylex): Use size_t for count, not int.
20462         Detect overflow when parsing large integer constants.
20463         Add support for fractions.
20464         (get_date): Make pointers 'const' if possible.
20465         Use more-portable code to detect integer overflow.
20466         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
20467         Don't use ctime; it's not reliable if the year has >4 digits.
20468
20469         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
20470         This is for compatibility with BSD.
20471
20472         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
20473         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
20474         From coreutils' system.h.
20475
20476         * lib/userspec.c: Don't include "posixver.h".
20477         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
20478         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
20479         compatible extension.  Simplify code by removing a boolean int
20480         that was always nonzero if a string was nonnull.
20481
20482 2004-03-30  Jim Meyering  <jim@meyering.net>
20483
20484         Merge from coreutils.
20485
20486         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
20487         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
20488         on some systems one must include <grp.h> before it.
20489         Reported by Christian Krackowizer.
20490
20491 2004-03-30  Jim Meyering  <jim@meyering.net>
20492
20493         Merge from coreutils.
20494
20495         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
20496
20497         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
20498         an empty input stream.
20499
20500         * lib/readtokens.c: Include <stdbool.h>.
20501         (readtoken): Use `size_t' rather than int/long.
20502         All callers adjusted.
20503         Use `bool' rather than `int' where appropriate.
20504         Use memset rather than an explicit loop.
20505         Use x2nrealloc rather than xrealloc.
20506         Allow the use of `\0' as a delimiter.
20507         (readtokens): Likewise.
20508         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
20509
20510 2004-03-30  Jim Meyering  <jim@meyering.net>
20511
20512         * m4/realloc.m4: Remove file, since now it does no more than
20513         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
20514         the `configure.ac' section of module/realloc.
20515         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
20516
20517 2004-03-30  Bruno Haible  <bruno@clisp.org>
20518
20519         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
20520         nonnull.
20521
20522 2004-03-29  Paul Eggert  <eggert@twinsun.com>
20523
20524         Merge changes to getloadavg.c from coreutils and Emacs.
20525
20526         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
20527         Define to an expression, not to the empty string.
20528         Include cloexec.h and xalloc.h.
20529         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
20530         Use set_cloexec_flag rather than rolling our own.
20531         * lib/cloexec.c, lib/cloexec.h: New files.
20532
20533 2004-03-29  Paul Eggert  <eggert@twinsun.com>
20534
20535         * m4/cloexec.m4: New file.
20536
20537 2004-03-18  Paul Eggert  <eggert@twinsun.com>
20538
20539         * lib/getopt.h: Sync with libc CVS.
20540
20541 2004-03-18  Paul Eggert  <eggert@twinsun.com>
20542             Bruno Haible  <bruno@clisp.org>
20543
20544         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
20545         mbswidth.
20546
20547 2004-03-18  Paul Eggert  <eggert@twinsun.com>
20548             Bruno Haible  <bruno@clisp.org>
20549
20550         * lib/mbswidth.h: Include <wchar.h> only if
20551         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
20552         <wchar.h>.
20553         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
20554
20555 2004-03-09  Paul Eggert  <eggert@twinsun.com>
20556
20557         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
20558         Sync with libc CVS.
20559         * lib/getopt_int.h: New file, also synced from libc.
20560
20561 2004-03-09  Paul Eggert  <eggert@twinsun.com>
20562
20563         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
20564         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
20565         Bring back getopt.c, getopt.h, getopt1.c.
20566
20567 2004-03-07  Paul Eggert  <eggert@twinsun.com>
20568
20569         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
20570         All uses changed.  Check for sa_sigaction member; this fixes
20571         a bug first reported by Jason Andrade in
20572         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
20573
20574 2004-03-07  Paul Eggert  <eggert@twinsun.com>
20575
20576         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
20577         '#if' expressions.  Unlike the code it replaces, it does not
20578         depend on (defined _SC_PAGESIZE).  However, it does depend on
20579         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
20580         first reported by Jason Andrade in
20581         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
20582
20583 2004-02-25  Simon Josefsson  <jas@extundo.com>
20584
20585         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
20586
20587 2004-02-25  Simon Josefsson  <jas@extundo.com>
20588
20589         * lib/strdup.h: New file.
20590         * lib/strdup.c: Include it.
20591         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
20592         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
20593
20594 2004-02-23  Karl Berry  <karl@gnu.org>
20595
20596         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
20597         (from fencepost.gnu.org:/gd/gnuorg).
20598
20599 2004-02-23  Karl Berry  <karl@gnu.org>
20600
20601         * config/srclistvars.sh (GNUORG) [karl]: redefine.
20602         * config/srclist.txt: add maintain/standards documents.
20603
20604 2004-02-18  Bruno Haible  <bruno@clisp.org>
20605
20606         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
20607         Reported by Derek Robert Price <derek@ximbiot.com>.
20608
20609 2004-02-16  Karl Berry  <karl@gnu.org>
20610
20611         * config/mkinstalldirs, install-sh: update from automake.
20612
20613 2004-02-06  Karl Berry  <karl@gnu.org>
20614
20615         * m4/po.m4: update from gettext 0.14.1.
20616
20617 2004-02-06  Karl Berry  <karl@gnu.org>
20618
20619         * lib/config.charset: update from gettext 0.14.1.
20620
20621 2004-02-05  Paul Eggert  <eggert@twinsun.com>
20622
20623         Add comments and code, prompted by suggestions from Bruno Haible
20624         for sh-quote.
20625         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
20626         describing the enum quoting_style values.
20627         * lib/quotearg.c (quotearg_alloc): New function.
20628         (quotearg_buffer_restyled): Treat lone { and } as special.
20629         Treat = as special.  Work around bug with older shells
20630         that "see" a '\' that is really the 2nd byte of a multibyte char.
20631         Quote empty string with shell_quoting_style.
20632
20633 2004-02-03  Bruno Haible  <bruno@clisp.org>
20634
20635         * m4/pipe.m4: New file, from GNU gettext.
20636
20637 2004-02-03  Bruno Haible  <bruno@clisp.org>
20638
20639         * lib/pipe.h: New file, from GNU gettext.
20640         * lib/pipe.c: New file, from GNU gettext.
20641
20642 2004-01-27  Bruno Haible  <bruno@clisp.org>
20643
20644         * m4/execute.m4: New file, from GNU gettext.
20645
20646 2004-01-27  Bruno Haible  <bruno@clisp.org>
20647
20648         * lib/execute.h: New file, from GNU gettext.
20649         * lib/execute.c: New file, from GNU gettext.
20650         * lib/w32spawn.h: New file, from GNU gettext.
20651
20652 2004-01-24  Paul Eggert  <eggert@twinsun.com>
20653
20654         Merge from diffutils.
20655
20656         * lib/file-type.c (file_type): Add typed memory objects.
20657         * lib/file-type.h (S_TYPEISTMO): New macro.
20658
20659         * lib/c-stack.h (c_stack_action): Remove argv argument.
20660         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
20661         (die): Don't calculate message unless segv_action returns.
20662         (get_stack_location, min_address_from_argv, max_address_from_argv,
20663         volatile stack_base, volatile_stack_size): Remove.
20664         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
20665         that every segmentation violation is a stack overflow.  (Ouch!)
20666         See Debian bug 136249 (still outstanding) for more info about why
20667         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
20668
20669 2004-01-24  Paul Eggert  <eggert@twinsun.com>
20670
20671         Exit-status fix from coreutils.
20672
20673         Use exit_failure consistently in place of EXIT_FAILURE,
20674         so that program exit statuses are consistent on failure.
20675
20676         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
20677         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
20678         * lib/argmatch.h: Comment fix to match the above.
20679         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
20680         Now a macro referring to exit_failure, instead of a separate
20681         variable.  Include "exitfail.h" to get it.
20682         * lib/xstrtol.h: Include "exitfail.h".
20683         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
20684
20685         * lib/long-options.c (parse_long_options): Use prototype
20686         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
20687         for clarity.
20688
20689 2004-01-21  Jim Meyering  <jim@meyering.net>
20690
20691         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
20692         so as not to conflict with a different-sized __mktime_internal
20693         function in GNU libc.
20694         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
20695         Problem building statically-linked `ls' reported by Michael Brunnbauer.
20696
20697 2004-01-20  Karl Berry  <karl@gnu.org>
20698
20699         * config/config.guess: update from config.
20700
20701         * config/srclistvars.sh: GNUWWWLICENSES for karl.
20702
20703 2004-01-20  Bruno Haible  <bruno@clisp.org>
20704
20705         Safer stack allocation.
20706         * lib/setenv.c: Include allocsa.h.
20707         (alloca): Remove fallback definition.
20708         (freea): Remove macro.
20709         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
20710         instead of freea.
20711
20712 2004-01-20  Bruno Haible  <bruno@clisp.org>
20713
20714         * m4/eealloc.m4: New file, from GNU gettext.
20715
20716 2004-01-20  Bruno Haible  <bruno@clisp.org>
20717
20718         * m4/allocsa.m4: New file, from GNU gettext.
20719
20720 2004-01-20  Bruno Haible  <bruno@clisp.org>
20721
20722         * lib/xallocsa.h: New file, from GNU gettext.
20723         * lib/xallocsa.c: New file, from GNU gettext.
20724
20725 2004-01-20  Bruno Haible  <bruno@clisp.org>
20726
20727         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
20728
20729 2004-01-20  Bruno Haible  <bruno@clisp.org>
20730
20731         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
20732         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
20733         specially.
20734
20735 2004-01-20  Bruno Haible  <bruno@clisp.org>
20736
20737         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
20738         patch.
20739
20740 2004-01-20  Bruno Haible  <bruno@clisp.org>
20741
20742         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
20743
20744 2004-01-20  Bruno Haible  <bruno@clisp.org>
20745
20746         * lib/eealloc.h: New file.
20747
20748 2004-01-20  Bruno Haible  <bruno@clisp.org>
20749
20750         * lib/binary-io.h: Avoid warnings on Cygwin.
20751
20752 2004-01-20  Bruno Haible  <bruno@clisp.org>
20753
20754         * lib/allocsa.h: New file, from GNU gettext.
20755         * lib/allocsa.c: New file, from GNU gettext.
20756
20757 2004-01-18  Karl Berry  <karl@gnu.org>
20758
20759         * doc/gpl.texi, doc/lgpl.texi: new files.
20760
20761 2004-01-18  Karl Berry  <karl@gnu.org>
20762
20763         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
20764         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
20765
20766 2004-01-15  Paul Eggert  <eggert@twinsun.com>
20767
20768         Merge from coreutils.
20769
20770         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
20771         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
20772         (gl_DEFAULT_POSIX2_VERSION): Move
20773         the documentation from 'configure' into 'config.hin',
20774         so that 'configure --help' isn't burdened by it and
20775         we don't have to worry about its formatting there.
20776         Reword the documentation so that it's more succinct
20777         and can be run together into a single paragraph.
20778         * m4/same.m4 (gl_SAME): Check for pathconf.
20779
20780 2004-01-15  Paul Eggert  <eggert@twinsun.com>
20781
20782         Merge from coreutils.
20783
20784         * lib/posixver.c: Include posixver.h.
20785
20786         * lib/same.c: Include <stdbool.h>, <limits.h>.
20787         (_POSIX_NAME_MAX): Define if not defined.
20788         (MIN): New macro.
20789         (same_name): If file names are silently truncated, report
20790         that the file names are the same if they are the same after
20791         the silent truncation.
20792
20793         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
20794         conversion function.
20795         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
20796         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
20797         longer needed.
20798
20799 2004-01-15  Jim Meyering  <jim@meyering.net>
20800
20801         Merge from coreutils.
20802
20803         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
20804         if no library is required.
20805         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
20806         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
20807         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
20808         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
20809         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
20810         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
20811         value, $ac_cv_search_crypt, if it's "none required".
20812         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
20813         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
20814         not gl_FUNC_GETLOADAVG.
20815         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
20816         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
20817
20818 2004-01-15  Jim Meyering  <jim@meyering.net>
20819
20820         Merge from coreutils.
20821
20822         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
20823         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
20824         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
20825
20826         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
20827         optional configure-time default.
20828
20829         * lib/version-etc.c (version_etc_copyright): Update copyright date.
20830
20831         * lib/xreadlink.c (xreadlink): Correct outdated comment.
20832
20833 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
20834
20835         Merge from coreutils.
20836
20837         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
20838         value, $ac_cv_search_nanosleep, if it's "none required".
20839
20840 2004-01-14  Paul Eggert  <eggert@twinsun.com>
20841
20842         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
20843         with like-named macro in fnmatch.c.
20844         (EXT): Use an internal constant instead.
20845
20846         Merge fnmatch patches from glibc.
20847         * lib/fnmatch.c (mbsinit): Remove define.
20848         Add libc_hidden_ver (__fnmatch, fnmatch).
20849         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
20850         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
20851
20852 2004-01-14  Karl Berry  <karl@gnu.org>
20853
20854         * config/install-sh: update from automake.
20855
20856 2004-01-13  Karl Berry  <karl@gnu.org>
20857
20858         * config/install-sh: update from automake.
20859
20860 2004-01-09  Karl Berry  <karl@gnu.org>
20861
20862         * config/install-sh: update from automake.
20863
20864 2004-01-05  Karl Berry  <karl@gnu.org>
20865
20866         * config/config.{sub,guess}: update from config.
20867
20868 2003-12-31  Karl Berry  <karl@gnu.org>
20869
20870         * config/depcomp: update from automake.
20871
20872 2003-12-14  Karl Berry  <karl@gnu.org>
20873
20874         * lib/config.charset: update from gettext-runtime.
20875
20876 2003-12-03  Paul Eggert  <eggert@twinsun.com>
20877
20878         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
20879         Bug reported by Alfred M. Szmidt.
20880
20881 2003-12-03  Bruno Haible  <bruno@clisp.org>
20882
20883         * m4/gettext.m4: Upgrade from gettext-0.13.
20884         * m4/po.m4: Upgrade from gettext-0.13.
20885         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
20886         * m4/intmax.m4: New file, from gettext-0.13.
20887         * m4/printf-posix.m4: New file, from gettext-0.13.
20888
20889 2003-11-29  Karl Berry  <karl@gnu.org>
20890
20891         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
20892
20893 2003-11-25  Paul Eggert  <eggert@twinsun.com>
20894             Bruno Haible  <bruno@clisp.org>
20895
20896         * lib/printf-parse.h: Don't include sys/types.h.
20897         (ARG_NONE): New macro.
20898         (char_directive): Change type of *arg_index fields to size_t.
20899         * lib/printf-parse.c: Don't include sys/types.h.
20900         (SSIZE_MAX): Remove macro.
20901         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
20902         Remove unnecessary overflow check.
20903         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
20904         fields.
20905
20906 2003-11-25  Bruno Haible  <bruno@clisp.org>
20907
20908         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
20909
20910 2003-11-25  Bruno Haible  <bruno@clisp.org>
20911
20912         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
20913         gt_TYPE_SSIZE_T.
20914
20915 2003-11-24  Paul Eggert  <eggert@twinsun.com>
20916
20917         * modules/alloca: Remove dependency on xalloc.
20918
20919 2003-11-24  Paul Eggert  <eggert@twinsun.com>
20920
20921         * lib/alloca.c: Remove dependency on xalloc module.
20922         (xalloc_die): Remove.
20923         (memory_full) [!defined emacs]: New macro.
20924         [!defined emacs]: Don't include xalloc.h.
20925         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
20926         address arithmetic overflows.  Change datatypes a bit to avoid
20927         unnecessary casts.
20928
20929 2003-11-22  Jim Meyering  <jim@meyering.net>
20930
20931         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
20932         s/size/size_t/.
20933
20934 2003-11-21  Karl Berry  <karl@gnu.org>
20935
20936         * config/config.{sub,guess}: update from config.
20937
20938 2003-11-18  Karl Berry  <karl@gnu.org>
20939
20940         * config/config.{sub,guess}: update from config.
20941
20942         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
20943
20944 2003-11-17  Paul Eggert  <eggert@twinsun.com>
20945
20946         * README: Mention that S+T cannot overflow if S is the size of
20947         an existing object and T is sufficiently small.
20948
20949 2003-11-17  Jim Meyering  <jim@meyering.net>
20950
20951         On systems without utime and without a utimes function capable of
20952         dealing with a NULL struct utimbuf* argument, this utime replacement
20953         could -- in unusual circumstances -- leak a file descriptor.
20954         * lib/utime.c: Include <unistd.h> and <errno.h>.
20955         (utime_null): Be sure to close `fd' and to preserve errno.
20956         Reported by Geoff Collyer via Arnold Robbins.
20957
20958 2003-11-17  Bruno Haible  <bruno@clisp.org>
20959
20960         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
20961         (Depends-on): Add xsize.
20962
20963 2003-11-17  Bruno Haible  <bruno@clisp.org>
20964
20965         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
20966
20967 2003-11-17  Bruno Haible  <bruno@clisp.org>
20968
20969         * lib/vasnprintf.c (alloca): Remove fallback definition.
20970         (freea): Remove definition.
20971         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
20972         Reported by Paul Eggert.
20973
20974 2003-11-16  Paul Eggert  <eggert@twinsun.com>
20975             Bruno Haible  <bruno@clisp.org>
20976
20977         Protect against address arithmetic overflow.
20978         * lib/printf-args.h: Include stddef.h.
20979         (arguments): Change type of field 'count' to size_t.
20980         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
20981         'unsigned int' where appropriate.
20982         * lib/printf-parse.h: Include sys/types.h.
20983         (char_directive): Change type of *arg_index fields to ssize_t.
20984         (char_directives): Change type of fields 'count', max_*_length to
20985         size_t.
20986         * lib/printf-parse.c: Include sys/types.h and xsize.h.
20987         (SSIZE_MAX): Define fallback value.
20988         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
20989         instead of 'int' where appropriate. Check a_allocated, d_allocated
20990         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
20991         * lib/vasnprintf.c: Include xsize.h.
20992         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
20993         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
20994         overflow. Avoid wraparound when converting a width or precision from
20995         decimal to binary.
20996
20997 2003-11-16  Bruno Haible  <bruno@clisp.org>
20998
20999         Update from GNU gettext.
21000         * lib/printf-parse.c: Generalize to it can be compiled for wide
21001         strings.
21002         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
21003         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
21004         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
21005         SNPRINTF): New macros.
21006         Don't include <alloca.h> if the file is used inside libintl.
21007         (local_wcslen): New function, for Solaris 2.5.1.
21008         (VASNPRINTF): Use it instead of wcslen.
21009
21010 2003-11-16  Bruno Haible  <bruno@clisp.org>
21011
21012         * lib/xsize.h (xmax): New function.
21013         (xsum, xsum3, xsum4): Declare as "pure" functions.
21014
21015 2003-11-12  Paul Eggert  <eggert@twinsun.com>
21016
21017         * modules/xalloc (Files): Undo latest change, since xalloc.h
21018         no longer needs SIZE_MAX or PTRDIFF_MAX.
21019
21020 2003-11-12  Paul Eggert  <eggert@twinsun.com>
21021
21022         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
21023         gl_PTRDIFF_MAX.
21024
21025 2003-11-12  Paul Eggert  <eggert@twinsun.com>
21026
21027         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
21028         "return", to pacify some unknown compiler.  Problem reported
21029         by Joerg Schilling.
21030
21031 2003-11-12  Paul Eggert  <eggert@twinsun.com>
21032
21033         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
21034         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
21035         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
21036         heuristic is just as accurate as far as we know, and it removes a
21037         dependency on size_max.m4 and ptrdiff_max.m4.
21038
21039 2003-11-11  Bruno Haible  <bruno@clisp.org>
21040
21041         * modules/xsize (Files): Add m4/size_max.m4.
21042         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
21043
21044 2003-11-11  Bruno Haible  <bruno@clisp.org>
21045
21046         * m4/size_max.m4: New file.
21047         * m4/ptrdiff_max.m4: New file.
21048         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
21049         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
21050         (gl_XALLOC): Invoke it.
21051
21052 2003-11-11  Bruno Haible  <bruno@clisp.org>
21053
21054         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
21055         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
21056         defined.
21057
21058 2003-11-10  Paul Eggert  <eggert@twinsun.com>
21059
21060         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
21061         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
21062         rejected some allocations of exactly SIZE_MAX - 2 bytes.
21063         From Bruno Haible.
21064         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
21065         not (size_t) -1, since it's defined here.
21066
21067 2003-11-09  Karl Berry  <karl@gnu.org>
21068
21069         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
21070
21071 2003-11-06  Paul Eggert  <eggert@twinsun.com>
21072
21073         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
21074         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
21075         Reject sizes of exactly SIZE_MAX bytes.
21076         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
21077         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
21078
21079 2003-11-05  Bruno Haible  <bruno@clisp.org>
21080
21081         * lib/xsize.h: Include limits.h, to avoid a possible collision with
21082         SIZE_MAX defined in <limits.h> on Solaris.
21083
21084 2003-11-04  Jim Meyering  <jim@meyering.net>
21085
21086         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
21087         variable names, rather than @VAR@.
21088         * modules/poll: Likewise.
21089
21090 2003-11-04  Bruno Haible  <bruno@clisp.org>
21091
21092         * modules/xsize: New file.
21093         * modules/linebreak: Depend on xsize.
21094         * MODULES.html.sh (func_all_modules): Add xsize.
21095
21096 2003-11-04  Bruno Haible  <bruno@clisp.org>
21097
21098         * m4/xsize.m4: New file.
21099
21100 2003-11-04  Bruno Haible  <bruno@clisp.org>
21101
21102         * lib/xsize.h: New file.
21103         * lib/linebreak.c: Include xsize.h.
21104         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
21105         argument for overflow.
21106         Suggested by Paul Eggert.
21107
21108 2003-11-03  Karl Berry  <karl@gnu.org>
21109
21110         * config/config.{guess,sub}: update from config.
21111
21112 2003-11-03  Jim Meyering  <jim@meyering.net>
21113
21114         * modules/userspec (lib_SOURCES): Add userspec.h.
21115         (Include): Add "userspec.h".
21116         Improve description.
21117
21118 2003-11-03  Jim Meyering  <jim@meyering.net>
21119
21120         * lib/userspec.c: Include "userspec.h".
21121         * lib/userspec.h: New file.
21122
21123 2003-11-03  Bruno Haible  <bruno@clisp.org>
21124
21125         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
21126
21127 2003-11-03  Bruno Haible  <bruno@clisp.org>
21128
21129         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
21130         available, to avoid (extremely rare) race condition.
21131         Suggested by Paul Eggert.
21132
21133 2003-11-02  Karl Berry  <karl@gnu.org>
21134
21135         * config/srclist.txt (vasprintf.c): sync broken, sigh.
21136
21137 2003-10-31  Paul Eggert  <eggert@twinsun.com>
21138
21139         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
21140         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
21141         (read_filesystem_list): Set and use me_type_malloced.
21142         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
21143         whatever the type happens to be), for brevity and consistency.
21144         Check for size calculation overflow on Alphas running OSF/1.
21145
21146 2003-10-31  Jim Meyering  <jim@meyering.net>
21147
21148         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
21149
21150         * lib/linebuffer.c: Include <string.h> for declaration of memset.
21151
21152 2003-10-30  Paul Eggert  <eggert@twinsun.com>
21153             Bruno Haible  <bruno@clisp.org>
21154
21155         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
21156         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
21157
21158 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
21159
21160         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
21161         netbsd*-gnu*.  Suggested by Robert Millan.
21162
21163 2003-10-29  Paul Eggert  <eggert@twinsun.com>
21164
21165         * modules/group-member: Depend on stdbool.
21166
21167 2003-10-29  Paul Eggert  <eggert@twinsun.com>
21168
21169         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
21170
21171 2003-10-29  Paul Eggert  <eggert@twinsun.com>
21172
21173         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
21174         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
21175         after the 'gnu' in these cases.  This fixes some bugs in the
21176         previous change, and is based on suggestions by Robert Millan.
21177
21178 2003-10-29  Paul Eggert  <eggert@twinsun.com>
21179
21180         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
21181         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
21182         no longer needed.
21183         * lib/quotearg.c (quotearg_n_options): Use it.
21184         * lib/group-member.c: Include <stdbool.h>.
21185         (free_group_info): Arg is now const *; don't free arg.
21186         (get_group_info): Now returns bool and accepts struct group_info *,
21187         rather than returning a malloc'ed struct group_info *.
21188         All uses changed.  Check for overflow in internal size calculation.
21189
21190         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
21191         rather than xmalloc/xrealloc.
21192         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
21193         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
21194         conformance bug: the old code used a pointer after freeing the
21195         storage that it addressed.
21196         * lib/hash.c (hash_initialize): Simplify the code by using
21197         xalloc_oversized rather than doing it by hand.
21198         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
21199         the buffer preserved.  Use free and xmalloc instead.
21200         * lib/quotearg.c (quotearg_n_options): Likewise.
21201         Use a simpler test for size overflow.  Don't use xalloc_oversized
21202         because unsigned int might be wider than size_t (!); this suggests
21203         that we should switch from unsigned int to size_t for slot numbers.
21204
21205 2003-10-28  Paul Eggert  <eggert@twinsun.com>
21206
21207         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
21208         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
21209         NetBSD kernels.  Requested by Richard Stallman.
21210
21211 2003-10-27  Paul Eggert  <eggert@twinsun.com>
21212
21213         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
21214         to allocate the returned structure.  Do not allocate a subarray,
21215         as x2nrealloc will do that.
21216         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
21217         instead of xnrealloc.
21218         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
21219
21220 2003-10-27  Bruno Haible  <bruno@clisp.org>
21221
21222         * lib/stdbool_.h: Better support for BeOS.
21223
21224 2003-10-26  Paul Eggert  <eggert@twinsun.com>
21225
21226         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
21227         now uses inline.
21228
21229 2003-10-26  Paul Eggert  <eggert@twinsun.com>
21230
21231         * lib/xalloc.h (xalloc_oversized): New static inline function, for
21232         callers that want to do their own size-overflow checking.  Include
21233         <stdbool.h>, since xalloc_oversized returns bool.
21234         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
21235         to use xalloc_oversized.
21236
21237         Add two functions x2realloc, x2nrealloc, for programs that grow
21238         arrays dynamically by doubling their sizes.
21239         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
21240         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
21241         New functions.
21242
21243         Port to C99 semantics for 'inline' of external functions.
21244         Bug reported by Bruno Haible.
21245         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
21246         with the old contents of xnmalloc.
21247         (xnmalloc, xmalloc): Use it.
21248         (xnrealloc_inline): New static inline function,
21249         with the old contents of xnrealloc.
21250         (xnrealloc, xrealloc): Use it.
21251
21252         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
21253         that.
21254
21255 2003-10-26  Karl Berry  <karl@gnu.org>
21256
21257         * config/srclist.txt (COPYING.DOC): no longer available from
21258         /gd/gnuorg; don't know where the ultimate source is.
21259
21260 2003-10-25  Paul Eggert  <eggert@twinsun.com>
21261
21262         Fix several address-calculation bugs in the hash modules,
21263         plus some minor code cleanup.
21264
21265         * lib/hash.h: Include <stdbool.h>, for bool.
21266         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
21267         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
21268         hash_get_n_entries, hash_get_max_bucket_length,
21269         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
21270         hash_rehash): Use size_t rather than unsigned.
21271         * lib/hash.c (struct hash_table, hash_get_n_buckets,
21272         hash_get_n_buckets_used, hash_get_n_entries,
21273         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
21274         hash_get_entries, hash_do_for_each, hash_string, is_prime,
21275         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
21276         Likewise.
21277         (SIZE_MAX): Define if not defined.
21278         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
21279         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
21280         hash_print):
21281         Use const * when possible.
21282         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
21283         (check_tuning): Fix bug: if tuning parameters were very close to
21284         0 or 1, rounding errors could have caused subscript violations.
21285         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
21286         (hash_initialize): Add 'fail:' label
21287         to free table and return NULL, and use it to simplify code.
21288         Use calloc rather than clearing the storage ourself.
21289         (hash_initialize, hash_rehash): Check for arithmetic overflow in
21290         buffer size calculations.
21291         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
21292         Include <stddef.h>, for size_t.
21293         * lib/hash-pjw.c (hash_pjw): Likewise.
21294         Switch to method described by Bruno Haible.
21295         Include <limits.h>, for CHAR_BIT.
21296         (SIZE_BITS): New macro.
21297
21298 2003-10-23  Paul Eggert  <eggert@twinsun.com>
21299
21300         * m4/getline.m4 (AM_FUNC_GETLINE):
21301         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
21302         hosts.  Problem reported by Derek Robert Price in
21303         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
21304         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
21305         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
21306
21307 2003-10-21  Paul Eggert  <eggert@twinsun.com>
21308
21309         * lib/getndelim2.c (getndelim2): When size calculation overflows,
21310         ceiling the allocation at NMAX bytes rather than silently
21311         discarding input bytes before NMAX is reached.  This makes
21312         a difference only if NMAX exceeds SIZE_MAX / 2.
21313
21314         * lib/obstack.c: Merge from glibc.
21315         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
21316         Add libc_hidden_def (_obstack_newchunk).
21317         (_obstack_free) [! defined _LIBC]: Remove.
21318         [defined _LIBC]: Make a strong alias from obstack_free, rather than
21319         a clone of the function body.
21320         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
21321         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
21322
21323         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
21324         glibc.
21325         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
21326         arg to memcpy.
21327
21328         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
21329         (obstack_ptr_grow_fast, obstack_int_grow_fast):
21330         Don't use lvalue casts, as GCC plans to remove support for them
21331         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
21332         was also present in the non-GCC version, indicating that this
21333         code had always been buggy and had never been widely used.
21334         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
21335         Use the fast variant of each macro, rather than copying the
21336         definiens of the fast variant; that way, we'll be more likely to
21337         catch future bugs in the fast variants.
21338
21339 2003-10-20  Bruno Haible  <bruno@clisp.org>
21340
21341         * modules/wait-process: New file.
21342         * MODULES.html.sh (func_all_modules): Add wait-process.
21343
21344 2003-10-20  Bruno Haible  <bruno@clisp.org>
21345
21346         * m4/wait-process.m4: New file.
21347
21348 2003-10-20  Bruno Haible  <bruno@clisp.org>
21349
21350         * lib/wait-process.h: New file, from GNU gettext.
21351         * lib/wait-process.c: New file, from GNU gettext.
21352
21353 2003-10-19  Jim Meyering  <jim@meyering.net>
21354
21355         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
21356         HPUX 10.20.
21357
21358 2003-10-18  Karl Berry  <karl@gnu.org>
21359
21360         * config/config.guess: update from config.
21361
21362 2003-10-16  Paul Eggert  <eggert@twinsun.com>
21363
21364         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
21365         (getgroups): First arg is int, not size_t.
21366         Don't let 'free' mangle errno.
21367
21368 2003-10-16  Paul Eggert  <eggert@twinsun.com>
21369
21370         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
21371
21372 2003-10-16  Karl Berry  <karl@gnu.org>
21373
21374         * config/config.{guess,sub}: update from config.
21375
21376 2003-10-16  Jim Meyering  <jim@meyering.net>
21377
21378         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
21379         memcpy.
21380
21381 2003-10-15  Paul Eggert  <eggert@twinsun.com>
21382
21383         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
21384         (SIZE_MAX): Remove.
21385         (new_exclude, add_exclude_file): Initial size no longer needs to
21386         be a power of 2.
21387         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
21388         our own address arithmetic overflow checking.
21389
21390         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
21391         (fnmatch): Do not alloca more than 2000 wide characters;
21392         instead, use malloc for large buffers.
21393         Check for address arithmetic overflow, and return -1
21394         with errno set to ENOMEM in that case.
21395         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
21396         (NEW_PATTERN): Do not alloca more than 8000 bytes;
21397         instead, return -1.  Check for address arithmetic overflow.
21398
21399 2003-10-14  Paul Eggert  <eggert@twinsun.com>
21400
21401         Handle invalid suffixes and overflow independently, so that
21402         callers can treat them independently as needed.  Fix some bugs in
21403         suffix handling, e.g., "100k@" was not diagnosed as an invalid
21404         suffix for a human-readable blocksize.  The major caller-visible
21405         change is the addition of a new
21406         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
21407         that both overflow and suffix chars were found.
21408
21409         * lib/human.c (humblock): Don't check separately for invalid suffix
21410         char; that is xstrtoumax's job (now that its bug is fixed).
21411         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
21412         INTMAX_MAX]: New macros.
21413         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
21414         TYPE_MAXIMUM): New macros.
21415         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
21416         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
21417         if overflow occurs, as it's what __strtol does and it's more useful
21418         in practice.
21419         (__xstrtol): If __strtol reports some error other than ERANGE,
21420         reflect it to the caller as LONGINT_INVALID.  If it reports
21421         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
21422         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
21423         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
21424         value.
21425         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
21426         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
21427         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
21428         [defined UINTMAX_MAX]: New macros.
21429
21430 2003-10-14  Bruno Haible  <bruno@clisp.org>
21431
21432         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
21433
21434 2003-10-14  Bruno Haible  <bruno@clisp.org>
21435
21436         * m4/sig_atomic_t: New file, from GNU gettext.
21437         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
21438
21439 2003-10-14  Bruno Haible  <bruno@clisp.org>
21440
21441         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
21442         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
21443         Also use volatile where needed.
21444
21445 2003-10-12  Paul Eggert  <eggert@twinsun.com>
21446
21447         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
21448         Change maintainer from Bruno Haible to 'all'.
21449
21450 2003-10-12  Paul Eggert  <eggert@twinsun.com>
21451
21452         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
21453
21454 2003-10-12  Paul Eggert  <eggert@twinsun.com>
21455
21456         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
21457         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
21458         and define in terms of the other primitives.
21459         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
21460         (SIZE_MAX): Define if not already defined.
21461         (array_size_overflow): New function.
21462         (xalloc_die): Abort instead of exiting if 'error' returns.
21463         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
21464         (xmalloc, xrealloc): Use them.
21465         (xcalloc): Check for address arithmetic overflow.
21466         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
21467         a bit faster than strcpy.
21468
21469 2003-10-10  Simon Josefsson  <jas@extundo.com>
21470
21471         * modules/argp (Depends-on): Add restrict and strcase.
21472
21473 2003-10-10  Simon Josefsson  <jas@extundo.com>
21474
21475         * m4/argp.m4: Add AC_C_INLINE.
21476
21477 2003-10-08  Paul Eggert  <eggert@twinsun.com>
21478
21479         Merge getpass from libc, plus a few fixes.
21480
21481         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
21482         Include <stdbool.h>.
21483         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
21484         __fsetlocking to empty.
21485         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
21486         do include <bits/libc-lock.h>.
21487         Do not include <fcntl.h>; not needed.
21488         [_LIBC]: Include <wchar.h>.
21489         (NOTCANCEL_MODE): New macro.
21490         (flockfile, funlockfile) [_LIBC]: New macros.
21491         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
21492         [!_LIBC]: New macros.
21493         (call_fclose): New function.
21494         (getpass): Use it.  Save tty stream separately; this simplifies the
21495         code and makes it more reliable if stdin happens to equal stdout.
21496         Invoke __fsetlocking on tty.
21497         Handle thread cancellation if needed.
21498         Namespace cleanup (use __tcgetattr, __getline).
21499         Use bool for Booleans.
21500         [USE_IN_LIBIO]: Handle wide streams.
21501         [!_LIBC]: Unconditionally do the fseek, since we don't know what
21502         stream might go where.
21503
21504         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
21505         doesn't have to include <stdio.h> before us.
21506         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
21507         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
21508         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
21509         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
21510         if not declared, so that we can use getpass.c code from libc without
21511         rewriting it.
21512         (flockfile, ftrylockfile, funlockfile): New macros.
21513
21514 2003-10-08  Paul Eggert  <eggert@twinsun.com>
21515
21516         * modules/getpass: Depend on stdbool.
21517
21518 2003-10-08  Paul Eggert  <eggert@twinsun.com>
21519
21520         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
21521
21522 2003-10-07  Karl Berry  <karl@gnu.org>
21523
21524         * config/config.{guess,sub}: update from config.
21525
21526 2003-10-06  Jim Meyering  <jim@meyering.net>
21527             Bruno Haible  <bruno@clisp.org>
21528
21529         This lets translators provide better translations for the
21530         "Written by ..." part of --version output.
21531         * lib/version-etc.h: Include stdarg.h.
21532         (version_etc_copyright): Declare as readonly.
21533         (version_etc): Make this function variadic with a NULL-terminated list
21534         of author name strings.
21535         (version_etc_va): New declaration.
21536         * lib/version-etc.c: Include stdarg.h, stdlib.h.
21537         (version_etc_copyright): Declare as readonly.
21538         (version_etc_va): New function. Provide a different translatable string
21539         for each possible number of authors < 10. Abbreviate when there are 10
21540         authors or more.
21541         (version_etc): Make this function variadic. Call version_etc_va.
21542         Suggestion from Gary V. Vaughan.
21543
21544         * lib/long-options.h (parse_long_options): Change prototype: the
21545         authors string is moved to the end and becomes variadic.
21546         * lib/long-options.c: Include stdarg.h.
21547         (parse_long_options): Make this function variadic, too.
21548         Call version_etc_va, not version_etc.
21549
21550 2003-10-06  Bruno Haible  <bruno@clisp.org>
21551
21552         * modules/version-etc-2: Remove file.
21553         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
21554
21555 2003-10-06  Bruno Haible  <bruno@clisp.org>
21556
21557         * modules/fatal-signal: New file.
21558         * MODULES.html.sh (func_all_modules): Add fatal-signal.
21559
21560 2003-10-06  Bruno Haible  <bruno@clisp.org>
21561
21562         * m4/fatal-signal.m4: New file.
21563         * m4/signalblocking.m4: New file, from GNU gettext.
21564
21565 2003-10-06  Bruno Haible  <bruno@clisp.org>
21566
21567         * lib/version-etc-2.h: Remove file.
21568         * lib/version-etc-2.c: Remove file.
21569
21570 2003-10-06  Bruno Haible  <bruno@clisp.org>
21571
21572         * lib/fatal-signal.h: New file, from GNU gettext.
21573         * lib/fatal-signal.c: New file, from GNU gettext.
21574
21575 2003-10-05  Paul Eggert  <eggert@twinsun.com>
21576
21577         * README: Rework advice for preventing empty .o files.
21578         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
21579         not <sys/types.h>.
21580
21581 2003-10-04  Karl Berry  <karl@gnu.org>
21582
21583         * lib/argp*: update from libc.
21584
21585 2003-10-04  Karl Berry  <karl@gnu.org>
21586
21587         * config/config.{guess,sub}: update from config.
21588
21589 2003-10-02  Bruno Haible  <bruno@clisp.org>
21590
21591         * modules/lchown (Include): Add lchown.h.
21592         * modules/time_r (Include): Use "..." syntax.
21593         * modules/xgetdomainname (Include): Add xgetdomainname.h.
21594
21595 2003-10-01  Simon Josefsson  <jas@extundo.com>
21596
21597         * MODULES.html.sh (func_all_modules): Move gethostname from section
21598         'based on' to section 'lacking' POSIX:2001.
21599
21600 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
21601
21602         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
21603         to output mode on the same stream.
21604
21605 2003-09-29  Paul Eggert  <eggert@twinsun.com>
21606
21607         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
21608         Fix arg typo in previous patch.
21609
21610 2003-09-28  Jim Meyering  <jim@meyering.net>
21611
21612         * lib/error.c: Correct cpp indentation.
21613
21614 2003-09-27  Paul Eggert  <eggert@twinsun.com>
21615
21616         * modules/free: New file.
21617
21618 2003-09-27  Paul Eggert  <eggert@twinsun.com>
21619
21620         * m4/free.m4: New file.
21621
21622 2003-09-27  Paul Eggert  <eggert@twinsun.com>
21623
21624         * lib/minmax.h (MIN, MAX)
21625         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
21626         Omit the special code that used __typeof__, since we worry that
21627         it could be more trouble than it's worth.  See:
21628         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
21629         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
21630
21631         * lib/free.c: New file.
21632
21633 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
21634
21635         Trivial fixes to Makefile.am parts of module listings.
21636         * modules/strstr: Append strstr.h to lib_SOURCES.
21637         * modules/strcase: Likewise, for strcase.h.
21638
21639 2003-09-27  Karl Berry  <karl@gnu.org>
21640
21641         * config/mkinstalldirs: update from automake.
21642
21643 2003-09-26  Paul Eggert  <eggert@twinsun.com>
21644
21645         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
21646         (error_tail): Do not loop, reallocating temporary buffer, since
21647         the output cannot contain more wide characters than the input
21648         contains bytes, the size must be big enough already.  This avoids
21649         one potential size overflow calculation.  Check for size overflow
21650         when calculating temporary buffer size.  Free temporary buffer
21651         when done, if it was allocated with malloc; this plugs a memory
21652         leak.  Remove casts from void * to pointers, that are no longer
21653         needed now that we're assuming C89 or better.
21654
21655         Merge error changes from glibc.
21656
21657         * lib/error.c, error.h: Update copyright notice header to match glibc.
21658         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
21659         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
21660         Disable cancellation while printing error.
21661         * lib/error.h: Prepend __ to parameter names.
21662
21663 2003-09-26  Jim Meyering  <jim@meyering.net>
21664
21665         * lib/error.c (error_tail): Move some declarations
21666         into inner scope where the local variables are used.
21667
21668 2003-09-26  Bruno Haible  <bruno@clisp.org>
21669
21670         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
21671         stpncpy().
21672         Don't define stpncpy through config.h; it's now done through stpncpy.h.
21673
21674 2003-09-26  Bruno Haible  <bruno@clisp.org>
21675
21676         * lib/stpncpy.h (gnu_stpncpy): New declaration.
21677         (stpncpy): Define as alias for gnu_stpncpy.
21678         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
21679
21680 2003-09-25  Simon Josefsson  <jas@extundo.com>
21681
21682         * lib/xgetdomainname.h: New file.
21683         * lib/xgetdomainname.c: New file.
21684
21685 2003-09-25  Simon Josefsson  <jas@extundo.com>
21686             Bruno Haible  <bruno@clisp.org>
21687
21688         * modules/getdomainname: New file.
21689         * modules/xgetdomainname: New file.
21690         * MODULES.html.sh (func_all_modules): Add getdomainname,
21691         xgetdomainname.
21692
21693 2003-09-25  Simon Josefsson  <jas@extundo.com>
21694             Bruno Haible  <bruno@clisp.org>
21695
21696         * m4/getdomainname.m4: New file.
21697
21698 2003-09-25  Simon Josefsson  <jas@extundo.com>
21699             Bruno Haible  <bruno@clisp.org>
21700
21701         * lib/getdomainname.h: New file.
21702         * lib/getdomainname.c: New file.
21703
21704 2003-09-25  Karl Berry  <karl@gnu.org>
21705
21706         * lib/argp-fmtstream.c, argp-help.c: update from libc.
21707
21708 2003-09-25  Karl Berry  <karl@gnu.org>
21709
21710         * config/install-sh: update from automake.
21711
21712 2003-09-25  Bruno Haible  <bruno@clisp.org>
21713
21714         * modules/version-etc-2: New file, from modules/version-etc with
21715         modifications.
21716         * MODULES.html.sh (func_all_modules): Add version-etc-2.
21717
21718 2003-09-25  Bruno Haible  <bruno@clisp.org>
21719
21720         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
21721         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
21722
21723 2003-09-24  Simon Josefsson  <jas@extundo.com>
21724
21725         * modules/xgethostname: Add xgethostname.h.
21726
21727 2003-09-24  Paul Eggert  <eggert@twinsun.com>
21728
21729         * lib/linebuffer.c (freebuffer): Don't free the argument, just
21730         the buffer associated with the argument.  Bug reported by
21731         Simon Josefsson.
21732
21733 2003-09-24  Paul Eggert  <eggert@twinsun.com>
21734
21735         * README: Document assumptions that 'int' is at least 32 bits
21736         wide, that integer arithmetic is 2's complement without overflow,
21737         that there are no holes in integer values, that adding sizes of
21738         two nonoverlapping objects can't overflow, and that all-bits-zero
21739         yields scalar zero.  Fix spelling and capitalization typos.
21740
21741 2003-09-19  Karl Berry  <karl@gnu.org>
21742
21743         * lib/argp.h: update from libc.
21744
21745 2003-09-17  Paul Eggert  <eggert@twinsun.com>
21746
21747         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
21748         to avoid spurious warnings like "AC_RUN_IFELSE was called before
21749         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
21750
21751 2003-09-17  Paul Eggert  <eggert@twinsun.com>
21752
21753         * gnulib-tool: Use "test -h", not "test -L", for portability
21754         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
21755         (tags_regexp): Remove, since \| doesn't conform to POSIX.
21756         (sed_extract_prog): Issue s commands one-by-one, rather than
21757         using \| in one s command.
21758
21759 2003-09-16  Paul Eggert  <eggert@twinsun.com>
21760
21761         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
21762         input error, instead of returning NULL the next time we are called
21763         (and therefore losing track of errno).
21764
21765 2003-09-16  Bruno Haible  <bruno@clisp.org>
21766
21767         * gnulib-tool (func_create_testdir): Warn about duplicated
21768         dependencies.
21769
21770 2003-09-15  Paul Eggert  <eggert@twinsun.com>
21771
21772         * modules/argmatch, modules/fatal, modules/obstack,
21773         modules/xalloc, modules/xgethostname: Sort dependencies by
21774         importance, not alphabetically.
21775
21776 2003-09-15  Paul Eggert  <eggert@twinsun.com>
21777
21778         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
21779         fails, so that the caller gets the proper errno.
21780
21781         * lib/readutmp.c (read_utmp): Likewise.
21782         Check for fstat error.  Close stream and free storage
21783         when failing.
21784
21785 2003-09-14  Karl Berry  <karl@gnu.org>
21786
21787         * config/srclist.txt (strdup.c): disable for c89 changes.
21788
21789 2003-09-14  Jim Meyering  <jim@meyering.net>
21790
21791         * lib/getloadavg.c: Correct cpp indentation.
21792         * lib/strdup.c: Likewise.
21793         * lib/vasnprintf.c: Likewise.
21794
21795 2003-09-14  Bruno Haible  <bruno@clisp.org>
21796
21797         * modules/fwriteerror: New file.
21798         * MODULES.html.sh (func_all_modules): Add fwriteerror.
21799
21800 2003-09-14  Bruno Haible  <bruno@clisp.org>
21801
21802         * lib/fwriteerror.h: New file.
21803         * lib/fwriteerror.c: New file.
21804
21805 2003-09-12  Paul Eggert  <eggert@twinsun.com>
21806
21807         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
21808         modules/xgethostname, modules/xalloc: Depend on exit.
21809
21810 2003-09-12  Paul Eggert  <eggert@twinsun.com>
21811
21812         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
21813
21814         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
21815         and AC_MINIX, too, so that their extensions are available.
21816
21817         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
21818         This macro has been superseded by gl_BACKUPFILE.
21819
21820         More patches to assume C89 or better.
21821
21822         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
21823
21824         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
21825         unconditionally.
21826         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
21827         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
21828         Include <string.h>, <stdlib.h> unconditionally.
21829         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
21830         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
21831         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
21832         headers or for string.h.
21833         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
21834         or strtoul.
21835
21836         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
21837         headers.
21838         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
21839         * m4/userspec.m4 (gl_USERSPEC): Likewise.
21840         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
21841         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
21842         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
21843         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
21844         memcpy, memset.
21845         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
21846         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
21847         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
21848         strtol.
21849         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
21850         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
21851         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
21852         strtoul.
21853
21854 2003-09-12  Paul Eggert  <eggert@twinsun.com>
21855
21856         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
21857         * lib/obstack.c [!defined _LIBC]: Likewise.
21858         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
21859         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
21860         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
21861
21862         More changes to assume C89 or better.
21863
21864         * lib/error.c (error_tail): Assume vprintf.
21865
21866         * lib/argmatch.c (getenv): Remove decl.
21867         * lib/progreloc.c (get_full_program_name): Define via prototype.
21868         * lib/setenv.c (clearenv): Likewise.
21869         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
21870         needed.
21871         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
21872         (malloc, memcpy): Remove decls.
21873         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
21874         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
21875         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
21876         (memcpy): Remove macro.
21877         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
21878         (__P): Remove.  All uses removed.
21879         (PTR): Remove.  All uses changed to void *.
21880         (CHAR_BIT, NULL): Remove.
21881         (spaces, zeros, memset_space, memset_zero)
21882         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
21883         Remove.
21884         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
21885         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
21886         Define with prototype.
21887         Remove now-unnecessary prototype decl.
21888         (extra_args_spec): Assume ANSI C.  All uses changed.
21889         (extra_args_spec_iso): Remove.
21890         (my_strftime, emacs_strftimeu): Define via prototype.
21891         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
21892         unconditionally.
21893         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
21894         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
21895         (strtoul, strtol): Remove decls.
21896         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
21897         LONG_MAX): Remove.
21898         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
21899         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
21900         (LOCALE_PARAM_PROTO): New macro.
21901         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
21902         (INTERNAL (strtol), strtol): Define with a prototype.
21903         (PARAMS): Remove.  All uses removed.
21904         * lib/tempname.c: Include <string.h> unconditionally.
21905         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
21906         * lib/xgethostname.c (main): Define with a prototype.
21907         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
21908         Include <stdlib.h> unconditionally.
21909         (calloc, malloc, realloc, free): Remove decls.
21910         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
21911         Include <stdlib.h> unconditionally.  Sort include file names.
21912         (strtod): Remove.
21913         (xstrtod): Define with a prototype.
21914         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
21915         (strtol, strtoul): Remove decls.
21916
21917 2003-09-11  Paul Eggert  <eggert@twinsun.com>
21918
21919         More patches to assume C89 or better.
21920         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
21921         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
21922         string.h, memchr, STDC_HEADERS.
21923
21924 2003-09-11  Paul Eggert  <eggert@twinsun.com>
21925
21926         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
21927         Include <stdlib.h>, <string.h> unconditionally.
21928         Remove now-unnecessary cast to char *.
21929         * lib/strnlen.c: Include <string.h> unconditionally.
21930         * lib/yesno.c (yesno): Define with a prototype.
21931
21932 2003-09-11  Bruno Haible  <bruno@clisp.org>
21933
21934         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
21935
21936 2003-09-10  Jim Meyering  <jim@meyering.net>
21937
21938         * lib/error.c: Correct indentation of cpp directives.
21939
21940 2003-09-10  Bruno Haible  <bruno@clisp.org>
21941
21942         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
21943         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
21944         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
21945         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
21946         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
21947         <stdlib.h> and <string.h> checks.
21948         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
21949         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
21950
21951 2003-09-10  Bruno Haible  <bruno@clisp.org>
21952
21953         * lib/strcspn.c: Include <string.h> unconditionally.
21954         * lib/strpbrk.c: Include <string.h> unconditionally.
21955         * lib/strstr.c: Include <string.h> unconditionally.
21956         * lib/unicodeio.c: Include <string.h> unconditionally.
21957         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
21958         * lib/unsetenv.c: Likewise.
21959         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
21960         * lib/yesno.c: Include <stdlib.h> unconditionally.
21961         (rpmatch): Add prototype.
21962
21963 2003-09-09  Paul Eggert  <eggert@twinsun.com>
21964
21965         More patches to assume C89 or better.
21966         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
21967         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
21968         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
21969         or for string.h.
21970         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
21971         stdlib.h.
21972         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
21973         C headers.
21974         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
21975         string.h.
21976         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
21977         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
21978         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
21979         or for string.h.
21980         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
21981         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
21982         C headers.
21983         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
21984         memcpy.
21985         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
21986         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
21987         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
21988         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
21989         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
21990         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
21991         string.h, free.
21992         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
21993         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
21994         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
21995         C headers, or for string.h.
21996         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
21997         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
21998         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
21999         headers, memory.h, stdlib.h, string.h, strings.h.
22000         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
22001         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
22002         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
22003         strchr.
22004         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
22005         headers, memory.h, string.h.
22006         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
22007         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
22008         free.
22009         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
22010         headers.
22011         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
22012         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
22013         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
22014         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
22015         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
22016
22017 2003-09-09  Paul Eggert  <eggert@twinsun.com>
22018
22019         More K&R removal.
22020
22021         * lib/acosl.c (main): Use a prototype.
22022         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
22023         tanl.c: Likewise.
22024
22025         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
22026
22027         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
22028         (getopt, etopt_long, getopt_long_only, _getopt_internal)
22029         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
22030         with a prototype.
22031         * lib/getopt.c (const): Remove macro.
22032         Include <string.h> unconditionally.
22033         (my_index): Remove; all uses changed to strchr.
22034         (strlen): Remove decl.
22035         (exchange): Remove forward decl; no longer needed.
22036         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
22037         Define with prototype.
22038         * lib/getopt1.c (const): Remove macro.
22039         (getopt_long, getopt_long_only, main): Define with prototype.
22040
22041         * lib/getugroups.c: Include <string.h> unconditionally.
22042
22043         * lib/getusershell.c: Include <stdlib.h> unconditionally.
22044         (getusershell, setusershell, endusershell, readname, main):
22045         Define with prototypes.
22046
22047         * lib/group-member.c: Include group-member.h first.
22048         Include <stdlib.h> unconditionally.
22049
22050         * lib/hard-locale.c: Include hard-locale.h first.
22051         Include <stdlib.h>, <string.h> unconditionally.
22052
22053         * lib/hash.c (free, malloc): Remove decls.
22054         Include <stdlib.h> unconditionally.
22055
22056         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
22057         (getenv): Do not declare.
22058
22059         * lib/idcache.c: Include <string.h> unconditionally.
22060
22061         * lib/long-options.c: Include long-options.h first, to test interface.
22062         Include <stdlib.h> unconditionally.
22063
22064         * lib/makepath.c: Include makepath.h first, to test interface.
22065         Include <stdlib.h> and <string.h> unconditionally.
22066
22067         * lib/linebuffer.c: Include <stdlib.h>.
22068         (free): Remove decl.
22069
22070         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
22071         stddef.h. rpl_malloc returns void *, not char *.
22072         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
22073         prototype.
22074
22075         * lib/md5.h: Include <limits.h> unconditionally.
22076         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
22077         (__P): Remove; all uses removed.
22078         * lib/md5.c: Include "md5.h" first.
22079         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
22080         md5_buffer, md5_process_bytes, md5_process_block):
22081         Define with prototypes.
22082         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
22083         * lib/sha.c: Include "sha.h" first.
22084         Include <stdlib.h>, <string.h> unconditionally.
22085
22086         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
22087         * lib/memcmp.c (__ptr_t): Likewise.
22088         * lib/memrchr.c (__ptr_t): Likewise.
22089         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
22090         Include <string.h> unconditionally.
22091         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
22092         * lib/memchr.c: Include <stdlib.h> unconditionally.
22093         * lib/memchr.c (LONG_MAX): Remove.
22094         * lib/memrchr.c (LONG_MAX): Likewise.
22095         * lib/memchr.c (__memchr): Define via a prototype.
22096         * lib/memrchr.c (__memrchr): Likewise.
22097         * lib/memcmp.c (__P): Remove, and remove all uses.
22098         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
22099         Remove forward decls; no longer needed.
22100         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
22101         Use types required by C89 in prototype.
22102
22103         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
22104         * lib/savedir.c: Likewise.
22105         * lib/mkdir.c (free): Remove decl.
22106         * lib/rmdir.c (rmdir): Define with a prototype.
22107         * lib/savedir.c: Include savedir.h first, to test interface.
22108
22109         * lib/mktime.c (STDC_HEADERS): Remove.
22110         Include <stdlib.h>, <string.h> unconditionally.
22111
22112         * lib/modechange.c: Include <stdlib.h> unconditionally.
22113         (malloc): Remove decl.
22114
22115         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
22116         (free): Remove decl.
22117
22118         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
22119         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
22120         (This type really should be intptr_t, but that's a C99ism.)
22121         (_obstack_memcpy): Remove: all uses changed to memcpy.
22122         Include <string.h> unconditionally.
22123         (struct obstack): Assume __STDC__ for types of members
22124         chunkfun, freefun, extra_arg.
22125         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
22126         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
22127         obstack_begin, obstack_specify_allocation,
22128         obstack_specify_allocation_with_arg, obstack_chunkfun,
22129         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
22130         Remove unprototyped decls and the macros that use them.
22131         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
22132         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
22133         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
22134         (defined __STDC__ && __STDC__)]:
22135         Remove nonprototyped code.
22136         Include <stdlib.h> unconditionally.
22137         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
22138         _obstack_allocated_p, _obstack_free, obstack_free,
22139         _obstack_memory_used, print_and_abort):
22140         Define using prototypes.
22141         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
22142         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
22143         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
22144         obstack_next_free, obstack_object_size, obstack_room) [0]:
22145         Remove unused, unprototyped code.
22146
22147         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
22148
22149         * lib/physmem.c (physmem_total, physmem_available, main): Define
22150         with prototypes.
22151
22152         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
22153         (main): Define with a prototype.
22154
22155         * lib/posixver.c (getenv): Remove decl.
22156
22157         * lib/putenv.c (malloc): Returns void *, not char *.
22158         Include <string.h> unconditionally.
22159         (strchr, memcpy, NULL): Do not define.
22160
22161         * lib/readtokens.c: Include readtokens.h first, to test interface.
22162         Include <stdlib.h>, <string.h> unconditionally.
22163         (init_tokenbuffer): Define with a prototype.
22164
22165         * lib/regex.c (PARAMS): Remove.  All uses removed.
22166         All uses of _RE_ARGS removed, too.
22167         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
22168         unconditionally.
22169         (bzero): Assume memset exists.
22170         (memcmp, memcpy, NULL): Remove.
22171         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
22172         char, or assignments to local vars of type signed char.
22173         (init_syntax_once, PREFIX(extract_number_and_incr),
22174         PREFIX(print_partial_compiled_pattern),
22175         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
22176         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
22177         PREFIX(regex_grow_registers), PREFIX(regex_compile),
22178         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
22179         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
22180         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
22181         wcs_compile_range, byte_compile_range, truncate_wchar,
22182         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
22183         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
22184         count_mbs_length, wcs_re_match_2_internal,
22185         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
22186         PREFIX(alt_match_null_string_p),
22187         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
22188         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
22189         regfree, PREFIX(extract_number)): Define with prototype.  Remove
22190         now-unnecessary declaration, if any.
22191         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
22192         regcomp, regexec):
22193         Remove now-unnecessary casts among pointer types.
22194         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
22195
22196         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
22197         (free): Remove decl.
22198
22199         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
22200
22201         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
22202         (free): Remove decl.
22203
22204         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
22205         * lib/xgetcwd.c: Likewise.
22206
22207         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
22208         (free): Remove decl.
22209
22210         * lib/strchrnul.c (strchrnul): Define with a prototype.
22211         Fix bug: c_in was not converted to char before searching.
22212
22213         The following changes are not K&R related:
22214
22215         * lib/group-member.h: Include <sys/types.h>, so that this file is
22216         self-contained.
22217         * lib/makepath.h: Likewise.
22218
22219         * lib/getusershell.c (readname, default_index, line_size, readname):
22220         Use size_t, not int, for sizes.
22221         (readname): If the size overflows, report an error instead of
22222         looping forever.
22223
22224 2003-09-09  Paul Eggert  <eggert@twinsun.com>
22225
22226         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
22227         libc.
22228
22229 2003-09-09  Paul Eggert  <eggert@twinsun.com>
22230
22231         * README: New section: portability guidelines.
22232
22233 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
22234
22235         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
22236         C89 spec.
22237
22238 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
22239
22240         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
22241
22242 2003-09-08  Paul Eggert  <eggert@twinsun.com>
22243
22244         Assume C89 or better; remove K&R cruft.
22245         A few of these changes were first proposed by Derek Robert Price
22246         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
22247
22248         * lib/addext.c: Include <string.h> unconditionally.
22249         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
22250         Don't declare getenv or malloc.
22251
22252         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
22253         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
22254         (NULL): Remove.
22255         (find_stack_direction, alloca): Use prototypes.
22256
22257         * lib/atexit.c (atexit): Define using a prototype.
22258
22259         * lib/basename.c, dirname.c, stripslash.c:
22260         Include <string.h> unconditionally.
22261
22262         * lib/bcopy.c: Include <stddef.h>.
22263         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
22264
22265         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
22266
22267         * lib/error.h (error, error_at_line, error_print_progname)
22268         [! (defined (__STDC__) && __STDC__)]: Remove decls.
22269         * lib/error.c: Include error.h first, to check interface.
22270         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
22271         (VA_START): Remove; all uses changeed to va_start.
22272         (exit, strerror): Remove decls.
22273         (error_print_progname): Prototype uncondionally.
22274         Don't include <errno.h>; no longer needed.
22275         (private_strerror): Remove.
22276         (error_tail): Always define.
22277         (error, error_at_line): Assume C89 or better; always use prototypes.
22278         * lib/fatal.c: Include "fatal.h" first, to test interface.
22279         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
22280         (VA_START): Remove; all uses changed to va_start.
22281         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
22282         this case.
22283         (exit): Remove decl.
22284         (fatal): Prototype unconditionally.  Assume va_start works.
22285         Abort at end, to pacify gcc.
22286
22287         * lib/euidaccess.c (main): Define with a prototype.
22288
22289         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
22290
22291         * lib/exitfail.c: Include <stdlib.h> unconditionally.
22292
22293         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
22294         prototypes.
22295         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
22296         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
22297         (getenv): Remove decl.
22298         (fnmatch): Define using a prototype.
22299         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
22300         (FCT): Define using a prototype.
22301
22302         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
22303
22304         * lib/gethostname.c: Include <stddef.h>.
22305         (gethostname): Define with prototype.  Length is size_t, not int.
22306
22307 2003-09-08  Paul Eggert  <eggert@twinsun.com>
22308
22309         Assume C89 or better; remove K&R cruft.
22310         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
22311         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
22312         string.h, getenv, malloc.
22313         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
22314         headers.
22315         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
22316         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
22317         do not check for strerror.
22318         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
22319         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
22320         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
22321         do not check for doprnt or vprintf.
22322         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
22323         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
22324
22325 2003-09-08  Paul Eggert  <eggert@twinsun.com>
22326
22327         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
22328         getversion.c should have been removed then, but was accidentally
22329         preserved.
22330
22331         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
22332         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
22333
22334 2003-09-08  Karl Berry  <karl@gnu.org>
22335
22336         * config/config.sub, config.guess, srclistvars.sh: update from savannah
22337                 config, forget about prep.
22338
22339         * config/depcomp, missing: update from automake.
22340
22341 2003-09-07  Paul Eggert  <eggert@twinsun.com>
22342
22343         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
22344         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
22345
22346 2003-09-07  Paul Eggert  <eggert@twinsun.com>
22347
22348         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
22349         copy_tm_result.  Bug reported by Simon Josefsson in
22350         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
22351
22352 2003-09-06  Paul Eggert  <eggert@twinsun.com>
22353
22354         * m4/time_r.m4: New file.
22355         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
22356         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
22357         is. Check for timegm declaration.
22358         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
22359         Do not check for gmtime_r.
22360         Replace mktime if __mktime_internal does not exist and if mktime
22361         hasn't been replaced already.
22362
22363 2003-09-06  Paul Eggert  <eggert@twinsun.com>
22364
22365         * lib/time_r.c, lib/time_r.h: New files.
22366
22367         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
22368         __localtime_r.
22369         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
22370         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
22371
22372         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
22373         __gmtime_r.
22374         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
22375         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
22376         Include <time_r.h>.
22377
22378         * lib/timegm.c: Switch to glibc implementation, with the following
22379         changes:
22380         [defined HAVE_CONFIG_H]: Include <config.h>.
22381         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
22382         (__mktime_internal) [!defined _LIBC]: New decl.
22383         (__gmtime_r) [!defined _LIBC]: New macro and function.
22384         (timegm): Use a prototype, since gnulib assumes C89.
22385         Do not bother declaring tmp to be const, as it's not really usefu.
22386         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
22387         (timegm): Declare only if HAVE_DECL_TIMEGM.
22388
22389 2003-09-06  Paul Eggert  <eggert@twinsun.com>
22390
22391         * MODULES.html.sh (func_all_modules): Add time_r.
22392         * modules/time_r: New file.
22393         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
22394         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
22395
22396 2003-09-03  Paul Eggert  <eggert@twinsun.com>
22397
22398         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
22399         Bug reported by Lute Kamstra in
22400         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
22401
22402         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
22403         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
22404         course with correspondingly smaller numbers for tomorrow and
22405         yesterday.  From Tadayoshi Funaba.  Originally installed into
22406         sh-utils on 1999-08-07, but the patch got lost (I guess during the
22407         coreutils merge?).
22408
22409 2003-08-31  Simon Josefsson  <jas@extundo.com>
22410
22411         * modules/timegm: New file.
22412         * MODULES.html.sh (func_all_modules): Add timegm.
22413
22414 2003-08-31  Simon Josefsson  <jas@extundo.com>
22415
22416         * m4/timegm.m4: New file.
22417
22418 2003-08-31  Simon Josefsson  <jas@extundo.com>
22419
22420         * lib/timegm.h: New file.
22421         * lib/timegm.c: New file.  Based on
22422         wget-1.8.2/src/http.c:mktime_from_utc.
22423
22424 2003-08-31  Karl Berry  <karl@gnu.org>
22425
22426         * lib/argp.h: update from libc.
22427
22428 2003-08-28  Bruno Haible  <bruno@clisp.org>
22429
22430         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
22431         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
22432         followed by '#define fnmatch fnmatch_posix' gives an error.
22433
22434 2003-08-28  Bruno Haible  <bruno@clisp.org>
22435
22436         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
22437         warning on QNX, which defines O_BINARY to 000000.
22438
22439 2003-08-27  Jim Meyering  <jim@meyering.net>
22440
22441         * m4/mkstemp.m4: Require that the system mkstemp be able to create
22442         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
22443         would fail after 32.  Reported by Danny Levinson.  Details here:
22444         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
22445
22446 2003-08-24  Bruno Haible  <bruno@clisp.org>
22447
22448         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
22449         MSVC7 <stdio.h> is included later.
22450
22451 2003-08-22  Simon Josefsson  <jas@extundo.com>
22452
22453         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
22454
22455 2003-08-20  Karl Berry  <karl@gnu.org>
22456
22457         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
22458
22459 2003-08-20  Bruno Haible  <bruno@clisp.org>
22460
22461         * modules/progname: New file.
22462         * MODULES.html.sh (func_all_modules): Add progname.
22463
22464 2003-08-20  Bruno Haible  <bruno@clisp.org>
22465
22466         * lib/progname.h: New file, from GNU gettext.
22467         * lib/progname.c: New file, from GNU gettext.
22468         * lib/progreloc.c: New file, from GNU gettext.
22469
22470 2003-08-19  Jim Meyering  <jim@meyering.net>
22471
22472         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
22473         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
22474
22475 2003-08-19  Bruno Haible  <bruno@clisp.org>
22476
22477         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
22478         more.
22479
22480 2003-08-19  Bruno Haible  <bruno@clisp.org>
22481
22482         * lib/xstrdup.c: Assume <string.h> exists.
22483
22484 2003-08-18  Paul Eggert  <eggert@twinsun.com>
22485
22486         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
22487         in makefile rules.
22488
22489 2003-08-18  Jim Meyering  <jim@meyering.net>
22490
22491         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
22492         * m4/lib-ld.m4: Likewise.
22493
22494 2003-08-18  Jim Meyering  <jim@meyering.net>
22495
22496         * lib/setenv.h: Indent nested cpp directive.
22497         * lib/vasnprintf.c: Remove trailing blanks.
22498
22499 2003-08-17  Simon Josefsson  <jas@extundo.com>
22500
22501         * modules/xstrndup: New file.
22502         * MODULES.html.sh (func_all_modules): Add xstrndup.
22503
22504 2003-08-17  Simon Josefsson  <jas@extundo.com>
22505
22506         * modules/argp: Fix autoconf macro name. Add more dependencies.
22507
22508 2003-08-17  Simon Josefsson  <jas@extundo.com>
22509
22510         * m4/xstrndup.m4: New file.
22511
22512 2003-08-17  Simon Josefsson  <jas@extundo.com>
22513
22514         * m4/argp.m4: New file.
22515
22516 2003-08-17  Simon Josefsson  <jas@extundo.com>
22517             Bruno Haible  <bruno@clisp.org>
22518
22519         * lib/xstrndup.h: New file.
22520         * lib/xstrndup.c: New file.
22521
22522 2003-08-17  Bruno Haible  <bruno@clisp.org>
22523
22524         * modules/strndup (Files, Include): Add lib/strndup.h.
22525
22526 2003-08-17  Bruno Haible  <bruno@clisp.org>
22527
22528         * modules/euidaccess (Files): Add lib/euidaccess.h.
22529
22530 2003-08-17  Bruno Haible  <bruno@clisp.org>
22531
22532         * lib/strndup.h: New file.
22533
22534 2003-08-17  Bruno Haible  <bruno@clisp.org>
22535
22536         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
22537         like AC_GNU_SOURCE.
22538         * modules/extensions (configure.ac): Comment out the invocation of
22539         gl_USE_SYSTEM_EXTENSIONS.
22540
22541 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22542
22543         Merges from coreutils, etc.
22544         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
22545         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
22546         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
22547         fixing a typo.
22548         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
22549         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
22550
22551 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22552
22553         Document merge from coreutils.
22554         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
22555         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
22556         * modules/utime: Add m4/utimes-null.m4.
22557
22558 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22559
22560         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
22561         space, undoing this 2003-08-12 change:
22562         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
22563
22564 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22565
22566         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
22567         strtoul.c from libc, undoing this 2003-08-12 change:
22568         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
22569
22570 2003-08-16  Jim Meyering  <jim@meyering.net>
22571
22572         Merges from coreutils.
22573         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
22574         prefix.  Adjust cache variables similarly.  Create 500 rather than
22575         just 300 files, to exercise bug on Darwin6.5, too.
22576         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
22577         $missing_dir.
22578         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
22579         AM_SYS_POSIX_TERMIOS.
22580         Reported by mkc@mathdogs.com.
22581         Also change use of $am_cv_sys_posix_termios
22582         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
22583         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
22584         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
22585         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
22586         in /proc/mounts until it finds one with matching device number.  This
22587         is unnecessary when the FILE argument *is* a mount point.  No stat call
22588         is necessary in that case.  So, disable the statvfs-testing code on
22589         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
22590         as RedHat bug# 84846.
22591         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
22592         to 1MB, so as not to render systems with no stack size limit (e.g.,
22593         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
22594         Include <unistd.h>.  On some systems,
22595         it is required for the definition of _SC_PAGESIZE.
22596
22597 2003-08-16  Jim Meyering  <jim@meyering.net>
22598
22599         Merge from coreutils.
22600         * lib/xstrtoimax.c: #else #if -> #elif.
22601         * lib/xstrtoumax.c: Likewise.
22602
22603 2003-08-16  Jim Meyering  <jim@meyering.net>
22604
22605         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
22606         * m4/utimes.m4: Removed.
22607         * m4/utimes-null.m4: Renamed from utimes.m4.
22608
22609         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
22610         to 1MB, so as not to render systems with no stack size limit (e.g.,
22611         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
22612         Include <unistd.h>.  On some systems,
22613         it is required for the definition of _SC_PAGESIZE.
22614
22615 2003-08-16  Jim Meyering  <jim@meyering.net>
22616         and Paul Eggert  <eggert@cs.ucla.edu>
22617
22618         Merges from coreutils, etc.
22619
22620         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
22621         using the latest version from cvs.  This avoids problems with #line
22622         directives using a vendor (Sun) compiler.
22623         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
22624         Don't set GETGROUPS_LIB here; now it's
22625         done via getgroups.m4's wrapper function.
22626         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
22627         rather than just in sh-util/configure.in, so that the
22628         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
22629         same.
22630         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
22631         AC_FUNC_GETLOADAVG where to find getloadavg.c.
22632         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
22633         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
22634         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
22635         Remove code that is now done by the newly-required macros.
22636         Append $(EXEEXT) to DF_PROG.
22637         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
22638         Do not invoke or require the following here,
22639         since prereq.m4 or some gnulib .m4 now does this for us:
22640         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
22641         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
22642         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
22643         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
22644         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
22645         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
22646         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
22647         AC_FUNC_OBSTACK.
22648         Do not replace the following functions, as this is now the job
22649         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
22650         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
22651         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
22652         atexit getpass, strdup, getpagesize.
22653         Replace 'raise'.
22654         Do not check for the following functions, as this is now the job
22655         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
22656         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
22657         setregid.
22658         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
22659         Check for sys/sysctl.h.
22660         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
22661         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
22662         of checking for ssize_t ourselves.
22663
22664         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
22665         Require every macro that gnulib/modules/* suggests for us.
22666         (jm_PREREQ_ADDEXT): New macro.
22667         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
22668         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
22669
22670         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
22671         (gl_PHYSMEM): Use it.
22672         Also check for `table' function.
22673         Check for new headers and functions.
22674         Add check for sys/sysmp.h.
22675         With suggestions from Kaveh Ghazi.
22676         Ignore headers that are present but cannot be compiled.  This
22677         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
22678         C 5.4.
22679
22680 2003-08-15  Paul Eggert  <eggert@twinsun.com>
22681
22682         Document merge from coreutils.
22683         * modules/userspec: Depend on posixver.
22684         * modules/strftime: Depend on tzset.
22685
22686 2003-08-15  Paul Eggert  <eggert@twinsun.com>
22687
22688         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
22689         rather than tab, after '#' in shell-script copyright notices.
22690         Suggested by Bruno Haible.
22691
22692 2003-08-15  Paul Eggert  <eggert@twinsun.com>
22693
22694         * config/srclist-update: Use three spaces, rather than tab, after '#'
22695         in shell-script copyright notices.  Suggested by Bruno Haible.
22696         Remove unnecessary parenthesization in regular expression.
22697
22698 2003-08-15  Jim Meyering  <jim@meyering.net>
22699
22700         Merge from coreutils.
22701         * lib/xgethostname.c: Include <stdlib.h>.
22702         (xghostname): Don't exit for anything other than memory-related
22703         failure; just return NULL.
22704         * lib/userspec.c: Include "posixver.h".
22705         (parse_user_spec): Accept `.' as a separator only
22706         in pre-POSIX-200112 mode.
22707         * lib/strtoimax.c: Use #elif rather than #else #if.
22708         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
22709         Remove function, now that we can rely on a working tzset function.
22710         [!_LIBC]: Ensure that the required autoconf test has been run.
22711         [!defined _NL_CURRENT && HAVE_STRFTIME]:
22712         Use underlying_strftime for %r.
22713         * lib/sha.c: Merge in some clean-up and optimization changes from
22714         glibc.
22715         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
22716         Ensure that it is a multiple of 64.
22717         Rearrange loop exit tests so as to avoid performing an
22718         additional fread after encountering an error or EOF.
22719         * lib/realloc.c: Update copyright date.
22720
22721 2003-08-15  Jim Meyering  <jim@meyering.net>
22722         and Paul Eggert  <eggert@twinsun.com>
22723
22724         Merge from coreutils.
22725         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
22726         member but strut utmpx does not.  Needed for AIX 4.3.3.
22727         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
22728
22729 2003-08-15  Jim Meyering  <jim@meyering.net>
22730         and Paul Eggert  <eggert@cs.ucla.edu>
22731
22732         Merges from coreutils, etc.
22733         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
22734         Require gl_FUNC_TZSET_CLOBBER.
22735         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
22736         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
22737         members.
22738
22739 2003-08-14  Paul Eggert  <eggert@twinsun.com>
22740
22741         Help the merge from coreutils.
22742         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
22743         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
22744         * m4/tzset.m4: Use it too.
22745
22746 2003-08-14  Paul Eggert  <eggert@twinsun.com>
22747
22748         * modules/tzset: New file.
22749
22750 2003-08-14  Jim Meyering  <jim@meyering.net>
22751
22752         Merges from coreutils.
22753         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
22754         variable names, rather than @FNMATCH_H@.
22755         * modules/alloca: Likewise for $(ALLOCA_H).
22756
22757         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
22758         the three copies of the literal target, `fnmatch.h'.
22759         * modules/alloca (alloca.h): Likewise.
22760
22761 2003-08-14  Jim Meyering  <jim@meyering.net>
22762
22763         Merge from coreutils.
22764         * m4/tzset.m4: New file.
22765         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
22766         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
22767         otherwise, AIX 5.1 systems would end up using the latter.
22768         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
22769         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
22770         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
22771         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
22772
22773 2003-08-14  Jim Meyering  <jim@meyering.net>
22774
22775         Merge from coreutils.
22776         * lib/obstack.h: Whitespace changes.
22777         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
22778         and xcalloc return values.
22779         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
22780         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
22781         hang on OSF/1 5.1 for DIR on both local and remote file systems.
22782         Reported by (and fix confirmed by) Nelson H. F. Beebe.
22783         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
22784         error from mntctl.
22785         Use mntctl's return value to drive the entry-processing loop, since
22786         we can't rely on the value of the vmt_length member in the last
22787         entry.  On some systems doing so could result in exhausting
22788         virtual memory.  Based in part on a patch from Mike Jetzer.
22789
22790 2003-08-14  Jim Meyering  <jim@meyering.net>
22791         and Paul Eggert  <eggert@twinsun.com>
22792
22793         Merges from coreutils, plus other fixes.
22794         * lib/physmem.c: Merge in portability changes from gcc/libiberty
22795         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
22796         for credits and details.  Thanks to Kaveh Ghazi for helping
22797         to keep these files in sync.
22798         (ARRAY_SIZE): Define it.
22799         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
22800         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
22801         (memcasecmp): Don't assume size_t fits in unsigned int.
22802         Remove casts and duplicate code.
22803         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
22804         (memcpy): Remove definition.
22805         Merge in some clean-up and optimization changes from glibc.
22806         [BLOCKSIZE]: Move definition to top of file.
22807         Ensure that it is a multiple of 64.
22808         Rearrange loop exit tests so as to avoid performing an
22809         additional fread after encountering an error or EOF.
22810         * lib/md5.h (md5_uintptr): Define.
22811         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
22812         return to the initial working directory.  Preserve errno
22813         for caller.
22814         * lib/idcache.c: Include "xalloc.h".
22815         (xmalloc, xrealloc): Remove decls.
22816         (getuser): Remove casts no longer required in C89.
22817         * lib/human.c: Include stdio.h, for sprintf.
22818         * lib/group-member.c: Include "xalloc.h".
22819         (xmalloc, xrealloc): Remove decls.
22820         (get_group_info): Remove casts no longer required in C89.
22821         * lib/getusershell.c (readname): Remove casts no longer required in
22822         C89.
22823         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
22824         * lib/getline.c: Whitespace fix, from coreutils.
22825
22826 2003-08-13  Paul Eggert  <eggert@twinsun.com>
22827
22828         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
22829         Check for isascii.
22830
22831         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
22832         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
22833         Undo previous (whitespace-only) change.
22834
22835 2003-08-13  Paul Eggert  <eggert@twinsun.com>
22836
22837         * lib/exclude.c: Include <ctype.h>
22838         (IN_CTYPE_DOMAIN): New macro.
22839         (is_space): New fn.
22840         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
22841         and empty lines.
22842
22843         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
22844         Undo previous (whitespace-only) change.
22845
22846 2003-08-13  Paul Eggert  <eggert@twinsun.com>
22847
22848         * config/srclist-update: Change update back to the old behavior,
22849         leaving whitespace alone.  Use one 'sed' command rather than a
22850         pipeline.
22851         (fixlicense): Now a variable, not a function.
22852         (remove_trailing_blanks): Remove.
22853         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
22854         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
22855         Undo previous (whitespace-only) change.
22856
22857 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22858
22859         Merge from coreutils.
22860         * modules/euidaccess: Add lib_SOURCES, include for new
22861         file euidaccess.h
22862
22863 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22864
22865         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
22866         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
22867         Normalize leading white space and remove trailing white space.
22868
22869         Merge from coreutils
22870         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
22871
22872         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
22873         0.12.1.  These files are now being upgraded automatically by
22874         ../config/srclist-update.
22875
22876 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22877
22878         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
22879         Normalize leading white space and remove trailing white space.
22880         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
22881         notice, as per ../config/srclist-update.
22882
22883         Merge from coreutils.
22884         * lib/euidaccess.h: New file.
22885         * lib/euidaccess.c: Include it.
22886         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
22887         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
22888         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
22889
22890 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22891
22892         * config/srclist-update: Add copyright notice.
22893         (remove_id_lines, remove_trailing_blanks): New constants.
22894         (fixfile): Use them to normalize spacing a bit in copied files.
22895         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
22896         Normalize leading white space and remove trailing white space.
22897
22898         * config/texinfo.tex: Sync with texinfo.
22899
22900         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
22901         strtoul.c from libc, to merge coreutils whitespace changes.
22902
22903         * config/srclist.txt: Get the following m4 files from gettext:
22904         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
22905         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
22906         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
22907         wint_t.m4.
22908
22909 2003-08-12  Karl Berry  <karl@gnu.org>
22910
22911         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
22912         been made.
22913
22914 2003-08-11  Paul Eggert  <eggert@twinsun.com>
22915
22916         * modules/gnu-source, m4/gnu-source.m4:
22917         Remove; we're assuming Autoconf 2.54 or later now.
22918         Suggested by Bruno Haible.
22919         * MODULES.html.sh (func_all_modules): Remove gnu-source.
22920
22921 2003-08-11  Bruno Haible  <bruno@clisp.org>
22922
22923         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
22924
22925 2003-08-11  Bruno Haible  <bruno@clisp.org>
22926
22927         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
22928         (vasnprintf): Use it instead of wcslen.
22929
22930 2003-08-11  Bruno Haible  <bruno@clisp.org>
22931
22932         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
22933         value to ensure that _Bool promotes to int. Use #define for _Bool when
22934         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
22935
22936 2003-08-10  Karl Berry  <karl@gnu.org>
22937
22938         * lib/regex.h: update from libc (whitespace fix).
22939
22940 2003-08-09  Paul Eggert  <eggert@twinsun.com>
22941
22942         Merge some files from coreutils.  These changes were
22943         originally made by Jim Meyering.
22944         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
22945         many older Unixes require this.
22946         * lib/alloca.c (alloca): Remove cast to argument of free;
22947         no longer needed in C89.
22948         * lib/alloca_.h, regex.h: Fix white space to match
22949         what GNU indent does.
22950
22951 2003-08-09  Paul Eggert  <eggert@twinsun.com>
22952
22953         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
22954         apparently Emacs's Unicode mode got confused before my 2003-08-05
22955         checkin.
22956
22957 2003-08-08  Paul Eggert  <eggert@twinsun.com>
22958
22959         * m4/extensions.m4: New file.
22960         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
22961         Require gl_USE_SYSTEM_EXTENSIONS.
22962         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
22963         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
22964
22965 2003-08-08  Paul Eggert  <eggert@twinsun.com>
22966
22967         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
22968         * modules/extensions, modules/gnu-source: New files.
22969         * modules/timespec, modules/unlocked-io: Depend on extensions.
22970
22971 2003-08-07  Paul Eggert  <eggert@twinsun.com>
22972
22973         * modules/restrict: New file.
22974         * MODULES.html.sh (func_all_modules): Add restrict.
22975         * modules/regex: Depend on restrict.
22976
22977 2003-08-07  Paul Eggert  <eggert@twinsun.com>
22978
22979         * m4/restrict.m4: New file.
22980         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
22981
22982 2003-08-07  Bruno Haible  <bruno@clisp.org>
22983
22984         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
22985         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
22986
22987 2003-08-07  Bruno Haible  <bruno@clisp.org>
22988
22989         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
22990         makes the module 'getndelim2' compatible with the module 'getline'.
22991
22992 2003-08-05  Paul Eggert  <eggert@twinsun.com>
22993
22994         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
22995         byte with "\201" to avoid glitches when editing that source file
22996         with multi-gnome-terminal.
22997
22998 2003-08-05  Paul Eggert  <eggert@twinsun.com>
22999
23000         * lib/bumpalloc.h: Remove.
23001
23002 2003-08-05  Paul Eggert  <eggert@twinsun.com>
23003
23004         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
23005         * modules/bumpalloc: Remove.
23006
23007 2003-08-04  Paul Eggert  <eggert@twinsun.com>
23008
23009         * lib/getloadavg.c: Change copyright notice and spacing to conform to
23010         GNU coding style.
23011
23012         Merge from coreutils.
23013         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
23014         1. From glibc.
23015         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
23016         from Karl Berry, implemented by Jim Meyering.
23017         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
23018         from Dmitry V. Levin.
23019         Remove anachronistic cast of xrealloc.
23020         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
23021         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
23022         type. Otherwise, it wouldn't compile with at least /bin/cc on
23023         ymp-cray-unicos9.0.2.X.
23024         Combine two mostly-identical uses of alloca into one.
23025         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
23026
23027 2003-08-04  Dave Love  <d.love@dl.ac.uk>
23028
23029         [From Emacs.]
23030
23031         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
23032         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
23033         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
23034         obsolete NLIST_NAME_UNION.
23035         [__GNU__]: Undef BSD and FSCALE.
23036         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
23037
23038 2003-08-03  Paul Eggert  <eggert@twinsun.com>
23039
23040         * lib/stdbool_.h (_Bool): Make it signed char, instead of
23041         an enum type, so that it's guaranteed to promote to int.  See:
23042         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
23043
23044 2003-08-03  Karl Berry  <karl@gnu.org>
23045
23046         * config/depcomp: update from automake.
23047
23048 2003-07-31  Paul Eggert  <eggert@twinsun.com>
23049
23050         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
23051         (strerror): Don't assume that a printable int fits in 14 bytes.
23052
23053 2003-07-31  Bruno Haible  <bruno@clisp.org>
23054
23055         * modules/getpass-gnu: New file.
23056         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
23057
23058 2003-07-31  Bruno Haible  <bruno@clisp.org>
23059
23060         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
23061
23062 2003-07-24  Karl Berry  <karl@gnu.org>
23063
23064         * config/missing: update from automake.
23065
23066 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
23067             Bruno Haible  <bruno@clisp.org>
23068
23069         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
23070         * lib/getline.c (getline, getdelim): Likewise.
23071         Remove _GNU_SOURCE define; now it's defined in config.h through
23072         m4/getline.m4.
23073
23074 2003-07-23  Karl Berry  <karl@gnu.org>
23075
23076         * config/config.sub: update from prep.
23077
23078 2003-07-22  Paul Eggert  <eggert@twinsun.com>
23079
23080         * modules/xalloc (Depends-on): Add exitfail.
23081         * modules/xmemcoll: Likewise.
23082
23083 2003-07-22  Paul Eggert  <eggert@twinsun.com>
23084
23085         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
23086         over-parenthesization in macros.
23087
23088         Sync with coreutils.
23089
23090         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
23091         required by C99.
23092
23093         Use `exit_failure' for xalloc and xmemcoll instead of their own
23094         private exit-failure variables.
23095         * lib/xalloc.h (xalloc_exit_failure): Remove.
23096         * lib/xmalloc.c: Likewise.  Include exitfail.h.
23097         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
23098         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
23099         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
23100         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
23101
23102 2003-07-20  Jim Meyering  <jim@meyering.net>
23103
23104         * modules/closeout (Depends-on): Add exitfail.
23105         Suggestion from Bruno Haible.
23106
23107 2003-07-19  Karl Berry  <karl@gnu.org>
23108
23109         * config/config.sub: update from prep.
23110
23111 2003-07-18  Paul Eggert  <eggert@twinsun.com>
23112
23113         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
23114         Remove.
23115         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
23116         to test that it can stand by itself.  Include "exitfail.h".
23117         Clients should set exit_failure instead.
23118         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
23119
23120 2003-07-18  Bruno Haible  <bruno@clisp.org>
23121
23122         * modules/getndelim2: New file.
23123         * modules/getline: Share files with module getndelim2.
23124         * modules/getnline: Depend on getndelim2 instead of sharing files with
23125         it. Add getnline.c to lib_SOURCES.
23126         * MODULES.html.sh (func_all_modules): Add getndelim2.
23127
23128 2003-07-18  Bruno Haible  <bruno@clisp.org>
23129
23130         * m4/getndelim2.m4: New file.
23131         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
23132         invoke gl_PREREQ_GETNDELIM2.
23133         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
23134         gl_PREREQ_GETNDELIM2.
23135         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
23136         gl_GETNDELIM2.
23137
23138 2003-07-18  Bruno Haible  <bruno@clisp.org>
23139
23140         * lib/getndelim2.h: New file.
23141         * lib/getndelim2.c: Make into a module of its own. Include config.h,
23142         getndelim2.h.
23143         (getndelim2): Make non-static. Change return type to ssize_t.
23144         * lib/getline.h: Change argument names.
23145         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
23146         * lib/getnline.c: Include getndelim2.h.
23147
23148 2003-07-18  Andreas Schwab  <schwab@suse.de>
23149
23150         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
23151
23152 2003-07-17  Karl Berry  <karl@gnu.org>
23153
23154         * config/config.sub: update from prep.
23155
23156 2003-07-17  Bruno Haible  <bruno@clisp.org>
23157
23158         * modules/getnline: New file.
23159         * modules/getline: Add lib/getndelim2.c to source file list.
23160         * MODULES.html.sh (func_all_modules): Add getnline.
23161
23162 2003-07-17  Bruno Haible  <bruno@clisp.org>
23163
23164         * m4/getnline.m4: New file.
23165
23166 2003-07-17  Bruno Haible  <bruno@clisp.org>
23167
23168         * m4/Makefile.am.in: Remove file.
23169         * m4/Makefile.am: Remove file.
23170         * m4/Makefile.in: Remove file.
23171
23172 2003-07-17  Bruno Haible  <bruno@clisp.org>
23173
23174         * lib/getnline.h: New file.
23175         * lib/getnline.c: New file.
23176         * lib/getndelim2.c: New file, extracted from getline.c.
23177         (getndelim2): Renamed from getdelim2, with added nmax argument.
23178         * lib/getline.c: Include getndelim2.c.
23179         (getdelim2): Moved out to getndelim2.c.
23180         (getline, getdelim): Update.
23181
23182 2003-07-17  Bruno Haible  <bruno@clisp.org>
23183
23184         * lib/Makefile.am: Remove file.
23185         * lib/Makefile.in: Remove file.
23186
23187 2003-07-17  Bruno Haible  <bruno@clisp.org>
23188
23189         * configure.in: Remove file.
23190         * Makefile.in: Remove file.
23191
23192 2003-07-17  Bruno Haible  <bruno@clisp.org>
23193
23194         * MODULES.html.sh: Put the </BODY> right before </HTML>.
23195
23196 2003-07-16  Karl Berry  <karl@gnu.org>
23197
23198         * config/srclist-update: was running fixlicense twice, which caused
23199                 texinfo.tex to be nullified for some reason.  Simplify,
23200                 $gplsrc is no longer needed as far as I can see?
23201
23202 2003-07-16  Jim Meyering  <jim@meyering.net>
23203
23204         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
23205
23206 2003-07-15  Paul Eggert  <eggert@twinsun.com>
23207
23208         * config/srclist.txt: Get the following files from gettext-runtime/intl
23209         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
23210         ref-del.sin.  From Bruno Haible.
23211         * config/srclist-update (fixfile): Change grep pattern again, since the
23212         previous fix didn't work (there was another trailing $).  Use
23213         '[$]' to escape the $s.
23214
23215 2003-07-15  Karl Berry  <karl@gnu.org>
23216
23217         * lib/vasnprintf.c: update from gettext.
23218
23219 2003-07-15  Karl Berry  <karl@gnu.org>
23220
23221         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
23222         gets expanded when surrounded by '$'.
23223
23224 2003-07-15  Jim Meyering  <jim@meyering.net>
23225
23226         * modules/save-cwd: Don't depend on error.  From Derek Price.
23227
23228 2003-07-15  Jim Meyering  <jim@meyering.net>
23229
23230         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
23231
23232 2003-07-14  Simon Josefsson  <jas@extundo.com>
23233
23234         * modules/mempcpy: New file.
23235         * MODULES.html.sh (func_all_modules): Add mempcpy.
23236
23237 2003-07-14  Simon Josefsson  <jas@extundo.com>
23238
23239         * m4/mempcpy.m4: New file.
23240
23241 2003-07-14  Simon Josefsson  <jas@extundo.com>
23242
23243         * lib/mempcpy.h: New file.
23244         * lib/mempcpy.c: New file.
23245
23246 2003-07-14  Paul Eggert  <eggert@twinsun.com>
23247
23248         * modules/getdate, modules/posixtm: Depend on mktime.
23249
23250 2003-07-14  Paul Eggert  <eggert@twinsun.com>
23251
23252         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
23253         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
23254         unicodeio.c, unicodeio.h, unlocked-io.h:
23255         Switch from LGPL to GPL.
23256
23257 2003-07-14  Paul Eggert  <eggert@twinsun.com>
23258
23259         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
23260         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
23261         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
23262         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
23263         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
23264         updated automatically by ../config/srclist-update.  This changes
23265         their license from LPGL to GPL.
23266
23267 2003-07-14  Paul Eggert  <eggert@twinsun.com>
23268
23269         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
23270         assumed to refer to the root of the most recent stable gettext version.
23271         * config/srclistvars.sh: Add defaults for eggert.
23272         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
23273         Match "This program" as well as "The program".  This is needed
23274         for gettext.
23275
23276 2003-07-14  Jim Meyering  <jim@meyering.net>
23277
23278         Don't emit diagnostics.  Let callers do that.
23279         * lib/save-cwd.c: Don't include "error.h".
23280         (save_cwd): Don't call error.  Ensure that errno is valid
23281         when returning nonzero.
23282
23283         * lib/save-cwd.h (restore_cwd): Update prototype.
23284         * lib/save-cwd.c (restore_cwd): Remove two parameters.
23285         Simplify.  Don't call error upon failure.  Let callers do that.
23286         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
23287         when auditing is enabled.  But don't bother updating the #if.
23288
23289 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
23290
23291         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
23292         it breaks C++ compilation.
23293         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
23294
23295 2003-07-10  Simon Josefsson  <jas@extundo.com>
23296
23297         * modules/strchrnul (Makefile.am): Add strchrnul.h.
23298
23299 2003-07-10  Jim Meyering  <jim@meyering.net>
23300
23301         * m4/clock_time.m4: Remove trailing blank.
23302         * m4/intmax_t.m4: Likewise.
23303
23304 2003-07-10  Jim Meyering  <jim@meyering.net>
23305
23306         * lib/vasnprintf.c: Remove trailing blanks.
23307         Make cpp indentation consistent.
23308
23309 2003-07-09  Paul Eggert  <eggert@twinsun.com>
23310
23311         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
23312         posixver.c, strftime.c, strnlen.c, strverscmp.c:
23313         Switch from LGPL to GPL.
23314
23315 2003-07-09  Paul Eggert  <eggert@twinsun.com>
23316
23317         * config/srclist.txt: Sort sublists.  Add
23318         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
23319         that differ from gnulib for one reason or another; we'd like this list
23320         to be smaller but for now let's document what we have.
23321
23322 2003-07-08  Paul Eggert  <eggert@twinsun.com>
23323
23324         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
23325         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
23326         and sweeter "eval x=$x".
23327         * config/srclist.txt: Get lib/argp* from glibc.
23328
23329 2003-07-07  Paul Eggert  <eggert@twinsun.com>
23330
23331         * lib/mktime.c: Fix some boundary cases and remove need for floating
23332         point.
23333
23334         Issue a compile-time diagnostic if time_t is floating point, or if
23335         two's complement arithmetic is not in effect, or if arithmetic
23336         right shift does not propagate the sign.  These assumptions were
23337         all in the original code but they weren't checked.
23338
23339         (TIME_T_MIDPOINT, verify): New macros.
23340         (__isleap): Remove; it has integer overflow problems.
23341         (leapyear): New function, without those problems.
23342         (ydhms_tm_diff): Remove; splitting into two parts.
23343         (ydhms_diff): New function, containing the arithmetic part of
23344         the old ydhms_tm_diff function.  Issue a compile-time
23345         diagnostic if we are not using C99 integer division.
23346         Avoid casts when possible.
23347         (guess_time_tm): New function, containing the checking part of
23348         the old ydhms_tm_diff function.  Return the new value, rather than
23349         the difference between it and the old.  Accept a new argument T
23350         so that *T specifies the old value.  Check for overflow in the result.
23351
23352         (__mktime_internal): Use a time_t offset, not a long int offset.
23353         This undoes the 2003-06-04 change, which is no longer needed now
23354         that we have better overflow checking.
23355         (localtime_offset): Likewise.
23356
23357         (__mktime_internal): Avoid harmful overflow on hosts where time_t
23358         and long are 64-bit but int is only 32-bit.
23359         (ydhms_diff): Use long int to store year1 and yday1.
23360         Issue a compile-time diagnostic if long int is not wide enough.
23361
23362         (__mktime_internal): Use long int to store adjusted year and yday.
23363         Use plain C rather than preprocessor commands, if that doesn't
23364         affect efficiency.
23365         Check for overflow (and try to repair) after each probe
23366         rather than checking only at the very end.  This avoids some bugs
23367         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
23368         does not equal GMT offset at maximum time).
23369         Use integer to check for overflow rather than floating point; this
23370         is more portable to non-IEEE hosts, and is a tad faster.
23371         When we detect that we are oscillating between two values,
23372         don't check whether tm_isdst has the requested value, since
23373         we already know the answer.  When tm_isdst has the wrong value,
23374         use a different heuristic to find the right one, based on the
23375         extreme values actually observed in practice in tz2003a,
23376         rather than the (overly optimistic) "previous 3 calendar quarters".
23377
23378         (not_equal_tm, print_tm, check_result): Use "const T" rather than
23379         "T const" to accommodate glibc style.
23380         (check_result): Use less-confusing report format.  "long" -> "long int.
23381         (main): Likewise.
23382         Don't loop if the iteration overflows time_t.
23383         Allow a negative step in the iteration.
23384
23385 2003-07-06  Karl Berry  <karl@gnu.org>
23386
23387         * config/depcomp: update from automake.
23388         * config/config.sub: update from prep.
23389
23390 2003-07-03  Karl Berry  <karl@gnu.org>
23391
23392         * config/config.guess: update from prep.
23393
23394 2003-07-01  Paul Eggert  <eggert@twinsun.com>
23395
23396         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
23397         xreadlink.c now includes it unconditionally.
23398
23399 2003-07-01  Paul Eggert  <eggert@twinsun.com>
23400
23401         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
23402         having it depend on HAVE_SYS_TYPES_H.
23403
23404 2003-07-01  Bruno Haible  <bruno@clisp.org>
23405
23406         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
23407         <sys/types.h> should be sufficient.
23408         Reported by Paul Eggert.
23409
23410 2003-06-26  Karl Berry  <karl@gnu.org>
23411
23412         * config/depcomp: update from automake.
23413
23414 2003-06-26  Bruno Haible  <bruno@clisp.org>
23415
23416         * modules/human: Depend on module stdbool.
23417
23418 2003-06-25  Bruno Haible  <bruno@clisp.org>
23419
23420         * modules/readlink: New file.
23421         * modules/xreadlink: Depend on it.
23422         * MODULES.html.sh (func_all_modules): Add readlink.
23423
23424 2003-06-25  Bruno Haible  <bruno@clisp.org>
23425
23426         * m4/readlink.m4: New file.
23427
23428 2003-06-25  Bruno Haible  <bruno@clisp.org>
23429
23430         * lib/readlink.c: New file.
23431
23432 2003-06-22  Karl Berry  <karl@gnu.org>
23433
23434         * config/srclist.txt: update mkinstalldirs from automake.
23435         * config/mkinstalldirs: update.
23436
23437 2003-06-22  Bruno Haible  <bruno@clisp.org>
23438
23439         Portability to mingw32.
23440         * m4/ssize_t.m4: New file, from GNU gettext.
23441         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
23442         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
23443
23444 2003-06-22  Bruno Haible  <bruno@clisp.org>
23445
23446         * modules/safe-read: Add m4/ssize_t.m4.
23447         * modules/xreadlink: Add m4/ssize_t.m4.
23448
23449 2003-06-20  Bruno Haible  <bruno@clisp.org>
23450
23451         Assume C89, so PARAMS isn't needed.
23452         * lib/unicodeio.h (PARAMS): Remove.
23453         * lib/unicodeio.c: Don't use PARAMS.
23454
23455 2003-06-18  Karl Berry  <karl@gnu.org>
23456
23457         * config/config.{guess,sub}: update from prep.
23458
23459 2003-06-18  Jim Meyering  <jim@meyering.net>
23460
23461         Merge changes from coreutils.
23462         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
23463         Remove explicit declarations of xmalloc and realloc.
23464         Include xalloc.h.
23465         (read_utmp): Remove anachronistic cast of xmalloc.
23466
23467 2003-06-17  Paul Eggert  <eggert@twinsun.com>
23468
23469         Assume C89, so PARAMS isn't needed.
23470         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
23471         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
23472         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
23473         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
23474         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
23475         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
23476         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
23477         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
23478         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
23479         lib/xstrtod.h, lib/xstrtol.h: Likewise.
23480         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
23481         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
23482         no longer needed. Anyway, config.h should always be included before any
23483         other file.
23484
23485 2003-06-11  Simon Josefsson  <jas@extundo.com>
23486
23487         * modules/sysexits: New file.
23488         * MODULES.html.sh (func_all_modules): Add sysexits.
23489
23490 2003-06-11  Simon Josefsson  <jas@extundo.com>
23491
23492         * lib/sysexit_.h: New file.
23493
23494 2003-06-11  Derek Price  <derek@ximbiot.com>
23495
23496         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
23497         necessary.
23498
23499 2003-06-11  Bruno Haible  <bruno@clisp.org>
23500
23501         * m4/sysexits.m4: New file.
23502
23503 2003-06-10  Simon Josefsson  <jas@extundo.com>
23504
23505         * lib/argp.h: New file, from glibc.
23506         * lib/argp-ba.c: New file, from glibc.
23507         * lib/argp-eexst.c: New file, from glibc.
23508         * lib/argp-fmtstream.c: New file, from glibc.
23509         * lib/argp-fmtstream.h: New file, from glibc.
23510         * lib/argp-fs-xinl.c: New file, from glibc.
23511         * lib/argp-help.c: New file, from glibc.
23512         * lib/argp-namefrob.h: New file, from glibc.
23513         * lib/argp-parse.c: New file, from glibc.
23514         * lib/argp-pv.c: New file, from glibc.
23515         * lib/argp-pvh.c: New file, from glibc.
23516         * lib/argp-xinl.c: New file, from glibc.
23517
23518 2003-06-10  Simon Josefsson  <jas@extundo.com>
23519
23520         * modules/strchrnul: New file.
23521
23522 2003-06-10  Simon Josefsson  <jas@extundo.com>
23523
23524         * modules/argp: New file.
23525
23526 2003-06-10  Simon Josefsson  <jas@extundo.com>
23527
23528         * m4/strchrnul.m4: New file.
23529
23530 2003-06-10  Simon Josefsson  <jas@extundo.com>
23531
23532         * lib/strchrnul.h: New file.
23533         * lib/strchrnul.c: New file.
23534
23535 2003-06-10  Bruno Haible  <bruno@clisp.org>
23536
23537         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
23538
23539 2003-06-07  Karl Berry  <karl@gnu.org>
23540
23541         * config/config.{guess,sub}: update from prep.
23542
23543 2003-06-07  Jim Meyering  <jim@meyering.net>
23544
23545         * modules/strtod: Use $(...) notation, not @...@ for
23546         AC_REPLACE'd variables.
23547         * modules/localcharset: Likewise.
23548
23549 2003-06-07  Jim Meyering  <jim@meyering.net>
23550
23551         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
23552         in place of my name in the copyright comment.
23553         Remove definition and uses of __P.
23554
23555         From coreutils.
23556         * lib/stat.c: Don't declare xmalloc explicitly.
23557         Instead, include "xalloc.h".
23558         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
23559         xrealloc, and xcalloc return values.
23560         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
23561         Improve comment.
23562         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
23563
23564 2003-06-07  Bruno Haible  <bruno@clisp.org>
23565
23566         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
23567         avoid AC_CONFIG_LINKS.
23568         * modules/fnmatch (Makefile.am): Use explicit creation rule for
23569         fnmatch.h, to avoid AC_CONFIG_LINKS.
23570         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
23571
23572 2003-06-07  Bruno Haible  <bruno@clisp.org>
23573
23574         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
23575         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
23576         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
23577         directory.
23578         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
23579         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
23580         directory.
23581
23582 2003-06-06  Jim Meyering  <jim@meyering.net>
23583
23584         Merge from coreutils.
23585         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
23586         Consolidate declarations and initializations of *_base* locals.
23587
23588         Merge from coreutils.
23589         This avoids a core dump on systems without GNU putenv,
23590         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
23591         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
23592         (unsetenv): New static function, from GNU libc.
23593         (rpl_putenv): Use it.
23594
23595         * lib/modechange.c: Remove trailing blanks.
23596
23597         Merge from coreutils.
23598         * lib/fsusage.c: Remove declaration of statfs.
23599         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
23600
23601         * lib/posixtm.c: Include <stdbool.h> unconditionally.
23602
23603 2003-06-06  Jim Meyering  <jim@meyering.net>
23604
23605         * lib/stdbool_.h: Renamed from stdbool.h.in.
23606
23607 2003-06-06  Jim Meyering  <jim@meyering.net>
23608             Bruno Haible  <bruno@clisp.org>
23609
23610         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
23611         Adjust Makefile.am snippet not to redirect directly to target.
23612         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
23613
23614 2003-06-05  Paul Eggert  <eggert@twinsun.com>
23615
23616         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
23617         mismatch, look in future quarters as well as past.  This fixes a
23618         bug when processing fall-backwards gaps immediately after a long
23619         period of daylight-saving time.
23620
23621         * lib/mktime.c: Assume freestanding C89 or better.
23622         (HAVE_LIMITS_H): Remove.  Assume it's 1.
23623         (__P): Remove; not used.
23624         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
23625         (mktime, not_equal_tm, print_tm, check_result,
23626         main): Use prototypes.  Use const * where appropriate.
23627         (main): Fix typo in testing code that uncovered by above changes.
23628         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
23629
23630 2003-06-04  Paul Eggert  <eggert@twinsun.com>
23631
23632         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
23633         locale.h, localeconv.  This merges changes from coreutils.
23634
23635         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
23636         It can be removed after the next Autoconf is released.
23637         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
23638         needed.
23639
23640 2003-06-04  Paul Eggert  <eggert@twinsun.com>
23641
23642         * lib/mktime.c: Fix Debian bug 177940
23643         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
23644         (localtime_offset): Now long int, not time_t, because we want it
23645         to be guaranteed to be signed.  All uses changed.
23646         (__mktime_internal): If overflow would occur when adding offset,
23647         don't add it.
23648
23649         Merge 'human' changes from coreutils.  Rewrite to support
23650         locale-specific notations like thousands separators.
23651         * lib/human.c: Simplify authorship notice.
23652         Include human.h immediately after config.h.
23653         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
23654         <limits.h>: Do not include, since human.h does.
23655         (SIZE_MAX, UINTMAX_MAX): New macros.
23656         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
23657         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
23658         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
23659         (power_letter): Renamed from suffixes.
23660         (generate_suffix_backwards): Remove.
23661         (adjust_value): Now takes int style (because of human.h changes)
23662         and long double value (for greater precision on some platforms).
23663         (group_number): New function.
23664         (human_readable): Use it.  Use integer options, not enum.
23665         Put the options before the sizes in the arg list.
23666         Support all the new options.
23667         The old human_readable function has been removed;
23668         use inttostr.h instead.
23669         (human_readable, default_block_size, humblock):
23670         Use uintmax_t, not int, for block sizes.
23671         (human_readable_inexact, block_size_types): Remove.
23672         (block_size_opts): New constant.
23673         (human_options): Renamed from human_block_size, with new signature
23674         that allows block sizes up to UINTMAX_MAX.  All callers changed.
23675         * lib/human.h: Add copyright and authorship notice.
23676         Include <limits.h> and <stdbool.h> unconditionally.
23677         (PARAMS): Remove.  All uses removed.
23678         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
23679         (enum human_inexact_style): Remove tag; now a nameless enum.
23680         (human_floor, human_ceiling, human_round_to_even): Now have
23681         values 2, 0, 1 rather than -1, 1, 0.
23682         (human_group_digits, human_suppress_point_zero, human_autoscale,
23683         human_base_1024, human_SI, human_B): New constants.
23684         (human_readable_inexact, human_block_size): Remove.
23685         (human_readable): Size args are now uintmax_t, not int.
23686         (human_options): New decl.
23687
23688         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
23689         unnecessary now that we assume C89 or better.  This change
23690         imported from coreutils.
23691
23692         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
23693         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
23694         in the 2003-05-30 sync from glibc.
23695
23696         .h files should stand alone, but we shouldn't include <sys/types.h>
23697         if we can get away with just <stddef.h>.
23698
23699         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
23700         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
23701         rather than <sys/types.h>, as we merely need size_t.
23702         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
23703         to get size_t.
23704         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
23705         Include <stdio.h>, to get FILE.
23706         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
23707         memcasecmp.h has included <stddef.h> and all we need is size_t.
23708         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
23709         our interface, instead of including <sys/types.h>
23710
23711 2003-06-04  Paul Eggert  <eggert@twinsun.com>
23712
23713         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
23714         now, as glibc mktime is buggy on non-glibc systems.
23715
23716 2003-06-03  Karl Berry  <karl@gnu.org>
23717
23718         * config/config.sub: update from prep.
23719
23720 2003-06-02  Paul Eggert  <eggert@twinsun.com>
23721
23722         [from coreutils]
23723         Fix some minor time-related bugs with POSIX time arguments.
23724         Some valid time stamps were being rejected (notably -1, and
23725         time stamps before 1900 on 64-bit hosts).  And some invalid
23726         time stamps were being accepted, e.g. September 31.
23727
23728         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
23729         that we can return (time_t) -1 successfully.
23730         * lib/posixtm.c: Likewise.
23731         [HAVE_STDBOOL_H]: Include <stdbool.h>.
23732         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
23733         (t): Remove static var.
23734         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
23735         of static var.  All uses changed.
23736         (year): Do not reject years before 1900; they can occur with
23737         64-bit time_t.
23738         (posix_time_parse): Do not check for out-of-range components;
23739         that is now the caller's responsibility, since our checks were
23740         only approximations.
23741         (posixtime): Use mktime to check for out-of-range components,
23742         since it knows them exactly.
23743         If mktime returns (time_t) -1, check whether an error actually occurred
23744         by invoking localtime on -1.
23745         (main) [TEST_POSIXTIME]: Check for input data errors, and report
23746         posixtime failures better.
23747         Improve the test data (in comments only).
23748
23749 2003-06-02  Karl Berry  <karl@gnu.org>
23750
23751         * config/mkinstalldirs (version): new variable.
23752         (--version): new option.
23753         (usage): improve message.
23754
23755 2003-05-30  Karl Berry  <karl@gnu.org>
23756
23757         * lib/mktime.c: update from libc.
23758
23759 2003-05-30  Bruno Haible  <bruno@clisp.org>
23760
23761         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
23762         * config/config.rpath: Upgrade to gettext-0.12.1.
23763
23764 2003-05-30  Bruno Haible  <bruno@clisp.org>
23765
23766         * m4/gettext.m4: Upgrade to gettext-0.12.1.
23767         * m4/nls.m4: New file, from gettext-0.12.1.
23768         * m4/po.m4: New file, from gettext-0.12.1.
23769         * m4/progtest.m4: Upgrade to gettext-0.12.1.
23770
23771 2003-05-30  Bruno Haible  <bruno@clisp.org>
23772
23773         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
23774         * lib/localcharset.h: Likewise.
23775         * lib/localcharset.c: Likewise.
23776
23777 2003-05-29  Karl Berry  <karl@gnu.org>
23778
23779         * config/config.rpath: update from gettext.
23780
23781 2003-05-28  Paul Eggert  <eggert@twinsun.com>
23782
23783         Assume the headers required for C89 freestanding compilers.
23784         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
23785         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
23786         * m4/human.m4 (gl_HUMAN): Likewise.
23787         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
23788         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
23789         * m4/userspec.m4 (gl_USERSPEC): Likewise.
23790         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
23791         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
23792         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
23793
23794 2003-05-28  Paul Eggert  <eggert@twinsun.com>
23795
23796         Assume the headers required for C89 freestanding compilers.
23797         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
23798         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
23799         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
23800         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
23801         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
23802         define, since <limits.h> is guaranteed to do that.
23803         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
23804         * lib/exclude.c: Include <stdbool.h> unconditionally.
23805         * lib/tempname.c: Include <stddef.h> unconditionally.
23806         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
23807         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
23808         <stddef.h> does that.
23809         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
23810         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
23811         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
23812         needed.
23813         * lib/xstrtol.c: Likewise.
23814         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
23815         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
23816
23817         * lib/addext.c (addext): Use assignment rather than cast, to avoid
23818         warnings on some platforms.
23819
23820         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
23821         arbitrarily.
23822
23823 2003-05-26  Jim Meyering  <jim@meyering.net>
23824
23825         Merge in a change from coreutils:
23826         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
23827         that is guaranteed to be `no'.  Use `no_such_member' to indicate
23828         that condition, rather than `-1' which is slightly misleading.
23829         Change the name of the cache variable to have the gl_ prefix.
23830         Prompted by a patch from Richard Dawe for DJGPP.
23831
23832 2003-05-24  Karl Berry  <karl@gnu.org>
23833
23834         * config/config.guess: update from prep.
23835
23836 2003-05-22  Karl Berry  <karl@gnu.org>
23837
23838         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
23839
23840 2003-05-20  Karl Berry  <karl@gnu.org>
23841
23842         * config/config.guess: update from prep.
23843
23844 2003-05-18  Karl Berry  <karl@gnu.org>
23845
23846         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
23847         might actually be set by the user.
23848
23849         * config/depcomp, install-sh, mdate-sh: update from automake.
23850
23851 2003-05-17  Bruno Haible  <bruno@clisp.org>
23852
23853         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
23854         invalid expansion for AC_EGREP_CPP.
23855         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
23856         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
23857         Suggested by Akim Demaille <akim@epita.fr> in
23858         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
23859
23860 2003-05-12  Jim Meyering  <jim@meyering.net>
23861
23862         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
23863         the space-padded-by-default conversion specifiers, %e, %k, %l.
23864
23865 2003-05-12  Bruno Haible  <bruno@clisp.org>
23866
23867         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
23868         the string is longer than 4 KB.
23869
23870 2003-05-11  Karl Berry  <karl@gnu.org>
23871
23872         * config/config.{guess,sub}: update from prep.
23873
23874 2003-05-09  Bruno Haible  <bruno@clisp.org>
23875
23876         * modules/error: Add m4/strerror_r.m4 to file list.
23877
23878 2003-05-03  Bruno Haible  <bruno@clisp.org>
23879
23880         Upgrade to Unicode-4.0.
23881         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
23882         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
23883         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
23884         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
23885         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
23886         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
23887         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
23888         Change width of U+E0100..U+E01EF from 1 to 0.
23889
23890 2003-04-25  Jim Meyering  <jim@meyering.net>
23891
23892         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
23893         of type size_t, not int.
23894
23895 2003-04-25  Bruno Haible  <bruno@clisp.org>
23896
23897         * lib/copy-file.c: Include <stddef.h>, for size_t.
23898
23899 2003-04-21  Paul Eggert  <eggert@twinsun.com>
23900
23901         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
23902         code which expansion is under static control.  Patch imported from
23903         Akim Demaille's patch to Bison; see
23904         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
23905
23906 2003-04-14  Bruno Haible  <bruno@clisp.org>
23907
23908         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
23909
23910 2003-04-11  Jim Meyering  <jim@meyering.net>
23911
23912         Merge changes from Coreutils.
23913
23914         2003-03-22  Jim Meyering  <jim@meyering.net>
23915
23916         * lib/strftime.c (widen): Cast alloca return value to proper type.
23917
23918         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
23919
23920         From GNU libc.
23921         * lib/strftime.c (my_strftime): Handle very large width
23922         specifications for numeric values correctly.  Improve checks for
23923         overflow.
23924
23925         2003-01-19  Jim Meyering  <jim@meyering.net>
23926
23927         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
23928         definitions.
23929         (nl_get_alt_digit) [! defined my_strftime]: Define.
23930         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
23931         _nl_get_alt_digit and _nl_get_walt_digit.
23932
23933         * lib/strftime.c (my_strftime): Merge in locale-related changes from
23934         libc. These changes have no effect outside of _LIBC.
23935
23936 2003-04-10  Bruno Haible  <bruno@clisp.org>
23937
23938         * modules/findprog: New file.
23939         * MODULES.html.sh (func_all_modules): Add it.
23940
23941 2003-04-10  Bruno Haible  <bruno@clisp.org>
23942
23943         * m4/findprog.m4: New file.
23944         * m4/eaccess.m4: New file.
23945
23946 2003-04-10  Bruno Haible  <bruno@clisp.org>
23947
23948         * lib/findprog.h: New file, from GNU gettext.
23949         * lib/findprog.c: New file, from GNU gettext.
23950
23951 2003-04-05  Jim Meyering  <jim@meyering.net>
23952
23953         Merge changes from Coreutils.
23954
23955         * lib/exclude.h (PARAMS): Remove definition and uses.
23956         * lib/exclude.c: Remove uses of `PARAMS'.
23957
23958         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
23959         Add test-cases for DOS filenames. Declare program_name.
23960         (main): Set up program_name.  Patch by Rich Dawe.
23961
23962         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
23963         error from mntctl.
23964         Use mntctl's return value to drive the entry-processing loop, since
23965         we can't rely on the value of the vmt_length member in the last
23966         entry.  On some systems doing so could result in exhausting
23967         virtual memory.  Based in part on a patch from Mike Jetzer.
23968
23969 2003-04-04  Bruno Haible  <bruno@clisp.org>
23970
23971         * modules/linebreak: New file.
23972         * MODULES.html.sh (func_all_modules): Add it.
23973
23974 2003-04-04  Bruno Haible  <bruno@clisp.org>
23975
23976         * m4/linebreak.m4: New file.
23977
23978 2003-04-04  Bruno Haible  <bruno@clisp.org>
23979
23980         * lib/linebreak.h: New file, from GNU gettext.
23981         * lib/linebreak.c: New file, from GNU gettext with slight
23982         modifications.
23983         * lib/lbrkprop.h: New file, from GNU gettext.
23984
23985 2003-04-03  Bruno Haible  <bruno@clisp.org>
23986
23987         * modules/utf8-ucs4: New file.
23988         * modules/utf16-ucs4: New file.
23989         * modules/ucs4-utf8: New file.
23990         * modules/ucs4-utf16: New file.
23991         * MODULES.html.sh (func_all_modules): Add them.
23992
23993 2003-04-03  Bruno Haible  <bruno@clisp.org>
23994
23995         * m4/utf-ucs4.m4: New file.
23996         * m4/ucs4-utf.m4: New file.
23997
23998 2003-04-03  Bruno Haible  <bruno@clisp.org>
23999
24000         * lib/utf8-ucs4.h: New file, from GNU gettext.
24001         * lib/utf16-ucs4.h: New file, from GNU gettext.
24002         * lib/ucs4-utf8.h: New file, from GNU gettext.
24003         * lib/ucs4-utf16.h: New file, from GNU gettext.
24004
24005 2003-04-02  Bruno Haible  <bruno@clisp.org>
24006
24007         * modules/binary-io: New file.
24008         * MODULES.html.sh (func_all_modules): Add it.
24009
24010 2003-04-02  Bruno Haible  <bruno@clisp.org>
24011
24012         * lib/binary-io.h: New file, from GNU gettext.
24013
24014 2003-04-01  Bruno Haible  <bruno@clisp.org>
24015
24016         * modules/pathname: New file.
24017         * MODULES.html.sh (func_all_modules): Add it.
24018
24019 2003-04-01  Bruno Haible  <bruno@clisp.org>
24020
24021         * lib/pathname.h: New file, from GNU gettext.
24022         * lib/concatpath.c: New file, from GNU gettext.
24023
24024 2003-03-30  Bruno Haible  <bruno@clisp.org>
24025
24026         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
24027
24028 2003-03-30  Bruno Haible  <bruno@clisp.org>
24029
24030         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
24031         function chown() doesn't exist.
24032
24033 2003-03-28  Bruno Haible  <bruno@clisp.org>
24034
24035         * modules/copy-file: New file.
24036         * MODULES.html.sh (func_all_modules): Add it.
24037
24038 2003-03-28  Bruno Haible  <bruno@clisp.org>
24039
24040         * m4/copy-file.m4: New file.
24041
24042 2003-03-28  Bruno Haible  <bruno@clisp.org>
24043
24044         * lib/copy-file.h: New file, from GNU gettext.
24045         * lib/copy-file.c: New file, from GNU gettext.
24046
24047 2003-03-18  Jim Meyering  <jim@meyering.net>
24048
24049         * lib/quote.c (quote_n): Fix typo in comment.
24050
24051 2003-03-18  Bruno Haible  <bruno@clisp.org>
24052
24053         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
24054         checking.
24055         * m4/onceonly_2_57.m4: Likewise.
24056
24057 2003-03-17  Bruno Haible  <bruno@clisp.org>
24058
24059         * m4/onceonly.m4: Require autoconf 2.54 or newer.
24060         (m4_quote): Remove macro.
24061         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
24062
24063 2003-03-14  Jim Meyering  <jim@meyering.net>
24064
24065         Merge changes from Coreutils.
24066         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
24067         to be const, in order to avoid warnings.
24068         (obstack_room): Likewise.
24069         (obstack_empty_p): Likewise.
24070
24071 2003-03-14  Bruno Haible  <bruno@clisp.org>
24072
24073         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
24074         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
24075
24076 2003-03-13  Paul Eggert  <eggert@twinsun.com>
24077
24078         Merge changes from Bison.
24079         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
24080         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
24081         when compiling Bison 1.875's `bitset bset = obstack_alloc
24082         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
24083         * lib/hash.c: Include <stdbool.h> unconditionally.
24084
24085 2003-03-13  Paul Eggert  <eggert@twinsun.com>
24086
24087         * m4/onceonly.m4 (m4_quote): New macro.
24088         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
24089         Quote AC_FOREACH variable-expansions properly.
24090
24091 2003-03-13  Paul Eggert  <eggert@twinsun.com>
24092
24093         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
24094
24095 2003-03-09  Paul Eggert  <eggert@twinsun.com>
24096
24097         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
24098         Reported by Bruce Becker; see:
24099         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
24100
24101 2003-03-03  Paul Eggert  <eggert@twinsun.com>
24102             Bruno Haible  <bruno@clisp.org>
24103
24104         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
24105         Reported by John Hughes, see
24106         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
24107
24108 2003-02-20  Bruno Haible  <bruno@clisp.org>
24109
24110         * MODULES.html.sh (func_all_modules): Add poll.
24111
24112 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
24113
24114         * modules/poll: New file.
24115
24116 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
24117
24118         * lib/poll_.h: New file.
24119         * lib/poll.c: New file.
24120
24121 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
24122
24123         * m4/poll.m4: New file.
24124
24125 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
24126
24127         * modules/mathl: New file.
24128
24129 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
24130
24131         * lib/mathl.h: New file.
24132         * lib/acosl.c: New file.
24133         * lib/asinl.c: New file.
24134         * lib/atanl.c: New file.
24135         * lib/ceill.c: New file.
24136         * lib/cosl.c: New file.
24137         * lib/expl.c: New file.
24138         * lib/floorl.c: New file.
24139         * lib/frexpl.c: New file.
24140         * lib/ldexpl.c: New file.
24141         * lib/logl.c: New file.
24142         * lib/sincosl.c: New file.
24143         * lib/sinl.c: New file.
24144         * lib/sqrtl.c: New file.
24145         * lib/tanl.c: New file.
24146         * lib/trigl.c: New file.
24147         * lib/trigl.h: New file.
24148
24149 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
24150
24151         * m4/mathl.m4: New file.
24152
24153 2003-02-18  Bruno Haible  <bruno@clisp.org>
24154
24155         * MODULES.html.sh (func_all_modules): Add mathl.
24156
24157 2003-02-17  Bruno Haible  <bruno@clisp.org>
24158
24159         * modules/mkdtemp: New module.
24160         * MODULES.html.sh (func_all_modules): Add it.
24161
24162 2003-02-17  Bruno Haible  <bruno@clisp.org>
24163
24164         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
24165
24166 2003-02-17  Bruno Haible  <bruno@clisp.org>
24167
24168         * lib/mkdtemp.h: New file, from GNU gettext.
24169         * lib/mkdtemp.c: New file, from GNU gettext.
24170
24171 2003-02-02  Jim Meyering  <jim@meyering.net>
24172
24173         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
24174         e.g. glibc-2.2.93.
24175
24176 2003-01-31  Bruno Haible  <bruno@clisp.org>
24177
24178         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
24179         'rpl_rename'.
24180         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
24181         'rpl_strnlen'.
24182         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
24183         'rpl_strtod'.
24184         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
24185         'rpl_utime'.
24186
24187 2003-01-31  Bruno Haible  <bruno@clisp.org>
24188
24189         * lib/rename.c: #undef rename before defining rpl_rename.
24190         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
24191
24192 2003-01-30  Bruno Haible  <bruno@clisp.org>
24193
24194         * modules/vasnprintf, modules/vasprintf: New modules.
24195         * MODULES.html.sh (func_all_modules): Add them.
24196
24197 2003-01-30  Bruno Haible  <bruno@clisp.org>
24198
24199         * m4/signed.m4: New file, from GNU gettext.
24200         * m4/longdouble.m4: New file, from GNU gettext.
24201         * m4/wchar_t.m4: New file, from GNU gettext.
24202         * m4/wint_t.m4: New file, from GNU gettext.
24203         * m4/vasnprintf.m4: New file.
24204         * m4/vasprintf.m4: New file.
24205
24206 2003-01-30  Bruno Haible  <bruno@clisp.org>
24207
24208         * lib/printf-args.h: New file, from GNU gettext.
24209         * lib/printf-args.c: New file, from GNU gettext.
24210         * lib/printf-parse.h: New file, from GNU gettext.
24211         * lib/printf-parse.c: New file, from GNU gettext.
24212         * lib/vasnprintf.h: New file, from GNU gettext.
24213         * lib/vasnprintf.c: New file, from GNU gettext.
24214         * lib/asnprintf.c: New file, from GNU gettext.
24215         * lib/vasprintf.h: New file, from GNU gettext with modifications.
24216         * lib/vasprintf.c: New file, from GNU gettext.
24217         * lib/asprintf.c: New file, from GNU gettext.
24218
24219 2003-01-29  Bruno Haible  <bruno@clisp.org>
24220
24221         * modules/stpncpy: New module.
24222         * MODULES.html.sh (func_all_modules): Add it.
24223
24224 2003-01-29  Bruno Haible  <bruno@clisp.org>
24225
24226         * m4/stpncpy.m4: New file.
24227
24228 2003-01-29  Bruno Haible  <bruno@clisp.org>
24229
24230         * lib/stpncpy.h: New file, from GNU gettext with modifications.
24231         * lib/stpncpy.c: New file, from GNU gettext with modifications.
24232
24233 2003-01-28  Bruno Haible  <bruno@clisp.org>
24234
24235         * modules/c-ctype: New module.
24236         * MODULES.html.sh (func_all_modules): Add it.
24237
24238 2003-01-28  Bruno Haible  <bruno@clisp.org>
24239
24240         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
24241         Paul Eggert.
24242         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
24243         Paul Eggert.
24244
24245 2003-01-27  Bruno Haible  <bruno@clisp.org>
24246
24247         * modules/xsetenv: New module.
24248         * MODULES.html.sh (func_all_modules): Add it.
24249
24250 2003-01-27  Bruno Haible  <bruno@clisp.org>
24251
24252         * lib/xsetenv.h: New file, from GNU gettext.
24253         * lib/xsetenv.c: New file, from GNU gettext.
24254
24255 2003-01-23  Jim Meyering  <jim@meyering.net>
24256
24257         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
24258         from working on systems without dirfd (at least Irix and OSF1/Tru64).
24259
24260 2003-01-23  Bruno Haible  <bruno@clisp.org>
24261
24262         * modules/minmax: New module.
24263         * MODULES.html.sh (func_all_modules): Add it.
24264
24265 2003-01-23  Bruno Haible  <bruno@clisp.org>
24266
24267         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
24268         Eggert.
24269
24270 2003-01-22  Bruno Haible  <bruno@clisp.org>
24271
24272         * modules/exit: New module.
24273         * MODULES.html.sh (func_all_modules): Add it.
24274
24275 2003-01-22  Bruno Haible  <bruno@clisp.org>
24276
24277         * lib/exit.h: New file, from GNU gettext.
24278
24279 2003-01-19  Bruno Haible  <bruno@clisp.org>
24280
24281         * gnulib-tool: Recognize option --extract-maintainer.
24282         (func_get_maintainer): New function.
24283         * modules/*: Add Maintainer entry.
24284
24285 2003-01-16  Jim Meyering  <jim@meyering.net>
24286
24287         * m4/regex.m4: The `regex' struct is both input and output.
24288         Initialize it before each use.  Patch by Tim Waugh.
24289
24290 2003-01-16  Bruno Haible  <bruno@clisp.org>
24291
24292         * MODULES.html.sh: Add a table of contents. Add the module name as
24293         leftmost column. Add hyperlinks.
24294
24295 2003-01-15  Bruno Haible  <bruno@clisp.org>
24296
24297         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
24298
24299 2003-01-15  Bruno Haible  <bruno@clisp.org>
24300
24301         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
24302         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
24303         suffix.
24304
24305 2003-01-15  Bruno Haible  <bruno@clisp.org>
24306
24307         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
24308
24309 2003-01-15  Bruno Haible  <bruno@clisp.org>
24310
24311         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
24312         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
24313
24314 2003-01-14  Jim Meyering  <jim@meyering.net>
24315
24316         * lib/same.c (same_name): Tweak a comment.
24317
24318 2003-01-14  Bruno Haible  <bruno@clisp.org>
24319
24320         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
24321         when a string comparison is sufficient.
24322
24323 2003-01-14  Bruno Haible  <bruno@clisp.org>
24324
24325         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
24326         'unsigned int'.
24327
24328 2003-01-14  Bruno Haible  <bruno@clisp.org>
24329
24330         * lib/hash-pjw.c: Add comment about low quality of this function.
24331
24332 2003-01-13  Bruno Haible  <bruno@clisp.org>
24333
24334         * modules/stpcpy: Distribute lib/stpcpy.h.
24335         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
24336
24337 2003-01-13  Bruno Haible  <bruno@clisp.org>
24338
24339         * modules/*: Add a description.
24340         * modules/strpbrk: Fix Makefile.am snippet.
24341         * modules/strtoimax: Fix dependencies.
24342         * modules/strtoumax: Likewise.
24343
24344 2003-01-13  Bruno Haible  <bruno@clisp.org>
24345
24346         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
24347         * modules/alloca (Makefile.am): All object files depend on alloca.h.
24348         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
24349
24350 2003-01-13  Bruno Haible  <bruno@clisp.org>
24351
24352         * gnulib-tool (func_create_testdir): Store config/* files in the main
24353         directory.
24354         * config.rpath: Move to ...
24355         * config/config.rpath: ... here.
24356         * modules/gettext: Contains config/config.rpath, not config.rpath.
24357         * modules/iconv: Likewise.
24358
24359 2003-01-12  Paul Eggert  <eggert@twinsun.com>
24360
24361         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
24362         to avoid collisions with libcurses and libreadline.
24363
24364         * m4/getstr.m4: Remove.
24365         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
24366
24367 2003-01-12  Paul Eggert  <eggert@twinsun.com>
24368
24369         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
24370         to avoid collisions with libcurses and libreadline.
24371
24372         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
24373         * lib/getstr.h, getstr.c: Remove.
24374         * lib/getline.c: Include "getline.h", to check interface.
24375         Move body of old getstr.c here: this defines MIN_CHUNK and
24376         declares getdelim2, which is renamed from getstr.
24377         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
24378
24379         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
24380         All uses changed.
24381         * lib/linebuffer.h: Likewise.
24382         (readline): Remove backward-compatibility macro.
24383
24384 2003-01-12  Paul Eggert  <eggert@twinsun.com>
24385
24386         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
24387         to avoid collisions with libcurses and libreadline.
24388         * getstr: Remove.
24389         * MODULES.html.sh: Remove getstr.
24390         * modules/getline: Depend on unlocked-io, not getstr.
24391
24392 2003-01-12  Jim Meyering  <jim@meyering.net>
24393
24394         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
24395
24396 2003-01-10  Bruno Haible  <bruno@clisp.org>
24397
24398         * modules/alloca: Change Makefile.am requirements. Simplify Include
24399         requirements. Add lib/alloca_.h to file list.
24400
24401 2003-01-10  Bruno Haible  <bruno@clisp.org>
24402
24403         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
24404
24405 2003-01-10  Bruno Haible  <bruno@clisp.org>
24406
24407         * lib/alloca_.h: New file.
24408         * lib/getdate.y: Unconditionally include alloca.h.
24409         * lib/makepath.c: Likewise.
24410         * lib/setenv.c: Likewise.
24411         * lib/userspec.c: Likewise.
24412
24413 2003-01-09  Karl Berry  <karl@gnu.org>
24414
24415         * MODULES.html.sh: include `dirname $0` in PATH, to find
24416         gnulib-tool.
24417
24418 2003-01-09  Bruno Haible  <bruno@clisp.org>
24419
24420         * modules/stdbool: Change configure.ac, Makefile.am requirements.
24421         Simplify Include requirements. Add lib/stdbool.h.in to file list.
24422
24423 2003-01-09  Bruno Haible  <bruno@clisp.org>
24424
24425         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
24426
24427 2003-01-09  Bruno Haible  <bruno@clisp.org>
24428
24429         * lib/stdbool.h.in: New file.
24430
24431 2003-01-09  Bruno Haible  <bruno@clisp.org>
24432
24433         * gnulib-tool (func_all_modules): Ignore files ending in ~.
24434         * MODULES.html.sh: Likewise.
24435
24436 2003-01-08  Jim Meyering  <jim@meyering.net>
24437
24438         * lib/full-write.c: Undefine and define-away `const' after inclusion
24439         of errno.h, not before.  Suggestion from Bruno Haible.
24440
24441 2003-01-08  Bruno Haible  <bruno@clisp.org>
24442
24443         * modules/full-read: Depend on full-write.
24444
24445 2003-01-08  Bruno Haible  <bruno@clisp.org>
24446
24447         * lib/safe-read.c: Include specification header first, to ensure its
24448         selfcontainedness.
24449         * lib/full-write.c: Likewise.
24450
24451 2003-01-07  Jim Meyering  <jim@meyering.net>
24452
24453         * lib/full-write.c: Rework so that it may serve to define full_read,
24454         too.
24455         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
24456
24457 2003-01-07  Bruno Haible  <bruno@clisp.org>
24458
24459         * lib/strtoimax.c: Include <stdint.h> as an alternative to
24460         <inttypes.h>.
24461         * lib/xstrtol.h: Likewise.
24462         * lib/xstrtoimax.c: Likewise.
24463         * lib/xstrtoumax.c: Likewise.
24464         * lib/human.h: Likewise.
24465
24466         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
24467         on systems that have <inttypes.h> but not <stdint.h>.
24468
24469 2003-01-07  Bruno Haible  <bruno@clisp.org>
24470
24471         * MODULES.html.sh: Add copyright notice.
24472         (missed_files): Omit CVS directory entries.
24473         (func_module): Make it work with sed-3.02.
24474         * MODULES.txt: Remove file.
24475
24476 2003-01-06  Jim Meyering  <jim@meyering.net>
24477
24478         * lib/version-etc.c: Update year in translatable copyright string.
24479
24480 2003-01-03  Karl Berry  <karl@gnu.org>
24481
24482         * config/config.{guess,sub}: update from prep.
24483
24484 2003-01-02  Karl Berry  <karl@gnu.org>
24485
24486         * doc/COPYING.DOC: belatedly updated to 1.2.
24487
24488 2003-01-01  Karl Berry  <karl@gnu.org>
24489
24490         * gnulib-tool (func_verify_module): report module name $module in
24491         error message, not $1.
24492         * gnulib-tool (create-testdir): don't complain if destdir couldn't
24493         be created, only if it doesn't exist.
24494         * gnulib-tool (last_checkin_date): don't expand the $Date here.
24495
24496 2002-12-31  Paul Eggert  <eggert@twinsun.com>
24497
24498         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
24499
24500 2002-12-31  Paul Eggert  <eggert@twinsun.com>
24501
24502         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
24503         memcmp if strcoll doesn't work.
24504
24505 2002-12-31  Bruno Haible  <bruno@clisp.org>
24506
24507         * lib/utime.c (utime_null): No need to call ftruncate if the file was
24508         nonempty.
24509
24510 2002-12-31  Bruno Haible  <bruno@clisp.org>
24511
24512         * lib/memcoll.c (STRCOLL): New macro.
24513         (memcoll): Use it.
24514
24515 2002-12-31  Bruno Haible  <bruno@clisp.org>
24516
24517         * lib/localcharset.h: New file.
24518         * lib/localcharset.c: Include it.
24519         * lib/unicodeio.c: Likewise.
24520
24521 2002-12-31  Bruno Haible  <bruno@clisp.org>
24522
24523         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
24524         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
24525
24526 2002-12-31  Bruno Haible  <bruno@clisp.org>
24527
24528         * lib/getline.h: Include <stddef.h>, for size_t.
24529
24530         * lib/unicodeio.h: Include <stddef.h>, for size_t.
24531         * lib/unicodeio.c: Don't include <stddef.h>.
24532
24533 2002-12-31  Bruno Haible  <bruno@clisp.org>
24534
24535         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
24536         HAVE_TM_ZONE.
24537
24538 2002-12-24  Karl Berry  <karl@gnu.org>
24539
24540         * config/config.guess: update from prep.
24541
24542 2002-12-24  Bruno Haible  <bruno@clisp.org>
24543
24544         General infrasructure.
24545         * m4/README: Rewritten.
24546         * m4/onceonly.m4: New file.
24547         * m4/onceonly_2_57.m4: New file.
24548
24549         Module atexit.
24550         * m4/atexit.m4: New file.
24551
24552         Module strtod.
24553         * m4/strtod.m4: New file.
24554
24555         Module strtol.
24556         * m4/strtol.m4: New file.
24557
24558         Module strtoul.
24559         * m4/strtoul.m4: New file.
24560
24561         Module memchr.
24562         * m4/memchr.m4: New file.
24563
24564         Module memcmp.
24565         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
24566         (jm_FUNC_MEMCMP): Invoke it.
24567
24568         Module memcpy.
24569         * m4/memcpy.m4: New file.
24570
24571         Module memmove.
24572         * m4/memmove.m4: New file.
24573
24574         Module memset.
24575         * m4/memset.m4: New file.
24576
24577         Module strcspn.
24578         * m4/strcspn.m4: New file.
24579
24580         Module strpbrk.
24581         * m4/strpbrk.m4: New file.
24582
24583         Module strstr.
24584         * m4/strstr.m4: New file.
24585
24586         Module strerror.
24587         * m4/strerror.m4: New file.
24588
24589         Module mktime.
24590         * m4/mktime.m4: Renamed from jm-mktime.m4.
24591         (gl_PREREQ_MKTIME): New macro.
24592         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
24593
24594         Module malloc.
24595         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
24596         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
24597         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
24598
24599         Module realloc.
24600         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
24601         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
24602         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
24603
24604         Module strftime.
24605         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
24606         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
24607         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
24608         gl_TM_GMTOFF.
24609         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
24610
24611         Module xalloc.
24612         * m4/xalloc.m4: New file.
24613
24614         Module alloca.
24615         * m4/alloca.m4: New file.
24616
24617         Module putenv.
24618         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
24619         (jm_FUNC_PUTENV): Invoke it.
24620
24621         Module setenv.
24622         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
24623         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
24624         when invoked twice.
24625         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
24626         gt_FUNC_SETENV.
24627
24628         Module memrchr.
24629         * m4/memrchr.m4: New file.
24630
24631         Module stpcpy.
24632         * m4/stpcpy.m4: New file.
24633
24634         Module strcase.
24635         * m4/strcase.m4: New file.
24636
24637         Module strdup.
24638         * m4/strdup.m4: New file.
24639
24640         Module strnlen.
24641         * m4/strnlen.m4: New file.
24642
24643         Module strndup.
24644         * m4/strndup.m4: New file.
24645
24646         Module xstrtod.
24647         * m4/xstrtod.m4: New file.
24648
24649         Module xstrtol.
24650         * m4/xstrtol.m4: New file.
24651
24652         Module getdate.
24653         * m4/getdate.m4: New file.
24654
24655         Module unlocked-io.
24656         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
24657         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
24658         * m4/jm-glibc-io.m4n: Remove file.
24659
24660         Module long-options.
24661         * m4/long-options.m4: New file.
24662
24663         Module md5.
24664         * m4/md5.m4: New file.
24665
24666         Module sha.
24667         * m4/sha.m4: New file.
24668
24669         Module getstr.
24670         * m4/getstr.m4: New file.
24671
24672         Module getline.
24673         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
24674         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
24675         <sys/types.h>, for size_t. Use the function name gnu_getline, not
24676         simply getline. Infoke gl_PREREQ_GETLINE.
24677
24678         Module obstack.
24679         * m4/obstack.m4: New file.
24680
24681         Module hash.
24682         * m4/hash.m4: New file.
24683
24684         Module readtokens.
24685         * m4/readtokens.m4: New file.
24686
24687         Module strverscmp.
24688         * m4/strverscmp.m4: New file.
24689
24690         Module stdbool.
24691         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
24692         OSF/1.
24693
24694         Module strtoll.
24695         * m4/strtoll.m4: New file.
24696
24697         Module strtoull.
24698         * m4/strtoull.m4: New file.
24699
24700         Module strtoimax.
24701         * m4/strtoimax.m4: New file.
24702
24703         Module strtoumax.
24704         * m4/strtoumax.m4: New file.
24705
24706         Module xstrtoimax.
24707         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
24708         jm_AC_PREREQ_XSTRTOIMAX.
24709         Moved the strtol prerequisites to strtol.m4.
24710         Moved the strtoll prerequisites to strtoll.m4.
24711         Moved the strtoimax prerequisites to strtoimax.m4.
24712
24713         Module xstrtoumax.
24714         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
24715         jm_AC_PREREQ_XSTRTOUMAX.
24716         Moved the strtoul prerequisites to strtoul.m4.
24717         Moved the strtoull prerequisites to strtoull.m4.
24718         Moved the strtoumax prerequisites to strtoumax.m4.
24719
24720         Module chown.
24721         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
24722         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
24723
24724         Module dup2.
24725         * m4/dup2.m4: New file.
24726
24727         Module ftruncate.
24728         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
24729         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
24730
24731         Module getgroups.
24732         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
24733         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
24734
24735         Module gettimeofday.
24736         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
24737         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
24738         gl_PREREQ_GETTIMEOFDAY.
24739
24740         Module mkdir.
24741         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
24742         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
24743
24744         Module mkstemp.
24745         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
24746         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
24747         jm_AC_TYPE_UINTMAX_T.
24748         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
24749
24750         Module stat.
24751         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
24752         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
24753
24754         Module lstat.
24755         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
24756         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
24757
24758         Module timespec.
24759         * m4/timespec.m4 (gl_TIMESPEC): New macro.
24760         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
24761         * m4/st_mtim.m4: Indentation.
24762
24763         Module nanosleep.
24764         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
24765         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
24766         gl_PREREQ_NANOSLEEP.
24767
24768         Module regex.
24769         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
24770         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
24771         (gl_REGEX): New macro.
24772
24773         Module rename.
24774         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
24775         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
24776
24777         Module rmdir.
24778         * m4/rmdir.m4: New file.
24779
24780         Module utime.
24781         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
24782         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
24783         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
24784
24785         Module dirname.
24786         * m4/dirname.m4: New file.
24787
24788         Module getopt.
24789         * m4/getopt.m4: New file.
24790
24791         Module unistd-safer.
24792         * m4/unistd-safer.m4: New file.
24793
24794         Module fnmatch.
24795         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
24796         declaration.
24797         (gl_PREREQ_FNMATCH_EXTRA): New macro.
24798         (gl_FUNC_FNMATCH_POSIX): New macro.
24799         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
24800         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
24801         simply fnmatch.
24802
24803         Module exclude.
24804         * m4/exclude.m4: New file.
24805
24806         Module human.
24807         * m4/human.m4: New file.
24808
24809         Module acl.
24810         * m4/acl.m4: Nop.
24811
24812         Module backupfile.
24813         * m4/backupfile.m4: New file.
24814         * m4/d-ino.m4: Indentation.
24815
24816         Module fsusage.
24817         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
24818         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
24819         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
24820
24821         Module dirfd.
24822         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
24823         requirements.
24824
24825         Module euidaccess.
24826         * m4/euidaccess.m4: New file.
24827
24828         Module file-type.
24829         * m4/file-type.m4: New file.
24830
24831         Module fileblocks.
24832         * m4/fileblocks.m4: New file.
24833
24834         Module filemode.
24835         * m4/filemode.m4: New file.
24836
24837         Module isdir.
24838         * m4/isdir.m4: New file.
24839
24840         Module lchown.
24841         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
24842         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
24843
24844         Module makepath.
24845         * m4/makepath.m4: New file.
24846
24847         Module modechange.
24848         * m4/modechange.m4: New file.
24849
24850         Module mountlist.
24851         * m4/mountlist.m4: New file.
24852         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
24853         Indentation.
24854
24855         Module path-concat.
24856         * m4/path-concat.m4: New file.
24857
24858         Module pathmax.
24859         * m4/pathmax.m4: New file.
24860
24861         Module same.
24862         * m4/same.m4: New file.
24863
24864         Module save-cwd.
24865         * m4/save-cwd.m4: New file.
24866
24867         Module savedir.
24868         * m4/savedir.m4: New file.
24869
24870         Module xgetcwd.
24871         * m4/xgetcwd.m4: New file.
24872         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
24873
24874         Module xreadlink.
24875         * m4/xreadlink.m4: New file.
24876
24877         Module safe-read.
24878         * m4/safe-read.m4: New file.
24879
24880         Module safe-write.
24881         * m4/safe-write.m4: New file.
24882
24883         Module closeout.
24884         * m4/closeout.m4: New file.
24885
24886         Module stdio-safer.
24887         * m4/stdio-safer.m4: New file.
24888
24889         Module getpass.
24890         * m4/getpass.m4: New file.
24891
24892         Module getugroups.
24893         * m4/getugroups.m4: New file.
24894
24895         Module group-member.
24896         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
24897         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
24898
24899         Module idcache.
24900         * m4/idcache.m4: New file.
24901
24902         Module userspec.
24903         * m4/userspec.m4: New file.
24904
24905         Module gettime.
24906         * m4/clock_time.m4: New file.
24907         * m4/gettime.m4: New file.
24908
24909         Module settime.
24910         * m4/settime.m4: New file.
24911
24912         Module posixtm.
24913         * m4/posixtm.m4: New file.
24914
24915         Module gethostname.
24916         * m4/gethostname.m4: New file.
24917
24918         Module canon-host.
24919         * m4/canon-host.m4: New file.
24920
24921         Module gettext.
24922         * m4/codeset.m4: New file, from gettext-0.11.5.
24923         * m4/gettext.m4: New file, from gettext-0.11.5.
24924         * m4/glibc21.m4: New file, from gettext-0.11.5.
24925         * m4/iconv.m4: New file, from gettext-0.11.5.
24926         * m4/intdiv0.m4: New file, from gettext-0.11.5.
24927         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
24928         * m4/inttypes.m4: New file, from gettext-0.11.5.
24929         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
24930         * m4/isc-posix.m4: New file, from gettext-0.11.5.
24931         * m4/lcmessage.m4: New file, from gettext-0.11.5.
24932         * m4/lib-ld.m4: New file, from gettext-0.11.5.
24933         * m4/lib-link.m4: New file, from gettext-0.11.5.
24934         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
24935         * m4/progtest.m4: New file, from gettext-0.11.5.
24936         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
24937         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
24938         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
24939
24940         Module localcharset.
24941         * m4/localcharset.m4: New file.
24942
24943         Module hard-locale.
24944         * m4/hard-locale.m4: New file.
24945
24946         Module mbswidth.
24947         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
24948         onceonly macros.
24949         * m4/mbrtowc.m4: Add comment.
24950
24951         Module memcasecmp.
24952         * m4/memcasecmp.m4: New file.
24953
24954         Module memcoll.
24955         * m4/memcoll.m4: New file.
24956
24957         Module unicodeio.
24958         * m4/unicodeio.m4: New file.
24959
24960         Module rpmatch.
24961         * m4/rpmatch.m4: New file.
24962
24963         Module yesno.
24964         * m4/yesno.m4: New file.
24965
24966         Module exitfail.
24967         * m4/exitfail.m4: New file.
24968
24969         Module c-stack.
24970         * m4/c-stack.m4 (gl_C_STACK): New macro.
24971         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
24972
24973         Module error.
24974         * m4/error.m4 (gl_ERROR): New macro.
24975         (jm_PREREQ_ERROR): Use onceonly macros.
24976
24977         Module fatal.
24978         * m4/fatal.m4: New file.
24979
24980         Module getloadavg.
24981         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
24982         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
24983
24984         Module getpagesize.
24985         * m4/getpagesize.m4: New file.
24986
24987         Module getusershell.
24988         * m4/getusershell.m4: New file.
24989
24990         Module physmem.
24991         * m4/physmem.m4: New file.
24992
24993         Module posixver.
24994         * m4/posixver.m4: New file.
24995
24996         Module quotearg.
24997         * m4/quotearg.m4: New file.
24998
24999         Module quote.
25000         * m4/quote.m4: New file.
25001
25002         Module readutmp.
25003         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
25004
25005         Module sig2str.
25006         * m4/sig2str.m4: New file.
25007
25008         Other.
25009         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
25010         ulonglong.m4.
25011         * m4/intmax_t.m4: New file.
25012         * m4/d-type.m4: Indentation.
25013         * m4/jm-macros.m4: Update.
25014         * m4/prereq.m4 (jm_PREREQ): Update.
25015         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
25016         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
25017         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
25018         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
25019         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
25020         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
25021         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
25022         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
25023         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
25024         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
25025         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
25026         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
25027         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
25028         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
25029         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
25030         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
25031         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
25032         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
25033         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
25034
25035 2002-12-24  Bruno Haible  <bruno@clisp.org>
25036
25037         * MODULES.txt: Update according to m4/ changes.
25038
25039         Module gettext.
25040         * config.rpath: New file, from gettext-0.11.5.
25041
25042         * modules/*: New module descriptions.
25043         * gnulib-tool: New file.
25044         * MODULES.html.sh: New file.
25045
25046 2002-12-21  Karl Berry  <karl@gnu.org>
25047
25048         * doc/fdl.texi: update to version 1.2.
25049
25050 2002-12-19  Karl Berry  <karl@gnu.org>
25051
25052         * config/config.guess: update from prep.
25053
25054 2002-12-18  Bruno Haible  <bruno@clisp.org>
25055
25056         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
25057         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
25058
25059 2002-12-17  Bruno Haible  <bruno@clisp.org>
25060
25061         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
25062         stdlib.h, string.h.
25063
25064 2002-12-17  Bruno Haible  <bruno@clisp.org>
25065
25066         * lib/canon-host.c (strdup): Remove unused declaration.
25067
25068         * lib/fsusage.c: Include full_read.h.
25069         (get_fs_usage): Use full_read instead of safe_read.
25070
25071         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
25072
25073 2002-12-12  Karl Berry  <karl@gnu.org>
25074
25075         * config/config.guess: update from prep.
25076
25077 2002-12-11  Bruno Haible  <bruno@clisp.org>
25078
25079         * m4/setenv.m4: New file, from gettext-0.11.5.
25080
25081 2002-12-11  Bruno Haible  <bruno@clisp.org>
25082
25083         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
25084         not unsetenv().
25085         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
25086         modifications:
25087
25088         2002-12-11  Bruno Haible  <bruno@clisp.org>
25089
25090                 * setenv.c (alloca): Fall back to malloc.
25091                 (freea): New macro.
25092                 (setenv): Use freea() to free memory allocated with alloca().
25093
25094         2002-11-13  Bruno Haible  <bruno@clisp.org>
25095
25096                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
25097                 function declarations.
25098                 * unsetenv.c (unsetenv): Likewise.
25099
25100         2002-03-04  Bruno Haible  <bruno@clisp.org>
25101
25102                 Portability to AIX 4.3.3.
25103                 * unsetenv.c: New file, extracted from setenv.c.
25104                 * setenv.c: Move the unsetenv() function to unsetenv.c.
25105
25106         2001-12-20  Bruno Haible  <bruno@clisp.org>
25107
25108                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
25109                 use malloc instead. For SunOS 4.
25110
25111         2001-12-11  Bruno Haible  <bruno@clisp.org>
25112
25113                 * setenv.c: Declare alloca.
25114                 (compar_fn_t): New typedef.
25115                 (KNOWN_VALUE, STORE_VALUE): Use it.
25116
25117         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
25118         setenv.h.
25119
25120 2002-12-10  Paul Eggert  <eggert@twinsun.com>
25121
25122         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
25123         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
25124         Choose values that are less likely to collide with system fnmatch
25125         options.
25126         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
25127         defined (e.g., a pure POSIX system).
25128         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
25129         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
25130
25131 2002-12-06  Paul Eggert  <eggert@twinsun.com>
25132
25133         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
25134         a pain in practice to deal with generated m4 files.  This change
25135         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
25136
25137         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
25138         and jm-glibc-io.m4, as they are no longer a special case.
25139         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
25140         kludge and the auto-generation stuff.  Check only whether the
25141         functions are declared, not whether they exist, since older hosts
25142         that don't declare the functions can't use the optimization anyway.
25143
25144 2002-12-06  Jim Meyering  <jim@meyering.net>
25145
25146         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
25147
25148         Merge in changes from libc's misc/error.c, in preparation
25149         for the merge of gnulib's changes back into libc.
25150
25151         * lib/error.c (_): Define only if not already defined.
25152         Move definition to follow all #include directives.
25153         Include unlocked-io.h only if !_LIBC.
25154         [_LIBC]: Include <libio/libioP.h>.
25155         [USE_IN_LIBIO]: Include <libio/iolibio.h>
25156         (fflush): Tweak definition to use INTUSE.
25157         (putc): Define.
25158
25159 2002-12-05  Paul Eggert  <eggert@twinsun.com>
25160
25161         * lib/alloca.c [defined emacs]: Include "lisp.h".
25162         (xalloc_die) [defined emacs]: New macro.
25163         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
25164         [! defined emacs]: Include <xalloc.h>.
25165         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
25166         (pointer): Typedef to POINTER_TYPE *.
25167         (malloc): Remove decl; we now always use xmalloc.
25168         (alloca): Use old-style definition, since Emacs needs this.
25169         Check for arithmetic overflow when computing combined size.
25170
25171 2002-12-04  Paul Eggert  <eggert@twinsun.com>
25172
25173         Do not generate unlocked-io.h automatically, since it's easier to
25174         maintain it by hand.
25175
25176         * lib/unlocked-io.h: New file, from GNU diffutils,
25177         but with proper copyright notice and attribution.
25178         * lib/gen-uio: Remove.
25179         * lib/Makefile.am: Add copyright notice.
25180         (libfetish_a_SOURCES): Add unlocked-io.h.
25181         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
25182         (DISTCLEANFILES, io_functions): Remove macros.
25183         (EXTRA_DIST): Remove gen_uio.
25184         (unlocked-io.h): Remove rule.
25185
25186 2002-12-04  Jim Meyering  <jim@meyering.net>
25187
25188         Reflect the fact that stat.c and lstat.c are no longer generated.
25189         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
25190         (DISTCLEANFILES): Likewise.
25191         (EXTRA_DIST): Likewise.
25192         (all_local): Don't depend on stat.c or lstat.c.
25193         (stat.c, lstat.c): Remove rules.
25194         (EXTRA_DIST): Remove xstat.in.
25195
25196         * lib/xstat.in: Remove file.  Contents moved into stat.c.
25197         * lib/stat.c: New file.  Contents mostly from xstat.in.
25198         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
25199         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
25200
25201         * lib/safe-read.c: Rework so that it may serve to define safe_write,
25202         too.
25203         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
25204
25205 2002-12-03  Jim Meyering  <jim@meyering.net>
25206
25207         * lib/safe-read.c, safe-write.c: Change variable names and comments,
25208         but not semantics, to minimize the differences between these two files.
25209         (safe_read): Change comment to mention SAFE_READ_ERROR.
25210
25211         * lib/safe-read.c (IS_EINTR): Define.
25212         (safe_read): Use IS_EINTR in place of in-function cpp directives.
25213
25214 2002-12-02  Jim Meyering  <jim@meyering.net>
25215
25216         * lib/safe-read.c (EINTR): Define.
25217         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
25218         (INT_MAX): Provide fallback.
25219         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
25220
25221         * lib/safe-read.h (SAFE_READ_ERROR): Define.
25222
25223 2002-12-02  Bruno Haible  <bruno@clisp.org>
25224
25225         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
25226         Define, taken from safe-read.c.
25227         (INT_MAX): Provide fallback.
25228         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
25229         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
25230
25231         * lib/safe-read.c (EINTR): Remove definition.
25232         (safe_read): Don't use EINTR if it is absent.
25233
25234 2002-12-01  Jim Meyering  <jim@meyering.net>
25235
25236         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
25237         zero.
25238         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
25239
25240 2002-11-27  Paul Eggert  <eggert@twinsun.com>
25241
25242         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
25243         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
25244         with `if (! (value < limit)) abort ();', for readability.
25245
25246 2002-11-26  Karl Berry  <karl@gnu.org>
25247
25248         * lib/strdup.c: copy from libc again, with jim's ok.
25249         * lib/.cppi-disable: re-add strdup.c
25250
25251 2002-11-25  Karl Berry  <karl@gnu.org>
25252
25253         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
25254         instead of "strtol.c".
25255
25256 2002-11-25  Karl Berry  <karl@gnu.org>
25257
25258         * config/install-sh: update from automake for variable quoting, $0 in
25259         error msgs, etc.
25260
25261         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
25262         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
25263         entry.
25264
25265 2002-11-25  Jim Meyering  <jim@meyering.net>
25266
25267         * lib/mktime.c: Sync from libc, now that it has the latest fix.
25268
25269 2002-11-24  Karl Berry  <karl@gnu.org>
25270
25271         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
25272         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
25273
25274 2002-11-24  Jim Meyering  <jim@meyering.net>
25275
25276         Update from coreutils:
25277
25278         * lib/mktime.c: Merge in changes from libc.
25279
25280         Avoid a link-time failure on some Linux systems.
25281         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
25282         (otherwise).
25283         (__mon_yday): Declare with the STATIC attribute.
25284         (__mktime_internal): Likewise.
25285         Based on a report from Greg Schafer.
25286
25287 2002-11-23  Jim Meyering  <jim@meyering.net>
25288
25289         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
25290         Use `unsigned', not `int', as type of index.
25291
25292         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
25293
25294         * lib/fsusage.c: Remove unneeded parentheses around operands of
25295         `defined'.
25296
25297 2002-11-22  Paul Eggert  <eggert@twinsun.com>
25298
25299         * lib/quotearg.h: Allow multiple inclusion by surrounding with
25300         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
25301         so that we can be included first.
25302         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
25303         * lib/quotearg.c: Include quotearg.h immediately after config.h.
25304         No need to include stddef.h or sys/types.h any more.
25305         Surround local include files with "", not "<>".
25306         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
25307         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
25308         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
25309         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
25310         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
25311         (ISPRINT): Remove; no longer needed now that we assume C89.
25312
25313         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
25314         Preserve errno.
25315
25316         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
25317         quotearg_char): Use SIZE_MAX rather than
25318         (size_t) -1 when we are talking about "infinity".
25319
25320         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
25321
25322 2002-11-22  Paul Eggert  <eggert@twinsun.com>
25323
25324         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
25325         hint that one should use `if (! x) abort ();' rather than `assert
25326         (x);', and anyway it's one less thing to worry about configuring.
25327         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
25328         hash_rehash, hash_insert): Use abort rather than assert.
25329
25330 2002-11-22  Bruno Haible  <bruno@clisp.org>
25331
25332         * lib/safe-read.h: Assume C89. Add comments.
25333         (safe_read): Change return type to size_t.
25334         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
25335         byte counts > SSIZE_MAX correctly.
25336         * lib/safe-write.h: New file.
25337         * lib/safe-write.c: New file.
25338         * lib/full-read.h: New file.
25339         * lib/full-read.c: New file.
25340         * lib/full-write.h: Assume C89. Add comments.
25341         * lib/full-write.c: Include safe-write.h.
25342         (full_write): Rewritten to use safe_write.
25343         Suggested by Jim Meyering and Paul Eggert.
25344
25345 2002-11-21  Jim Meyering  <jim@meyering.net>
25346
25347         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
25348
25349         Merge in changes from the coreutils.
25350
25351         2002-09-25  Paul Eggert  <eggert@twinsun.com>
25352         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
25353         <stdint.h>.
25354         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
25355         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
25356         int.  Work more efficiently if X is the same width as uintmax_t.
25357         Do not compare X to -1, to avoid bogus compiler warning.
25358         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
25359         Don't assume that f_frsize and f_bsize are the same type.
25360
25361         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
25362         warning on FreeBSD.
25363
25364         * lib/makepath.c (make_path): Restore umask *before* creating the final
25365         component.
25366         (make_path): Minor reformatting.
25367
25368         * lib/xmalloc.c: Adjust to work with new autoconf macros,
25369         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
25370         HAVE_MALLOC/HAVE_REALLOC.
25371
25372         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
25373         dummy ones.  At least on GNU/Linux systems, `auto' means something
25374         else.
25375         From Michael Stone.
25376
25377 2002-11-21  Bruno Haible  <bruno@clisp.org>
25378
25379         Remove case insensitive option matching.
25380         * lib/argmatch.h (argcasematch): Remove declaration.
25381         (ARGCASEMATCH): Remove macro.
25382         (__xargmatch_internal): Remove case_sensitive argument.
25383         (XARGMATCH): Update.
25384         (XARGCASEMATCH): Remove macro.
25385         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
25386         case_sensitive argument.
25387         (argcasematch): Remove function.
25388         (__xargmatch_internal): Remove case_sensitive argument.
25389         (main): Use XARGMATCH instead of XARGCASEMATCH.
25390
25391         * lib/xmalloc.c: Change compile-time error message. Add comment about
25392         required autoconf version.
25393
25394 2002-11-20  Paul Eggert  <eggert@twinsun.com>
25395
25396         Merge argmatch cleanups from Bison.  Assume C89.
25397
25398         * lib/argmatch.c: Include config.h here, not in argmatch.h.
25399         Include stdlib.h, for EXIT_FAILURE.
25400         Always include <string.h>, since we assume C89.
25401         (EXIT_FAILURE): Remove pre-C89 bug workaround.
25402         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
25403         Include <stddef.h> instead, since it's all we need for size_t.
25404         (PARAMS): Remove.  All uses removed.
25405         (ARRAY_CARDINALITY): Do not bother to #undef.
25406         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
25407         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
25408         Remove unnecessary parentheses.
25409         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
25410         Insert necessary parentheses.
25411         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
25412         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
25413
25414 2002-11-19  Bruno Haible  <bruno@clisp.org>
25415
25416         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
25417         * lib/mbswidth.h: Include <stddef.h>, for size_t.
25418
25419         * lib/mbswidth.h (PARAMS): Remove macro.
25420         (mbswidth, mbsnwidth): Use ANSI C function declarations.
25421         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
25422
25423         * lib/gcd.h (PARAMS): Remove macro.
25424         (gcd): Use ANSI C function declarations.
25425         * lib/gcd.c (gcd): Likewise.
25426
25427 2002-11-15  Bruno Haible  <bruno@clisp.org>
25428
25429         * lib/strcspn.c: Include <stddef.h>.
25430         (strcspn): Use ANSI C function declaration. Change return type to
25431         size_t. Use NULL.
25432         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
25433         (strpbrk): Use NULL.
25434         * lib/strpbrk.h (PARAMS): Remove macro.
25435         (strpbrk): Use ANSI C function declaration.
25436         * lib/strstr.c: Don't include <sys/types.h>.
25437         * lib/strstr.h (PARAMS): Remove macro.
25438         (strstr): Use ANSI C function declarations.
25439
25440 2002-11-14  Karl Berry  <karl@gnu.org>
25441
25442         * config/mkinstalldirs: `do' on separate line, instead of
25443         `for var; do'.
25444
25445 2002-11-06  Bruno Haible  <bruno@clisp.org>
25446
25447         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
25448         * lib/gcd.c (gcd): Likewise.
25449
25450 2002-11-05  Bruno Haible  <bruno@clisp.org>
25451
25452         * lib/gcd.h: New file, from gettext-0.11.5.
25453         * lib/gcd.c: New file, from gettext-0.11.5.
25454
25455 2002-11-05  Bruno Haible  <bruno@clisp.org>
25456
25457         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25458         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25459         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25460         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25461
25462         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
25463         <libintl.h>.
25464         * lib/makepath.c: Include gettext.h instead of <locale.h> and
25465         <libintl.h>.
25466
25467         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
25468         * lib/human.c: Include gettext.h instead of <libintl.h>.
25469         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
25470         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
25471         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
25472         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
25473         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
25474         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
25475         (textdomain): Remove definition.
25476         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
25477
25478         * lib/long-options.c: Remove include of <libintl.h> and definition of
25479         _.
25480         * lib/same.c: Remove include of <libintl.h> and definition of _.
25481
25482 2002-11-04  Owen Taylor  <otaylor@redhat.com>
25483
25484         * lib/config.charset: A few additions for Solaris.
25485
25486 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
25487
25488         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
25489         * lib/localcharset.c (locale_charset): Declare as extern "C".
25490
25491 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
25492
25493         * lib/config.charset: msdos in uk_UA uses CP1125.
25494
25495 2002-11-04  Bruno Haible  <bruno@clisp.org>
25496
25497         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
25498         * lib/strcase.h: New file, from GNU gettext-0.11.5.
25499         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
25500         * lib/strstr.h: New file, from GNU gettext-0.11.5.
25501         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
25502
25503 2002-11-04  Bruno Haible  <bruno@clisp.org>
25504
25505         * lib/localcharset.c (locale_charset): Don't return an empty string.
25506
25507 2002-11-04  Bruno Haible  <bruno@clisp.org>
25508
25509         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
25510         aliases.
25511
25512 2002-11-04  Bruno Haible  <bruno@clisp.org>
25513
25514         * lib/config.charset: Update for newest glibc. Add canonical names
25515         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
25516
25517 2002-11-04  Bruno Haible  <bruno@clisp.org>
25518
25519         * lib/config.charset: Add support for NetBSD.
25520
25521 2002-11-04  Bruno Haible  <bruno@clisp.org>
25522
25523         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
25524
25525 2002-11-01  Bruno Haible  <bruno@clisp.org>
25526
25527         * configure.in: Add AC_CONFIG_AUX_DIR call.
25528         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
25529         test/Makefile.
25530         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
25531
25532 2002-09-28  Karl Berry  <karl@gnu.org>
25533
25534         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
25535         installed automake until the next release, since changes have been
25536         made.
25537
25538 2002-09-25  Karl Berry  <karl@gnu.org>
25539
25540         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
25541         * lib/getopt*: copy from libc/posix.
25542         * lib/gettext.h: copy from gettext.
25543         * lib/.cppi-disable: add strdup.c, gettext.h.
25544
25545 2002-09-25  Karl Berry  <karl@gnu.org>
25546
25547         * config/srclist.txt: enable gettext.h check.
25548         * config/config.{guess,sub}: update from prep.
25549         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
25550                 from automake 1.6.3.
25551         See srclist*.
25552
25553 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
25554
25555         * regex.c (PATFETCH): Remove the translating fetch.
25556         (PATFETCH_RAW): Rename to PATFETCH.
25557         (set_image_of_range): New fun.
25558         (SET_RANGE_TABLE_WORK_AREA): Use it.
25559         (regex_compile): Don't translate the pattern chars so eagerly.
25560         Only do it when inserting an `exactn' bytecode or when handling
25561         a char-range.
25562         (mutually_exclusive_p): Avoid empty statement.
25563
25564 2002-07-06  Jim Meyering  <meyering@lucent.com>
25565
25566         * m4/README: Don't mention Makefile.am.in.
25567         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
25568
25569 2002-07-01  Jim Meyering  <meyering@lucent.com>
25570
25571         * lib/c-stack.c: Include sys/time.h.
25572         From Volker Borchert.
25573
25574 2002-06-26  Paul Eggert  <eggert@twinsun.com>
25575
25576         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
25577
25578 2002-06-26  Paul Eggert  <eggert@twinsun.com>
25579
25580         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
25581         New macro.  Use it uniformly instead of
25582         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
25583         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
25584         reported by Vin Shelton.
25585
25586 2002-06-22  Paul Eggert  <eggert@twinsun.com>
25587
25588         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
25589         Do not assume SA_SIGINFO behavior.
25590         Bug reported by Jim Meyering on NetBSD 1.5.2.
25591
25592 2002-06-22  Jim Meyering  <meyering@lucent.com>
25593
25594         * m4/c-stack.m4: New file, from diffutils-2.8.2.
25595         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
25596
25597         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
25598         now that configure.ac uses AC_GNU_SOURCE.
25599         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
25600         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
25601
25602         Update to latest tools.  Suggestions from Paul Eggert.
25603         * m4/stdbool.m4: New file, from diffutils-2.8.2.
25604         * m4/gnu-source.m4: Update from diffutils-2.8.2.
25605         * m4/fnmatch.m4: Likewise.
25606         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
25607         to AC_HEADER_STDBOOL
25608
25609 2002-06-22  Jim Meyering  <meyering@lucent.com>
25610
25611         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
25612         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
25613
25614 2002-06-22  Jim Meyering  <meyering@lucent.com>
25615
25616         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
25617
25618         * lib/exitfail.c, exitfail.h: Likewise.
25619         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
25620
25621         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
25622         of fnmatch.h.
25623         (EXTRA_DIST): Add fnmatch_loop.c.
25624         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
25625
25626         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
25627         * lib/fnmatch.c: Update from diffutils-2.8.2.
25628         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
25629         * lib/fnmatch.h: Remove file.
25630
25631 2002-06-21  Jim Meyering  <meyering@lucent.com>
25632
25633         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
25634         * m4/mbrtowc.m4: Likewise.
25635
25636         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
25637         * m4/mbswidth.m4: Reflect name change:
25638         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
25639         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
25640
25641         * m4/lib-link.m4: Update from gettext-0.11.2.
25642         * m4/gettext.m4: Likewise.
25643
25644         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
25645         From Alfred M. Szmidt.
25646
25647 2002-06-18  Paul Eggert  <eggert@twinsun.com>
25648
25649         * lib/file-type.h: Report an error if neither S_ISREG nor
25650         S_IFREG is defined, instead of using a test specific to glibc
25651         2.2.  This should be safe, since POSIX requires S_ISREG and
25652         Unix Version 7 had S_IFREG.  We don't need to check for
25653         <sys/types.h> since we don't use any symbols that it defines.
25654
25655 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
25656
25657         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
25658         $@-t, so that each temporary file name is unique and valid in the first
25659         8 characters, for operation under DOS.
25660
25661 2002-06-15  Paul Eggert  <eggert@twinsun.com>
25662
25663         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
25664
25665 2002-06-15  Jim Meyering  <meyering@lucent.com>
25666
25667         Work even with DJGPP 2.03, which lacks support for symlinks.
25668         From Richard Dawe.
25669         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
25670         is defined.
25671         * lib/lchown.c (S_ISLNK): Likewise.
25672
25673 2002-06-15  Jim Meyering  <meyering@lucent.com>
25674
25675         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
25676         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
25677         have been included before this file.
25678
25679 2002-06-14  Jim Meyering  <meyering@lucent.com>
25680
25681         * lib/file-type.h: Use the version from diffutils-2.8.2.
25682         * lib/file-type.c: Likewise.
25683
25684 2002-06-07  Jim Meyering  <meyering@lucent.com>
25685
25686         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
25687         They're needed at least for NetBSD 1.5.2.
25688         ($statxfs_includes): Include those same headers.
25689         ($statxfs_includes): Include sys/vfs.h if available.
25690         ($statxfs_includes): Likewise for sys/statvfs.h.
25691         Check for the following members in both structs statfs and statvfs:
25692         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
25693
25694 2002-06-01  Jim Meyering  <meyering@lucent.com>
25695
25696         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
25697         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
25698
25699 2002-05-28  Jim Meyering  <meyering@lucent.com>
25700
25701         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
25702         Reported by Volker Borchert.
25703
25704 2002-05-27  Jim Meyering  <meyering@lucent.com>
25705
25706         Fix a problem seen only on nonconforming systems whereby ls.c's
25707         use of localtime, and then of gettimeofday would cause trouble:
25708         the localtime call used to initialize rpl_gettimeofday's save
25709         mechanism would clobber ls's current local time information so
25710         that in any long listing the first file would always be listed
25711         with date 1970-01-01.  Analysis by Volker Borchert.
25712
25713         * lib/gettimeofday.c (localtime): Undefine.
25714         (rpl_localtime): New function.
25715
25716 2002-05-27  Jim Meyering  <meyering@lucent.com>
25717
25718         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
25719         localtime.
25720
25721         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
25722         use the replacement function; it wouldn't resolve at link time.
25723         Reported by Volker Borchert.
25724
25725 2002-05-22  Jim Meyering  <meyering@lucent.com>
25726
25727         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
25728         file-type.h.
25729         * lib/file-type.h: New file.
25730         * lib/file-type.c (file_type): New file/function.  Extracted from
25731         diffutils.
25732
25733 2002-04-30  Jim Meyering  <meyering@lucent.com>
25734
25735         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
25736
25737 2002-04-29  Paul Eggert  <eggert@twinsun.com>
25738
25739         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
25740
25741 2002-04-29  Paul Eggert  <eggert@twinsun.com>
25742
25743         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
25744         Do not check for alloca.h (no longer used) or stdbool.h (was never
25745         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
25746
25747 2002-04-29  Paul Eggert  <eggert@twinsun.com>
25748
25749         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
25750
25751 2002-04-29  Jim Meyering  <meyering@lucent.com>
25752
25753         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
25754         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
25755         Use AC_FUNC_STRNLEN here instead.
25756
25757         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
25758         With autoconf-2.53a, it's part of AC_PROG_CC.
25759
25760 2002-04-28  Paul Eggert  <eggert@twinsun.com>
25761
25762         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
25763         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
25764
25765 2002-04-28  Paul Eggert  <eggert@twinsun.com>
25766
25767         * lib/sig2str.h, lib/sig2str.c: New files.
25768         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
25769
25770 2002-04-28  Paul Eggert  <eggert@twinsun.com>
25771
25772         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
25773         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
25774         of 127, since 64 is the largest conceivable number for ancient
25775         nonstandard hosts.
25776         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
25777
25778 2002-04-28  Jim Meyering  <meyering@lucent.com>
25779
25780         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
25781
25782 2002-04-24  Jim Meyering  <meyering@lucent.com>
25783
25784         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
25785         (jm_PREREQ): Use it.
25786
25787         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
25788         mach/mach.h fcntl.h.
25789         Check for this function: setlocale.
25790
25791 2002-04-24  Jim Meyering  <meyering@lucent.com>
25792
25793         * lib/gettext.h: New file, from Gettext.
25794         * lib/Makefile.am (INCLUDES): Remove -I../intl.
25795         (libfetish_a_SOURCES): Add gettext.h.
25796
25797 2002-04-16  Jim Meyering  <meyering@lucent.com>
25798
25799         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
25800         ut_pid, ut_id, ut_exit.
25801
25802 2002-04-16  Jim Meyering  <meyering@lucent.com>
25803
25804         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
25805         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
25806         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
25807
25808 2002-04-12  Jim Meyering  <meyering@lucent.com>
25809
25810         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
25811         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
25812         existence of the getmntinfo function.  Needed for Darwin 5.3.
25813
25814         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
25815         This is necessary at least on Darwin 5.3.
25816
25817         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
25818         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
25819         strnlen.o in the library, and that makes some versions of ranlib
25820         object.
25821
25822 2002-04-12  Jim Meyering  <meyering@lucent.com>
25823
25824         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
25825
25826 2002-04-09  Jim Meyering  <meyering@lucent.com>
25827
25828         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
25829         to be more precise.  Rather than saying we're checking whether the
25830         function `works', say what we're testing.
25831         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
25832         Reported by Bruno Haible.
25833
25834 2002-03-10  Jim Meyering  <meyering@lucent.com>
25835
25836         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
25837         Suggestion from Santiago Vila.
25838
25839 2002-03-08  Jim Meyering  <meyering@lucent.com>
25840
25841         * lib/rename.c: Mention that this wrapper is needed also on
25842         mips-dec-ultrix4.4 systems.
25843
25844 2002-03-02  Jim Meyering  <meyering@lucent.com>
25845
25846         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
25847         not HAVE_CLOCK_SETTIME.
25848
25849 2002-02-27  Paul Eggert  <eggert@twinsun.com>
25850
25851         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
25852         Check for clock_settime.
25853
25854 2002-02-27  Paul Eggert  <eggert@twinsun.com>
25855
25856         * lib/nanosleep.h: Rename to....
25857         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
25858
25859         * lib/gettime.c: New file.
25860         * lib/settime.c: New file.
25861         * lib/stime.c: Remove.
25862
25863         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
25864         timespec.h.  Remove nanosleep.h.
25865
25866 2002-02-25  Paul Eggert  <eggert@twinsun.com>
25867
25868         * m4/acl.m4: New file.
25869         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
25870         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
25871
25872 2002-02-25  Paul Eggert  <eggert@twinsun.com>
25873
25874         * lib/acl.c, lib/acl.h: New files.
25875         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
25876
25877 2002-02-24  Jim Meyering  <meyering@lucent.com>
25878
25879         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
25880         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
25881         cause trouble.  Reported by Nelson Beebe.
25882
25883 2002-02-23  Paul Eggert  <eggert@twinsun.com>
25884
25885         * lib/path-concat.c (xpath_concat): Reorder code to pacify
25886         compilers that don't know that xalloc_die never returns.
25887
25888 2002-02-20  Jim Meyering  <meyering@lucent.com>
25889
25890         * lib/getdate.c: Regenerate using bison-1.33.
25891
25892 2002-02-17  Jim Meyering  <meyering@lucent.com>
25893
25894         * config/config.guess (main): Don't use `head -1'; it's no longer
25895         portable. Use `sed 1q' instead.
25896
25897 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
25898
25899         * m4/codeset.m4: Upgrade to gettext-0.11.
25900         * m4/gettext.m4: Upgrade to gettext-0.11.
25901         * m4/glibc21.m4: Upgrade to gettext-0.11.
25902         * m4/iconv.m4: Upgrade to gettext-0.11.
25903         * m4/isc-posix.m4: Upgrade to gettext-0.11.
25904         * m4/lcmessage.m4: Upgrade to gettext-0.11.
25905         * m4/lib-ld.m4: New file, from gettext-0.11.
25906         * m4/lib-link.m4: New file, from gettext-0.11.
25907         * m4/lib-prefix.m4: New file, from gettext-0.11.
25908         * m4/progtest.m4: Upgrade to gettext-0.11.
25909
25910 2002-02-15  Paul Eggert  <eggert@twinsun.com>
25911
25912         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
25913         (jm_PREREQ): Use it.
25914
25915 2002-02-15  Paul Eggert  <eggert@twinsun.com>
25916
25917         * lib/posixver.c, lib/posixver.h: New files.
25918         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
25919
25920 2002-02-02  Paul Eggert  <eggert@twinsun.com>
25921             Bruno Haible  <bruno@clisp.org>
25922
25923         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
25924         (fwrite_success_callback): New declaration.
25925         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
25926         print_unicode_char. Call failure callback instead of error.
25927         (fwrite_success_callback): New function.
25928         (exit_failure_callback): New function.
25929         (fallback_failure_callback): New function.
25930         (print_unicode_char): Call unicode_to_mb.
25931
25932 2002-01-26  Jim Meyering  <meyering@lucent.com>
25933
25934         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
25935         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
25936
25937 2002-01-26  Jim Meyering  <meyering@lucent.com>
25938
25939         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
25940
25941 2002-01-22  Paul Eggert  <eggert@twinsun.com>
25942
25943         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
25944
25945 2002-01-22  Jim Meyering  <meyering@lucent.com>
25946
25947         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
25948         Otherwise, some versions of automake would omit the rule that makes
25949         Makefile from Makefile.in.
25950
25951 2002-01-21  Paul Eggert  <eggert@twinsun.com>
25952
25953         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
25954         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
25955         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
25956         (memcoll): Set errno to zero if there is no error.
25957
25958         * lib/quotearg.c (quotearg_buffer_restyled):
25959         Fix bug with quoting buffers containing NUL when backslashing escapes.
25960         This bug was exposed by the other changes in this patch.
25961         (quotearg_n_options): New arg ARGSIZE.
25962         All callers changed.
25963         (quoting_options_from_style): New function.
25964         (quotearg_n_style): Use it.
25965         (quotearg_n_style_mem): New function.
25966
25967         * lib/quotearg.h (quotearg_n_style_mem): New function.
25968
25969 2002-01-19  Jim Meyering  <meyering@lucent.com>
25970
25971         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
25972         Remove useless quotes: DF_PROG="df".
25973         * m4/strnlen.m4: New file.
25974
25975 2002-01-16  Paul Eggert  <eggert@twinsun.com>
25976
25977         * lib/backupfile.c (ISDIGIT): Comment fix.
25978         * lib/getdate.y (ISDIGIT): Likewise.
25979         * lib/posixtm.c (ISDIGIT, year): Likewise.
25980         * lib/strverscmp.c (ISDIGIT): Likewise.
25981         * lib/userspec.c (ISDIGIT): Likewise.
25982
25983 2002-01-16  Jim Meyering  <meyering@lucent.com>
25984
25985         * lib/getdate.y: Add three semicolons, each just before a closing
25986         brace. Bison (as of version 1.31) no longer papers over that mistake.
25987
25988 2002-01-05  Jim Meyering  <meyering@lucent.com>
25989
25990         * lib/version-etc.c (version_etc_copyright): Update copyright year.
25991
25992 2001-12-19  Paul Eggert  <eggert@twinsun.com>
25993
25994         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
25995         not silently exit merely because the output buffer happens to
25996         have nothing pending.
25997
25998 2001-12-18  Paul Eggert  <eggert@twinsun.com>
25999
26000         See the big note in ../ChangeLog.
26001         * lib/human.c (suffixes): Prefer K to k for 1024.
26002         (generate_suffix_backwards): New function.
26003         (human_readable_inexact): Use it.
26004         * lib/xstrtol.c (__xstrtol): If there is no number but there
26005         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
26006         Accept 'K' as well as 'k'.
26007
26008 2001-12-15  Jim Meyering  <meyering@lucent.com>
26009
26010         * lib/regex.h (__restrict_arr): Update from libc.
26011
26012         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
26013         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
26014         (STREQ): Define.
26015
26016 2001-12-14  Jim Meyering  <meyering@lucent.com>
26017
26018         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
26019         Suggestion from Bruno Haible.
26020
26021 2001-12-10  Jim Meyering  <meyering@lucent.com>
26022
26023         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
26024         xrealloc, Instead, include "xalloc.h".
26025         (initbuffer): Don't cast xmalloc return value to char*.
26026         (readline): Reword comment.
26027         Don't cast xrealloc return value to char*
26028         Return NULL, not 0.
26029
26030 2001-12-09  Jim Meyering  <meyering@lucent.com>
26031
26032         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
26033         about `signed and unsigned type in conditional expression'.
26034         * lib/posixtm.c (posix_time_parse): Likewise.
26035
26036         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
26037
26038         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
26039         to avoid a pedantic warning.
26040
26041         * lib/getstr.c: Don't include assert.h.
26042         (getstr): Remove warning-evoking assertions.
26043         Return -1 if offset parameter is out of bounds.
26044         Change the type of a local from int to size_t.
26045
26046         * lib/strftime.c (my_strftime_localtime_r): Include this function
26047         definition in the `#if ! HAVE_TM_GMTOFF' block.
26048
26049         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
26050         Include xalloc.h instead.
26051
26052 2001-12-02  Jim Meyering  <meyering@lucent.com>
26053
26054         * lib/tempname.c: Don't declare getenv, thus reverting the change of
26055         2001-11-18.  It's no longer necessary, now that stdlib.h is always
26056         included.
26057
26058         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
26059         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
26060
26061 2001-11-30  Akim Demaille  <akim@epita.fr>
26062
26063         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
26064         before being defined.
26065
26066 2001-11-27  Paul Eggert  <eggert@twinsun.com>
26067
26068         * lib/quotearg.h (quotearg_n, quotearg_n_style):
26069         First arg is int, not unsigned.
26070         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
26071         (SIZE_MAX, UINT_MAX): New macros.
26072         (quotearg_n_options): Abort if N is negative.
26073         Avoid overflow check on hosts where size_t is 64 bits and int
26074         is 32 bits, as overflow is impossible there.
26075         Fix off-by-one typo that caused unnecessary reallocation.
26076
26077 2001-11-27  Jim Meyering  <meyering@lucent.com>
26078
26079         * lib/tempname.c: Merge with version from libc.
26080         * lib/regex.c: Likewise.
26081
26082         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
26083         systems for which STDC_HEADERS is 0, it was not included, resulting in
26084         a warning about an integer-to-pointer conversion problem with getenv.
26085         Reported by Volker Borchert.
26086
26087 2001-11-26  Jim Meyering  <meyering@lucent.com>
26088
26089         * lib/gtod.h: Remove file.
26090         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
26091         * lib/gettimeofday.c: Don't include gtod.h.
26092         (GTOD_init): Remove function.
26093         (rpl_gettimeofday): Do its job here instead, rather than aborting.
26094         Suggestion from Volker Borchert.
26095
26096 2001-11-23  Jim Meyering  <meyering@lucent.com>
26097
26098         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
26099         it.
26100         * lib/hash.c (struct hash_table): Define it here instead.
26101
26102 2001-11-22  Jim Meyering  <meyering@lucent.com>
26103
26104         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
26105
26106 2001-11-20  Jim Meyering  <meyering@lucent.com>
26107
26108         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
26109         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
26110
26111 2001-11-19  Jim Meyering  <meyering@lucent.com>
26112
26113         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
26114         directory.  Use "conftestXXXXXX" as the template.
26115         Suggestion from Paul Eggert.
26116
26117         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
26118         immediately, so the test doesn't mistakenly hit the max-open-files
26119         limit.
26120
26121 2001-11-18  Paul Eggert  <eggert@twinsun.com>
26122
26123         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
26124         (TEMPORARIES): New macro.
26125         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
26126         removes an artificial limitation (e.g. HP-UX 10.20, where
26127         TMP_MAX is 17576).
26128
26129 2001-11-18  Jim Meyering  <meyering@lucent.com>
26130
26131         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
26132
26133 2001-11-18  Jim Meyering  <meyering@lucent.com>
26134
26135         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
26136         on SunOS 4.
26137
26138         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
26139         files will be created before anything else.
26140
26141 2001-11-17  Paul Eggert  <eggert@twinsun.com>
26142
26143         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
26144         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
26145
26146 2001-11-17  Jim Meyering  <meyering@lucent.com>
26147
26148         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
26149         Prompted by a report from Bob Proulx.
26150
26151         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
26152         Instead, require UTILS_FUNC_MKSTEMP.
26153
26154 2001-11-17  Jim Meyering  <meyering@lucent.com>
26155
26156         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
26157         Now, that's done as part of AC_FUNC_STRTOD.
26158
26159 2001-11-17  Jim Meyering  <meyering@lucent.com>
26160
26161         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
26162         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
26163         rather than group writable.  Patch by Juan F. Codagnone.
26164
26165         * lib/readtokens.c: Remove explicit declarations of xmalloc and
26166         xrealloc, Instead, include "xalloc.h".
26167
26168         * lib/mountlist.c: Include unlocked-io.h after all system headers.
26169         Remove explicit declarations of xmalloc, xrealloc,
26170         and xstrdup.  Instead, include "xalloc.h".
26171
26172         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
26173         unlocked-io.h.
26174         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
26175         Likewise.
26176         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
26177
26178         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
26179         Reported by Padraig Brady.
26180
26181         * lib/mkstemp.c: #undef mkstemp.
26182         Include config.h.
26183         (rpl_mkstemp): Rename from mkstemp.
26184         Protoize.
26185
26186 2001-11-16  Jim Meyering  <meyering@lucent.com>
26187
26188         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
26189         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
26190         determine the amount of total physical memory, use pstat_getstatic.
26191         HPUX-11 doesn't define _SC_PHYS_PAGES.
26192         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
26193         If sysconf couldn't be used to determine the amount of available
26194         physical memory, use both pstat_getstatic and pstat_getdynamic.
26195         Based on a patch from Bob Proulx.
26196
26197 2001-11-10  Jim Meyering  <meyering@lucent.com>
26198
26199         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
26200         (jm_PREREQ): Use it.
26201
26202 2001-11-09  Jim Meyering  <meyering@lucent.com>
26203
26204         * m4/jm-macros.m4: Require autoconf-2.52f.
26205         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
26206         Use these AC_-prefixed names, not the AM_-prefixed ones.
26207
26208         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
26209
26210 2001-11-05  Jim Meyering  <meyering@lucent.com>
26211
26212         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
26213
26214 2001-11-04  Jim Meyering  <meyering@lucent.com>
26215
26216         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
26217         $DEFS.
26218
26219 2001-11-03  Jim Meyering  <meyering@lucent.com>
26220
26221         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
26222         of AC_DEFUN.
26223
26224         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
26225         know the name of the variable in the macro definition.
26226
26227 2001-11-03  Jim Meyering  <meyering@lucent.com>
26228
26229         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
26230         in argmatch_to_argument call.
26231
26232         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
26233         argument.
26234
26235         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
26236         e.g., a fault due to an attempt to free a NULL pointer.
26237
26238 2001-11-01  Jim Meyering  <meyering@lucent.com>
26239
26240         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
26241         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
26242
26243 2001-11-01  Jim Meyering  <meyering@lucent.com>
26244
26245         * lib/dirfd.c, lib/dirfd.h: New files.
26246         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
26247
26248         * lib/hash.c (hash_print) [TESTING]: Clean up.
26249
26250 2001-10-22  Paul Eggert  <eggert@twinsun.com>
26251
26252         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
26253         to avoid a warning if -Wall.
26254
26255 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
26256
26257         * README: New file
26258         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
26259         (per RMS's instructions, this is now the canonical source)
26260         * lgpl/, gpl/: New directories.
26261
26262 2001-10-21  Paul Eggert  <eggert@twinsun.com>
26263
26264         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
26265
26266 2001-10-21  Jim Meyering  <meyering@lucent.com>
26267
26268         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
26269         this code would end up calling gettext even in packages built
26270         with --disable-nls.
26271         * lib/getopt.c (_): Likewise.
26272         * lib/regex.c (_): Likewise.
26273
26274 2001-10-20  Paul Eggert  <eggert@twinsun.com>
26275
26276         * m4/error.m4 (jm_PREREQ_ERROR):
26277         Do not invoke AC_CHECK_FUNCS with strerror_r, as
26278         AC_FUNC_STRERROR_R does that.
26279         Check for strerror declaration.
26280
26281         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
26282         are supposed to have them these days.
26283         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
26284         Merge changes from latest Autoconf CVS.
26285         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
26286         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
26287         POSIX decided to standardize on the int flavor of strerror_r.
26288
26289 2001-10-20  Paul Eggert  <eggert@twinsun.com>
26290
26291         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
26292         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
26293         Use strerror_r that is only a macro, even if it is not a function.
26294         (strerror): Check for HAVE_DECL_STRERROR before declaring.
26295         (private_strerror): Use prototypes, not old-style function definition.
26296         (print_errno_message): New function.
26297         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
26298         char*-flavored one.
26299         (error_tail, error, error_at_line): Use it.
26300
26301 2001-10-11  Jim Meyering  <meyering@lucent.com>
26302
26303         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
26304         and quote_n (1, ... to avoid clobbering a buffer.
26305
26306 2001-10-05  Jim Meyering  <meyering@lucent.com>
26307
26308         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
26309         hash-pjw.h.
26310         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
26311         * lib/hash-pjw.h: New file.
26312
26313 2001-09-30  Jim Meyering  <meyering@lucent.com>
26314
26315         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
26316         `struct fsstat' has the `f_fstypename' member.
26317         Use that to define FS_TYPE, which is now used to make
26318         the getfsstat link test tighter.
26319
26320 2001-09-30  Jim Meyering  <meyering@lucent.com>
26321
26322         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
26323         Include <sys/ucred.h>, for Apple Darwin.
26324         Include sys/mount.h and sys/fs_types.h only if available.
26325         (FS_TYPE): Define.
26326         (read_filesystem_list): Use FS_TYPE.
26327
26328 2001-09-29  Paul Eggert  <eggert@twinsun.com>
26329
26330         * lib/exclude.c (excluded_filename): 0 -> false, since it's
26331         a boolean context.
26332
26333 2001-09-29  Jim Meyering  <meyering@lucent.com>
26334
26335         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
26336         [one-argument getmntent function]): Include stdio.h before mntent.h.
26337         SunOS 4.1.x needs it for the declaration of `FILE'.
26338         Patch by Volker Borchert.
26339
26340         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
26341         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
26342         sys/fs_types.h, and make the link-test for getfsstat guard #include
26343         directives with appropriate #if HAVE_*_H tests so that we can
26344         detect getfsstat on Apple Darwin1.3.7 systems.
26345         Reported by Nelson Beebe.
26346         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
26347
26348 2001-09-28  Paul Eggert  <eggert@twinsun.com>
26349
26350         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
26351         #defines strtoimax.  Also treat the other strto* functions
26352         like strtoimax.
26353
26354         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
26355         Check for strtoul and strtoumax,
26356         as those declarations are made even in the signed case.
26357         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
26358         Likewise, for strtol and strtoimax.
26359
26360 2001-09-28  Paul Eggert  <eggert@twinsun.com>
26361
26362         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
26363         #defines strtoimax.  Also treat the other strto* functions
26364         like strtoimax.
26365
26366         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
26367         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
26368         (strtoimax, strtoumax): Do not declare if already defined as a macro.
26369
26370 2001-09-26  Jim Meyering  <meyering@lucent.com>
26371
26372         Most macros in unlocked-io.h had the wrong number of arguments.
26373         * lib/gen-uio: New script.
26374         (USE_UNLOCKED_IO): Define to 1 if not already defined.
26375         * lib/unlocked-io.hin: Remove file.
26376         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
26377         rather than trying to embed it here.
26378         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
26379         Reported by Padraig Brady.
26380
26381 2001-09-25  Volker Borchert  <bt@teknon.de>
26382
26383         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
26384         `result'.
26385
26386 2001-09-24  Jim Meyering  <meyering@lucent.com>
26387
26388         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
26389
26390 2001-09-23  Jim Meyering  <meyering@lucent.com>
26391
26392         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
26393         instead of the mere test for existence of mntent.h.  The latter
26394         would get a false-positive on AIX 3.4 systems.
26395         In the outer getmntent if-block, don't die if neither of the getmntent
26396         tests succeeds.  Instead, just fall through and continue with the
26397         remaining tests.
26398
26399 2001-09-23  Jim Meyering  <meyering@lucent.com>
26400
26401         * lib/mountlist.c: Remove useless parentheses in #if directives.
26402         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
26403         the deprecated MOUNTED symbol is no longer defined in mntent.h.
26404
26405 2001-09-22  Jim Meyering  <meyering@lucent.com>
26406
26407         * m4/gettext.m4: New file.  From gettext.
26408         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
26409         * m4/progtest.m4: Likewise
26410         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
26411         * m4/glibc21.m4: Likewise.
26412
26413         * m4/libintl.m4: Remove.  No longer used.
26414
26415 2001-09-22  Jim Meyering  <meyering@lucent.com>
26416
26417         * lib/localcharset.c: Update from latest gettext.
26418         * lib/config.charset: Likewise.
26419
26420 2001-09-20  Jim Meyering  <meyering@lucent.com>
26421
26422         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
26423         strtoimax.
26424         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
26425         strtoumax.
26426
26427 2001-09-20  Jim Meyering  <meyering@lucent.com>
26428
26429         * lib/xstrtol.c (strtoimax): Guard declaration with
26430         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
26431         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
26432         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
26433         (strtoumax): Likewise, for completeness (it wasn't necessary).
26434
26435 2001-09-17  Paul Eggert  <eggert@twinsun.com>
26436
26437         * lib/strtoimax.c (HAVE_LONG_LONG):
26438         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
26439         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
26440         to work around bug in IBM C compiler.
26441
26442 2001-09-17  Jim Meyering  <meyering@lucent.com>
26443
26444         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
26445         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
26446         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
26447         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
26448         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
26449         whenever the right hand side need not be expanded by the shell.
26450
26451 2001-09-16  Paul Eggert  <eggert@twinsun.com>
26452
26453         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
26454         library.  It's not correct, as some older glibcs are buggy.
26455         fnmatch wasn't fixed until glibc 2.2.
26456
26457         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
26458         special shell magic here.
26459
26460 2001-09-16  Jim Meyering  <meyering@lucent.com>
26461
26462         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
26463         * m4/jm-macros.m4: Require it.
26464
26465 2001-09-16  Jim Meyering  <meyering@lucent.com>
26466
26467         * lib/mkdir.c: New file.
26468
26469 2001-09-15  Jim Meyering  <meyering@lucent.com>
26470
26471         * m4/jm-macros.m4: Check for help2man.
26472
26473 2001-09-11  Jim Meyering  <meyering@lucent.com>
26474
26475         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
26476         The body, by Paul Eggert, was moved here from configure.in.
26477         * m4/jm-macros.m4: Require UTILS_HOST_OS.
26478
26479 2001-09-04  Paul Eggert  <eggert@twinsun.com>
26480
26481         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
26482         (jm_PREREQ): Use it.
26483
26484 2001-09-04  Paul Eggert  <eggert@twinsun.com>
26485
26486         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
26487         Use ssize_t, not int, to store result of readlink.
26488         Check for ssize_t overflow as well as size_t overflow,
26489         as POSIX says the result of readlink is implementation-defined
26490         when ssize_t overflows.
26491         Remove unnecessary cast to char*.
26492         Use free+malloc instead of realloc, as the storage doesn't need
26493         to be preserved and it's clearer and can be more efficient that way.
26494         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
26495         * lib/xreadlink.h (xreadlink): Update prototype.
26496
26497 2001-09-04  Paul Eggert  <eggert@twinsun.com>
26498
26499         * lib/xgetcwd.c: Revert some of the previous change; intead,
26500         fix the HAVE_GETCWD_NULL code to behave more like the
26501         !HAVE_GETCWD_NULL code used to.
26502
26503         Include "xalloc.h".
26504         (xgetcwd): Do not return NULL when memory is exhausted; instead,
26505         invoke xalloc_die.
26506
26507 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26508
26509         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
26510         sys/param.h, as pathmax.h includes them.
26511
26512 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26513
26514         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
26515         (jm_PREREQ_XGETCWD): New macro.
26516
26517         * m4/getcwd.m4: New file.
26518
26519 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26520
26521         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
26522         like the HAVE_GETCWD_NULL code.
26523         Include pathmax.h if not HAVE_GETCWD.
26524         Do not include xalloc.h.
26525         (INITIAL_BUFFER_SIZE): New symbol.
26526         Do not use xmalloc / xrealloc, since the caller is responsible for
26527         handling errors.  Preserve errno around `free' during failure.
26528         Do not overrun buffer when using getwd.
26529
26530 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26531
26532         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
26533         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
26534         getcwd (NULL, 0).
26535
26536 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26537
26538         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
26539         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
26540         spotted by Jim Meyering.
26541
26542 2001-09-03  Jim Meyering  <meyering@lucent.com>
26543
26544         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
26545         failure.
26546
26547 2001-09-02  Jim Meyering  <meyering@lucent.com>
26548
26549         * lib/error.c: Update from GNU libc.
26550
26551 2001-09-01  Jim Meyering  <meyering@lucent.com>
26552
26553         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
26554         Used by df.
26555
26556 2001-09-01  Jim Meyering  <meyering@lucent.com>
26557
26558         * lib/xreadlink.c: New file.
26559         * lib/xreadlink.h: New file.
26560         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
26561         xreadlink.h.
26562
26563         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
26564         doesn't conflict with sparc Solaris 7's definition in
26565         /usr/include/sys/int_types.h.
26566
26567         * lib/exclude.c: Use `""', not `<>' to #include non-system header
26568         files.
26569         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
26570         and strncasecmp as r-values.  Unixware didn't have declarations.
26571
26572 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26573
26574         * lib/xstrtol.h: Add copyright notice.
26575         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
26576         LONGINT_INVALID_SUFFIX_CHAR.
26577
26578 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26579
26580         * lib/xstrtol.c (strtoimax): New decl.
26581
26582 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26583
26584         * lib/xgetcwd.c: Don't include pathmax.h.
26585         Include stdlib.h and unistd.h if available.
26586         Include xalloc.h.
26587         (xmalloc, xstrdup, free): Remove decls.
26588         (xgetcwd): Don't assume sizes fit in unsigned.
26589         Check for overflow when computing sizes.
26590         Simplify reallocation code.
26591
26592 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26593
26594         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
26595         a directory's st_size can have an arbitrary value, so the old
26596         usage could waste an arbitrary amount of memory.  All uses
26597         changed.
26598         * lib/savedir.h: Update prototype.
26599
26600 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26601
26602         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
26603
26604         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
26605         old strtoimax.c.
26606
26607         Also, make the following further changes to make this file's
26608         configuration more similar to that of strtol.c:
26609         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
26610         (strtoumax, uintmax_t, strtoull, strtol): Remove.
26611         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
26612         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
26613         changed to signed values.
26614
26615         And make the following changes as well:
26616         Fix copyright notice, as 1999 was missing.
26617         (verify): New macro.
26618         (strtoimax): Check sizes at compile-time, not run-time.
26619         Prefer strtol to strtoll if both work.
26620         (main): Remove; it was not that useful and was a pain to maintain.
26621
26622         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
26623
26624 2001-08-31  Jim Meyering  <meyering@lucent.com>
26625
26626         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
26627         Use an initial, malloc'd, buffer of length 128 rather than
26628         a statically allocated one of length 1024.
26629
26630 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26631
26632         Simplify code, partly by assuming autoconf 2.52 semantics.
26633
26634         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
26635
26636         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
26637         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
26638         All uses removed.
26639         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
26640         Move AC_REQUIRE to next-to-top level, to avoid confusion.
26641         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
26642         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
26643         jm_AC_HEADER_INTTYPES_H.
26644         * m4/jm-macros.m4 (jm_MACROS): Likewise.
26645
26646         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
26647
26648         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
26649         Quote first arg of AC_DEFUN.
26650         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
26651         since they are needed to parse the include file even if we need
26652         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
26653         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
26654         but with opposite signedness.
26655
26656 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26657
26658         Merge 'exclude' changes from tar 1.13.22.
26659         This fixes one or two unlikely storage allocation overflow bugs,
26660         but doesn't change user-visible behavior otherwise.
26661
26662 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26663
26664         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
26665         (jm_PREREQ_EXCLUDE): New macro.
26666
26667 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26668
26669         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
26670         tm to be declared.
26671
26672 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26673
26674         * lib/hash.c: Remove '2001' from copyright notice.
26675
26676 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26677
26678         * lib/full-write.h: New file.
26679         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
26680         * lib/full-write.c: Correct credits, as cccp.c no longer
26681         exists and anyway it was so heavily changed from the old cccp
26682         code as to be unrecognizable.  Include full-write.h.
26683         (full_write) Return size_t, with short writes meaning failure.
26684         All callers changed.  This fixes a bug with large buffers
26685         on 64-bit hosts.
26686         * lib/utime.c: Include full-write.h.
26687
26688 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26689
26690         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
26691         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
26692         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
26693         Include if available.
26694         (<xalloc.h>): Include
26695         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
26696         (verify): New macro.  Use it to verify that EXCLUDE macros do not
26697         collide with FNM macros.
26698         (struct patopts): New struct.
26699         (struct exclude): Use it, as exclude patterns now come with options.
26700         (new_exclude): Support above changes.
26701         (new_exclude, add_exclude_file):
26702         Initial size must now be a power of two to simplify overflow checking.
26703         (free_exclude, fnmatch_no_wildcards): New function.
26704         (excluded_filename): No longer requires options arg, as the options
26705         are determined by add_exclude.  Now returns bool, not int.
26706         (excluded_filename, add_exclude):
26707         Add support for the fancy new exclusion options.
26708         (add_exclude, add_exclude_file): Now takes int options arg.
26709         Check for arithmetic overflow when computing sizes.
26710         (add_exclude_file): xrealloc might modify errno, so don't
26711         realloc until after errno might be used.
26712
26713         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
26714         New macros.
26715         (free_exclude): New decl.
26716         (add_exclude, add_exclude_file): Now takes int options arg.
26717         (excluded_filename): No longer requires options arg, as the options
26718         are determined by add_exclude.  Now returns bool, not int.
26719
26720 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26721
26722         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
26723
26724 2001-08-27  Jim Meyering  <meyering@lucent.com>
26725
26726         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
26727
26728         * lib/version-etc.c (N_): Remove definition.
26729         Revert most of last change.
26730         Instead, simply don't mark the `Copyright...' string for translation.
26731         Based on advice from Paul Eggert.
26732
26733         * lib/strtoxmax.c: Tweak comment.
26734
26735 2001-08-26  Jim Meyering  <meyering@lucent.com>
26736
26737         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
26738
26739         * m4/xstrtoimax.m4: New file.
26740         * m4/xstrtoumax.m4: Add comments explaining why we
26741         AC_REPLACE_FUNCS(strtol).
26742
26743 2001-08-26  Jim Meyering  <meyering@lucent.com>
26744
26745         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
26746         of copyright with `%s' so translators don't get an untranslated
26747         message in 2002.
26748         (COPYRIGHT_YEAR): Define.
26749         (version_etc): Use fprintf rather than fputs.
26750         Suggestion from Ulrich Drepper.
26751
26752         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
26753
26754         * lib/strtoll.c: New file, from GNU libc.
26755         * lib/xstrtoimax.c: New file.
26756
26757         * lib/xstrtol.h: Add xstrtoimax.
26758         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
26759         * lib/strtoimax.c: New file.  Likewise, but first define
26760         STRTOUXMAX_SIGNED.
26761
26762         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
26763         ...
26764         * lib/strtoxmax.c: ... then renamed to this.
26765
26766 2001-08-18  Paul Eggert  <eggert@twinsun.com>
26767
26768         * m4/inttypes.m4: Add AC_PREREQ(2.13).
26769         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
26770         (jm_AC_TYPE_INTMAX_T): New macro.
26771         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
26772
26773         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
26774
26775         * m4/longlong.m4: Renamed from ulonglong.m4.
26776         * m4/inttypes.m4: Renamed from inttypes_h.m4.
26777         * m4/uintmax_t.m4: Removed.
26778
26779 2001-08-13  Paul Eggert  <eggert@twinsun.com>
26780
26781         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
26782         Port to Solaris 8, where 'sed' requires a space after the 'r'
26783         command, and where sh dislikes "$/".  Clean up the spacing a bit.
26784         Redirect output to $tmp just once.
26785
26786 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
26787
26788         * lib/addext.c (<errno.h>): Include.
26789         (errno): Declare if not defined.
26790         (addext): Work correctly when pathconf returns -1 and leaves
26791         errno alone because there is no limit.  Also, work even if
26792         pathconf returns a value greater than SIZE_MAX.
26793
26794 2001-08-12  Jim Meyering  <meyering@lucent.com>
26795
26796         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
26797         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
26798         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
26799         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
26800         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
26801         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
26802         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
26803         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
26804         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
26805         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
26806         utime.m4, utimes.m4, xstrtoumax.m4:
26807         Quote the first argument in each use of AC_DEFUN.
26808
26809 2001-08-12  Jim Meyering  <meyering@lucent.com>
26810
26811         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
26812         Simply `return getcwd (NULL, 0);'.
26813         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
26814         Use 1300 as initial value for length, not PATH_MAX.
26815
26816         * lib/pathmax.h: Clean up cpp syntax.
26817
26818 2001-08-12  Jim Meyering  <meyering@lucent.com>
26819
26820         * lib/gettimeofday.c: New file.
26821         * lib/gtod.h: New file.
26822         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
26823
26824 2001-08-05  Jim Meyering  <meyering@lucent.com>
26825
26826         * m4/jm-macros.m4: Require autoconf-2.52.
26827
26828 2001-08-04  Jim Meyering  <meyering@lucent.com>
26829
26830         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
26831         stmt, to get in sync with glibc.
26832
26833 2001-08-03  Paul Eggert  <eggert@twinsun.com>
26834
26835         The following changes are from gettext 0.10.39 as maintained by
26836         Bruno Haible.
26837
26838         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
26839         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
26840         with inverted sense.  All uses changed.
26841
26842         * lib/mbswidth.c: Don't include <limits.h>.
26843         Include <stdlib.h> and <string.h> unconditionally.
26844         (iswcntrl, mbsinit, ISCNTRL): New macros.
26845         (mbsnwidth): Use K&R style function declarations.
26846         Don't bother checking for MB_LEN_MAX == 1, since the compiler
26847         can optimize it when MB_CUR_MAX == 1.
26848         The width of control characters is zero, not 1.
26849
26850 2001-08-03  Paul Eggert  <eggert@twinsun.com>
26851
26852         The following changes are from gettext 0.10.39 as maintained by
26853         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
26854
26855         * m4/codeset.m4: Upgrade to serial AM1.
26856         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
26857         all uses changed.  Quote first arg of AC_DEFUN.
26858         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
26859
26860         * m4/iconv.m4: Upgrade to serial AM2.
26861         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
26862         Add --with-libconv-prefix.
26863         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
26864         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
26865         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
26866         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
26867         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
26868
26869         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
26870         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
26871         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
26872         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
26873         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
26874         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
26875         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
26876         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
26877         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
26878
26879         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
26880         string.h any more.
26881
26882         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
26883         not the default value.
26884
26885         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
26886         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
26887         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
26888         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
26889         Also check for iswcntrl, used for wcwidth fallback.
26890         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
26891         to Autoconf 2.13.
26892
26893 2001-08-03  Jim Meyering  <meyering@lucent.com>
26894
26895         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
26896         as it was in the original.  Reported by Paul Eggert.
26897
26898 2001-07-16  Jim Meyering  <meyering@lucent.com>
26899
26900         * m4/gettimeofday.m4: New file.
26901         Prompted by a report from Bernhard Baehr.
26902
26903 2001-07-15  Jim Meyering  <meyering@lucent.com>
26904
26905         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
26906         stuff. Now it's in ../Makefile.cfg.
26907
26908 2001-07-15  Jim Meyering  <meyering@lucent.com>
26909
26910         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
26911         (BUILT_SOURCES): Add unlocked-io.h.
26912         (io_functions): Define.
26913         (unlocked-io.h): New rule.
26914         (DISTCLEANFILES): Add unlocked-io.h.
26915         (all-local): Depend on unlocked-io.h, to ensure it is created.
26916
26917         * lib/unlocked-io.hin: New file
26918
26919         * lib/regex.c: Update from glibc.
26920
26921 2001-07-05  Jim Meyering  <meyering@lucent.com>
26922
26923         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
26924         recommendation.
26925         (libfetish_a_SOURCES): Put all .h files here instead.
26926         Remove a thus-exposed (better checks in automake) duplicate and
26927         two unnecessary .h files.
26928
26929 2001-07-04  Jim Meyering  <meyering@lucent.com>
26930
26931         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
26932         that generates jm-glibc-io.m4 so that it doesn't trigger any make
26933         distcheck failure.
26934
26935 2001-07-02  Jim Meyering  <meyering@lucent.com>
26936
26937         The following changes were prompted by suggestions from Bruno Haible.
26938
26939         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
26940         is now generated.
26941         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
26942         definition of EXTRA_DIST.
26943         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
26944         ensure that the generated file is created/updated whenever the list
26945         of $(unlocked_functions) is changed.
26946         (jm-glibc-io.m4): New rule.
26947         (unlocked-io.h): New rule -- currently unused.
26948
26949 2001-06-24  Jim Meyering  <meyering@lucent.com>
26950
26951         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
26952         unmatched right bracket, rather than kludging it with an extra,
26953         falsely-matching quote in a comment.  Patch by Akim Demaille.
26954
26955 2001-06-11  Jim Meyering  <meyering@lucent.com>
26956
26957         * lib/regex.c: Update from GNU libc.
26958
26959 2001-05-27  Jim Meyering  <meyering@lucent.com>
26960
26961         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
26962         Check for ut_type in struct utmp.
26963
26964 2001-05-27  Jim Meyering  <meyering@lucent.com>
26965
26966         * lib/readutmp.h (UT_TYPE): Define.
26967
26968 2001-05-24  Jim Meyering  <meyering@lucent.com>
26969
26970         * lib/argmatch.c: Include "quote.h".
26971         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
26972         quote function.  Reported by Göran Uddeborg.
26973
26974 2001-05-22  Jim Meyering  <meyering@lucent.com>
26975
26976         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
26977         now that we use the package-supplied version unconditionally.
26978         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
26979
26980 2001-05-21  Jim Meyering  <meyering@lucent.com>
26981
26982         * m4/regex.m4: Change a couple backticks to single quotes to avoid
26983         shell syntax errors.
26984
26985 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
26986
26987         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
26988
26989 2001-05-20  Paul Eggert  <eggert@twinsun.com>
26990
26991         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
26992         Don't bother to check library strftime, since
26993         we'll be using our own my_strftime function anyway.
26994         Define my_strftime instead of strftime.
26995
26996 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
26997
26998         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
26999         which is not yet declared.
27000
27001 2001-05-15  Jim Meyering  <meyering@lucent.com>
27002
27003         * m4/regex.m4: Use proper quoting so brackets appear in the test
27004         program.
27005         Reported by, and with help from, Bruno Haible.
27006
27007 2001-05-13  Jim Meyering  <meyering@lucent.com>
27008
27009         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
27010         undefined.
27011
27012 2001-05-11  Paul Eggert  <eggert@twinsun.com>
27013
27014         dirname code cleanup.  base_name now behaves more compatibly
27015         with POSIX basename when given file names that have trailing
27016         slashes, and similarly for dir_name.  Add new primitives
27017         base_len and dir_len.  Put the directory-name-related decls
27018         into dirname.h.
27019
27020         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
27021         * lib/backupfile.c (base_name): Likewise.
27022         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
27023         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
27024         * lib/makepath.c (strip_trailing_slashes): Likewise.
27025         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
27026         ISSLASH): Likewise.
27027         * lib/rename.c (strip_trailing_slashes): Likewise.
27028         * lib/same.c (base_name): Likewise.
27029         * lib/stripslash.c (ISSLASH): Likewise.
27030
27031         * lib/addext.c: Include <dirname.h> after size_t is defined.
27032         * lib/backupfile.c: Likewise.
27033
27034         * lib/addext.c (addext): Use base_len to trim redundant
27035         trailing slashes instead of doing it ourselves.
27036         But do not trim the last slash if it is not redundant.
27037
27038         * lib/backupfile.c (find_backup_file_name,
27039         max_backup_version): Use base_len instead of rolling it ourselves.
27040         Handle the case of "" and (on DOS) "C:" correctly.
27041
27042         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
27043         needed. Include <string.h>, <dirname.h>.
27044         (base_name): Allow file names ending in slashes, other than names
27045         that are all slashes.  In this case, return the basename followed
27046         by the slashes.  This is more general, and can be used in places
27047         where the original base_name purposely had an assertion failure.
27048         (base_len): New function.
27049
27050         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
27051         Do not include <assert.h>; no longer needed.
27052         Include xalloc.h.
27053         (memrchr): Remove decl.
27054         (dir_name_r): Remove.
27055         (dir_len): Renamed from dirlen.  All callers changed.
27056         Rewrite in terms of base_name, for simplicity and consistency.
27057         (dir_name): Never return NULL.  All callers changed.
27058         Do not include <stdlib.h> in test program; no longer needed.
27059         return 0; is fine for test program.
27060
27061         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
27062         New macros.
27063         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
27064
27065         * lib/path-concat.c (path_concat): Use base_len to compute
27066         base length, not strlen; this means we cannot rely on memcpy
27067         to null-terminate.
27068
27069         * lib/same.c (STREQ): Remove.
27070         (same_name): Handle the case where the basename ends in trailing '/'.
27071
27072         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
27073         a slash was stripped.  Do not strip the last slash after a
27074         file system prefix.
27075
27076 2001-05-11  Paul Eggert  <eggert@twinsun.com>
27077
27078         * lib/Makefile.am (libfetish_a_SOURCES):
27079         Add strftime.c, since we now compile it on all hosts.
27080
27081         * lib/strftime.c (my_strftime):
27082         Define to nstrftime if emacs, but only if my_strftime is not defined.
27083         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
27084         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
27085         Add one more extra argument: a nanoseconds value.
27086         All uses changed.
27087         (ns): New macro.
27088         (my_strftime function): Add %N format.
27089         (emacs_strftimeu): Renamed from emacs_strftime,
27090         with extra ut argument.
27091
27092 2001-05-09  Paul Eggert  <eggert@twinsun.com>
27093
27094         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
27095
27096 2001-04-21  Jim Meyering  <meyering@lucent.com>
27097
27098         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
27099         doesn't interfere.
27100
27101 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
27102
27103         * m4/ftruncate.m4: Check for chsize.
27104         Link with ftruncate.o unconditionally if ftruncate is missing.
27105         This was required when cross-compiling to i586-mingw32msvc.
27106
27107 2001-04-08  Jim Meyering  <meyering@lucent.com>
27108
27109         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
27110         recomputed; that's necessary when the offset spans a DST transition.
27111         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
27112
27113 2001-04-02  Jim Meyering  <meyering@lucent.com>
27114
27115         * lib/regex.h, regex.c: Update from GNU libc.
27116
27117 2001-03-24  Jim Meyering  <meyering@lucent.com>
27118
27119         * m4/jm-macros.m4: Require autoconf-2.49d.
27120
27121 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
27122
27123         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
27124
27125 2001-03-19  Paul Eggert  <eggert@twinsun.com>
27126
27127         * lib/version-etc.c (version_etc_copyright): Update to 2001.
27128
27129 2001-03-17  Jim Meyering  <meyering@lucent.com>
27130
27131         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
27132         now that the version in autoconf is equivalent.
27133         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
27134
27135         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
27136         Suggestion from Akim Demaille.
27137
27138         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
27139         (jm_PREREQ_TEMPNAME): New function.
27140
27141 2001-03-16  Paul Eggert  <eggert@twinsun.com>
27142
27143         * lib/tempname.c (uint64_t): Define to uintmax_t if
27144         not defined, and if UINT64_MAX is not defined.
27145         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
27146         Reported by John David Anglin.
27147
27148 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
27149
27150         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
27151         resolve alias if codeset is empty.
27152         * lib/config.charset (BeOS): Use wildcard syntax.
27153
27154 2001-03-13  Jim Meyering  <meyering@lucent.com>
27155
27156         * lib/path-concat.c (path_concat)
27157         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
27158         concatenating e.g., `C:' and `foo'.
27159         From Bruno Haible.
27160
27161 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
27162
27163         * lib/localcharset.c (locale_charset): Don't use
27164         setlocale(LC_CTYPE,NULL). Don't return NULL.
27165         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
27166
27167 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
27168
27169         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
27170         support for DOS/DJGPP.
27171
27172 2001-03-01  Paul Eggert  <eggert@twinsun.com>
27173
27174         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
27175         lacks mkstemp.  Compile our own tempname.c if we compile our own
27176         mkstemp.c, as mkstemp relies on tempname.
27177
27178 2001-03-01  Jim Meyering  <meyering@lucent.com>
27179
27180         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
27181         AH_VERBATIM really does output its argument verbatim.
27182
27183 2001-02-28  Paul Eggert  <eggert@twinsun.com>
27184
27185         * lib/Makefile.am (libfetish_a_SOURCES):
27186         Add dup-safer.c, fopen-safer.c.
27187         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
27188
27189         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
27190         * lib/unistd-safer.h: New files.
27191
27192 2001-02-25  Paul Eggert  <eggert@twinsun.com>
27193
27194         The mkstemp replacement is taken from glibc 2.2.2, with some
27195         portability fixes for use outside glibc, as follows:
27196
27197         * lib/tempname.c (struct_stat64): New macro.
27198         (direxists, __gen_tempname): Use it.
27199         This avoids a portability problem with Solaris 8.
27200
27201         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
27202         (<stddef.h>, <stdint.h>, <string.h>):
27203         Include only if STDC_HEADERS || _LIBC.
27204         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
27205         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
27206         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
27207         (__set_errno): Define this macro if <errno.h> doesn't.
27208         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
27209         Define these macros if <stdio.h> doesn't.
27210         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
27211         Define these macros if <sys/stat.h>
27212         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
27213         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
27214         __xstat64): Define if not _LIBC.
27215         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
27216         (__gen_tempname): Invoke gettimeofday only if
27217         HAVE_GETTIMEOFDAY || _LIBC;
27218         otherwise, fall back on plain "time".
27219         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
27220
27221         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
27222
27223         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
27224
27225 2001-02-18  Paul Eggert  <eggert@twinsun.com>
27226
27227         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
27228
27229 2001-02-17  Paul Eggert  <eggert@twinsun.com>
27230
27231         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
27232         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
27233         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
27234         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
27235
27236 2001-02-17  Paul Eggert  <eggert@twinsun.com>
27237
27238         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
27239         Remove workaround macros for hosts that have mbrtowc but not
27240         mbstate_t, as we now insist on proper declarations for both
27241         before using mbrtowc.
27242
27243 2001-02-17  Jim Meyering  <meyering@lucent.com>
27244
27245         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
27246         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
27247         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
27248         UnixWare 7.1.1.
27249
27250         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
27251         rather than AC_CACHE_VAL.
27252
27253 2001-02-17  Jim Meyering  <meyering@lucent.com>
27254
27255         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
27256         around included file name.
27257
27258         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
27259
27260         * lib/strftime.c: Update from GNU libc (the only changes were to
27261         comments).
27262
27263 2001-02-17  Jim Meyering  <meyering@lucent.com>
27264
27265         * lib/regex.c: Update from libc.
27266
27267 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
27268
27269         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
27270         clash.
27271
27272 2001-02-16  Paul Eggert  <eggert@twinsun.com>
27273
27274         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
27275         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
27276         Reported by Mark Hounschell via Paul Eggert.
27277
27278 2001-02-07  Jim Meyering  <meyering@lucent.com>
27279
27280         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
27281
27282 2001-02-05  Jim Meyering  <meyering@lucent.com>
27283
27284         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
27285         it includes the patch required for `large file' support with at least
27286         HP-UX's 10.20 /bin/cc.
27287
27288 2001-02-03  Jim Meyering  <meyering@lucent.com>
27289
27290         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
27291         AS_IF, now that it works once again (mysteriously).
27292         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
27293
27294 2001-01-30  Jim Meyering  <meyering@lucent.com>
27295
27296         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
27297         * m4/chown.m4: Rename conftestchown to conftest.chown.
27298         * m4/rename.m4: s/conftestdir/conftest.d1/ and
27299         s/conftestdir2/conftest.d2/.
27300         * m4/utimes.m4: s/conftestdata/conftest.data/
27301         Inspired by Pavel Roskin's change in autoconf.
27302
27303 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
27304
27305         * lib/config.charset: Update for FreeBSD 4.2.
27306
27307 2001-01-27  Jim Meyering  <meyering@lucent.com>
27308
27309         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
27310         a use of AS_IF.
27311         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
27312
27313 2001-01-26  Jim Meyering  <meyering@lucent.com>
27314
27315         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
27316         quotearg.c includes it.
27317
27318 2001-01-26  Jim Meyering  <meyering@lucent.com>
27319
27320         * lib/quotearg.c: Include stddef.h.
27321         * lib/quote.c: Include stddef.h.
27322         Reported by Axel Kittenberger.
27323
27324         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
27325         line in double quotes so that it evokes a better diagnostic.
27326         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
27327         Reported by Axel Kittenberger.
27328
27329 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
27330
27331         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
27332         as if it was a `charset'.
27333
27334 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
27335
27336         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
27337         has const.
27338
27339 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
27340
27341         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
27342         to avoid a warning.  Add back 'const' to inptr.
27343
27344 2001-01-20  Jim Meyering  <meyering@lucent.com>
27345
27346         Be sure that headers are checked before used in code compiled
27347         for the type checks.
27348         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
27349         In place of that, invoke jm_CHECK_ALL_TYPES.
27350         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
27351         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
27352         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
27353         The check for ssize_t was mistakenly run before the test for unistd.h.
27354
27355         The configure-time check for stdbool.h was missing.
27356         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
27357         (jm_PREREQ_HASH): New function.
27358
27359 2001-01-17  Jim Meyering  <meyering@lucent.com>
27360
27361         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
27362         for autoconf-2.49c.
27363         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
27364
27365 2001-01-16  Jim Meyering  <meyering@lucent.com>
27366
27367         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
27368         From Bruno Haible.
27369
27370 2001-01-14  Jim Meyering  <meyering@lucent.com>
27371
27372         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
27373         foo and bar.  Create conftestdir/ in the script, not in the C code.
27374         Remove directories in the script, not in the C code.
27375         Remove conftestdir{,2} before trying to create the directory.
27376         Make the entire configure script fail if the mkdir fails.
27377
27378 2001-01-14  Jim Meyering  <meyering@lucent.com>
27379
27380         * lib/rename.c: New file.  From Volker Borchert.
27381         Include stdlib.h, string.h or strings.h, and xalloc.h.
27382         Use strip_trailing_slashes rather than open-coding it.
27383
27384 2001-01-03  Paul Eggert  <eggert@twinsun.com>
27385
27386         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
27387
27388 2001-01-03  Jim Meyering  <meyering@lucent.com>
27389
27390         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
27391         of local `inptr' to avoid warning with some system declarations of
27392         iconv.
27393
27394 2001-01-02  Volker Borchert  <bt@teknon.de>
27395
27396         * m4/rename.m4: New file.
27397         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
27398
27399 2001-01-01  Jim Meyering  <meyering@lucent.com>
27400
27401         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
27402         even on systems with utmpx.h.  It's necessary for the declaration of
27403         utmp's ut_user member.  Reported by Andreas Jaeger.
27404
27405         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
27406         available. They are required for the declarations of getgrgid and
27407         getpwuid resp.
27408         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
27409         Reported by Andreas Jaeger.
27410
27411 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
27412
27413         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
27414         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
27415         so `make install' also works in VPATH builds.
27416
27417 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
27418
27419         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
27420         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
27421         can be used in subdirectories.
27422
27423 2000-12-29  Paul Eggert  <eggert@twinsun.com>
27424
27425         * lib/modechange.c: Do not assume that mode_t uses the
27426         traditional octal encoding.  E.g. "chmod 1 FOO" should set
27427         the other-execute bit of FOO even if S_IXOTH != 1.
27428
27429         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
27430         WOTH, XOTH, ALLM): New macros.
27431         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
27432          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
27433         Use them.
27434         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
27435         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
27436         (mode_compile):
27437         No need to use uintmax_t; unsigned long is long enough.
27438         Don't bother to get suffix since we don't use it.
27439
27440 2000-12-26  Jim Meyering  <meyering@lucent.com>
27441
27442         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
27443         better with autoheader.
27444
27445 2000-12-24  Jim Meyering  <meyering@lucent.com>
27446
27447         * lib/hash.c (is_prime): Return explicit boolean values.
27448         (hash_get_first): Return NULL to appease Irix5.6's 89.
27449         Reported by Nelson Beebe.
27450
27451 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
27452
27453         * lib/localcharset.c (locale_charset): Add support for Win32.
27454
27455 2000-12-18  Paul Eggert  <eggert@twinsun.com>
27456
27457         * lib/physmem.h, lib/physmem.c: New files.
27458
27459         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
27460         (noinst_HEADERS): Add physmem.h.
27461
27462         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
27463         't' for compatibility with Solaris 8 sort.
27464
27465 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
27466
27467         * lib/config.charset: Add support for BeOS.
27468
27469 2000-12-17  Jim Meyering  <meyering@lucent.com>
27470
27471         * m4/dos.m4 (jm_AC_DOS): New file and macro.
27472         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
27473
27474 2000-12-16  Jim Meyering  <meyering@lucent.com>
27475
27476         This bug had a serious impact on chown: `chown N:M FILE' (for integer
27477         N and M) would have treated it like `chown N:N FILE'.
27478
27479         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
27480
27481 2000-12-16  Jim Meyering  <meyering@lucent.com>
27482
27483         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
27484         SHELLS_FILE to a file name that's useful on djgpp systems.
27485         Include stdlib.h.
27486         (ADDITIONAL_DEFAULT_SHELLS): Define.
27487         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
27488         Based mostly on a patch from Prashant TR.
27489
27490 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
27491
27492         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
27493         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
27494         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
27495
27496 2000-12-08  Andreas Schwab  <schwab@suse.de>
27497
27498         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
27499         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
27500
27501 2000-12-07  Jim Meyering  <meyering@lucent.com>
27502
27503         * lib/stripslash.c (ISSLASH): Define.
27504         (strip_trailing_slashes): Use ISSLASH rather than comparing against
27505         `/'.
27506         From Prashant TR.
27507
27508         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
27509         (dir_name_r): Declare this function as static.
27510         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
27511         manifest itself on a name containing a mix of slashes and
27512         backslashes.
27513         Make this function work with names starting with a DOS-style
27514         drive letter and colon prefix.
27515         (dir_name): Append `.' if necessary.
27516         Based mostly on patches from Prashant TR and Eli Zaretskii.
27517
27518         * lib/dirname.h (dir_name_r): Remove prototype.
27519
27520 2000-12-06  Paul Eggert  <eggert@twinsun.com>
27521
27522         * m4/off_t-format.m4: Remove this file.
27523         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
27524
27525 2000-12-06  Jim Meyering  <meyering@lucent.com>
27526
27527         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
27528         replacement strtoull, we may well need the replacement strtoul, too.
27529         Check for declarations of strtoul and strtoull.
27530         Check for strtol.  Mainly as a cue to cause automake to include
27531         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
27532         Check for limits.h -- strtol.c needs it.
27533
27534 2000-12-05  Jim Meyering  <meyering@lucent.com>
27535
27536         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
27537
27538 2000-12-04  Jim Meyering  <meyering@lucent.com>
27539
27540         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
27541         Also include memory.h, stdlib.h, unistd.h if appropriate.
27542         Reported by Andreas Jaeger (conflicting declaration of malloc).
27543
27544 2000-12-02  Jim Meyering  <meyering@lucent.com>
27545
27546         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
27547         * m4/jm-macros.m4 (jm_MACROS): require it.
27548
27549 2000-12-02  Jim Meyering  <meyering@lucent.com>
27550
27551         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
27552
27553 2000-12-01  Paul Eggert  <eggert@twinsun.com>
27554
27555         * lib/memrchr.c: Include <config.h> before any system include file.
27556
27557 2000-11-30  Jim Meyering  <meyering@lucent.com>
27558
27559         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
27560
27561 2000-11-30  Jim Meyering  <meyering@lucent.com>
27562
27563         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
27564
27565 2000-11-29  Paul Eggert  <eggert@twinsun.com>
27566
27567         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
27568
27569 2000-11-26  Jim Meyering  <meyering@lucent.com>
27570
27571         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
27572
27573 2000-11-22  Paul Eggert  <eggert@twinsun.com>
27574
27575         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
27576         size of (size_t) -1; it's not portable.
27577
27578 2000-11-17  Jim Meyering  <meyering@lucent.com>
27579
27580         * lib/strstr.c: Update from GNU libc.
27581
27582 2000-11-17  Akim Demaille  <akim@epita.fr>
27583
27584         * lib/obstack.h: Formatting changes.
27585         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
27586         prevent type checking.
27587         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
27588         cast the value to (void *): assigning a `foo *' to a `void *'
27589         variable is valid.
27590         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
27591
27592 2000-11-16  Jim Meyering  <meyering@lucent.com>
27593
27594         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
27595
27596 2000-11-11  Jim Meyering  <meyering@lucent.com>
27597
27598         * lib/error.c: Add a couple #includes, merging from GNU libc version.
27599
27600 2000-11-10  Jim Meyering  <meyering@lucent.com>
27601
27602         * lib/obstack.h: Update from GNU libc.
27603         * lib/obstack.c: Likewise.
27604
27605 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
27606
27607         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
27608
27609 2000-11-06  Paul Eggert  <eggert@twinsun.com>
27610
27611         * lib/getusershell.c (setusershell): Use rewind rather than
27612         fseek/fseeko, to avoid configuration hassles with fseeko.
27613         Don't bother opening SHELLS_FILE if shellstream is NULL;
27614         it's not necessary.
27615
27616 2000-11-05  Jim Meyering  <meyering@lucent.com>
27617
27618         * lib/makepath.h (make_dir): Declare.
27619         * lib/makepath.c (make_dir): Remove `static' attribute.
27620         Tweak a comment.
27621
27622 2000-11-04  Jim Meyering  <meyering@lucent.com>
27623
27624         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
27625
27626 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
27627
27628         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
27629         last one in a bucket, advance to the next bucket.
27630
27631 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
27632
27633         * lib/fnmatch.c: Do not comment out all the code if we are using
27634         the GNU C library, because in some cases we are replacing buggy
27635         code in the GNU C library itself.
27636
27637 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
27638
27639         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
27640         (regex_compile): Catch bogus \(\1\).
27641
27642 2000-10-30  Paul Eggert  <eggert@twinsun.com>
27643
27644         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
27645         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
27646         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
27647
27648 2000-10-30  Paul Eggert  <eggert@twinsun.com>
27649
27650         * lib/error.h, getline.h, modechange.h:
27651         Remove "2000" from Copyright line, as the file hasn't been
27652         changed this year other than in the copyright notice.
27653
27654         * lib/xalloc.h: Add "2000" to Copyright line, as this file
27655         was changed this year.
27656
27657 2000-10-29  Jim Meyering  <meyering@lucent.com>
27658
27659         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
27660         renaming.
27661         * m4/ls-mntd-fs.m4: Likewise
27662
27663 2000-10-29  Jim Meyering  <meyering@lucent.com>
27664
27665         * lib/xstat.in: Fix grammar in comment.
27666
27667 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
27668
27669         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
27670         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
27671         doesn't define __restrict_arr.
27672
27673 2000-10-28  Jim Meyering  <meyering@lucent.com>
27674
27675         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
27676         (jm_PREREQ_MEMCHR): New function.
27677
27678 2000-10-28  Jim Meyering  <meyering@lucent.com>
27679
27680         * lib/memchr.c: Update from libc.
27681         Adjust for portability:
27682         [HAVE_STDLIB_H]: Include stdlib.h.
27683         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
27684         Undef __memchr, too.
27685         [!weak_alias]: Define __memchr to memchr.
27686
27687         * lib/regex.c: Update from libc.
27688         * lib/regex.h: Likewise.
27689         * lib/getopt1.c: Likewise.
27690         * lib/memcmp.c: Likewise.
27691
27692         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
27693         Avoid using fseek, when possible -- it's broken by design.
27694         Patch by Ulrich Drepper.
27695
27696 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
27697
27698         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
27699         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
27700         Giving in to popular pressure to shut up the compiler with casts.
27701
27702 2000-10-26  Jim Meyering  <meyering@lucent.com>
27703
27704         * lib/strftime.c: Update from libc.
27705
27706 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
27707
27708         * regex.c: More `unsigned char' -> `re_char' changes.
27709         Also change several `int' into `re_wchar_t'.
27710         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
27711         (PUSH_FAILURE_POINTER): Don't cast any more.
27712         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
27713         We want GCC to complain, since this piece of code makes
27714         re_match non-reentrant, which *should* be fixed.
27715         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
27716         (EXTEND_BUFFER): Use RETALLOC.
27717         (SET_LIST_BIT): Don't cast.
27718         (re_wchar_t): New type.
27719         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
27720         that those two functions will always properly return.
27721         (IMMEDIATE_QUIT_CHECK): Cast to void.
27722         (analyse_first): Use recursion rather than an explicit stack.
27723         (re_compile_fastmap): Can't fail anymore.
27724         (re_search_2): Don't check re_compile_fastmap for failure.
27725         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
27726         Now also sets the new value (passed in a new argument).
27727         (re_match_2_internal): Use it.
27728         Also, use a new var `reg' of type size_t when looping through regs
27729         rather than reuse the inappropriate `mcnt'.
27730
27731 2000-10-25  Jim Meyering  <meyering@lucent.com>
27732
27733         * lib/obstack.c: Update from libc.
27734
27735 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
27736
27737         * regex.c (regex_compile): Change the way of handling a range from
27738         a char less than 256 to a char not less than 256.
27739
27740 2000-10-24  Andrew Innes  <andrewi@gnu.org>
27741
27742         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
27743         NT-Emacs only.
27744         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
27745         so that re_search functions only quit when callers expect them to.
27746
27747 2000-10-23  Jim Meyering  <meyering@lucent.com>
27748
27749         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
27750         wrong.  That set_locale call must not have any side effects.
27751         From Paul Eggert.
27752
27753 2000-10-22  Jim Meyering  <meyering@lucent.com>
27754
27755         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
27756         [CYCLIC]: Remove now-unused definition.
27757
27758         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
27759         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
27760         Suggestion from Ulrich Drepper.
27761
27762 2000-10-21  Jim Meyering  <meyering@lucent.com>
27763
27764         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
27765         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
27766         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
27767
27768 2000-10-21  Jim Meyering  <meyering@lucent.com>
27769
27770         * lib/dirname.c (memrchr): Declare if necessary.
27771         (dir_name): Remove the restriction that there be no
27772         trailing slashes.  Now, this code skips past them, effectively
27773         ignoring them.
27774         [TEST_DIRNAME] (main): New unit tests.
27775
27776         * lib/memrchr.c: New file from GNU libc.
27777         Undef __memrchr, too.
27778         [!weak_alias]: Define __memrchr to memrchr.
27779         Guard weak_alias use with `#ifdef weak_alias'.
27780
27781 2000-10-21  Jim Meyering  <meyering@lucent.com>
27782
27783         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
27784         (dir_name): Use dir_name_r.
27785         * lib/dirname.h (dir_name_r): Declare it.
27786
27787 2000-10-17  Jim Meyering  <meyering@lucent.com>
27788
27789         * lib/quote.h (PARAMS): Define and use.
27790         Reported by Akim Demaille.
27791
27792         * lib/getopt.c: Update from libc.
27793
27794 2000-10-16  Jim Meyering  <meyering@lucent.com>
27795
27796         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
27797         setlocale.
27798         From Jan Fedak.
27799
27800 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
27801
27802         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
27803
27804 2000-09-25  Jim Meyering  <meyering@lucent.com>
27805
27806         * lib/md5.h (rol): Define (from GnuPG).
27807
27808         * lib/sha.c: Give credit (GnuPG) where due.
27809         (M): Use rol rather than open-coding it.
27810         Add a FIXME comment.
27811
27812 2000-09-21  Jim Meyering  <meyering@lucent.com>
27813
27814         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
27815         Reported by Michael Stone.
27816
27817 2000-09-20  Jim Meyering  <meyering@lucent.com>
27818
27819         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
27820         (noinst_HEADERS): Add sha.h.
27821         Based on code from Scott G. Miller and from GnuPG.
27822
27823 2000-09-18  Jim Meyering  <meyering@lucent.com>
27824
27825         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
27826         LIBS. Otherwise, everyone ends up linking with -lelf for some
27827         configurations.
27828         Reported by Mike Stone.
27829
27830 2000-09-15  Jim Meyering  <meyering@lucent.com>
27831
27832         * lib/regex.c: Update from libc.
27833
27834 2000-09-10  Jim Meyering  <meyering@lucent.com>
27835
27836         * lib/getopt.c (_getopt_internal): Update from glibc.
27837
27838 2000-09-09  Jim Meyering  <meyering@lucent.com>
27839
27840         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
27841         think it should be used as a general replacement for isascii.
27842         * lib/fnmatch.c: Likewise.
27843         * lib/mbswidth.c: Likewise
27844         * lib/regex.c: Likewise.
27845
27846         Don't use atoi.
27847         * lib/userspec.c: Include sys/param.h and limits.h.
27848         Include xstrtol.h.
27849         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
27850         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
27851         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
27852         UID, GID.  Check range.
27853
27854 2000-09-06  Jim Meyering  <meyering@lucent.com>
27855
27856         * lib/getopt.c (_getopt_internal): Update from glibc.
27857
27858 2000-08-30  Jim Meyering  <meyering@lucent.com>
27859
27860         * lib/strftime.c: Merge in changes from GNU libc.
27861
27862 2000-08-26  Jim Meyering  <meyering@lucent.com>
27863
27864         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
27865         * m4/fpending.m4: New file.
27866
27867 2000-08-26  Jim Meyering  <meyering@lucent.com>
27868
27869         * lib/closeout.c: Include "__fpending.h".
27870         (close_stdout_status): Return right away if there's nothing to flush.
27871
27872         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
27873         * lib/__fpending.c: New file.
27874         * lib/__fpending.h: New file.
27875
27876 2000-08-20  Jim Meyering  <meyering@lucent.com>
27877
27878         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
27879         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
27880         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
27881
27882 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
27883
27884         Improve fileutils installation on systems where running
27885         programs (like install) can't be unlinked.
27886         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
27887         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
27888
27889 2000-08-07  Paul Eggert  <eggert@twinsun.com>
27890
27891         Standardize on "memory exhausted" instead of "Memory exhausted"
27892         or "virtual memory exhausted".
27893         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
27894         "virtual memory exhausted".
27895         * lib/same.c (same_name): Invoke xalloc_die instead of printing
27896         our own message.
27897         * lib/userspec.c (parse_user_spec): Likewise.
27898         * lib/bumpalloc.h: comment fix
27899         * lib/same.c, userspec.c: Include xalloc.h.
27900
27901         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
27902         not char *const and pointing to a constant array.
27903         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
27904         (xrealloc): Comment fix.
27905
27906         * lib/userspec.c (parse_user_spec):
27907         Don't translate a message until just before returning,
27908         to avoid unnecessary translation.
27909
27910 2000-08-07  Jim Meyering  <meyering@lucent.com>
27911
27912         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
27913         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
27914         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
27915         getgroups.c, gethostname.c, getopt.h, group-member.c,
27916         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
27917         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
27918         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
27919         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
27920         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
27921         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
27922         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
27923         yesno.c: Back out Copyright date changes for each file with no change
27924         this year.  This eases coordination with other programs using the same
27925         source code modules.  From Paul Eggert.
27926
27927 2000-08-06  Paul Eggert  <eggert@twinsun.com>
27928
27929         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
27930         not char, for compatibility with glibc 2.1.3 strftime.c.
27931
27932 2000-08-03  Greg McGary  <greg@mcgary.org>
27933
27934         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
27935         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
27936         (EXTEND_BUFFER): Use them.
27937
27938 2000-08-01  Jim Meyering  <meyering@lucent.com>
27939
27940         * lib/dirname.c (ISSLASH): Define.
27941         (BACKSLASH_IS_PATH_SEPARATOR): Define.
27942         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
27943         both `\' and `/' may be use as path separators.
27944         Based on a patch from Prashant TR.
27945
27946 2000-07-31  Paul Eggert  <eggert@twinsun.com>
27947
27948         * lib/quotearg.c (quotearg_n_options): Don't make the initial
27949         slot vector a constant, since it might get modified.
27950
27951 2000-07-31  Jim Meyering  <meyering@lucent.com>
27952
27953         * lib/xmalloc.c: Use `virtual memory exhausted', not
27954         `Memory exhausted'.
27955         * lib/obstack.c (print_and_abort): Likewise.
27956
27957 2000-07-30  Paul Eggert  <eggert@twinsun.com>
27958
27959         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
27960         buffer, so that the caller can always quote one small
27961         component of a "memory exhausted" message in slot 0.
27962         From a suggestion by Jim Meyering.
27963
27964 2000-07-30  Jim Meyering  <meyering@lucent.com>
27965
27966         * lib/makepath.c (make_path): Quote the other instance, too.
27967
27968         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
27969         (STATIC_BUF_SIZE): Define.
27970         (quotearg_n_options): Use only statically allocated storage when
27971         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
27972         than STATIC_BUF_SIZE.
27973
27974 2000-07-29  Jim Meyering  <meyering@lucent.com>
27975
27976         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
27977         * lib/dirname.c (dir_name): Likewise.
27978
27979         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
27980         `/'.
27981
27982         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
27983         (dir_name): Assert that there are no trailing slashes.
27984
27985 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
27986
27987         * lib/mbswidth.h (mbswidth): Add a flags argument.
27988         (mbswidth): New declaration.
27989         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
27990         * lib/mbswidth.c (mbswidth): Add a flags argument.
27991         (mbsnwidth): New function.
27992
27993 2000-07-24  Jim Meyering  <meyering@lucent.com>
27994
27995         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
27996
27997 2000-07-23  Paul Eggert  <eggert@twinsun.com>
27998
27999         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
28000
28001 2000-07-23  Paul Eggert  <eggert@twinsun.com>
28002
28003         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
28004         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
28005         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
28006         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
28007         invoke multibyte primitives.
28008
28009 2000-07-23  Paul Eggert  <eggert@twinsun.com>
28010
28011         * lib/quotearg.c:
28012         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
28013         so that mbstate_t is always defined.
28014
28015         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
28016         be 1 in at least one GCC installation, and this configuration
28017         error is likely to be common.  Ignoring MB_LEN_MAX hurts
28018         performance on hosts that have mbrtowc but have only unibyte
28019         locales, but I assume these hosts are rare.
28020
28021 2000-07-23  Paul Eggert  <eggert@twinsun.com>
28022
28023         * lib/mbswidth.c (_XOPEN_SOURCE):
28024         Don't define; this causes problems on Solaris 7.
28025         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
28026
28027 2000-07-23  Jim Meyering  <meyering@lucent.com>
28028
28029         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
28030         too: getgrgid, getpwuid, getuid.
28031
28032 2000-07-23  Jim Meyering  <meyering@lucent.com>
28033
28034         * lib/basename.c (base_name): Add an assertion.
28035
28036 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
28037
28038         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
28039         shadow its mbsinit function.
28040
28041 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
28042
28043         * lib/mbswidth.h: New file.
28044         * lib/mbswidth.c: New file.
28045         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
28046         (noinst_HEADERS): Add mbswidth.h.
28047
28048 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
28049
28050         * lib/config.charset: Add support for FreeBSD. Improve support for
28051         HP-UX and IRIX 6.
28052
28053 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
28054
28055         * m4/mbswidth.m4: New file.
28056         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
28057
28058 2000-07-15  Jim Meyering  <meyering@lucent.com>
28059
28060         * lib/makepath.c: Include quote.h.
28061         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
28062         corresponding argument in a `quote (...)' call.
28063         Give better diagnostics.
28064
28065         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
28066         (noinst_HEADERS): Add quote.h.
28067
28068         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
28069         from tar's src/misc.c.
28070         * lib/quote.h: New file.  Prototypes for same.
28071
28072 2000-07-14  Paul Eggert  <eggert@twinsun.com>
28073
28074         From a suggestion by Bruno Haible.
28075         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
28076         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
28077         to decide whether to define the BeOS workaround macro;
28078         this adjusts to the change to AC_MBSTATE_T.
28079
28080 2000-07-14  Jim Meyering  <meyering@lucent.com>
28081
28082         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
28083         jm_AC_TYPE_UINTMAX_T.
28084
28085 2000-07-13  Paul Eggert  <eggert@twinsun.com>
28086
28087         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
28088
28089         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
28090         quotearg_buffer_restyled): Add support for
28091         clocale_quoting_style.  Undo previous change to
28092         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
28093         and "{RIGHT QUOTATION MARK}" msgids.
28094
28095 2000-07-10  Paul Eggert  <eggert@twinsun.com>
28096
28097         From a suggestion by Bruno Haible.
28098         * m4/mbstate_t.m4 (AC_MBSTATE_T):
28099         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
28100         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
28101         and mbstate_t, to a single-part test that simply defines mbstate_t.
28102         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
28103         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
28104
28105 2000-07-10  Jim Meyering  <meyering@lucent.com>
28106
28107         * m4/strerror_r.m4: Mirror the correction made in autoconf.
28108
28109         * m4/gnu-source.m4: Output to confdefs.h directly.
28110         Suggestion from Akim Demaille.
28111
28112 2000-07-09  Paul Eggert  <eggert@twinsun.com>
28113
28114         The old behavior of quoting `like this' doesn't look good with
28115         newer, ISO-style fonts.  See:
28116         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
28117
28118         Instead, quote "like this" by default.  Let the translator
28119         tailor the locale-specific quoting behavior by providing
28120         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
28121
28122         * lib/quotearg.c (N_): New macro.
28123         (gettext_default): New function.
28124         (quotearg_buffer_restyled): Use
28125         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
28126         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
28127
28128 2000-07-09  Jim Meyering  <meyering@lucent.com>
28129
28130         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
28131         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
28132
28133         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
28134         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
28135
28136 2000-07-09  Jim Meyering  <meyering@lucent.com>
28137
28138         * lib/Most files: Update copyright dates to include 2000.
28139
28140 2000-07-08  Jim Meyering  <meyering@lucent.com>
28141
28142         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
28143         if not defined.
28144         (xgethostname): Remove now-unnecessary #ifdef.
28145         Move declaration of `err' into loop where it's used.
28146
28147 2000-07-05  Paul Eggert  <eggert@twinsun.com>
28148         and Bruno Haible  <haible@clisp.cons.org>
28149
28150         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
28151         only if the test for an object-type mbstate_t fails.  This
28152         prevents us from mistakenly reporting that mbstate_t is a
28153         system object type after we "#define mbstate_t int" to work
28154         around its lack.
28155
28156 2000-07-05  Paul Eggert  <eggert@twinsun.com>
28157         and Bruno Haible  <haible@clisp.cons.org>
28158
28159         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
28160
28161 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
28162
28163         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
28164         to strerror_r.
28165         Include <ctype.h> for use of isalpha.
28166
28167 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
28168
28169         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
28170         by allocating a larger buffer. Test the gethostname return value for
28171         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
28172         returns an error and ENAMETOOLONG isn't defined.
28173
28174 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
28175
28176         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
28177         dimension.
28178
28179 2000-07-04  Jim Meyering  <meyering@lucent.com>
28180
28181         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
28182         of the deprecated AC_CHECKING.
28183
28184 2000-07-04  Jim Meyering  <meyering@lucent.com>
28185
28186         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
28187         Reported by Bruno Haible.
28188
28189 2000-07-04  Jim Meyering  <meyering@lucent.com>
28190
28191         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
28192         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
28193         lacks mbrtowc.
28194
28195 2000-07-03  Paul Eggert  <eggert@twinsun.com>
28196
28197         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
28198         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
28199
28200 2000-07-03  Paul Eggert  <eggert@twinsun.com>
28201         and Bruno Haible  <haible@clisp.cons.org>
28202
28203         * lib/quotearg.c (mbrtowc):
28204         Assign to *pwc, and return 1 only if result is nonzero.
28205         (iswprint): Use ISPRINT when substituting our own mbrtowc.
28206
28207 2000-07-03  Jim Meyering  <meyering@lucent.com>
28208
28209         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
28210
28211 2000-07-03  Jim Meyering  <meyering@lucent.com>
28212
28213         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
28214         This is necessary to get a definition of e.g., UTMP_FILE on
28215         HP-UX 10.20.
28216         From Bob Proulx.
28217
28218 2000-07-02  Jim Meyering  <meyering@lucent.com>
28219
28220         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
28221
28222         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
28223         AC_LIBOBJ(function_name).
28224         * m4/chown.m4: Likewise.
28225         * m4/fnmatch.m4: Likewise.
28226         * m4/ftruncate.m4: Likewise.
28227         * m4/getgroups.m4: Likewise.
28228         * m4/getline.m4: Likewise.
28229         * m4/group-member.m4: Likewise.
28230         * m4/jm-macros.m4: Likewise.
28231         * m4/lstat.m4: Likewise.
28232         * m4/malloc.m4: Likewise.
28233         * m4/memcmp.m4: Likewise.
28234         * m4/nanosleep.m4: Likewise.
28235         * m4/putenv.m4: Likewise.
28236         * m4/realloc.m4: Likewise.
28237         * m4/regex.m4: Likewise.
28238         * m4/stat.m4: Likewise.
28239         * m4/strftime.m4: Likewise.
28240
28241 2000-07-02  Jim Meyering  <meyering@lucent.com>
28242
28243         * lib/quotearg.c (mbstate_t): Don't define here.
28244
28245 2000-07-02  Jim Meyering  <meyering@lucent.com>
28246
28247         * lib/nanosleep.c (SIGCONT): Define if not already defined.
28248
28249 2000-07-01  Jim Meyering  <meyering@lucent.com>
28250
28251         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
28252
28253 2000-07-01  Jim Meyering  <meyering@lucent.com>
28254
28255         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
28256         problem.
28257
28258 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
28259
28260         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
28261         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
28262
28263 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
28264
28265         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
28266         per change in ../m4/ls-mntd-fs.m4.
28267         (read_filesystem_list): Ignore symbolic links.
28268
28269 2000-06-29  Jim Meyering  <meyering@lucent.com>
28270
28271         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
28272         for declaration of strcmp.
28273
28274         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
28275
28276         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
28277         Avoid warning by casting result to `char *' to remove `const'.
28278
28279 2000-06-28  Jim Meyering  <meyering@lucent.com>
28280
28281         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
28282         included by quotearg.c, for which we perform this test.  From
28283         Bruno Haible.
28284
28285 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
28286
28287         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
28288         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
28289         <utmpx.h> exists, put readutmp.o into LIBOBJS.
28290
28291 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
28292
28293         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
28294
28295 2000-06-26  Paul Eggert  <eggert@twinsun.com>
28296
28297         savedir now sets errno on failure and invokes xmalloc to get memory.
28298         Fix a couple of other minor bugs while we're at it.
28299
28300         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
28301         (NAMLEN): Remove macro.
28302         (malloc, realloc): Remove decls.
28303         (stpcpy): Likewise.
28304         ("xalloc.h"): Include.
28305         (NAME_SIZE_DEFAULT): New macro.
28306         (savedir): Use xmalloc / xrealloc to allocate memory.
28307         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
28308         Skip "" directory entries.
28309         Use strlen to calculate directory entry length, since the old method
28310         is rarely used these days and isn't worth supporting.
28311         Don't use a pointer after freeing it.
28312         Check for integer overflow when calculating allocation size.
28313         Use memcpy to copy entries, instead of stpcpy.
28314         Set errno properly when returning NULL.
28315         Check for readdir error.
28316
28317 2000-06-26  Jim Meyering  <meyering@lucent.com>
28318
28319         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
28320
28321 2000-06-25  Jim Meyering  <meyering@lucent.com>
28322
28323         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
28324         Linux header bug when _XOPEN_SOURCE is defined to 500.
28325
28326 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
28327
28328         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
28329         deficiency.
28330
28331 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
28332
28333         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
28334         Include xalloc.h.
28335         Don't include <stdlib.h>.  Don't declare malloc, realloc.
28336
28337 2000-06-24  Jim Meyering  <meyering@lucent.com>
28338
28339         * m4/strerror_r.m4: Revive this file -- to try out an experimental
28340         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
28341         for which strerror does return char*, but which lacks a conveniently
28342         accessible declaration of the function.  If the compile-test says
28343         strerror_r doesn't work, then resort to a `run'-test that works on
28344         BeOS and segfaults on DEC Unix.
28345
28346 2000-06-24  Jim Meyering  <meyering@lucent.com>
28347
28348         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
28349
28350 2000-06-23  Paul Eggert  <eggert@twinsun.com>
28351
28352         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
28353         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
28354
28355 2000-06-23  Paul Eggert  <eggert@twinsun.com>
28356
28357         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
28358         (mbrtowc, mbstate_t): Define substitutes if
28359         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
28360         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
28361         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
28362
28363 2000-06-23  Jim Meyering  <meyering@lucent.com>
28364
28365         * m4/afs.m4: Add missing AC_MSG_RESULT.
28366         Reported by Bruno Haible.
28367
28368         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
28369         Suggestion from Bruno Haible.
28370
28371 2000-06-23  Jim Meyering  <meyering@lucent.com>
28372
28373         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
28374
28375 2000-06-21  Jim Meyering  <meyering@lucent.com>
28376
28377         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
28378
28379 2000-06-21  Jim Meyering  <meyering@lucent.com>
28380
28381         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
28382         (noinst_HEADERS): Add getstr.h.
28383
28384         * lib/getline.c (getstr): Move into a separate file.
28385         * lib/getstr.c (getstr): New file, extracted from getline.c, with
28386         the following changes: new parameter, delim2; both delim[12]
28387         parameters have type `int', not `char'.  The latter would lose
28388         with 8-bit delimiters.
28389         * lib/getstr.h: New file.
28390
28391 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
28392
28393         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
28394         than 1024, return a memory chunk of least possible size, instead
28395         of size PATH_MAX + 2. In the loop, increment the size proportionally.
28396         Use free/xmalloc instead of xrealloc to avoid copying for very long
28397         paths.
28398
28399 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
28400
28401         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
28402         the empty string.
28403
28404 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
28405
28406         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
28407         address, not strdup.  Include <stdlib.h> and don't declare free().
28408
28409 2000-06-19  Jim Meyering  <meyering@lucent.com>
28410
28411         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
28412
28413 2000-06-18  Jim Meyering  <meyering@lucent.com>
28414
28415         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
28416
28417         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
28418         `checking whether...' message to be consistent with that of the
28419         lstat test.
28420
28421 2000-06-18  Jim Meyering  <meyering@lucent.com>
28422
28423         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
28424         Besides, these days every porting target provides a mkdir function.
28425
28426         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
28427         needed. (this snippet comes from src/system.h).
28428
28429 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
28430
28431         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
28432
28433 2000-06-15  Paul Eggert  <eggert@twinsun.com>
28434
28435         * lib/human.c (adjust_value): New function.
28436         (human_readable_inexact): Apply rounding style even when
28437         printing approximate values.
28438
28439 2000-06-14  Paul Eggert  <eggert@twinsun.com>
28440
28441         * lib/human.c (human_readable_inexact): Allow an input block
28442         size that is not a multiple of the output block size, and vice versa.
28443         Reported by Piergiorgio Sartor.
28444
28445 2000-06-14  Paul Eggert  <eggert@twinsun.com>
28446
28447         * lib/getdate.y (get_date): Apply relative times after time
28448         zone indicator, not before.  Reported by Todd A. Jacobs.
28449
28450 2000-06-13  Jim Meyering  <meyering@lucent.com>
28451
28452         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
28453
28454         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
28455
28456 2000-06-12  Paul Eggert  <eggert@twinsun.com>
28457
28458         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
28459
28460 2000-06-12  Jim Meyering  <meyering@lucent.com>
28461
28462         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
28463         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
28464         optional argument.
28465         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
28466         the optional argument, `lib'.
28467
28468 2000-06-08  Jim Meyering  <meyering@lucent.com>
28469
28470         * m4/largefile.m4: Remove file (now that it's part of autoconf).
28471
28472 2000-06-04  Paul Eggert  <eggert@twinsun.com>
28473
28474         Rewrite largefile configuration so that we don't need to run
28475         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
28476         AC_CANONICAL_HOST in configure.in -- jmm]
28477
28478         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
28479         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
28480         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
28481         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
28482         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
28483         All uses changed.
28484         Instead of inspecting the output of getconf, try to compile the
28485         test program without and with the macro definition.
28486         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
28487         for getconf.  Instead, check for the needed flags by compiling
28488         test programs.
28489
28490 2000-06-04  Paul Eggert  <eggert@twinsun.com>
28491
28492         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
28493
28494 2000-06-04  Jim Meyering  <meyering@lucent.com>
28495
28496         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
28497         SunOS 4.1.4 for which gid_t is an unsigned type.
28498
28499 2000-06-03  Jim Meyering  <meyering@lucent.com>
28500
28501         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
28502         now that autoconf requires that.
28503
28504         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
28505         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
28506         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
28507
28508 2000-06-03  Jim Meyering  <meyering@lucent.com>
28509
28510         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
28511
28512 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
28513
28514         * m4/glibc21.m4: New file.
28515         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
28516
28517 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
28518
28519         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
28520         newer, don't install charset.alias.
28521         * lib/config.charset: Change the Linux/glibc rules so they become empty
28522         on glibc-2.1 or newer.
28523
28524 2000-06-02  Jim Meyering  <meyering@lucent.com>
28525
28526         * lib/mountlist.c: Back out last change.  Instead, do this...
28527         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
28528         me_dummy member using the same `ignore'-testing code.
28529         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
28530         fs_type strings.
28531         From Mark D. Roth.
28532
28533 2000-05-29  Jim Meyering  <meyering@lucent.com>
28534
28535         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
28536         mounts with the `ignore' attribute.  Based on a patch from
28537         Mark D. Roth.
28538
28539 2000-05-28  Jim Meyering  <meyering@lucent.com>
28540
28541         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
28542         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
28543         * m4/stat.m4: Likewise.
28544         * m4/lstat.m4: Likewise.
28545         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
28546
28547         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
28548         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
28549
28550 2000-05-26  Jim Meyering  <meyering@lucent.com>
28551
28552         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
28553
28554 2000-05-24  Jim Meyering  <meyering@lucent.com>
28555
28556         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
28557         autoconf requires that.
28558         * m4/lib-check.m4: Likewise.
28559         * m4/jm-macros.m4: Likewise.
28560         * m4/strftime.m4: Likewise.
28561
28562         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
28563         AC_CHECK_DECLS, now that autoconf requires that.
28564
28565 2000-05-22  Jim Meyering  <meyering@lucent.com>
28566
28567         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
28568         * m4/lstat.m4: Likewise.
28569
28570 2000-05-22  Jim Meyering  <meyering@lucent.com>
28571
28572         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
28573
28574 2000-05-20  Jim Meyering  <meyering@lucent.com>
28575
28576         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
28577         (jm_PREREQ): Use it.
28578
28579 2000-05-18  Jim Meyering  <meyering@lucent.com>
28580
28581         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
28582         back, too, since it may have been modified by allocate_entry.
28583         (hash_delete): Rewrite to use neither the assignment operator
28584         nor the comma operator in an if-expression.
28585
28586 2000-05-15  Paul Eggert  <eggert@twinsun.com>
28587
28588         * lib/closeout.c:
28589         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
28590         Remove; no longer needed.
28591         "quotearg.h": Add include.
28592         (file_name): Do not bother to explicitly initialize to NULL; it's less
28593         efficient on some hosts.
28594         (close_stdout_status): Remove test as to whether stdout was already
28595         closed; it breaks for the case "echo x | sort >&-".
28596         Quote file name colons.
28597         Do not assume that _("write error") lacks format strings.
28598
28599 2000-05-15  Jim Meyering  <meyering@lucent.com>
28600
28601         * lib/version-etc.c (version_etc_copyright): Update the copyright
28602         string used in all --version output.
28603
28604 2000-05-14  Jim Meyering  <meyering@lucent.com>
28605
28606         * lib/closeout.c (close_stdout_set_file_name): New function.
28607         (close_stdout_status): Use new file-scoped global.
28608         Return right away if fstat says the stdout file descriptor is invalid.
28609         * lib/closeout.h (close_stdout_set_file_name): Declare.
28610
28611 2000-05-10  Jim Meyering  <meyering@lucent.com>
28612
28613         * lib/closeout.c [default_exit_status]: New file-scoped variable.
28614         (close_stdout_set_status): New function.
28615         * lib/closeout.h (close_stdout_set_status): Declare.
28616
28617 2000-05-09  Jim Meyering  <meyering@lucent.com>
28618
28619         * m4/gettext.m4: Rename this...
28620         * m4/libintl.m4: ...to this.
28621
28622 2000-05-08  Jim Meyering  <meyering@lucent.com>
28623
28624         * lib/long-options.c: Don't include closeout.h.
28625         (parse_long_options): Don't call close_stdout for --version.
28626
28627 2000-05-06  Paul Eggert  <eggert@twinsun.com>
28628
28629         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
28630         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
28631         2.1.3 bug.  This avoids a clash when files like regex.c define
28632         _GNU_SOURCE.
28633
28634 2000-05-06  Jim Meyering  <meyering@lucent.com>
28635
28636         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
28637         (AC_REPLACE_FUNCS): Add strnlen.
28638
28639         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
28640         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
28641
28642         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
28643         AC_SEARCH_LIBS call for nanosleep.
28644         (LIB_NANOSLEEP): Set and AC_SUBST.
28645
28646 2000-05-06  Jim Meyering  <meyering@lucent.com>
28647
28648         * lib/strnlen.c: Undefine __strnlen and strnlen.
28649         [!weak_alias]: Define __strnlen to strnlen.
28650
28651         * lib/atexit.c: New file, from libiberty.
28652
28653 2000-05-06  Jim Meyering  <meyering@lucent.com>
28654
28655         * lib/closeout.c (close_stdout_status): Also check for errors on the
28656         stderr stream.
28657
28658 2000-05-05  Jim Meyering  <meyering@lucent.com>
28659
28660         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
28661         AC_SEARCH_LIBS call for clock_gettime.
28662         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
28663
28664         * m4/search-libs.m4: Update from autoconf.
28665
28666         su doesn't work on Solaris 2.6.
28667         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
28668         <shadow.h>.  Reported by Dragos Harabor.
28669
28670 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
28671
28672         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
28673         memcpy instead of xmalloc, xrealloc, path_concat.
28674         (locale_charset): Treat empty environment variables as absent.
28675         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
28676
28677 2000-05-04  Jim Meyering  <meyering@lucent.com>
28678
28679         * lib/getopt.c: Update from glibc.
28680         * lib/obstack.c: Likewise.
28681         * lib/obstack.h: Likewise.
28682         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
28683         file
28684
28685         * lib/regex.h: Likewise.
28686         * lib/strndup.c: Likewise.
28687         * lib/strnlen.c: New file, from glibc.
28688
28689 2000-05-03  Jim Meyering  <meyering@lucent.com>
28690
28691         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
28692
28693 2000-05-02  Paul Eggert  <eggert@twinsun.com>
28694
28695         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
28696         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
28697         compile-time test, rather than inspecting host and OS, to
28698         decide whether to define _LARGEFILE_SOURCE.
28699
28700 2000-05-01  Jim Meyering  <meyering@lucent.com>
28701
28702         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
28703
28704         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
28705         Based on a patch from Bruno Haible.
28706
28707 2000-05-01  Jim Meyering  <meyering@lucent.com>
28708
28709         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
28710
28711 2000-04-29  Jim Meyering  <meyering@lucent.com>
28712
28713         * lib/path-concat.c: Declare strdup only if it's not defined.
28714         * lib/canon-host.c: Likewise.
28715
28716 2000-04-28  Jim Meyering  <meyering@lucent.com>
28717
28718         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
28719         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
28720         is included first, then limits.h is included by locale.h by libintl.h.
28721         From John David Anglin.
28722
28723 2000-04-25  Jim Meyering  <meyering@lucent.com>
28724
28725         * lib/makepath.c (S_IRWXUGO): Define.
28726         (make_path): Always perform explicit chmod if MODE specifies any
28727         of the `special' permission bits.  Prompted by a bug report against
28728         install from Mate Wierdl and Joost van Baal.
28729
28730 2000-04-18  Jim Meyering  <meyering@lucent.com>
28731
28732         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
28733         (jm_PREREQ): Use it.
28734
28735 2000-04-18  Jim Meyering  <meyering@lucent.com>
28736
28737         * lib/README: New file.
28738
28739         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
28740         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
28741
28742 2000-04-17  Jim Meyering  <meyering@lucent.com>
28743
28744         Get it right :-)
28745         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
28746         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
28747         Suggestion from Akim Demaille.
28748
28749 2000-04-17  Jim Meyering  <meyering@lucent.com>
28750
28751         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
28752         the definition of it to rpl_strftime also defined-away the system's
28753         declaration.
28754
28755 2000-04-15  Jim Meyering  <meyering@lucent.com>
28756
28757         Use `C' to denote so-called `contiguous' files, the same way
28758         that tar does.
28759         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
28760         (ftypelet): Use S_ISCTG.
28761         From Michael Deutschmann.
28762
28763 2000-04-14  Jim Meyering  <meyering@lucent.com>
28764
28765         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
28766         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
28767         clobbered.
28768
28769 2000-04-14  Jim Meyering  <meyering@lucent.com>
28770
28771         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
28772
28773 2000-04-13  Jim Meyering  <meyering@lucent.com>
28774
28775         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
28776         AH_VERBATIM to insert required #ifndef into config.h.in.
28777         Suggestion from Akim Demaille.
28778
28779 2000-04-12  Jim Meyering  <meyering@lucent.com>
28780
28781         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
28782         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
28783         Christian Krackowizer.
28784
28785         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
28786         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
28787         (AC_SYS_LARGEFILE): Require.
28788         (AM_C_PROTOTYPES): Require.
28789
28790 2000-04-08  Jim Meyering  <meyering@lucent.com>
28791
28792         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
28793         names don't conflict.  Reported by Eli Zaretskii.
28794
28795 2000-04-07  Jim Meyering  <meyering@lucent.com>
28796
28797         * lib/putenv.c: Move inclusion of errno.h so it follows that of
28798         sys/types.h, to work around system header problems on AIX 3.2.5.
28799         From Bruno Haible.
28800
28801 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
28802
28803         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
28804         bug.  Deal with the different error behavior of Irix iconv.
28805
28806 2000-04-05  Paul Eggert  <eggert@twinsun.com>
28807
28808         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
28809         IRIX if the installer said otherwise.
28810
28811 2000-04-05  Jim Meyering  <meyering@lucent.com>
28812
28813         Portability tweaks required for ultrix4.3.
28814         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
28815         (jm_CHECK_DECLS): Add getutent to the list of functions.
28816         (_jm_DECL_HEADERS): Add utmpx.h.
28817         From John David Anglin.
28818
28819         * m4/strftime.m4: Back out the 2000-04-02 change.
28820         Instead of that change, simply undefine putenv in the test program.
28821
28822 2000-04-05  Jim Meyering  <meyering@lucent.com>
28823
28824         Portability tweaks required for ultrix4.3.
28825         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
28826         getutent.
28827         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
28828         * lib/canon-host.c: Declare strdup.
28829         * lib/path-concat.c: Likewise.
28830         From John David Anglin.
28831
28832 2000-04-04  Jim Meyering  <meyering@lucent.com>
28833
28834         Be more DOS 8.3-friendly.
28835         * lib/ref-add.sin: Renamed from ref-add.sed.in.
28836         * lib/ref-del.sin: Renamed from ref-del.sed.in.
28837         * lib/Makefile.am: Reflect renaming.
28838         Reported by Eli Zaretskii.
28839
28840         Use a temporary file name that won't clash with `charset.alias'
28841         in the DOS 8.3 name space.
28842         * lib/Makefile.am (charset_tmp): Define.
28843         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
28844         (uninstall-local): Likewise.
28845         Reported by Eli Zaretskii.
28846
28847 2000-04-03  Jim Meyering  <meyering@lucent.com>
28848
28849         * m4/gettext.m4: Fix typo in comment.
28850
28851         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
28852         textutils/configure.in).  Suggestion from Paul Eggert.
28853         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
28854
28855 2000-04-02  Paul Eggert  <eggert@twinsun.com>
28856
28857         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
28858         variable in the shell rather than using putenv, which isn't
28859         portable.  This avoids the configure-time inter-test dependency
28860         on the potentially-renamed putenv function.
28861
28862 2000-03-30  Paul Eggert  <eggert@twinsun.com>
28863
28864         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
28865         before checking struct stat.st_blksize, so that
28866         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
28867
28868 2000-03-29  Paul Eggert  <eggert@twinsun.com>
28869
28870         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
28871         since strftime.c uses HAVE_STRFTIME to decide whether to use
28872         the underlying strftime.
28873
28874 2000-03-29  Paul Eggert  <eggert@twinsun.com>
28875
28876         * lib/time/strftime.c (my_strftime): Make sure we call the system
28877         strftime, not ourselves, when invoking the underlying strftime.
28878
28879 2000-03-24  Jim Meyering  <meyering@lucent.com>
28880
28881         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
28882         (charset_alias): Define.
28883         (install-exec-local): Factor out common code.
28884         (uninstall-local): Split lines longer than 80.
28885         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
28886         (SUFFIXES): Define.
28887         (.sed.in.sed): New rule.  Don't redirect directly to $@.
28888         (CLEANFILES): Add ref-add.sed and ref-del.sed.
28889
28890 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
28891
28892         * lib/config.charset: Output a line containing "Packages using this
28893         file".
28894         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
28895         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
28896         ref-del.sed): New rules.
28897
28898 2000-03-17  Jim Meyering  <meyering@lucent.com>
28899
28900         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
28901         Otherwise, include <strings.h>
28902
28903 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
28904
28905         * lib/unicodeio.c (utf8_wctomb): New function.
28906         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
28907         format instead of in UCS-4 with platform dependent endianness.
28908
28909 2000-03-10  Jim Meyering  <meyering@lucent.com>
28910
28911         * m4/lib-check.m4: Look for getspnam in -lgen, too.
28912         From Marco Franzen.
28913
28914 2000-03-07  Paul Eggert  <eggert@twinsun.com>
28915
28916         * lib/savedir.c (savedir): Work even if directory size is
28917         negative; this can happen with some screwy NFS configurations.
28918
28919 2000-03-06  Jim Meyering  <meyering@lucent.com>
28920
28921         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
28922         if it's NULL (because we ran out of memory).  From Bruno Haible.
28923
28924 2000-03-05  Jim Meyering  <meyering@lucent.com>
28925
28926         * lib/localcharset.c ("path-concat.h"): Include.
28927         (get_charset_aliases): Use path_concat instead of ANSI string
28928         concatenation.
28929
28930         * lib/unicodeio.h (PARAMS): Define.
28931         Use it to guard prototype.
28932
28933 2000-03-04  Jim Meyering  <meyering@lucent.com>
28934
28935         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
28936         for lib/localcharset.c.
28937
28938 2000-03-04  Jim Meyering  <meyering@lucent.com>
28939
28940         * lib/Makefile.am (install-exec-local): Create $(libdir) before
28941         installing into it.
28942         (uninstall-local): Uncomment this rule so `make distcheck' works
28943         once again.
28944
28945         * lib/unicodeio.c (<errno.h>): Include it.
28946         (errno): Declare if not defined.
28947
28948         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
28949
28950         * lib/config.charset: New version, incorporating remarks from a linux
28951         i18n mailing list.  From Bruno Haible.
28952
28953 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
28954
28955         * m4/codeset.m4: New file.
28956         * m4/iconv.m4: New file.
28957         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
28958
28959 2000-03-03  Jim Meyering  <meyering@lucent.com>
28960
28961         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
28962
28963 2000-03-02  Jim Meyering  <meyering@lucent.com>
28964
28965         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
28966         the messages come out on separate lines.
28967
28968         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
28969         rather than jm_CHECK_DECLARATIONS.
28970         * m4/decl.m4: Remove now-unused file.
28971
28972         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
28973         geteuid.
28974
28975 2000-03-02  Jim Meyering  <meyering@lucent.com>
28976
28977         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
28978
28979 2000-03-01  Jim Meyering  <meyering@lucent.com>
28980
28981         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
28982         * lib/unicodeio.c: Likewise.
28983
28984 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
28985
28986         * lib/config.charset: New file.
28987         * lib/localcharset.c: New file.
28988         * lib/unicodeio.h, lib/unicodeio.c: New files.
28989         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
28990         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
28991         (noinst_HEADERS): Add unicodeio.h.
28992         (all-local, install-exec-local, charset.alias): New targets.
28993
28994 2000-02-28  Paul Eggert  <eggert@twinsun.com>
28995
28996         * lib/quotearg.c (ALERT_CHAR): New macro.
28997         (quotearg_buffer_restyled): Use it.
28998
28999 2000-02-27  Jim Meyering  <meyering@lucent.com>
29000
29001         * m4/check-decl.m4: Add getenv to the list.
29002
29003 2000-02-27  Jim Meyering  <meyering@lucent.com>
29004
29005         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
29006         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
29007
29008         * lib/backupfile.c: Guard inclusion of stdlib.h with
29009         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
29010         Declare malloc if needed.
29011
29012         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
29013         `#ifndef HAVE_DECL..'
29014         now that autoconf always defines the HAVE_DECL_ symbols.
29015         * lib/human.c: Likewise.
29016         * lib/same.c: Likewise.
29017         * lib/strtoumax.c: Likewise.
29018
29019         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
29020         declaration check was not run.
29021         * lib/hash.c: Likewise.
29022         * lib/human.c: Likewise.
29023         * lib/same.c: Likewise.
29024         * lib/strtoumax.c: Likewise.
29025
29026         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
29027         `.', then first look up the entire `.'-containing string as a login
29028         name.
29029
29030 2000-02-23  Jim Meyering  <meyering@lucent.com>
29031
29032         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
29033         in place of my hack.
29034
29035 2000-02-18  Paul Eggert  <eggert@twinsun.com>
29036
29037         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
29038         (textint): New typedef.
29039         (parser_control): Member year changed from int to textint.
29040         All uses changed.
29041         (YYSTYPE): Removed; replaced by %union with int and textint members.
29042         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
29043         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
29044         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
29045         (tSNUMBER, tUNUMBER): Now of type <textintval>.
29046         (date, number, to_year): Use width of number in digits, not its value,
29047         to determine whether it's a 2-digit year, or a 2-digit time.
29048         (yylex): Store number of digits of numeric tokens.
29049         Reported by John Kendall.
29050
29051         (parser_control): Changed from struct parser_control to typedef (for
29052         consistency).  All uses changed.
29053
29054         (tID): Removed; not used.
29055         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
29056
29057 2000-02-14  Paul Eggert  <eggert@twinsun.com>
29058
29059         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
29060         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
29061
29062 2000-02-12  Jim Meyering  <meyering@lucent.com>
29063
29064         * lib/userspec.c (ISDIGIT): Define it.
29065         (isdigit): Remove definition.
29066         (is_number): Use ISDIGIT, not isdigit.
29067         <libintl.h>: Include.
29068         (_ and N_): Define.
29069         (parse_user_spec): Mark translatable strings.
29070
29071 2000-02-10  Jim Meyering  <meyering@lucent.com>
29072
29073         With these changes, nanosleep.[ch] are finally enough like the other
29074         lib/* replacement files to compile on a few more losing systems.
29075
29076         * lib/nanosleep.h: Don't include config.h.
29077         Remove prototype from declaration of nanosleep.
29078         (PARAMS): Remove now-unneeded definition.
29079         * lib/nanosleep.c: #undef nanosleep.
29080         (rpl_nanosleep): Rename from nanosleep.
29081
29082 2000-02-10  Jim Meyering  <meyering@lucent.com>
29083
29084         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
29085         gnu_nanosleep to rpl_nanosleep.
29086
29087 2000-02-09  Jim Meyering  <meyering@lucent.com>
29088
29089         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
29090         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
29091
29092 2000-02-08  Akim Demaille  <akim@epita.fr>
29093
29094         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
29095         `[' and `]' and remove uses of `changequote'.
29096         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
29097         (AC_SYS_LARGEFILE): Likewise.
29098         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
29099         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
29100         of changequote.
29101         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
29102         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
29103         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
29104         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
29105
29106 2000-02-05  Jim Meyering  <meyering@lucent.com>
29107
29108         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
29109         Remove explicit use of AC_HEADER_TIME.  It is required by
29110         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
29111         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
29112         in autoconf whereby the expansion of the latter ended up preceding
29113         the expansion of its prerequisite, AC_HEADER_TIME.
29114         Reported by Volker Borchert.
29115
29116 2000-02-03  Jim Meyering  <meyering@lucent.com>
29117
29118         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
29119
29120 2000-02-03  Jim Meyering  <meyering@lucent.com>
29121
29122         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
29123         rather than with `#if HAVE_UTMPNAME'.
29124
29125 2000-02-02  Jim Meyering  <meyering@lucent.com>
29126
29127         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
29128         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
29129         Reported by Eli Zaretskii.
29130
29131 2000-02-01  Jim Meyering  <meyering@lucent.com>
29132
29133         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
29134
29135 2000-01-31  Jim Meyering  <meyering@lucent.com>
29136
29137         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
29138         functions.  Add the time.h and sys/time.h headers along with the
29139         AC_REQUIRE'ment of AC_HEADER_TIME.
29140
29141 2000-01-31  Jim Meyering  <meyering@lucent.com>
29142
29143         * lib/nanosleep.h (nanosleep): Guard declaration with
29144         `#if ! HAVE_DECL_NANOSLEEP'.
29145         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
29146         the declaration in that vendor's sys/timers.h.
29147         Reported by Christian Krackowizer.
29148
29149         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
29150         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
29151         (ISPRINT): Likewise.
29152         Reported by Tom Tromey.
29153
29154 2000-01-30  Jim Meyering  <meyering@lucent.com>
29155
29156         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
29157
29158         * m4/prereq.m4 (utmp_includes): Define.
29159         Check for ut_user and ut_name members in both struct utmpx
29160         and struct utmp.
29161
29162 2000-01-30  Jim Meyering  <meyering@lucent.com>
29163
29164         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
29165         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
29166         header files where only utmpx.ut_user is declared.
29167
29168         * lib/readutmp.h (UT_USER): Define.
29169
29170 2000-01-29  Jim Meyering  <meyering@lucent.com>
29171
29172         * m4/lib-check.m4: New file containing library-related checks from
29173         fileutils and sh-utils (textutils had none).
29174
29175 2000-01-28  Jim Meyering  <meyering@lucent.com>
29176
29177         * m4/perl.m4: Change format of warning message to look more like that
29178         from the missing script.  Suggestion from François Pinard.
29179
29180 2000-01-25  Jim Meyering  <meyering@lucent.com>
29181
29182         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
29183         well as time.h in the compile check.
29184         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
29185         Fix typo in cross-compiling case: s/yes/no/.
29186
29187 2000-01-23  Jim Meyering  <meyering@lucent.com>
29188
29189         * m4/jm-macros.m4: Move df-related tests here from
29190         fileutils/configure.in
29191
29192         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
29193         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
29194
29195         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
29196         s/space/ac_fsusage_space/.
29197         (jm_FILE_SYSTEM_USAGE): Take two parameters.
29198
29199         * m4/ftruncate.m4: New file (derived from part of
29200         fileutils/configure.in).
29201         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
29202         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
29203
29204         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
29205         AC_SUBST these here, rather than just in sh-util/configure.in, so
29206         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
29207         all the same.
29208         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
29209         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
29210         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
29211         (AC_SUBST(POW_LIBM)): Likewise.
29212         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
29213
29214 2000-01-23  Jim Meyering  <meyering@lucent.com>
29215
29216         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
29217         obstack.c.
29218
29219 2000-01-22  Jim Meyering  <meyering@lucent.com>
29220
29221         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
29222
29223         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
29224
29225         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
29226         configure.in
29227         (AC_CHECK_HEADERS): Likewise for sh-utils.
29228         (AC_CHECK_HEADERS): Likewise for textutils.
29229         Merge the three lists of headers.
29230
29231         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
29232         from fileutils' configure.in.
29233
29234         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
29235         code. Moved tests into their own function (_jm_DECL_HEADERS) in
29236         check-decl.m4.
29237
29238         * m4/check-decl.m4: Use #if rather than #ifdef.
29239         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
29240         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
29241         (_jm_DECL_HEADERS): Define new function.
29242         (jm_CHECK_DECLARATIONS): Require it.
29243
29244 2000-01-22  Jim Meyering  <meyering@lucent.com>
29245
29246         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
29247         [! HAVE_DECL_STRTOULL]: Declare strtoull.
29248         Required for some AIX systems.  Reported by Christian Krackowizer.
29249         [TESTING] (main): New function.
29250
29251         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
29252         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
29253         letters.
29254
29255         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
29256         iswprint.
29257
29258         * lib/strverscmp.c (ISDIGIT): Define.
29259         (strverscmp): Use ISDIGIT, not isdigit.
29260
29261 2000-01-19  Jim Meyering  <meyering@lucent.com>
29262
29263         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
29264         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
29265         defines `struct timespec' in <sys/time.h>
29266
29267         * m4/c-bs-a.m4: Remove uses of changequote altogether.
29268         Thanks to Akim for explaining.
29269
29270 2000-01-17  Paul Eggert  <eggert@twinsun.com>
29271
29272         * lib/nanosleep.c (nanosleep):
29273         Don't use SA_INTERRUPT to decide whether to call sigaction, as
29274         POSIX.1 doesn't require SA_INTERRUPT and some systems
29275         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
29276         it's been part of POSIX.1 since day 1 (in 1988).
29277
29278 2000-01-17  Jim Meyering  <meyering@lucent.com>
29279
29280         * lib/interlock: Remove unused file.  Reported by François Pinard.
29281
29282 2000-01-16  Paul Eggert  <eggert@twinsun.com>
29283
29284         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
29285         alert, backslash, formfeed, and vertical tab unnecessarily in
29286         shell quoting style.
29287
29288 2000-01-16  Jim Meyering  <meyering@lucent.com>
29289
29290         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
29291         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
29292         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
29293         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
29294
29295 2000-01-16  Jim Meyering  <meyering@lucent.com>
29296
29297         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
29298         because the latter didn't work.
29299
29300 2000-01-15  Jim Meyering  <meyering@lucent.com>
29301
29302         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
29303         (AC_REPLACE_FUNCS): Add memcpy and memset.
29304         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
29305         Add strpbrk.
29306         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
29307
29308 2000-01-12  Jim Meyering  <meyering@lucent.com>
29309
29310         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
29311         (jm_PREREQ): Use it.
29312         (jm_PREREQ_READUTMP): New macro.
29313         (jm_PREREQ): Use it.
29314
29315 2000-01-11  Paul Eggert  <eggert@twinsun.com>
29316
29317         Quote multibyte characters correctly.
29318         * m4/c-bs-a.m4: New file.
29319         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
29320         (jm_PREREQ): Use it.
29321
29322 2000-01-11  Paul Eggert  <eggert@twinsun.com>
29323
29324         * m4/uintmax_t.m4: Port to autoconf 2.13.
29325
29326 2000-01-08  Jim Meyering  <meyering@ascend.com>
29327
29328         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
29329         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
29330
29331 2000-01-04  Jim Meyering  <meyering@ascend.com>
29332
29333         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
29334         jm_STRUCT_DIRENT_D_TYPE.
29335         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
29336         jm_STRUCT_DIRENT_D_INO.
29337         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
29338         jm_STRUCT_UTIMBUF.
29339         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
29340         renamings.
29341         * m4/utime.m4: Likewise.
29342
29343         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
29344         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
29345
29346 2000-01-03  Paul Eggert  <eggert@twinsun.com>
29347
29348         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
29349         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
29350
29351 2000-01-02  Jim Meyering  <meyering@ascend.com>
29352
29353         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
29354         remember if this is necessary.
29355
29356 1999-12-26  Jim Meyering  <meyering@ascend.com>
29357
29358         * m4/jm-macros.m4: Use it here.
29359         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
29360
29361 1999-12-23  Jim Meyering  <meyering@ascend.com>
29362
29363         * m4/jm-macros.m4: Check for clock_gettime (moved from
29364         fileutils/configure.in)
29365         Check for gettimeofday.
29366
29367 1999-12-20  Jim Meyering  <meyering@ascend.com>
29368
29369         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
29370         autoconf-2.14a-1999-12-20.
29371
29372 1999-12-19  Jim Meyering  <meyering@ascend.com>
29373
29374         * m4/lstat-slash.m4: New file.
29375         * m4/jm-macros.m4: Use the new macro:
29376         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
29377
29378 1999-12-07  Jim Meyering  <meyering@ascend.com>
29379
29380         * m4/perl.m4: Require that File::Compare be available, too.
29381         Too many systems seem to lack it.
29382
29383         * m4/strftime.m4: Add checks for most of the cpp macros tested in
29384         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
29385
29386 1999-11-18  Paul Eggert  <eggert@twinsun.com>
29387
29388         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
29389         problem with the QNX 4.25 shell, which doesn't propagate exit
29390         status of failed commands inside shell assignments.
29391
29392 1999-11-17  Jim Meyering  <meyering@ascend.com>
29393
29394         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
29395
29396 1999-11-07  Jim Meyering  <meyering@ascend.com>
29397
29398         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
29399
29400 1999-11-06  Jim Meyering  <meyering@ascend.com>
29401
29402         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
29403         * m4/jm-macros.m4 (jm_MACROS): Use it here.
29404
29405 1999-11-05  Jim Meyering  <meyering@ascend.com>
29406
29407         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
29408         configure.in of textutils, fileutils, and sh-utils into this one
29409         (shared between those packages) file.
29410         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
29411         AC_STRUCT_ST_BLKSIZE.
29412
29413 1999-11-03  Jim Meyering  <meyering@ascend.com>
29414
29415         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
29416         of AC_CHECK_TYPE checks includes unistd.h.
29417         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
29418         Suggestion from Akim Demaille.
29419
29420 1999-10-30  Jim Meyering  <meyering@ascend.com>
29421
29422         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
29423         m4-quoted string.
29424         * m4/ls-mntd-fs.m4: Likewise.
29425         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
29426         * m4/jm-winsz1.m4: Likewise.
29427
29428         * m4/const.m4: Remove file, since the fix made it into the experimental
29429         version of autoconf.
29430         * m4/mktime.m4: Likewise.
29431
29432         * m4/check-type.m4: Remove file, now that the latest version of
29433         AC_CHECK_TYPE takes a third arg to specify additional #includes.
29434
29435         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
29436         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
29437         AC_CHECK_TYPE.
29438
29439 1999-10-04  Jim Meyering  <meyering@ascend.com>
29440
29441         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
29442
29443 1999-09-22  Paul Eggert  <eggert@twinsun.com>
29444
29445         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
29446         2.95.1 bug with HP-UX 10.20.
29447
29448 1999-09-17  Jim Meyering  <meyering@ascend.com>
29449
29450         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
29451         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
29452         due to missing strdup (against sh-utils-2.0).
29453
29454 1999-08-29  Jim Meyering  <meyering@ascend.com>
29455
29456         * m4/jm-macros.m4: Require jm_BISON.
29457         * m4/bison.m4: New file.
29458
29459 1999-08-17  Paul Eggert  <eggert@twinsun.com>
29460
29461         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
29462         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
29463
29464 1999-08-05  Jim Meyering  <meyering@ascend.com>
29465
29466         * m4/getline.m4: Rename test file from conftestdata to conftest.data
29467         to avoid conflicts with `conftest' on 8+3 filesystems.
29468         Suggestion from Eli Zaretskii.
29469
29470 1999-08-04  Jim Meyering  <meyering@ascend.com>
29471
29472         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
29473         fileutils and sh-utils (textutils's getline test was inadequate).
29474         (AM_FUNC_GETLINE): Run this test.
29475         (AC_CHECK_FUNCS): Check for getdelim.
29476         Reported by Bob Proulx.
29477
29478 1999-08-02  Jim Meyering  <meyering@ascend.com>
29479
29480         * m4/jm-macros.m4: Add a comment.
29481
29482 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29483
29484         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
29485         <inttypes.h> defines strtoumax as a macro (and not as a
29486         function).
29487
29488 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29489
29490         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
29491         that we can shift, multiply and divide unsigned long long
29492         values; Ultrix cc can't do it.
29493
29494 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29495
29496         * m4/mktime.m4: New file, which is a preview of what should appear
29497         in the next public autoconf release.
29498
29499 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29500
29501         * m4/lfs.m4: Remove this file.
29502         * m4/largefile.m4: New file.  It contains the old contents of
29503         lfs.m4, except that all names with prefix AC_LFS have been
29504         changed to use the prefix AC_SYS_LARGEFILE instead, to be
29505         compatible with future autoconf versions.  Also, some minor m4
29506         quoting problems have been fixed.
29507
29508 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29509
29510         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
29511         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
29512         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
29513         and simplify the shell code.
29514
29515 1999-08-01  Jim Meyering  <meyering@ascend.com>
29516
29517         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
29518         m4.
29519
29520 1999-07-20  Jim Meyering  <meyering@ascend.com>
29521
29522         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
29523
29524 1999-07-15  Jim Meyering  <meyering@ascend.com>
29525
29526         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
29527
29528 1999-05-22  Jim Meyering  <meyering@ascend.com>
29529
29530         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
29531
29532 1999-05-20  Jim Meyering  <meyering@ascend.com>
29533
29534         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
29535         Add a colon after each `then' in case $4 is empty.
29536
29537 1999-05-16  Jim Meyering  <meyering@ascend.com>
29538
29539         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
29540
29541 1999-05-10  Jim Meyering  <meyering@ascend.com>
29542
29543         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
29544
29545         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
29546         AC_FUNC_MKTIME.
29547
29548 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
29549
29550         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
29551
29552 1999-05-04  Paul Eggert  <eggert@twinsun.com>
29553
29554         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
29555         not CPPFLAGS, so that linking works correctly in IRIX.
29556
29557 1999-04-30  Paul Eggert  <eggert@twinsun.com>
29558
29559         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
29560
29561 1999-04-20  Paul Eggert  <eggert@twinsun.com>
29562
29563         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
29564         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
29565         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
29566         jm_AC_TYPE_UNSIGNED_LONG_LONG.
29567         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
29568
29569         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
29570
29571 1999-04-20  Jim Meyering  <meyering@ascend.com>
29572
29573         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
29574         AC_REPLACE xstroull if necessary.  From Paul Eggert.
29575         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
29576
29577 1999-04-18  Jim Meyering  <meyering@ascend.com>
29578
29579         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
29580         * m4/jm-macros.m4: Use it.
29581
29582 1999-04-06  Jim Meyering  <meyering@ascend.com>
29583
29584         * m4/strftime.m4: Remove test for %f.
29585
29586 1999-03-29  Jim Meyering  <meyering@ascend.com>
29587
29588         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
29589         superset of the AC_TYPE_* checks in the textutils, fileutils,
29590         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
29591         AC_TYPE_PID_T.
29592
29593 1999-03-28  Jim Meyering  <meyering@ascend.com>
29594
29595         * m4/jm-macros.m4: Define GNU_PACKAGE here.
29596         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
29597         replaced e.g., in the *.sh files of the sh-utils.
29598
29599 1999-03-20  Jim Meyering  <meyering@ascend.com>
29600
29601         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
29602         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
29603         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
29604
29605 1999-03-19  Jim Meyering  <meyering@ascend.com>
29606
29607         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
29608
29609 1999-03-12  Jim Meyering  <meyering@ascend.com>
29610
29611         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
29612
29613 1999-03-07  Jim Meyering  <meyering@ascend.com>
29614
29615         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
29616         declared.
29617
29618 1999-02-17  Jim Meyering  <meyering@ascend.com>
29619
29620         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
29621         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
29622
29623 1999-02-07  Jim Meyering  <meyering@ascend.com>
29624
29625         * m4/group-member.m4: New file -- extracted from sh-utils'
29626         configure.in.
29627
29628         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
29629         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
29630
29631 1999-02-06  Jim Meyering  <meyering@ascend.com>
29632
29633         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
29634         * m4/fnmatch.m4: Likewise.
29635         * m4/getgroups.m4: Likewise.
29636         * m4/lstat.m4: Likewise.
29637         * m4/malloc.m4: Likewise.
29638         * m4/putenv.m4: Likewise.
29639         * m4/realloc.m4: Likewise.
29640         * m4/regex.m4: Likewise.
29641         * m4/stat.m4: Likewise.
29642         * m4/strftime.m4: Likewise.
29643         Suggestion from Alain Magloire.
29644
29645         * m4/chown.m4: Use `.$ac_objext', not `.o'.
29646         * m4/fnmatch.m4: Likewise.
29647         * m4/getgroups.m4: Likewise.
29648         * m4/getline.m4: Likewise.
29649         * m4/lstat.m4: Likewise.
29650         * m4/malloc.m4: Likewise.
29651         * m4/memcmp.m4: Likewise.
29652         * m4/putenv.m4: Likewise.
29653         * m4/realloc.m4: Likewise.
29654         * m4/regex.m4: Likewise.
29655         * m4/stat.m4: Likewise.
29656         * m4/strftime.m4: Likewise.
29657         Suggestion from Alain Magloire.
29658
29659         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
29660         an argument.
29661
29662         * m4/regex.m4: Add a run-time Test for proper operation of
29663         re_compile_pattern.
29664
29665 1999-01-31  Jim Meyering  <meyering@ascend.com>
29666
29667         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
29668
29669 1999-01-30  Jim Meyering  <meyering@ascend.com>
29670
29671         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
29672
29673         * m4/jm-mktime.m4: Make this a wrapper around the official
29674         AM_FUNC_MKTIME rather than my private copy, now that the official one
29675         is up to date.
29676         * m4/mktime.m4: Remove file.
29677
29678         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
29679         * m4/uptime.m4: Likewise.
29680         * m4/uintmax_t.m4: Likewise.
29681
29682 1999-01-28  Jim Meyering  <meyering@ascend.com>
29683
29684         * m4/jm-macros.m4: Use jm_AFS.
29685         * m4/afs.m4: New file (from fileutils' configure.in).
29686
29687         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
29688         * m4/chown.m4: Likewise.
29689         * m4/d-ino.m4: Likewise.
29690         * m4/d-type.m4: Likewise.
29691         * m4/fnmatch.m4: Likewise.
29692         * m4/getgroups.m4: Likewise.
29693         * m4/gettext.m4: Likewise.
29694         * m4/jm-mktime.m4: Likewise.
29695         * m4/jm-winsz2.m4: Likewise.
29696         * m4/lcmessage.m4: Likewise.
29697         * m4/ls-mntd-fs.m4: Likewise.
29698         * m4/malloc.m4: Likewise.
29699         * m4/memcmp.m4: Likewise.
29700         * m4/putenv.m4: Likewise.
29701         * m4/realloc.m4: Likewise.
29702         * m4/st_mtim.m4: Likewise.
29703         * m4/strftime.m4: Likewise.
29704
29705 1999-01-16  Jim Meyering  <meyering@ascend.com>
29706
29707         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
29708         (ARGMATCH_DIE_DECL): Define.
29709
29710 1999-01-12  Jim Meyering  <meyering@ascend.com>
29711
29712         * m4/Makefile.am.in: Rewrite to avoid using fmt.
29713         Reported by Lars Hecking.
29714
29715 1999-01-10  Jim Meyering  <meyering@ascend.com>
29716
29717         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
29718         gross kludge.
29719         * m4/inttypes_h.m4: Likewise.
29720         * m4/lstat.m4: Likewise.
29721         * m4/malloc.m4: Likewise.
29722         * m4/readdir.m4: Likewise.
29723         * m4/realloc.m4: Likewise.
29724         * m4/st_dm_mode.m4: Likewise.
29725         * m4/stat.m4: Likewise.
29726         * m4/utimbuf.m4: Likewise.
29727         * m4/utimes.m4: Likewise.
29728
29729         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
29730         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
29731         comments in config.h.in are meaningful.
29732
29733         * m4/jm-macros.m4: Require autoconf-2.13 here.
29734
29735         * m4/regex.m4: By default, don't use the included regex.c on systems
29736         with glibc 2.  Suggestion from Uli Drepper.
29737
29738 1999-01-02  Jim Meyering  <meyering@ascend.com>
29739
29740         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
29741
29742 1998-12-18  Jim Meyering  <meyering@ascend.com>
29743
29744         * m4/Makefile.am.in (Makefile.am): Simplify rule.
29745         Based on a suggestion from Lars Hecking.
29746
29747 1998-11-16  Paul Eggert  <eggert@twinsun.com>
29748
29749         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
29750
29751 1998-11-16  Jim Meyering  <meyering@ascend.com>
29752
29753         * m4/lfs.m4: Double-quote the `uname...` expression.
29754
29755 1998-11-14  Jim Meyering  <meyering@ascend.com>
29756
29757         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
29758         * m4/stat.m4: Likewise.
29759
29760 1998-11-03  Jim Meyering  <meyering@ascend.com>
29761
29762         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
29763         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
29764
29765 1998-10-18  Jim Meyering  <meyering@ascend.com>
29766
29767         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
29768
29769 1998-10-17  Jim Meyering  <meyering@ascend.com>
29770
29771         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
29772         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
29773         calls for those previously hard-coded headers.  Instead, take a new
29774         parameter.
29775         (jm_CHECK_DECLARATIONS): Reflect interface change.
29776         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
29777         (jm_CHECK_DECL_LOCALTIME_R): New macro.
29778
29779         * m4/mktime.m4: Test for spring-forward gap before long-running test.
29780
29781 1998-10-14  Jim Meyering  <meyering@ascend.com>
29782
29783         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
29784         instead of "TZ=America/Vancouver".  From Paul Eggert.
29785
29786 1998-10-11  Jim Meyering  <meyering@ascend.com>
29787
29788         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
29789         This adds a test for a recently added compatibility fix for mktime.c.
29790         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
29791
29792 1998-09-27  Jim Meyering  <meyering@ascend.com>
29793
29794         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
29795
29796         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
29797         ../configure.in, including a change from Gordon Matzigkeit to allow
29798         cross-compiling for the Hurd.
29799
29800         * m4/glibc.m4: New file/macro to test for the GNU C Library
29801         versions 1 and 2.  From Gordon Matzigkeit.
29802         Indent.
29803
29804 1998-09-21  Jim Meyering  <meyering@ascend.com>
29805
29806         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
29807
29808 1998-08-18  Paul Eggert  <eggert@twinsun.com>
29809
29810         Port nanosecond-resolution times to UnixWare 2.1.2 and
29811         pedantic Solaris 2.6.
29812
29813         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
29814         AC_STRUCT_ST_MTIM.
29815         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
29816         Generate name of ns member, instead of just 1 or undef.
29817         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
29818
29819 1998-08-15  Jim Meyering  <meyering@ascend.com>
29820
29821         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
29822         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
29823         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
29824         instead of jm_TYPE_SSIZE_T.
29825
29826 1998-08-12  Jim Meyering  <meyering@ascend.com>
29827
29828         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
29829
29830 1998-08-02  Jim Meyering  <meyering@ascend.com>
29831
29832         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
29833         in acconfig.h manually.
29834
29835 1998-07-31  Paul Eggert  <eggert@twinsun.com>
29836
29837         * m4/st_mtim.m4: New file.
29838
29839 1998-07-28  Jim Meyering  <meyering@ascend.com>
29840
29841         * m4/utimes.m4: Undef stat.
29842
29843 1998-07-25  Jim Meyering  <meyering@ascend.com>
29844
29845         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
29846         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
29847
29848 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
29849
29850         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
29851         uid and gid actually remain unchanged.
29852
29853 1998-07-07  Jim Meyering  <meyering@ascend.com>
29854
29855         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
29856
29857 1998-07-04  Jim Meyering  <meyering@ascend.com>
29858
29859         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
29860         to prove that this macro can be used in packages without regex.c.
29861
29862 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
29863
29864         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
29865         is to be used.
29866
29867 1998-07-03  Jim Meyering  <meyering@ascend.com>
29868
29869         * m4/gettext.m4: Add -lintl if it's found to be necessary.
29870
29871         * m4/gettext.m4: New file -- from gettext-0.10.35.
29872         * m4/lcmessage.m4: Likewise.
29873         * m4/progtest.m4: Likewise.
29874
29875         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
29876         * m4/jm-macros.m4: Require the new macro.
29877
29878 1998-06-29  Jim Meyering  <meyering@ascend.com>
29879
29880         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
29881         for the definition of NGROUPS (used in a system header included
29882         by sys/mount.h).
29883
29884 1998-06-28  Jim Meyering  <meyering@ascend.com>
29885
29886         * m4/ls-mntd-fs.m4: New file.
29887         * m4/fstypename.m4: New file.
29888
29889         * m4/jm-macros.m4: Require the new macro.
29890         * m4/jm-glibc-io.m4: New file.
29891
29892 1998-05-19  Jim Meyering  <meyering@ascend.com>
29893
29894         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
29895         * m4/lchown.m4: New file.
29896
29897         * m4/Makefile.am.in: New file.
29898         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
29899
29900 1998-05-14  Jim Meyering  <meyering@ascend.com>
29901
29902         * m4/Makefile.am (EXTRA_DIST): Add them.
29903         * m4/jm-macros.m4: New file.
29904         * m4/utimbuf.m4: New file.
29905
29906 1998-05-12  Jim Meyering  <meyering@ascend.com>
29907
29908         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
29909
29910 1998-05-11  Jim Meyering  <meyering@ascend.com>
29911
29912         * m4/isc-posix.m4: New file.
29913
29914 1998-05-10  Jim Meyering  <meyering@ascend.com>