Add doc chapter about the POSIX header files.
[gnulib.git] / ChangeLog
1 2007-04-27  Bruno Haible  <bruno@clisp.org>
2
3         * doc/headers/*.texi: New files.
4         * doc/gnulib.texi (Header File Substitutes): New chapter.
5         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
6         dependencies.
7         (standards.info ,standards.html, standards.dvi): Update dependencies.
8         (mostlyclean, clean): New targets.
9
10 2007-04-27  Bruno Haible  <bruno@clisp.org>
11
12         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
13         * modules/sysexits (Files, Makefile.am): Update.
14
15         * lib/sys_socket_.h: Renamed from lib/socket_.h.
16         * modules/sys_socket (Files, Makefile.am): Update.
17
18         * lib/sys_stat_.h: Renamed from lib/stat_.h.
19         * modules/sys_stat (Files, Makefile.am): Update.
20
21 2007-04-27  Eric Blake  <ebb9@byu.net>
22
23         * lib/freading.h: Improve comments.
24         * lib/fwriting.h: Likewise.
25         * lib/fflush.c: Likewise.
26
27         Fix closein for mingw.
28         * modules/closein-tests: Add tests for closein.
29         * tests/test-closein.c: New file.
30         * tests/test-closein.sh: Likewise.
31         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
32         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
33
34 2007-04-27  Bruno Haible  <bruno@clisp.org>
35
36         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
37         version is < 6.
38         * lib/math_.h [__DECC]: Likewise.
39         * lib/stdio_.h [__DECC]: Likewise.
40         * lib/stdlib_.h [__DECC]: Likewise.
41         * lib/string_.h [__DECC]: Likewise.
42         * lib/time_.h [__DECC]: Likewise.
43         * lib/wchar_.h [__DECC]: Likewise.
44         * lib/wctype_.h [__DECC]: Likewise.
45
46 2007-04-27  Bruno Haible  <bruno@clisp.org>
47
48         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
49
50 2007-04-27  Bruno Haible  <bruno@clisp.org>
51
52         * lib/fflush.c: Add comments.
53         * modules/fpurge-tests (Depends-on): Add fflush.
54         * modules/freadable-tests (Depends-on): Likewise.
55         * modules/fwritable-tests (Depends-on): Likewise.
56
57 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
58
59         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
60         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
61         Report by Bruno Haible <bruno@clisp.org>.
62
63 2007-04-26  Eric Blake  <ebb9@byu.net>
64
65         Fix fflush on mingw.
66         * modules/fflush (Depends-on): Add freading.
67         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
68         but unread data.
69
70 2007-04-26  Eric Blake  <ebb9@byu.net>
71         and Bruno Haible  <bruno@clisp.org>
72
73         Implement freading and fwriting.
74         * lib/freading.c: New file.
75         * lib/freading.h: Likewise.
76         * m4/freading.m4: Likewise.
77         * modules/freading: Likewise.
78         * modules/freading-tests: Likewise.
79         * tests/test-freading.c: Likewise.
80         * lib/fwriting.c: New file.
81         * lib/fwriting.h: Likewise.
82         * m4/fwriting.m4: Likewise.
83         * modules/fwriting: Likewise.
84         * modules/fwriting-tests: Likewise.
85         * tests/test-fwriting.c: Likewise.
86         * MODULES.html.sh (File stream based Input/Output): Mention them.
87
88 2007-04-26  Bruno Haible  <bruno@clisp.org>
89
90         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
91         'long' when we assume it.
92         Suggested by Eric Blake.
93
94 2007-04-26  Bruno Haible  <bruno@clisp.org>
95
96         Ensure fseeko, ftello are declared on glibc systems.
97         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
98         * modules/fseeko (configure.ac-early): Likewise.
99         * modules/ftello (configure.ac-early): Likewise.
100         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
101         AC_FUNC_FSEEKO for this.
102         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
103         (gl_CHECK_FSEEKO): Remove macro.
104
105 2007-04-26  Bruno Haible  <bruno@clisp.org>
106
107         * tests/test-fflush.c (main): Also check the ftell result after
108         fflush and fseek/fseeko.
109         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
110         file descriptor position cache in the stream.
111         * lib/fseeko.c (rpl_fseeko): Likewise.
112
113 2007-04-26  Bruno Haible  <bruno@clisp.org>
114
115         * modules/fflush-tests (Depends-on): Add fseeko.
116
117 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
118             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
119
120         * lib/argz_.h: ensure error_t definition is obtained in same
121         mechanism system argz.h would have.
122         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
123         argz facilities are known bad.  Err on the side of caution if
124         cross-compiling.
125
126 2007-04-25  Eric Blake  <ebb9@byu.net>
127
128         * lib/fpurge.c (includes): Use stdlib.h for free.
129         * tests/test-fflush.c (main): Also test fflush-fseeko.
130
131 2007-04-25  Bruno Haible  <bruno@clisp.org>
132
133         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
134         * lib/fseeko.c: New file.
135         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
136         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
137         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
138         gl_FUNC_FSEEKO.
139         (gl_FUNC_FSEEKO): Invoke it.
140         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
141         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
142         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
143
144 2007-04-25  Bruno Haible  <bruno@clisp.org>
145
146         * modules/fflush (Depends-on): Add ftello.
147
148 2007-04-25  Bruno Haible  <bruno@clisp.org>
149
150         * modules/ftello-tests: New file.
151         * tests/test-ftello.c: New file.
152
153         * modules/ftello: New file.
154         * m4/ftello.m4: New file.
155         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
156         HAVE_FTELLO.
157         * lib/stdio_.h (ftello): New declaration.
158         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
159         HAVE_FTELLO.
160
161 2007-04-25  Bruno Haible  <bruno@clisp.org>
162
163         * modules/fseeko-tests: New file.
164         * tests/test-fseeko.c: New file.
165
166         * modules/fseeko: New file.
167         * m4/fseeko.m4: New file.
168         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
169         HAVE_FSEEKO.
170         * lib/stdio_.h (fseeko): New declaration.
171         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
172         HAVE_FSEEKO.
173
174 2007-04-25  Bruno Haible  <bruno@clisp.org>
175
176         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
177
178 2007-04-25  Bruno Haible  <bruno@clisp.org>
179
180         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
181         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
182         * tests/test-unistd.c: Likewise.
183         * tests/test-fcntl.c: Likewise.
184
185 2007-04-23  Eric Blake  <ebb9@byu.net>
186
187         * lib/fflush.c: Fix missing include.
188         Reported by Bruno Haible.
189
190 2007-04-23  Bruno Haible  <bruno@clisp.org>
191
192         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
193         Reported by Eric Blake.
194
195 2007-04-23  Bruno Haible  <bruno@clisp.org>
196
197         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
198
199 2007-04-23  Bruno Haible  <bruno@clisp.org>
200
201         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
202
203 2007-04-23  Bruno Haible  <bruno@clisp.org>
204
205         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
206         Needed on HP-UX 11.
207
208 2007-04-16  Eric Blake  <ebb9@byu.net>
209
210         Make fflush rely on fpurge.
211         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
212         open coding all variants.
213         * modules/fflush (Depends-on): Add fpurge and unistd.
214         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
215         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
216
217         Fix --with-tests compilation on cygwin.
218         * modules/argmatch-tests (Makefile.am): List gnulib library first
219         in LDADD.
220         * modules/argp-tests (Makefile.am): Likewise.
221         * modules/array-list-tests (Makefile.am): Likewise.
222         * modules/array-oset-tests (Makefile.am): Likewise.
223         * modules/avltree-list-tests (Makefile.am): Likewise.
224         * modules/avltree-oset-tests (Makefile.am): Likewise.
225         * modules/avltreehash-list-tests (Makefile.am): Likewise.
226         * modules/carray-list-tests (Makefile.am): Likewise.
227         * modules/dirname-tests (Makefile.am): Likewise.
228         * modules/frexp-tests (Makefile.am): Likewise.
229         * modules/isnanl-tests (Makefile.am): Likewise.
230         * modules/linked-list-tests (Makefile.am): Likewise.
231         * modules/linkedhash-list-tests (Makefile.am): Likewise.
232         * modules/lock-tests (Makefile.am): Likewise.
233         * modules/rbtree-list-tests (Makefile.am): Likewise.
234         * modules/rbtree-oset-tests (Makefile.am): Likewise.
235         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
236         * modules/tls-tests (Makefile.am): Likewise.
237         * modules/tsearch-tests (Makefile.am): Likewise.
238         * modules/xvasprintf-tests (Makefile.am): Likewise.
239
240         Fix fpurge for cygwin.
241         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
242         value.
243         * modules/fpurge-tests (Depends-on): Clean up trash.
244
245 2007-04-16  Simon Josefsson  <simon@josefsson.org>
246
247         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
248
249         * m4/autobuild.m4: Re-indent.
250
251 2007-04-13  Bruno Haible  <bruno@clisp.org>
252
253         * modules/fpurge-tests: New file.
254         * tests/test-fpurge.c: New file.
255
256         * modules/fpurge: New file.
257         * lib/fpurge.h: New file.
258         * lib/fpurge.c: New file.
259         * m4/fpurge.m4: New file.
260
261 2007-04-13  Bruno Haible  <bruno@clisp.org>
262
263         * modules/fbufmode-tests: New file.
264         * tests/test-fbufmode.c: New file.
265
266         * modules/fbufmode: New file.
267         * lib/fbufmode.h: New file.
268         * lib/fbufmode.c: New file.
269         * m4/fbufmode.m4: New file.
270
271 2007-04-13  Bruno Haible  <bruno@clisp.org>
272
273         * modules/fwritable-tests: New file.
274         * tests/test-fwritable.c: New file.
275
276         * modules/fwritable: New file.
277         * lib/fwritable.h: New file.
278         * lib/fwritable.c: New file.
279         * m4/fwritable.m4: New file.
280
281 2007-04-13  Bruno Haible  <bruno@clisp.org>
282
283         * modules/freadable-tests: New file.
284         * tests/test-freadable.c: New file.
285
286         * modules/freadable: New file.
287         * lib/freadable.h: New file.
288         * lib/freadable.c: New file.
289         * m4/freadable.m4: New file.
290
291 2007-04-13  Bruno Haible  <bruno@clisp.org>
292
293         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
294         MOSTLYCLEANFILES.
295
296 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
297
298         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
299         gzip bootstrap.conf to avoid dragging in i18n machinery.
300         (gnulib_tool_option): Use it.
301
302 2007-04-13  Bruno Haible  <bruno@clisp.org>
303
304         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
305         %F directives.
306         * tests/test-vasprintf-posix.c (test_function): Likewise.
307         * tests/test-snprintf-posix.h (test_function): Likewise.
308         * tests/test-sprintf-posix.h (test_function): Likewise.
309         * tests/test-fprintf-posix.h (test_function): Likewise.
310         * tests/test-printf-posix.h (test_function): Likewise.
311         * tests/test-fprintf-posix.out: Likewise.
312
313 2007-04-13  Bruno Haible  <bruno@clisp.org>
314
315         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
316         * modules/tls-tests (configure.ac): Likewise.
317         Reported by Arto C. Nirkko <anirkko@insel.ch>.
318
319 2007-04-13  Bruno Haible  <bruno@clisp.org>
320
321         * lib/tls.c (glthread_tls_get): Fix return type.
322         Patch by Arto C. Nirkko <anirkko@insel.ch>.
323
324 2007-04-12  Eric Blake  <ebb9@byu.net>
325
326         * modules/gettime (Depends-on): Remove gettime.
327         Reported by Dmitry V. Levin.
328
329 2007-04-12  Bruno Haible  <bruno@clisp.org>
330
331         * modules/fflush (Include): Mention <stdio.h>.
332         * modules/strtoimax (Include): Mention <inttypes.h>.
333         * modules/strtoumax (Include): Likewise.
334
335 2007-04-12  Eric Blake  <ebb9@byu.net>
336
337         * .cvsignore: New file.
338         * .gitignore: Likewise.
339
340 2007-04-12  Bruno Haible  <bruno@clisp.org>
341
342         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
343         not before, since $(LDADD) often contains libgnu.a.
344         * modules/striconv-tests (test_striconv_LDADD): Likewise.
345         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
346         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
347         Needed on Cygwin.
348
349 2007-04-12  Eric Blake  <ebb9@byu.net>
350
351         Work around glibc's failure to flush stdin on fclose.
352         * lib/closein.c (close_stdin): Flush stdin before closing.
353
354         Work around glibc's failure to reset seekable stdin on exit.
355         * modules/closein: New module.
356         * lib/closein.c: New file.
357         * lib/closein.h: Likewise.
358         * m4/closein.m4: Likewise.
359         * MODULES.html.sh (File stream based Input/Output): Document it.
360
361 2007-04-12  Simon Josefsson  <simon@josefsson.org>
362
363         * gnulib-tool: Rename generated 'autobuild' script to
364         'do-autobuild' in --create-megatestdir output.
365
366         * doc/gnulib.texi (Build robot for gnulib): Fix.
367
368 2007-04-12  Simon Josefsson  <simon@josefsson.org>
369
370         * modules/sysexits (Depends-on): Add absolute-header.
371
372 2007-04-12  Eric Blake  <ebb9@byu.net>
373
374         No need to preserve errno on success.
375         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
376         Reported by Bruno Haible.
377
378 2007-04-12  Simon Josefsson  <simon@josefsson.org>
379
380         * MODULES.html.sh (Support for maintaining and releasing
381         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
382
383 2007-04-12  Simon Josefsson  <simon@josefsson.org>
384
385         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
386
387 2007-04-12  Simon Josefsson  <simon@josefsson.org>
388
389         * modules/autobuild: New module.
390
391         * m4/autobuild.m4: New file.
392
393 2007-04-11  Bruno Haible  <bruno@clisp.org>
394
395         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
396         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
397         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
398         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
399         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
400         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
401         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
402         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
403         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
404         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
405         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
406         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
407         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
408         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
409         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
410         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
411         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
412         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
413         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
414         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
415         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
416         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
417         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
418         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
419         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
420         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
421         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
422         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
423         Reported by Eric Blake.
424
425 2007-04-11  Bruno Haible  <bruno@clisp.org>
426
427         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
428
429 2007-04-10  Bruno Haible  <bruno@clisp.org>
430
431         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
432         for NaN and Infinity. Needed on FreeBSD 6.1.
433         * tests/test-vasnprintf-posix.c (test_function): Undo last change
434         regarding results for "%010a" of Infinity and NaN.
435         * tests/test-vasprintf-posix.c (test_function): Likewise.
436         * tests/test-snprintf-posix.h (test_function): Likewise.
437         * tests/test-sprintf-posix.h (test_function): Likewise.
438         * tests/test-fprintf-posix.h (test_function): Likewise.
439         * tests/test-printf-posix.h (test_function): Likewise.
440         * tests/test-fprintf-posix.out: Likewise.
441
442 2007-04-10  Bruno Haible  <bruno@clisp.org>
443
444         * modules/locale-tests: New file.
445         * tests/test-locale.c: New file.
446
447         * modules/locale: New file.
448         * lib/locale_.h: New file.
449         * m4/locale_h.m4: New file.
450
451 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
452             Bruno Haible  <bruno@clisp.org>
453
454         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
455         be determined, test for availability of the copysignf, copysign,
456         copysignl functions.
457         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
458         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
459         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
460
461 2007-04-09  Eric Blake  <ebb9@byu.net>
462
463         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
464         * modules/stdio (Makefile.am): Support fflush.
465         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
466         * modules/fflush: New file.
467         * lib/fflush.c: Likewise.
468         * m4/fflush.m4: Likewise.
469         * modules/fflush-tests: New test.
470         * tests/test-fflush.c: Likewise.
471         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
472
473 2007-04-06  Bruno Haible  <bruno@clisp.org>
474
475         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
476         (VASNPRINTF): Use signbit for faster determination whether to print a
477         minus sign.
478         * modules/vasnprintf (Files): Remove lib/float+.h.
479         * modules/fprintf-posix (Depends-on): Add signbit.
480         * modules/snprintf-posix (Depends-on): Likewise.
481         * modules/sprintf-posix (Depends-on): Likewise.
482         * modules/vasnprintf-posix (Depends-on): Likewise.
483         * modules/vasprintf-posix (Depends-on): Likewise.
484         * modules/vfprintf-posix (Depends-on): Likewise.
485         * modules/vsnprintf-posix (Depends-on): Likewise.
486         * modules/vsprintf-posix (Depends-on): Likewise.
487
488 2007-04-06  Bruno Haible  <bruno@clisp.org>
489
490         * tests/test-frexp.c (main): Test also the sign bit of zero results.
491         * tests/test-frexpl.c (main): Likewise.
492         * tests/test-ldexpl.c (main): Likewise.
493         * modules/frexp-tests (Depends-on): Add signbit.
494         * modules/frexpl-tests (Depdends-on): Likewise.
495         * modules/ldexpl-tests (Depdends-on): Likewise.
496
497 2007-04-06  Bruno Haible  <bruno@clisp.org>
498
499         * modules/signbit-tests: New file.
500         * tests/test-signbit.c: New file.
501
502         * modules/signbit: New file.
503         * lib/signbitf.c: New file.
504         * lib/signbitd.c: New file.
505         * lib/signbitl.c: New file.
506         * m4/signbit.m4: New file.
507         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
508         (signbit): New macro.
509         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
510         REPLACE_SIGNBIT.
511         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
512         REPLACE_FREXPL into math.h.
513
514 2007-04-06  Bruno Haible  <bruno@clisp.org>
515
516         * modules/isnanf-nolibm-tests: New file.
517         * tests/test-isnanf.c: New file.
518
519         * modules/isnanf-nolibm: New file.
520         * lib/isnanf.h: New file.
521         * lib/isnanf.c: New file.
522         * lib/isnan.c: Consider the USE_FLOAT macro.
523         * m4/isnanf.m4: New file.
524
525 2007-04-06  Bruno Haible  <bruno@clisp.org>
526
527         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
528         (Link): New section.
529
530         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
531
532 2007-04-06  Bruno Haible  <bruno@clisp.org>
533
534         Assume the 'long double' type.
535         * m4/longdouble.m4: Remove file.
536         * config/srclist.txt: Don't mention longdouble.m4.
537         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
538         * lib/float+.h: Likewise.
539         * lib/frexp.c: Likewise.
540         * lib/printf-args.h: Likewise.
541         * lib/printf-args.c: Likewise.
542         * lib/printf-frexp.c: Likewise.
543         * lib/printf-parse.c: Likewise.
544         * lib/vasnprintf.c: Likewise.
545         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
546         * m4/intl.m4: Likewise.
547         * m4/isnanl.m4: Likewise.
548         * m4/printf.m4: Likewise.
549         * m4/printf-frexpl.m4: Likewise.
550         * m4/vasnprintf.m4: Likewise.
551         * modules/allocsa (Files): Remove m4/longdouble.m4.
552         * modules/gettext (Files): Likewise.
553         * modules/relocatable-prog-wrapper (Files): Likewise.
554         * modules/vasnprintf (Files): Likewise.
555         * modules/isnanl (Files): Likewise.
556         (Include): Simplify.
557         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
558         (Include): Simplify.
559         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
560         (Include): Simplify.
561         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
562         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
563         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
564         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
565         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
566         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
567         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
568         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
569         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
570         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
571         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
572         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
573         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
574         * tests/test-isnanl.c: Likewise.
575         * tests/test-snprintf-posix.h: Likewise.
576         * tests/test-sprintf-posix.h: Likewise.
577         * tests/test-vasnprintf-posix.c: Likewise.
578         * tests/test-vasnprintf-posix2.c: Likewise.
579         * tests/test-vasprintf-posix.c: Likewise.
580
581 2007-04-06  Bruno Haible  <bruno@clisp.org>
582
583         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
584         * lib/math_.h [__DECC]: Include the overridden include file through
585         #include_next, outside the double-inclusion guard.
586         * lib/stdio_.h [__DECC]: Likewise.
587         * lib/stdlib_.h [__DECC]: Likewise.
588         * lib/string_.h [__DECC]: Likewise.
589         * lib/time_.h [__DECC]: Likewise.
590         * lib/wchar_.h [__DECC]: Likewise.
591         * lib/wctype_.h [__DECC]: Likewise.
592         * lib/inttypes_.h [__DECC]: Likewise.
593         Reported by Albert Chin <china@thewrittenword.com> in
594         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
595
596 2007-04-04  Eric Blake  <ebb9@byu.net>
597
598         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
599         1.5.x.
600
601 2007-04-04  Bruno Haible  <bruno@clisp.org>
602
603         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
604         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
605
606 2007-04-04  Bruno Haible  <bruno@clisp.org>
607
608         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
609         results for "%010a" of Infinity and NaN.
610         * tests/test-vasprintf-posix.c (test_function): Likewise.
611         * tests/test-snprintf-posix.h (test_function): Likewise.
612         * tests/test-sprintf-posix.h (test_function): Likewise.
613         * tests/test-fprintf-posix.h (test_function): Remove these tests.
614         * tests/test-printf-posix.h (test_function): Likewise.
615         * tests/test-fprintf-posix.out: Update.
616         Needed for FreeBSD 6.1.
617
618 2007-04-04  Bruno Haible  <bruno@clisp.org>
619
620         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
621         directly used by the gnulib modules nor by gnulib-tool.
622
623 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
624
625         * DEPENDENCIES: Give overall description of version dependency
626         desirability.  Use more-typical names for apps.
627         Add shell, coreutils, diffutils, grep, tar, gzip.
628
629 2007-04-04  Simon Josefsson  <simon@josefsson.org>
630
631         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
632
633 2007-04-04  Karl Berry  <karl@gnu.org>
634
635         * MODULES.html.sh (func_module): missing '.
636
637 2007-04-03  Bruno Haible  <bruno@clisp.org>
638
639         * modules/argmatch-tests (Makefile.am): New variable
640         test_argmatch_LDADD.
641         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
642         * modules/array-list-tests (Makefile.am): New variable
643         test_array_list_LDADD.
644         * modules/array-oset-tests (Makefile.am): New variable
645         test_array_oset_LDADD.
646         * modules/avltree-list-tests (Makefile.am): New variable
647         test_avltree_list_LDADD.
648         * modules/avltree-oset-tests (Makefile.am): New variable
649         test_avltree_oset_LDADD.
650         * modules/avltreehash-list-tests (Makefile.am): New variable
651         test_avltreehash_list_LDADD.
652         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
653         test_canonicalize_lgpl_LDADD.
654         * modules/carray-list-tests (Makefile.am): New variable
655         test_carray_list_LDADD.
656         * modules/dirname-tests (Makefile.am): New variable
657         test_dirname_LDADD.
658         * modules/linked-list-tests (Makefile.am): New variable
659         test_linked_list_LDADD.
660         * modules/linkedhash-list-tests (Makefile.am): New variable
661         test_linkedhash_list_LDADD.
662         * modules/rbtree-list-tests (Makefile.am): New variable
663         test_rbtree_list_LDADD.
664         * modules/rbtree-oset-tests (Makefile.am): New variable
665         test_rbtree_oset_LDADD.
666         * modules/rbtreehash-list-tests (Makefile.am): New variable
667         test_rbtreehash_list_LDADD.
668         * modules/xvasprintf-tests (Makefile.am): New variable
669         test_xvasprintf_LDADD.
670         Reported by Eric Blake.
671
672 2007-04-03  Eric Blake  <ebb9@byu.net>
673
674         * DEPENDENCIES: Weaken m4 requirements.
675
676 2007-04-03  Bruno Haible  <bruno@clisp.org>
677
678         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
679         * modules/isnanl-tests (configure.ac): Likewise.
680
681 2007-04-03  Ben Pfaff  <blp@gnu.org>
682
683         * modules/iconv_open: Add $(srcdir)/ to source directory
684         references in Makefile fragments that call gperf, to fix VPATH
685         builds.
686
687 2007-04-03  Bruno Haible  <bruno@clisp.org>
688
689         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
690         * lib/ldexpl.c: Undo last change.
691
692 2007-04-03  Bruno Haible  <bruno@clisp.org>
693
694         * modules/printf-frexpl (Depends-on): Undo last change.
695         (Files): Add m4/ldexpl.m4.
696
697 2007-04-03  Bruno Haible  <bruno@clisp.org>
698
699         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
700         * modules/isnanl (Link): New section.
701
702         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
703         * modules/frexp (Link): New section.
704
705         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
706         * modules/frexpl (Link): New section.
707
708         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
709         * modules/ldexpl (Link): New section.
710
711 2007-04-03  Bruno Haible  <bruno@clisp.org>
712
713         * modules/TEMPLATE-EXTENDED: New file.
714         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
715
716 2007-04-03  Bruno Haible  <bruno@clisp.org>
717
718         * DEPENDENCIES: New file.
719         Suggested by Simon Josefsson.
720
721 2007-04-03  Bruno Haible  <bruno@clisp.org>
722
723         * doc/gnulib.texi: Escape @.
724
725 2007-04-03  James Youngman  <jay@gnu.org>
726         and Paul Eggert  <eggert@cs.ucla.edu>
727
728         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
729         birthtime on all systems that have birthtime, not just those which
730         use st_birthtimensec rather than st_birthtim.  Putting zero in
731         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
732         that the birth time is not available for files on an NFS mount.
733
734 2007-04-03  Simon Josefsson  <simon@josefsson.org>
735
736         * modules/memxor: Move back from crypto/, suggested by Bruno.
737         * modules/crypto/hmac-sha1: Fix memxor dependency.
738
739         * modules/crypto/gc: Moved from ../.
740
741 2007-04-02  Eric Blake  <ebb9@byu.net>
742
743         * lib/ldexpl.c (includes): Avoid libm.
744
745         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
746
747 2007-04-02  Bruno Haible  <bruno@clisp.org>
748
749         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
750         on IRIX.
751
752 2007-04-02  Bruno Haible  <bruno@clisp.org>
753
754         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
755         x86 or x86_64 platforms running MacOS X.
756         Reported by Ryan Schmidt <@ryandesign.com>.
757
758 2007-04-02  Bruno Haible  <bruno@clisp.org>
759
760         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
761         i386.
762
763 2007-04-01  Simon Josefsson  <simon@josefsson.org>
764
765         * modules/crypto/arcfour: Moved from ../.
766         * modules/crypto/arcfour-tests: Moved from ../.
767         * modules/crypto/arctwo: Moved from ../.
768         * modules/crypto/arctwo-tests: Moved from ../.
769         * modules/crypto/des: Moved from ../.
770         * modules/crypto/des-tests: Moved from ../.
771         * modules/crypto/gc-arcfour: Moved from ../.
772         * modules/crypto/gc-arcfour-tests: Moved from ../.
773         * modules/crypto/gc-arctwo: Moved from ../.
774         * modules/crypto/gc-arctwo-tests: Moved from ../.
775         * modules/crypto/gc-des: Moved from ../.
776         * modules/crypto/gc-des-tests: Moved from ../.
777         * modules/crypto/gc-hmac-md5: Moved from ../.
778         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
779         * modules/crypto/gc-hmac-sha1: Moved from ../.
780         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
781         * modules/crypto/gc-md2: Moved from ../.
782         * modules/crypto/gc-md2-tests: Moved from ../.
783         * modules/crypto/gc-md4: Moved from ../.
784         * modules/crypto/gc-md4-tests: Moved from ../.
785         * modules/crypto/gc-md5: Moved from ../.
786         * modules/crypto/gc-md5-tests: Moved from ../.
787         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
788         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
789         * modules/crypto/gc-random: Moved from ../.
790         * modules/crypto/gc-rijndael: Moved from ../.
791         * modules/crypto/gc-rijndael-tests: Moved from ../.
792         * modules/crypto/gc-sha1: Moved from ../.
793         * modules/crypto/gc-sha1-tests: Moved from ../.
794         * modules/crypto/gc-tests: Moved from ../.
795         * modules/crypto/hmac-md5: Moved from ../.
796         * modules/crypto/hmac-md5-tests: Moved from ../.
797         * modules/crypto/hmac-sha1: Moved from ../.
798         * modules/crypto/hmac-sha1-tests: Moved from ../.
799         * modules/crypto/md2: Moved from ../.
800         * modules/crypto/md2-tests: Moved from ../.
801         * modules/crypto/md4: Moved from ../.
802         * modules/crypto/md4-tests: Moved from ../.
803         * modules/crypto/md5: Moved from ../.
804         * modules/crypto/md5-tests: Moved from ../.
805         * modules/crypto/memxor: Moved from ../.
806         * modules/crypto/rijndael: Moved from ../.
807         * modules/crypto/rijndael-tests: Moved from ../.
808         * modules/crypto/sha1: Moved from ../.
809
810 2007-03-30  James Youngman  <jay@gnu.org>
811
812         * tests/test-stat-time.c (prepare_test): use chmod() rather than
813         rename() to change the ctime of a file (because ctime is unaffected
814         by rename on jfs2 on AIX 5.1).
815         (main): Start by doing cleanup, in case a previous run failed leaving
816         test files behind.
817
818 2007-03-31  Bruno Haible  <bruno@clisp.org>
819
820         Support old proprietary implementations of iconv.
821         * modules/iconv_open: New file.
822         * lib/iconv_.h: New file.
823         * m4/iconv_h.m4: New file.
824         * lib/iconv_open.c: New file.
825         * lib/iconv_open-aix.gperf: New file.
826         * lib/iconv_open-hpux.gperf: New file.
827         * lib/iconv_open-irix.gperf: New file.
828         * lib/iconv_open-osf.gperf: New file.
829         * m4/iconv_open.m4: New file.
830         * modules/linebreak (Depends-on): Add iconv_open.
831         * modules/striconv (Depends-on): Likewise.
832         * modules/striconveh (Depends-on): Likewise.
833         * modules/unicodeio (Depends-on): Likewise.
834         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
835         (iconv_t)(-1).
836         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
837         conversion if cd is (iconv_t)(-1).
838         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
839         is not possible.
840
841 2007-03-31  Bruno Haible  <bruno@clisp.org>
842
843         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
844         work on Solaris either. Protect also second use of "autodetect_jp".
845
846 2007-03-31  Bruno Haible  <bruno@clisp.org>
847
848         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
849         the function is not present.
850
851 2007-03-31  Bruno Haible  <bruno@clisp.org>
852
853         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
854         the function is not present.
855
856 2007-03-31  Bruno Haible  <bruno@clisp.org>
857
858         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
859         a bug in HP-UX iconv_open().
860
861 2007-03-31  Bruno Haible  <bruno@clisp.org>
862
863         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
864         (Mathematics <math.h>): New section, add fpieee.
865         (Input/output <stdio.h>): Add fseterr.
866         (Mathematics <math.h>): New section, add printf-frexp.
867         (Container data structures): Add sublist.
868         (Core language properties): Add fpucw, inline.
869         (Functions for greatest-width integer types <inttypes.h>): Add
870         imaxabs, imaxdiv, inttypes.
871         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
872         isnanl-nolibm, ldexp.
873         (Mathematics <math.h>): New section, add printf-frexpl.
874         (Support for systems lacking POSIX:2001): Add fprintf-posix,
875         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
876         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
877         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
878         (Unicode string functions): Add unistr/u*-mbtoucr.
879         (Java): Add javacomp-script, javaexec-script.
880         (C#): Add csharpcomp-script, csharpexec-script.
881         (Support for building libraries and executables): Add havelib,
882         relocatable-*.
883         (Support for maintaining and releasing projects): Renamed from
884         'Support for maintaining and release projects'. Add announce-gen.
885
886 2007-03-31  Bruno Haible  <bruno@clisp.org>
887
888         * README: Talk primarily about git.
889         (git and CVS): Renamed from CVS.
890         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
891         gnulib is available through git.
892         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
893
894 2007-03-30  Bruno Haible  <bruno@clisp.org>
895
896         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
897         * lib/poll_.h: Likewise.
898         * lib/stat_.h: Likewise.
899         * lib/sys_time_.h: Likewise.
900         * lib/sysexit_.h: Likewise.
901         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
902         * lib/stdbool_.h: Likewise.
903         * lib/byteswap_.h: Add double-inclusion guard.
904
905 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
906
907         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
908
909 2007-03-30  Karl Berry  <karl@gnu.org>
910
911         * config/srclist-update: double space after USA in the license
912         substitution, since that's how it's usually (?) written.
913
914 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
915
916         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
917         reported by Bruno Haible.
918
919 2007-03-29  Bruno Haible  <bruno@clisp.org>
920
921         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
922         a bug in AIX iconv().
923
924 2007-03-29  Bruno Haible  <bruno@clisp.org>
925
926         * modules/ldexpl-tests: New file.
927         * tests/test-ldexpl.c: New file.
928
929 2007-03-29  Bruno Haible  <bruno@clisp.org>
930
931         * lib/ldexpl.c: Include fpucw.h.
932         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
933         multiplication.
934         * modules/ldexpl (Depends-on): Add fpucw.
935
936 2007-03-29  Bruno Haible  <bruno@clisp.org>
937
938         * modules/ldexpl: New file.
939         * m4/ldexpl.m4: New file.
940         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
941         set.
942         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
943         REPLACE_LDEXPL.
944         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
945         REPLACE_LDEXPL.
946         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
947         gl_FUNC_LDEXPL_WORKS.
948         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
949         * modules/mathl (Files): Remove lib/ldexpl.c.
950         (Depends-on): Add ldexpl.
951
952 2007-03-29  Bruno Haible  <bruno@clisp.org>
953
954         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
955
956 2007-03-29  Bruno Haible  <bruno@clisp.org>
957
958         * tests/test-striconveh.c (main): Don't assume that a direct conversion
959         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
960         and possibly also HP-UX.
961         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
962         work on AIX, IRIX, HP-UX, OSF/1.
963         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
964         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
965         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
966         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
967         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
968         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
969
970 2007-03-29  Bruno Haible  <bruno@clisp.org>
971
972         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
973
974 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
975
976         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
977         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
978
979 2007-03-29  Eric Blake  <ebb9@byu.net>
980
981         * lib/acl-internal.h: Remove redundant include.
982         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
983         Cygwin when a file is locked.
984
985 2007-03-29  Bruno Haible  <bruno@clisp.org>
986
987         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
988         file.
989         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
990
991 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
992
993         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
994         try to remove a parent directory if the child couldn't be removed
995         (except for the first rmdir, which could fail because the child
996         doesn't exist).  Problem reported by Jeff Blaine in
997         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
998
999 2007-03-28  Bruno Haible  <bruno@clisp.org>
1000
1001         * lib/striconveh.c (utf8conv_carefully): New function.
1002         (mem_cd_iconveh_internal): Invoke it.
1003
1004 2007-03-28  Bruno Haible  <bruno@clisp.org>
1005
1006         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
1007         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
1008         input.
1009         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
1010         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
1011         unistr/u8-uctomb.
1012
1013 2007-03-28  Bruno Haible  <bruno@clisp.org>
1014
1015         * modules/unistr/u8-mbtoucr: New file.
1016         * lib/unistr/u8-mbtoucr.c: New file.
1017         * modules/unistr/u16-mbtoucr: New file.
1018         * lib/unistr/u16-mbtoucr.c: New file.
1019         * modules/unistr/u16-mbtoucr: New file.
1020         * lib/unistr/u16-mbtoucr.c: New file.
1021         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
1022
1023 2007-03-27  Simon Josefsson  <simon@josefsson.org>
1024             Bruno Haible  <bruno@clisp.org>
1025
1026         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
1027         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
1028         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
1029
1030         * m4/stdio_h.m4: Add stubs for vasprintf too.
1031
1032         * modules/stdio: Support vasprintf in sed command.
1033
1034         * modules/vasprintf: Depend on stdio for prototypes.  Remove
1035         vasprintf.h.  Add stdio module indicator.
1036
1037         * lib/stdio_.h: Declare asprintf and vasprintf, based on
1038         vasprintf.h.
1039
1040         * lib/vasprintf.h: File removed.
1041
1042         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
1043         * lib/vasprintf.c: Ditto.
1044         * lib/xvasprintf.c: Ditto.
1045         * tests/test-vasprintf-posix.c: Ditto.
1046         * tests/test-vasprintf.c: Ditto.
1047
1048 2007-03-27  Bruno Haible  <bruno@clisp.org>
1049
1050         Make vasnprintf multithread-safe.
1051         * lib/vasnprintf.c (decimal_point_char): New function.
1052         (VASNPRINTF): Use it.
1053         Suggested by Simon Josefsson.
1054
1055 2007-03-27  Eric Blake  <ebb9@byu.net>
1056
1057         Support sub-second birthtime on cygwin.
1058         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
1059         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
1060         (get_stat_birthtime): Also work with st_birthtim.
1061
1062 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
1063
1064         * lib/stat-time.h (USE_BIRTHTIME): Remove.
1065         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
1066         (get_stat_birthtime_ns): Do not try to use "spare" fields.
1067         (get_stat_birthtime_ns): Simplify compile-time tests.
1068         (get_stat_birthtime): Change the API to look like
1069         get_stat_mtime etc., except return a negative tv_nsec on error.
1070         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
1071         Don't check for "spare" fields.
1072         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
1073         or for struct stat.st_birthtime, as these tests aren't used.
1074         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
1075
1076 2007-03-27  Bruno Haible  <bruno@clisp.org>
1077
1078         * lib/stat-time.h: Include <sys/stat.h>.
1079
1080 2007-03-27  James Youngman  <jay@gnu.org>
1081
1082         * lib/stat-time.h (get_stat_birthtime): New function for
1083           retrieving st_birthtime as provided by UFS2 (hence *BSD).
1084         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
1085           and its variants.
1086         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
1087         * modules/stat-time-test: New file.
1088         * tests/test-stat-time.c: New test, devised by Bruno Haible.
1089
1090 2007-03-26  Bruno Haible  <bruno@clisp.org>
1091
1092         Better support of signalling NaNs.
1093         * lib/atanl.c: Include isnanl.h.
1094         (atanl): Perform test for NaN at the beginning of the function and
1095         through a call to isnanl.
1096         * lib/cosl.c: Include isnanl.h.
1097         (cosl): Perform test for NaN at the beginning of the function and
1098         through a call to isnanl.
1099         * lib/ldexpl.c: Include isnanl.h.
1100         (ldexpl): Perform test for NaN through a call to isnanl.
1101         * lib/logl.c: Include isnanl.h.
1102         (logl): Perform test for NaN at the beginning of the function and
1103         through a call to isnanl.
1104         * lib/sinl.c: Include isnanl.h.
1105         (sinl): Perform test for NaN at the beginning of the function and
1106         through a call to isnanl.
1107         * lib/sqrtl.c: Include isnanl.h.
1108         (sqrtl): Perform test for NaN at the beginning of the function and
1109         through a call to isnanl.
1110         * lib/tanl.c: Include isnanl.h.
1111         (tanl): Perform test for NaN at the beginning of the function and
1112         through a call to isnanl.
1113         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
1114         * modules/mathl (Depends-on): Add isnanl.
1115
1116 2007-03-26  Eric Blake  <ebb9@byu.net>
1117
1118         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
1119         regression in logic sense of previous patch.
1120
1121 2007-03-26  Bruno Haible  <bruno@clisp.org>
1122
1123         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
1124         unportable shell command "if ! ...".
1125         Reported by Ralf Wildenhues.
1126
1127 2007-03-25  Bruno Haible  <bruno@clisp.org>
1128
1129         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
1130         <sysexits.h> file, and only add EX_CONFIG.
1131         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
1132         absolute file name and whether it is sufficient. Substitute also
1133         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
1134         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
1135         ABSOLUTE_SYSEXITS_H into sysexits.h.
1136
1137 2007-03-25  Bruno Haible  <bruno@clisp.org>
1138
1139         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
1140         hints is NULL.
1141
1142 2007-03-25  Bruno Haible  <bruno@clisp.org>
1143
1144         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
1145         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
1146
1147 2007-03-25  Bruno Haible  <bruno@clisp.org>
1148
1149         * lib/vasnprintf.c: Include langinfo.h.
1150         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
1151         multithread-safe.
1152         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
1153         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
1154         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1155         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1156         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1157         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1158         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1159         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
1160         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1161         Reported by Simon Josefsson.
1162
1163 2007-03-25  Bruno Haible  <bruno@clisp.org>
1164
1165         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
1166         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
1167         * modules/vasnprintf (Depends-on): Add stdint.
1168
1169 2007-03-25  Bruno Haible  <bruno@clisp.org>
1170
1171         * modules/fpieee: New file.
1172         * m4/fpieee.m4: New file.
1173         * modules/isnan-nolibm (Depends-on): Add fpieee.
1174         * modules/isnanl-nolibm (Depends-on): Add fpieee.
1175         * modules/isnanl (Depends-on): Add fpieee.
1176
1177 2007-03-25  Bruno Haible  <bruno@clisp.org>
1178
1179         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
1180
1181 2007-03-25  Bruno Haible  <bruno@clisp.org>
1182
1183         Avoid test failures on IRIX 6.5.
1184         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
1185         (main): Use it.
1186         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
1187         macros.
1188         (main): Use them.
1189
1190 2007-03-25  Bruno Haible  <bruno@clisp.org>
1191
1192         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
1193         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
1194         exists but doesn't work.
1195         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
1196         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
1197         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
1198         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
1199
1200 2007-03-25  Bruno Haible  <bruno@clisp.org>
1201
1202         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
1203         returns inf. Needed on IRIX 6.5.
1204
1205 2007-03-25  Bruno Haible  <bruno@clisp.org>
1206
1207         * tests/test-frexpl.c: Include isnanl-nolibm.h.
1208         (main): Use isnanl instead of x != x idiom.
1209         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
1210
1211         * tests/test-frexp.c: Include isnan.h.
1212         (main): Use isnan instead of x != x idiom.
1213         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
1214
1215 2007-03-25  Bruno Haible  <bruno@clisp.org>
1216
1217         * tests/test-frexp.c (NaN): New function/macro.
1218         (main): Use it instead of 0.0 / 0.0.
1219         * tests/test-isnan.c (NaN): New function/macro.
1220         (main): Use it instead of 0.0 / 0.0.
1221         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
1222         (test_function): Use it instead of 0.0 / 0.0.
1223         * tests/test-vasprintf-posix.c (NaN): New function/macro.
1224         (test_function): Use it instead of 0.0 / 0.0.
1225         * tests/test-snprintf-posix.h (NaN): New function/macro.
1226         (test_function): Use it instead of 0.0 / 0.0.
1227         * tests/test-sprintf-posix.h (NaN): New function/macro.
1228         (test_function): Use it instead of 0.0 / 0.0.
1229         * tests/test-fprintf-posix.h (NaN): New function/macro.
1230         (test_function): Use it instead of 0.0 / 0.0.
1231         * tests/test-printf-posix.h (NaN): New function/macro.
1232         (test_function): Use it instead of 0.0 / 0.0.
1233
1234         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
1235
1236 2007-03-25  Bruno Haible  <bruno@clisp.org>
1237
1238         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
1239
1240 2007-03-25  Bruno Haible  <bruno@clisp.org>
1241
1242         * lib/regexec.c (merge_state_with_log): Make static.
1243
1244 2007-03-25  Bruno Haible  <bruno@clisp.org>
1245
1246         * lib/trigl.c (kernel_rem_pio2): Make static.
1247
1248 2007-03-25  Bruno Haible  <bruno@clisp.org>
1249
1250         * lib/sincosl.c (sincosl_table): Make static.
1251
1252 2007-03-25  Bruno Haible  <bruno@clisp.org>
1253
1254         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
1255         if the compiler does not support C99.
1256
1257 2007-03-25  Bruno Haible  <bruno@clisp.org>
1258
1259         * modules/time (Makefile.am): Ensure all rule action lines start with a
1260         tab.
1261
1262 2007-03-24  Bruno Haible  <bruno@clisp.org>
1263
1264         * modules/tsearch-tests: New file.
1265         * tests/test-tsearch.sh: New file.
1266         * tests/test-tsearch.c: New file, mostly copied from glibc.
1267
1268         * modules/search-tests: New file.
1269         * tests/test-search.c: New file.
1270
1271         * modules/search: New file.
1272         * lib/search_.h: New file, incorporating lib/tsearch.h.
1273         * m4/search_h.m4: New file.
1274         * lib/tsearch.h: Remove file.
1275         * lib/tsearch.c: Include search.h instead of tsearch.h.
1276         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
1277         HAVE_TSEARCH.
1278         * modules/tsearch (Files): Remove lib/tsearch.h.
1279         (Depends-on): Add search.
1280         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
1281         (Include): Change tsearch.h into search.h.
1282
1283 2007-03-24  Bruno Haible  <bruno@clisp.org>
1284
1285         * modules/fpucw: New file.
1286         * lib/fpucw.h: New file.
1287         * lib/frexp.c: Include fpucw.h.
1288         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
1289         (FUNC): Use them.
1290         * lib/printf-frexp.c: Include fpucw.h.
1291         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
1292         (FUNC): Use them.
1293         * lib/vasnprintf.c: Include fpucw.h.
1294         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
1295         'long double' calculations.
1296         * tests/test-frexpl.c: Include fpucw.h.
1297         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
1298         * tests/test-printf-frexpl.c: Include fpucw.h.
1299         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
1300         * modules/frexpl (Depends-on): Add fpucw.
1301         * modules/printf-frexpl (Depends-on): Likewise.
1302         * modules/fprintf-posix (Depends-on): Likewise.
1303         * modules/snprintf-posix (Depends-on): Likewise.
1304         * modules/sprintf-posix (Depends-on): Likewise.
1305         * modules/vasnprintf-posix (Depends-on): Likewise.
1306         * modules/vasprintf-posix (Depends-on): Likewise.
1307         * modules/vfprintf-posix (Depends-on): Likewise.
1308         * modules/vsnprintf-posix (Depends-on): Likewise.
1309         * modules/vsprintf-posix (Depends-on): Likewise.
1310         * modules/frexpl-tests (Depends-on): Likewise.
1311         * modules/printf-frexpl-tests (Depends-on): Likewise.
1312
1313 2007-03-24  Bruno Haible  <bruno@clisp.org>
1314
1315         * lib/float+.h: New file.
1316         * lib/isnan.c: Include float+.h.
1317         (SIZE): New macro.
1318         (FUNC): Compare only SIZE bytes of the value.
1319         * lib/vasnprintf.c: Include float+.h.
1320         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
1321         SIZEOF_LDBL or SIZEOF_DBL bytes.
1322         * modules/isnan-nolibm (Files): Add lib/float+.h.
1323         * modules/isnanl-nolibm (Files): Add lib/float+.h.
1324         * modules/isnanl (Files): Add lib/float+.h.
1325         * modules/vasnprintf (Files): Add lib/float+.h.
1326
1327 2007-03-24  Bruno Haible  <bruno@clisp.org>
1328
1329         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
1330         include isnanl-nolibm.h.
1331
1332 2007-03-24  Bruno Haible  <bruno@clisp.org>
1333
1334         * tests/test-read-file.c (main): Don't produce spurious output for
1335         expected situations. Make the test fail if it encountered unexpected
1336         results.
1337
1338 2007-03-24  Bruno Haible  <bruno@clisp.org>
1339
1340         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
1341         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
1342
1343 2007-03-24  Bruno Haible  <bruno@clisp.org>
1344
1345         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
1346
1347 2007-03-24  Bruno Haible  <bruno@clisp.org>
1348
1349         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
1350         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
1351
1352         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
1353         * modules/utf8-ucs4: Turn into a symbolic link to module
1354         unistr/u8-mbtouc.
1355
1356         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
1357         utf8-ucs4-unsafe.
1358         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
1359         unistr/u8-mbtouc-unsafe.
1360
1361         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
1362         * modules/utf16-ucs4: Turn into a symbolic link to module
1363         unistr/u16-mbtouc.
1364
1365         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
1366         utf16-ucs4-unsafe.
1367         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
1368         unistr/u16-mbtouc-unsafe.
1369
1370         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
1371         * modules/ucs4-utf8: Turn into a symbolic link to module
1372         unistr/u8-ubtomb.
1373
1374         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
1375         * modules/ucs4-utf16: Turn into a symbolic link to module
1376         unistr/u16-ubtomb.
1377
1378 2007-03-24  Bruno Haible  <bruno@clisp.org>
1379
1380         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
1381         Enable the function only if HAVE_INLINE.
1382         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
1383         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
1384         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
1385         Enable the function only if HAVE_INLINE.
1386         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
1387         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
1388         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
1389         Enable the function only if HAVE_INLINE.
1390         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
1391         Enable the function only if HAVE_INLINE.
1392         * modules/utf8-ucs4: Update.
1393         * modules/utf8-ucs4-unsafe: Update.
1394         * modules/utf16-ucs4: Update.
1395         * modules/utf16-ucs4-unsafe: Update.
1396         * modules/ucs4-utf8: Update.
1397         * modules/ucs4-utf16: Update.
1398
1399 2007-03-24  Bruno Haible  <bruno@clisp.org>
1400
1401         * lib/utf8-ucs4.h: Remove file.
1402         * lib/utf8-ucs4-unsafe.h: Remove file.
1403         * lib/utf16-ucs4.h: Remove file.
1404         * lib/utf16-ucs4-unsafe.h: Remove file.
1405         * lib/ucs4-utf8.h: Remove file.
1406         * lib/ucs4-utf16.h: Remove file.
1407         * lib/unistr.h: Include their previous contents.
1408         * m4/utf-ucs4.m4: Remove file.
1409         * m4/ucs4-utf.m4: Remove file.
1410         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
1411         (Depends-on): Add unistr/base.
1412         (configure.ac): Remove gl_UTF_UCS4.
1413         (Makefile.am): Update.
1414         (Include): Change to unistr.h.
1415         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
1416         (Depends-on): Add unistr/base.
1417         (configure.ac): Remove gl_UTF_UCS4.
1418         (Makefile.am): Update.
1419         (Include): Change to unistr.h.
1420         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
1421         (Depends-on): Add unistr/base.
1422         (configure.ac): Remove gl_UTF_UCS4.
1423         (Makefile.am): Update.
1424         (Include): Change to unistr.h.
1425         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
1426         (Depends-on): Add unistr/base.
1427         (configure.ac): Remove gl_UTF_UCS4.
1428         (Makefile.am): Update.
1429         (Include): Change to unistr.h.
1430         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
1431         (Depends-on): Add unistr/base.
1432         (configure.ac): Remove gl_UCS4_UTF.
1433         (Makefile.am): Update.
1434         (Include): Change to unistr.h.
1435         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
1436         (Depends-on): Add unistr/base.
1437         (configure.ac): Remove gl_UCS4_UTF.
1438         (Makefile.am): Update.
1439         (Include): Change to unistr.h.
1440         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
1441         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
1442         utf8-ucs4-unsafe.h.
1443         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
1444         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
1445         utf16-ucs4-unsafe.h.
1446         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
1447         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
1448         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
1449         * lib/unistr/u8-strchr.c: Likewise.
1450         * lib/unistr/u8-strrchr.c: Likewise.
1451         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
1452         * lib/unistr/u16-strchr.c: Likewise.
1453         * lib/unistr/u16-strrchr.c: Likewise.
1454         * lib/striconveh.c: Update.
1455         * lib/linebreak.c: Update.
1456
1457 2007-03-24  Bruno Haible  <bruno@clisp.org>
1458
1459         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
1460         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
1461
1462 2007-03-22  Bruno Haible  <bruno@clisp.org>
1463
1464         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
1465
1466 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
1467
1468         * MODULES.html.sh (File system functions): New module write-any-file.
1469         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
1470         * m4/write-any-file.m4: New files.
1471
1472 2007-03-23  Eric Blake  <ebb9@byu.net>
1473
1474         * gnulib-tool: Rearrange space-tab sequences, since some editors
1475         like to eat them.
1476
1477 2007-03-23  Eric Blake  <ebb9@byu.net>
1478
1479         * lib/version-etc.c (version_etc_va): Update license wording to
1480         be more concise.  Recommended by Richard Stallman.
1481
1482 2007-03-22  Bruno Haible  <bruno@clisp.org>
1483
1484         * lib/poll.c (MSG_PEEK): New fallback definition.
1485
1486 2007-03-22  Bruno Haible  <bruno@clisp.org>
1487
1488         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
1489         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
1490         (main): Update.
1491         Fixes a compilation error on BeOS.
1492
1493 2007-03-22  Bruno Haible  <bruno@clisp.org>
1494
1495         * modules/frexpl-tests: New file.
1496         * tests/test-frexpl.c: New file.
1497
1498         * modules/frexpl: New file.
1499         * m4/frexpl.m4: New file.
1500         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
1501         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
1502         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
1503         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
1504         (Depends-on): Add frexpl. Remove isnanl-nolibm.
1505         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
1506
1507 2007-03-22  Bruno Haible  <bruno@clisp.org>
1508
1509         * lib/frexpl.c: Share code with lib/frexp.c.
1510         * modules/mathl (Files): Add lib/frexp.c.
1511         (Depends-on): Add isnanl-nolibm.
1512
1513 2007-03-22  Bruno Haible  <bruno@clisp.org>
1514
1515         * modules/printf-frexp (Files): Add m4/frexp.m4.
1516         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
1517         only if the found frexp function actually works.
1518
1519 2007-03-22  Bruno Haible  <bruno@clisp.org>
1520
1521         * lib/frexp.c: Remove older implementation that uses divisions.
1522
1523 2007-03-21  Bruno Haible  <bruno@clisp.org>
1524
1525         * modules/frexp-tests: New file.
1526         * tests/test-frexp.c: New file.
1527
1528         * modules/frexp: New file.
1529         * lib/frexp.c: New file.
1530         * m4/frexp.m4: New file.
1531         * lib/math_.h (frexp): New declaration.
1532         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
1533         REPLACE_FREXP.
1534         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
1535
1536 2007-03-21  Bruno Haible  <bruno@clisp.org>
1537
1538         * modules/isnanl-tests: New file.
1539         * tests/test-isnanl.c: New file.
1540
1541         * modules/isnanl: New file.
1542         * lib/isnanl.h: New file.
1543         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
1544         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
1545         gl_FUNC_ISNANL_WORKS.
1546         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
1547         New macros.
1548
1549 2007-03-21  Bruno Haible  <bruno@clisp.org>
1550
1551         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
1552         lib/isnanl.h.
1553         (Include): Update.
1554         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
1555         * lib/vasnprintf.c: Update.
1556         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
1557         tests/test-isnanl.h, remove tests/test-isnanl.c.
1558         (Makefile.am): Update.
1559         * tests/test-isnanl-nolibm.c: New file.
1560         * tests/test-isnanl.h: New file.
1561         * tests/test-isnanl.c: Remove file.
1562
1563 2007-03-21  Jim Meyering  <jim@meyering.net>
1564
1565         When trying to open ".", treat ESTALE like EACCES.
1566         * lib/savewd.c (savewd_save): Resort to forking not just upon
1567         failure with EACCES, but also when errno is ESTALE.
1568
1569 2007-03-20  Bruno Haible  <bruno@clisp.org>
1570
1571         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
1572         Needed on AIX 5.1. Reported by Matthew Woehlke.
1573
1574 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
1575
1576         Suggestions by Bruno Haible:
1577         * lib/acl-internal.h: Include "gettext.h" rather than rolling
1578         our own.
1579         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
1580         * modules/acl (Depends-on): Add gettext.
1581
1582 2007-03-19  Bruno Haible  <bruno@clisp.org>
1583
1584         * modules/iconvme: Remove file.
1585         * lib/iconvme.h: Remove file.
1586         * lib/iconvme.c: Remove file.
1587         * m4/iconvme.m4: Remove file.
1588
1589 2007-03-19  Bruno Haible  <bruno@clisp.org>
1590
1591         * doc/relocatable-maint.texi: Break long shell script line.
1592         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
1593
1594 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
1595
1596         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
1597         handle file_has_acl.
1598         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
1599         * lib/acl.c: Move header inclusions and related macro defns into
1600         lib/acl-internal.h.
1601         (S_ISLNK): Remove defn, since that's now done for us.
1602         (file_has_acl): Move to lib/file-has-acl.c.
1603         Call acl_trivial if available.  This is the crucial part of the fix.
1604         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
1605         shared within the library.  Rewrite a bit, partly to make it compatible
1606         with the GNU coding style.
1607         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
1608         Remove unnecessary double-quotes.
1609         Don't test for acl_to_text; the build will catch that.
1610         Replace acl_entries if it doesn't exist and it is needed.
1611         Check for -lsec and acl_trivial (as used on Solaris 10).
1612         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
1613         lib/file-has-acl.c.
1614         (Depends-on): Add sys_stat, for S_ISLNK.
1615
1616 2007-03-19  Ben Pfaff  <blp@gnu.org>
1617
1618         * doc/gnulib.texi: Fix typos.
1619         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
1620
1621 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
1622
1623         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
1624         If size is zero here, buf must be zero.
1625
1626 2007-03-19  Simon Josefsson  <simon@josefsson.org>
1627
1628         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
1629         <bruno@clisp.org>.
1630
1631 2007-03-18  Bruno Haible  <bruno@clisp.org>
1632
1633         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
1634         Suggested by Eric Blake.
1635
1636 2007-03-18  Ben Pfaff  <blp@gnu.org>
1637
1638         * doc/relocatable.texi: Recommend using as prefix a directory
1639         that does not exist and will never be created.  Based on
1640         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
1641         and others.
1642
1643 2007-03-17  Bruno Haible  <bruno@clisp.org>
1644
1645         * lib/fchownat.c: Include lchown.h.
1646
1647 2007-03-17  Bruno Haible  <bruno@clisp.org>
1648
1649         Fix endless loop when the given allocated size was > INT_MAX.
1650         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
1651         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
1652         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
1653         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
1654         * lib/sprintf.c (sprintf): Likewise.
1655
1656 2007-03-17  Bruno Haible  <bruno@clisp.org>
1657
1658         * tests/test-argp-2.sh (func_compare): Output a context diff.
1659
1660 2007-03-17  Bruno Haible  <bruno@clisp.org>
1661
1662         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
1663         locale's decimal-point character.
1664
1665 2007-03-17  Bruno Haible  <bruno@clisp.org>
1666
1667         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
1668         before comparing it. Needed because on some platforms (e.g. x86) a
1669         'long double' occupies less bytes than sizeof (long double).
1670
1671 2007-03-17  Bruno Haible  <bruno@clisp.org>
1672
1673         * tests/test-crc.c (main): Make printf statements 64-bit clean.
1674         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
1675         * tests/test-getaddrinfo.c (simple): Likewise.
1676         * tests/test-read-file.c (main): Likewise.
1677
1678 2007-03-17  Bruno Haible  <bruno@clisp.org>
1679
1680         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
1681
1682 2007-03-17  Bruno Haible  <bruno@clisp.org>
1683
1684         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
1685         unused variable.
1686
1687 2007-03-17  Bruno Haible  <bruno@clisp.org>
1688
1689         * tests/test-c-strcasecmp.c: Include c-strcase.h.
1690         * tests/test-c-strncasecmp.c: Likewise.
1691
1692 2007-03-17  Bruno Haible  <bruno@clisp.org>
1693
1694         * modules/stdlib (Depends-on): Add unistd.
1695         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
1696         Needed for MacOS X 10.3.
1697
1698 2007-03-17  Bruno Haible  <bruno@clisp.org>
1699
1700         * lib/unistr/u-strdup.h: Include <stdlib.h>.
1701
1702 2007-03-17  Bruno Haible  <bruno@clisp.org>
1703
1704         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
1705
1706 2007-03-17  Bruno Haible  <bruno@clisp.org>
1707
1708         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
1709         to reflect files copied from gnulib (with or without modifications).
1710         Suggested by Jim Meyering.
1711
1712 2007-03-17  Eric Blake  <ebb9@byu.net>
1713
1714         * NEWS: Document stdlib change from 2007-02-18.
1715
1716 2007-03-17  Jim Meyering  <jim@meyering.net>
1717
1718         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
1719         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
1720         someone uses a name containing shell meta-characters.
1721         Reported by Alfred M. Szmidt.
1722
1723         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
1724
1725 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
1726
1727         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
1728         and copy gettext configuration files only if configure.ac contains
1729         a use of AM_GNU_GETTEXT_VERSION.
1730
1731 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
1732
1733         * build-aux/bootstrap (gnulib_name): New variable.
1734         (gnulib_tool_options): Use it.
1735
1736 2007-03-13  Simon Josefsson  <simon@josefsson.org>
1737
1738         * tests/test-des.c: Use new namespace.
1739
1740 2007-03-15  Bruno Haible  <bruno@clisp.org>
1741
1742         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
1743         Reported by James Youngman <jay@gnu.org>.
1744
1745 2007-03-15  Bruno Haible  <bruno@clisp.org>
1746
1747         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
1748         declared prototype. Needed with cc on OSF/1 5.1.
1749
1750 2007-03-15  Bruno Haible  <bruno@clisp.org>
1751
1752         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
1753         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
1754         (struct gl_list_implementation): Add dispose_fn argument to the
1755         'create_empty', 'create' methods.
1756         (struct gl_list_impl_base): Add field 'dispose_fn'.
1757         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
1758         argument.
1759         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
1760         dispose_fn argument.
1761         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
1762         dispose_fn on the dropped values.
1763         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
1764         dispose_fn argument.
1765         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
1766         dropped values.
1767         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
1768         (gl_tree_remove_node): Call dispose_fn on the dropped value.
1769         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
1770         (gl_tree_remove_node): Call dispose_fn on the dropped value.
1771         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
1772         argument.
1773         (gl_tree_list_free): Call dispose_fn on the dropped values.
1774         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
1775         the dropped values.
1776         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
1777         Add dispose_fn argument.
1778         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
1779         Call dispose_fn on the dropped values.
1780         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
1781         Add dispose_fn argument.
1782         (gl_sublist_create): Initialize the 'dispose_fn' field.
1783         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
1784         * tests/test-array_list.c (main): Update.
1785         * tests/test-carray_list.c (main): Update.
1786         * tests/test-avltree_list.c (main): Update.
1787         * tests/test-rbtree_list.c (main): Update.
1788         * tests/test-avltreehash_list.c (main): Update.
1789         * tests/test-rbtreehash_list.c (main): Update.
1790         * tests/test-linked_list.c (main): Update.
1791         * tests/test-linkedhash_list.c (main): Update.
1792         * tests/test-array_oset.c (main): Update.
1793
1794 2007-03-15  Bruno Haible  <bruno@clisp.org>
1795
1796         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
1797         (gl_oset_create_empty): Add dispose_fn argument.
1798         (struct gl_oset_implementation): Add dispose_fn argument to
1799         'create_empty' method.
1800         (struct gl_oset_impl_base): Add dispose_fn field.
1801         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
1802         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
1803         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
1804         values.
1805         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
1806         (gl_tree_oset_free): Call dispose_fn on the dropped values.
1807         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
1808         dropped value.
1809         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
1810         dropped value.
1811         * tests/test-array_oset.c (main): Update.
1812         * tests/test-avltree_oset.c (main): Update.
1813         * tests/test-rbtree_oset.c (main): Update.
1814         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
1815
1816 2007-03-13  Bruno Haible  <bruno@clisp.org>
1817
1818         * tests/test-stdbool.c (i): Update after last patch.
1819
1820 2007-03-12  Bruno Haible  <bruno@clisp.org>
1821
1822         * lib/quotearg.c: Include <wctype.h> early, before the definition of
1823         the iswprint macro. Needed on Solaris 2.5.1.
1824
1825 2007-03-12  Bruno Haible  <bruno@clisp.org>
1826
1827         * tests/test-printf-frexp.c (main): Declare x as volatile.
1828
1829 2007-03-12  Simon Josefsson  <simon@josefsson.org>
1830
1831         * doc/gnulib.texi (Build robot for gnulib): New section.
1832
1833 2007-03-12  Jim Meyering  <jim@meyering.net>
1834
1835         * build-aux/bootstrap: New file.
1836         * build-aux/bootstrap.conf: New file, from coreutils.
1837
1838 2007-03-11  Bruno Haible  <bruno@clisp.org>
1839
1840         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
1841
1842 2007-03-12  Simon Josefsson  <simon@josefsson.org>
1843
1844         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
1845         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
1846         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
1847
1848 2007-03-11  Bruno Haible  <bruno@clisp.org>
1849
1850         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
1851         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
1852
1853 2007-03-11  Bruno Haible  <bruno@clisp.org>
1854
1855         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
1856         formula. Needed for SunPRO C 5.0.
1857
1858 2007-03-11  Bruno Haible  <bruno@clisp.org>
1859
1860         * modules/long-options (Depends-on): Add getopt.
1861
1862 2007-03-11  Bruno Haible  <bruno@clisp.org>
1863
1864         * modules/modechange (Depends-on): Add stdbool.
1865
1866 2007-03-11  Bruno Haible  <bruno@clisp.org>
1867
1868         * modules/i-ring (Depends-on): Add stdbool.
1869
1870 2007-03-11  Bruno Haible  <bruno@clisp.org>
1871
1872         * modules/gc-des (Depends-on): Add stdbool.
1873
1874 2007-03-11  Bruno Haible  <bruno@clisp.org>
1875
1876         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
1877
1878 2007-03-11  Bruno Haible  <bruno@clisp.org>
1879
1880         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
1881
1882 2007-03-11  Bruno Haible  <bruno@clisp.org>
1883
1884         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
1885
1886 2007-03-11  Bruno Haible  <bruno@clisp.org>
1887
1888         * lib/vasnprintf.c (sprintf): Undefine.
1889
1890 2007-03-11  Bruno Haible  <bruno@clisp.org>
1891
1892         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
1893         initializers in SunPRO C and Compaq C compilers.
1894
1895 2007-03-11  Bruno Haible  <bruno@clisp.org>
1896
1897         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
1898         decrementing code ANSI C compliant.
1899
1900 2007-03-11  Bruno Haible  <bruno@clisp.org>
1901
1902         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
1903         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
1904
1905 2007-03-11  Bruno Haible  <bruno@clisp.org>
1906
1907         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
1908         <stdbool.h> substitute doesn't pass.
1909
1910 2007-03-11  Bruno Haible  <bruno@clisp.org>
1911
1912         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
1913
1914 2007-03-11  Bruno Haible  <bruno@clisp.org>
1915
1916         * gnulib-tool (func_create_megatestdir): Create also an autobuild
1917         script, for submission to autobuild.josefsson.org.
1918
1919 2007-03-10  Bruno Haible  <bruno@clisp.org>
1920
1921         * modules/canonicalize-lgpl-tests: New file.
1922         * tests/test-canonicalize-lgpl.sh: New file.
1923         * tests/test-canonicalize-lgpl.c: New file.
1924
1925         * modules/c-strcase-tests: New file.
1926         * tests/test-c-strcase.sh: New file.
1927         * tests/test-c-strcasecmp.c: New file.
1928         * tests/test-c-strncasecmp.c: New file.
1929
1930         * modules/atexit-tests: New file.
1931         * tests/test-atexit.sh: New file.
1932         * tests/test-atexit.c: New file.
1933
1934 2007-03-10  Bruno Haible  <bruno@clisp.org>
1935
1936         * tests/test-binary-io.sh: Use temporary filenames that are not so
1937         likely to clash with those of other tests (in a parallel make).
1938         * tests/test-binary-io.c: Likewise.
1939
1940 2007-03-10  Bruno Haible  <bruno@clisp.org>
1941
1942         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
1943         fallback; use #error instead.
1944         Suggested by Simon Josefsson.
1945
1946 2007-03-10  Bruno Haible  <bruno@clisp.org>
1947
1948         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
1949         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
1950         first and the last.
1951
1952 2007-03-10  Bruno Haible  <bruno@clisp.org>
1953
1954         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
1955
1956 2007-03-10  Bruno Haible  <bruno@clisp.org>
1957
1958         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
1959         "make distcheck".
1960         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
1961         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
1962         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
1963
1964 2007-03-10  Bruno Haible  <bruno@clisp.org>
1965
1966         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
1967         variable.
1968         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
1969         variable.
1970
1971 2007-03-09  Eric Blake  <ebb9@byu.net>
1972         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
1973
1974         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
1975         types are not being provided by gnulib.
1976         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
1977         types are supported.
1978
1979 2007-03-10  Bruno Haible  <bruno@clisp.org>
1980
1981         * lib/stdio_.h (__attribute__): New macro.
1982         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
1983         vsprintf): Specify __attribute__ __format__ for GCC.
1984         Suggested by Eric Blake.
1985
1986 2007-03-09  Bruno Haible  <bruno@clisp.org>
1987
1988         * modules/printf-posix-tests: New file.
1989         * tests/test-printf-posix.sh: New file.
1990         * tests/test-printf-posix.c: New file.
1991
1992         * modules/printf-posix: New file.
1993         * lib/printf.c: New file.
1994         * m4/printf-posix-rpl.m4: New file.
1995         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
1996         REPLACE_PRINTF.
1997         * lib/stdio_.h (printf): New declaration.
1998         (format, __format__, ____printf____, ____scanf____, ____strftime____,
1999         ____strfmon____): New macros.
2000         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
2001         REPLACE_PRINTF.
2002
2003 2007-03-09  Bruno Haible  <bruno@clisp.org>
2004
2005         * tests/test-vasnprintf-posix2.sh: New file.
2006         * tests/test-vasnprintf-posix2.c: New file.
2007         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
2008         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
2009         (Makefile.am): Activate test-vasnprintf-posix2.sh.
2010
2011         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
2012         a locale dependent decimal point, rather than always '.'.
2013
2014 2007-03-09  Eric Blake  <ebb9@byu.net>
2015
2016         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
2017         spite of platforms like Tandem/NSK that define it to -1.
2018
2019 2007-03-08  Bruno Haible  <bruno@clisp.org>
2020
2021         * modules/vprintf-posix-tests: New file.
2022         * tests/test-vprintf-posix.sh: New file.
2023         * tests/test-vprintf-posix.c: New file.
2024         * tests/test-printf-posix.h: New file.
2025
2026         * modules/vprintf-posix: New file.
2027         * lib/vprintf.c: New file.
2028         * m4/vprintf-posix.m4: New file.
2029         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
2030         REPLACE_VPRINTF.
2031         * lib/stdio_.h (vprintf): New declaration.
2032         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
2033         REPLACE_VPRINTF.
2034
2035 2007-03-08  Bruno Haible  <bruno@clisp.org>
2036
2037         * modules/fprintf-posix-tests: New file.
2038         * tests/test-fprintf-posix.sh: New file.
2039         * tests/test-fprintf-posix.c: New file.
2040
2041         * modules/fprintf-posix: New file.
2042         * lib/fprintf.c: New file.
2043         * m4/fprintf-posix.m4: New file.
2044         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
2045         REPLACE_FPRINTF.
2046         * lib/stdio_.h (fprintf): New declaration.
2047         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
2048         REPLACE_FPRINTF.
2049
2050 2007-03-08  Bruno Haible  <bruno@clisp.org>
2051
2052         * modules/vfprintf-posix-tests: New file.
2053         * tests/test-vfprintf-posix.sh: New file.
2054         * tests/test-vfprintf-posix.c: New file.
2055         * tests/test-fprintf-posix.h: New file.
2056         * tests/test-fprintf-posix.out: New file.
2057
2058         * modules/vfprintf-posix: New file.
2059         * lib/vfprintf.c: New file.
2060         * m4/vfprintf-posix.m4: New file.
2061         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
2062         REPLACE_VFPRINTF.
2063         * lib/stdio_.h (vfprintf): New declaration.
2064         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
2065         REPLACE_VFPRINTF.
2066
2067 2007-03-08  Bruno Haible  <bruno@clisp.org>
2068
2069         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
2070
2071 2007-03-08  Bruno Haible  <bruno@clisp.org>
2072
2073         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
2074         instead of 'expr' invocations.
2075         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2076         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2077         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2078         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2079         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2080         Suggested by Paul Eggert.
2081
2082 2007-03-08  Bruno Haible  <bruno@clisp.org>
2083
2084         * modules/fseterr-tests: New file.
2085         * tests/test-fseterr.c: New file.
2086
2087         * modules/fseterr: New file.
2088         * lib/fseterr.h: New file.
2089         * lib/fseterr.c: New file.
2090
2091 2007-03-08  Bruno Haible  <bruno@clisp.org>
2092
2093         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
2094         * lib/getopt_.h: Likewise.
2095         * lib/mbswidth.h: Likewise.
2096         * lib/setenv.h: Likewise.
2097         * lib/vasnprintf.h: Likewise.
2098         * lib/vasprintf.h: Likewise.
2099         * lib/verror.h: Likewise.
2100         * lib/xsetenv.h: Likewise.
2101         * lib/xvasprintf.h: Likewise.
2102
2103 2007-03-08  Jim Meyering  <jim@meyering.net>
2104
2105         * users.txt: Add parted.
2106
2107         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
2108
2109 2007-03-07  Bruno Haible  <bruno@clisp.org>
2110
2111         * m4/printf.m4: Make the shell script snippets copy&pastable.
2112
2113 2007-03-02  Bruno Haible  <bruno@clisp.org>
2114
2115         * lib/netinet_in_.h: New file.
2116         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
2117         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
2118         * modules/netinet_in (Files): Add lib/netinet_in_.h.
2119         (Depends-on): Add absolute-header.
2120         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
2121         into netinet/in.h.
2122
2123 2007-03-03  Bruno Haible  <bruno@clisp.org>
2124
2125         * lib/sys_select_.h: New file.
2126         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
2127         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
2128         * modules/sys_select (Files): Add lib/sys_select_.h.
2129         (Depends-on): Add absolute-header.
2130         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
2131         into sys/select.h.
2132
2133 2007-03-02  Bruno Haible  <bruno@clisp.org>
2134
2135         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
2136         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
2137         values.
2138         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
2139         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
2140         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
2141         * modules/sys_socket (Depends-on): Add absolute-header.
2142         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
2143         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
2144         (Include): Remove requirement of inclusion of <sys/types.h>.
2145
2146 2007-03-02  Bruno Haible  <bruno@clisp.org>
2147
2148         * lib/byteswap_.h (bswap_32): Fix formula.
2149
2150 2007-03-06  Bruno Haible  <bruno@clisp.org>
2151
2152         * modules/sprintf-posix-tests: New file.
2153         * tests/test-sprintf-posix.c: New file.
2154
2155         * modules/sprintf-posix: New file.
2156         * lib/sprintf.c: New file.
2157         * m4/sprintf-posix.m4: New file.
2158         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
2159         REPLACE_SPRINTF.
2160         * lib/stdio_.h (sprintf): New declaration.
2161         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
2162         REPLACE_SPRINTF.
2163
2164 2007-03-06  Bruno Haible  <bruno@clisp.org>
2165
2166         * modules/vsprintf-posix-tests: New file.
2167         * tests/test-vsprintf-posix.c: New file.
2168         * tests/test-sprintf-posix.h: New file.
2169
2170         * modules/vsprintf-posix: New file.
2171         * lib/vsprintf.c: New file.
2172         * m4/vsprintf-posix.m4: New file.
2173         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
2174         REPLACE_VSPRINTF.
2175         * lib/stdio_.h (vsprintf): New declaration.
2176         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
2177         REPLACE_VSPRINTF.
2178
2179 2007-03-06  Bruno Haible  <bruno@clisp.org>
2180
2181         * modules/vsnprintf (Depend-on): Remove minmax.
2182
2183 2007-03-06  Bruno Haible  <bruno@clisp.org>
2184
2185         * modules/snprintf-posix-tests: New file.
2186         * tests/test-snprintf-posix.c: New file.
2187
2188         * modules/snprintf-posix: New file.
2189         * m4/snprintf-posix.m4: New file.
2190         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
2191         gl_FUNC_SNPRINTF.
2192         (gl_FUNC_SNPRINTF): Invoke it.
2193         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
2194         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
2195         is set.
2196         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
2197
2198 2007-03-06  Bruno Haible  <bruno@clisp.org>
2199
2200         * modules/vsnprintf-posix-tests: New file.
2201         * tests/test-vsnprintf-posix.c: New file.
2202         * tests/test-snprintf-posix.h: New file.
2203
2204         * modules/vsnprintf-posix: New file.
2205         * m4/vsnprintf-posix.m4: New file.
2206         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
2207         gl_FUNC_VSNPRINTF.
2208         (gl_FUNC_VSNPRINTF): Invoke it.
2209         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
2210         * lib/stdio_.h (vsnprintf): Define as a replacement if
2211         REPLACE_VSNPRINTF is set.
2212         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
2213
2214 2007-03-06  Bruno Haible  <bruno@clisp.org>
2215
2216         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
2217         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
2218
2219 2007-03-06  Bruno Haible  <bruno@clisp.org>
2220
2221         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
2222         (asinl): Declare also if HAVE_DECL_ASINL is set.
2223         (atanl): Declare also if HAVE_DECL_ATANL is set.
2224         (ceill): Declare also if HAVE_DECL_CEILL is set.
2225         (cosl): Declare also if HAVE_DECL_COSL is set.
2226         (expl): Declare also if HAVE_DECL_EXPL is set.
2227         (floorl): Declare also if HAVE_DECL_FLOORL is set.
2228         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
2229         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
2230         (logl): Declare also if HAVE_DECL_LOGL is set.
2231         (sinl): Declare also if HAVE_DECL_SINL is set.
2232         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
2233         (tanl): Declare also if HAVE_DECL_TANL is set.
2234         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
2235         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
2236         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
2237         declaration of frexpl, ldexpl.
2238         * modules/printf-frexpl (Depends-on): Add math.
2239         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
2240
2241 2007-03-05  Bruno Haible  <bruno@clisp.org>
2242
2243         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
2244         frexpl and ldexpl are declared.
2245         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
2246
2247 2007-03-05  Bruno Haible  <bruno@clisp.org>
2248
2249         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
2250         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
2251
2252 2007-03-05  Bruno Haible  <bruno@clisp.org>
2253
2254         * lib/stdio_.h: Include <stddef.h>.
2255
2256 2007-03-05  Bruno Haible  <bruno@clisp.org>
2257
2258         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
2259
2260 2007-03-05  Bruno Haible  <bruno@clisp.org>
2261
2262         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
2263         NetBSD 4, from Ralf Wildenhues.
2264
2265 2007-03-04  Bruno Haible  <bruno@clisp.org>
2266
2267         * lib/vasprintf.h: Update #if logic for the case when the functions
2268         exist but are overridden.
2269
2270 2007-03-04  Bruno Haible  <bruno@clisp.org>
2271
2272         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
2273         implementations: glibc-2.4 and MacOS X 10.3.
2274         * tests/test-vasnprintf-posix.c (test_function): Test also the case
2275         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
2276         * tests/test-vasprintf-posix.c (test_function): Likewise.
2277
2278 2007-03-04  Bruno Haible  <bruno@clisp.org>
2279
2280         * modules/vasprintf-posix-tests: New file.
2281         * tests/test-vasprintf-posix.c: New file.
2282
2283         * modules/vasprintf-posix: New file.
2284         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
2285         defined.
2286         * m4/vasprintf-posix.m4: New file.
2287         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
2288         gl_FUNC_VASPRINTF.
2289         (gl_FUNC_VASPRINTF): Invoke it.
2290         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
2291         here.
2292         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
2293
2294 2007-03-04  Bruno Haible  <bruno@clisp.org>
2295
2296         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
2297         REPLACE_GETTIMEOFDAY.
2298         * modules/sys_time (Makefile.am): Likewise.
2299         * m4/sys_time_h.m4: Likewise.
2300         * m4/gettimeofday.m4: Likewise.
2301
2302 2007-03-04  Bruno Haible  <bruno@clisp.org>
2303
2304         * modules/vasnprintf-posix-tests: New file.
2305         * tests/test-vasnprintf-posix.c: New file.
2306
2307         * modules/vasnprintf-posix: New file.
2308         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
2309         printf-frexpl.h.
2310         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
2311         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
2312         REPLACE_VASNPRINTF is defined.
2313         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
2314         gl_FUNC_VASNPRINTF.
2315         (gl_FUNC_VASNPRINTF): Invoke it.
2316         * m4/vasnprintf-posix.m4: New file.
2317         * m4/printf.m4: New file.
2318
2319 2007-03-04  Bruno Haible  <bruno@clisp.org>
2320
2321         Compile progreloc.c only if --enable-relocatable is specified.
2322         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
2323         if --enable-relocatable was specified.
2324         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
2325         lib_SOURCES.
2326
2327 2007-03-04  Jim Meyering  <jim@meyering.net>
2328
2329         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
2330         Use it consistently, rather than enumerating errno constants.
2331
2332 2007-03-04  Bruno Haible  <bruno@clisp.org>
2333
2334         * modules/xvasprintf-tests: New file.
2335         * tests/test-xvasprintf.c: New file.
2336
2337         * modules/vasprintf-tests: New file.
2338         * tests/test-vasprintf.c: New file.
2339
2340         * modules/vasnprintf-tests: New file.
2341         * tests/test-vasnprintf.c: New file.
2342
2343         * modules/vsnprintf-tests: New file.
2344         * tests/test-vsnprintf.c: New file.
2345
2346         * modules/snprintf-tests: New file.
2347         * tests/test-snprintf.c: New file.
2348
2349 2007-03-04  Bruno Haible  <bruno@clisp.org>
2350
2351         Compile relocatable.c only if --enable-relocatable is specified.
2352         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
2353         gl_RELOCATABLE_LIBRARY.
2354         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
2355         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
2356         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
2357         gl_RELOCATABLE_LIBRARY.
2358         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
2359         (Makefile.am): Remove lib_SOURCES.
2360         * modules/relocatable-lib-lgpl (configure.ac): Invoke
2361         gl_RELOCATABLE_LIBRARY.
2362         (Makefile.am): Remove lib_SOURCES.
2363         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
2364         always.
2365         * modules/relocatable-prog-wrapper (configure.ac): Invoke
2366         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
2367
2368 2007-03-04  Bruno Haible  <bruno@clisp.org>
2369
2370         * modules/argmatch-tests: New file.
2371         * tests/test-argmatch.c: New file.
2372
2373         * tests/test-allocsa.c (main): Halve the number of loop runs.
2374
2375         * modules/alloca-opt-tests: New file.
2376         * tests/test-alloca-opt.c: New file.
2377
2378 2007-03-04  Jim Meyering  <jim@meyering.net>
2379
2380         Work around difference between Linux ACLs and Solaris 10 ZFS.
2381         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
2382         for EINVAL.
2383
2384 2007-03-03  Bruno Haible  <bruno@clisp.org>
2385
2386         * modules/relocatable-prog (Depends-on): Add back progreloc's
2387         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
2388
2389 2007-03-03  Bruno Haible  <bruno@clisp.org>
2390
2391         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
2392         * modules/relocatable-lib: New file.
2393
2394 2007-03-03  Bruno Haible  <bruno@clisp.org>
2395
2396         * modules/relocatable-prog: Renamed from modules/relocatable.
2397         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
2398
2399 2007-03-03  Bruno Haible  <bruno@clisp.org>
2400
2401         * modules/relocatable-script (Files): Add doc/relocatable.texi,
2402         m4/relocatable-lib.m4.
2403         (Depends-on): Remove 'relocatable'.
2404         (configure.ac): Add gl_RELOCATABLE_NOP.
2405
2406 2007-03-03  Bruno Haible  <bruno@clisp.org>
2407
2408         * modules/relocatable-prog-wrapper: New file.
2409         * modules/relocatable (Depends-on): Add it. Remove all other
2410         dependencies except progname.
2411         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
2412
2413         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
2414         (gl_FUNC_STRERROR): Nop.
2415         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
2416
2417         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
2418         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
2419
2420         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
2421         (gl_FUNC_READLINK): Update.
2422
2423         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
2424
2425 2007-03-03  Bruno Haible  <bruno@clisp.org>
2426
2427         * lib/xreadlink.c: Include <unistd.h> unconditionally.
2428         * modules/xreadlink (Depends-on): Add unistd.
2429         * modules/xreadlink-with-size (Depends-on): Likewise.
2430
2431 2007-03-03  Bruno Haible  <bruno@clisp.org>
2432
2433         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
2434         extracted from gt_FUNC_SETENV.
2435         (gt_FUNC_SETENV): Remove macro.
2436         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
2437         remove gt_FUNC_SETENV.
2438
2439 2007-03-03  Bruno Haible  <bruno@clisp.org>
2440
2441         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
2442         ENABLE_RELOCATABLE here.
2443         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
2444
2445 2007-03-03  Bruno Haible  <bruno@clisp.org>
2446
2447         * modules/rbtreehash-list-tests (Depends-on): Add progname.
2448         * tests/test-rbtreehash_list.c: Include progname.h.
2449         (main): Call set_program_name.
2450
2451         * modules/rbtree-oset-tests (Depends-on): Add progname.
2452         * tests/test-rbtree_oset.c: Include progname.h.
2453         (main): Call set_program_name.
2454
2455         * modules/rbtree-list-tests (Depends-on): Add progname.
2456         * tests/test-rbtree_list.c: Include progname.h.
2457         (main): Call set_program_name.
2458
2459         * modules/linked-list-tests (Depends-on): Add progname.
2460         * tests/test-linked_list.c: Include progname.h.
2461         (main): Call set_program_name.
2462
2463 2007-03-03  Bruno Haible  <bruno@clisp.org>
2464
2465         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
2466         All uses of __restrict changed to _Restrict_.
2467         * lib/glob_.h (__restrict): Remove macro.
2468
2469 2007-03-02  Bruno Haible  <bruno@clisp.org>
2470
2471         * modules/gettext (configure.ac): Require gettext infrastructure
2472         from version 0.16.1.
2473
2474 2007-03-02  Bruno Haible  <bruno@clisp.org>
2475
2476         * modules/linkedhash-list-tests (Depends-on): Add progname.
2477         * tests/test-linkedhash_list.c: Include progname.h.
2478         (main): Call set_program_name.
2479
2480         * modules/carray-list-tests (Depends-on): Add progname.
2481         * tests/test-carray_list.c: Include progname.h.
2482         (main): Call set_program_name.
2483
2484         * modules/avltreehash-list-tests (Depends-on): Add progname.
2485         * tests/test-avltreehash_list.c: Include progname.h.
2486         (main): Call set_program_name.
2487
2488         * modules/avltree-oset-tests (Depends-on): Add progname.
2489         * tests/test-avltree_oset.c: Include progname.h.
2490         (main): Call set_program_name.
2491
2492         * modules/avltree-list-tests (Depends-on): Add progname.
2493         * tests/test-avltree_list.c: Include progname.h.
2494         (main): Call set_program_name.
2495
2496         * modules/array-oset-tests (Depends-on): Add progname.
2497         * tests/test-array_oset.c: Include progname.h.
2498         (main): Call set_program_name.
2499
2500         * modules/array-list-tests (Depends-on): Add progname.
2501         * tests/test-array_list.c: Include progname.h.
2502         (main): Call set_program_name.
2503
2504         * modules/argp-tests (Depends-on): Add progname.
2505         * tests/test-argp.c: Include argp.h first. Include progname.h.
2506         (main): Call set_program_name.
2507
2508 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
2509
2510         * doc/gnulib-tool.texi (Initial import): Reword description of
2511         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
2512         limited effect even if defined after the first system include.
2513
2514 2007-03-01  Bruno Haible  <bruno@clisp.org>
2515
2516         * build-aux/config.libpath: Update to libtool-1.5.22.
2517         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
2518
2519 2007-03-01  Bruno Haible  <bruno@clisp.org>
2520
2521         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
2522         foo_CFLAGS.
2523         Reported by Ralf Wildenhues.
2524
2525 2007-03-01  Bruno Haible  <bruno@clisp.org>
2526
2527         * build-aux/install-reloc: Remove object files left over by some
2528         compilers.
2529         Reported by Ralf Wildenhues.
2530
2531 2007-03-01  Bruno Haible  <bruno@clisp.org>
2532
2533         * build-aux/install-reloc: Break long lines.
2534
2535 2007-03-01  Bruno Haible  <bruno@clisp.org>
2536
2537         * doc/relocatable.texi: Document that it may not work on OpenBSD.
2538         Reported by Ralf Wildenhues.
2539
2540 2007-03-01  Bruno Haible  <bruno@clisp.org>
2541
2542         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
2543         include ordering constraints.
2544
2545 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
2546
2547         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
2548         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
2549         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
2550         as another example.
2551         * lib/time_.h: Fix misspelling.
2552         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
2553         Require gl_HEADER_TIME_H_DEFAULTS.
2554         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
2555         * m4/time_r.m4 (gl_TIME_R): Likewise.
2556         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
2557
2558 2007-03-01  Bruno Haible  <bruno@clisp.org>
2559
2560         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
2561         * m4/utimens.m4 (gl_UTIMENS): Likewise.
2562
2563 2007-03-01  Jim Meyering  <jim@meyering.net>
2564
2565         * modules/xreadlink (Maintainer): Add my name.
2566         * modules/xreadlink-with-size (Depends-on): Alphabetize.
2567
2568 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
2569             Bruno Haible  <bruno@clisp.org>
2570
2571         * build-aux/install-reloc: Compile also c-ctype.c.
2572         * build-aux/relocatable.sh.in: New file.
2573         * doc/relocatable.texi: New file.
2574         * doc/relocatable-maint.texi: New file.
2575         * doc/gnulib.texi: Include relocatable-maint.texi.
2576         * lib/progreloc.c: Include unistd.h unconditionally.
2577         * lib/relocwrapper.c: Include unistd.h unconditionally.
2578         Include c-ctype.h.
2579         (add_dotbin): Use c_tolower.
2580         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
2581         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
2582         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
2583         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
2584         to m4/relocatable-lib.m4.
2585         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
2586         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
2587         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
2588         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
2589         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
2590         * modules/relocatable: New file.
2591         * modules/relocatable-lib: New file.
2592         * modules/relocatable-script: New file.
2593
2594 2007-02-28  Bruno Haible  <bruno@clisp.org>
2595
2596         Import --enable-relocatable infrastructure.
2597         * build-aux/config.libpath: New file, from GNU gettext.
2598         * build-aux/install-reloc: New file, from GNU gettext.
2599         * build-aux/reloc-ldflags: New file, from GNU gettext.
2600         * lib/relocatable.h: New file, from GNU gettext.
2601         * lib/relocatable.c: New file, from GNU gettext.
2602         * lib/relocwrapper.c: New file, from GNU gettext.
2603         * m4/relocatable.m4: New file, from GNU gettext.
2604
2605 2007-02-28  Bruno Haible  <bruno@clisp.org>
2606
2607         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
2608
2609         * modules/xreadlink: New file, from GNU gettext with modifications.
2610         * lib/xreadlink.c: New file, from GNU gettext.
2611         * lib/xreadlink.h: Add comments.
2612         (xreadlink): New declaration.
2613
2614         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
2615         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
2616         lib/xreadlink-with-size.c.
2617         (configure.ac): Remove gl_XREADLINK invocation.
2618         (Makefile.am): Augment lib_SOURCES.
2619         * m4/xreadlink.m4: Remove file.
2620         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
2621         (xreadlink_with_size): Renamed from xreadink.
2622         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
2623         * modules/canonicalize (Depends-on): Replace xreadlink with
2624         xreadlink-with-size.
2625         * lib/canonicalize.c (canonicalize_filename_mode): Update.
2626
2627 2007-02-25  Jim Meyering  <jim@meyering.net>
2628
2629         * build-aux/announce-gen: When complaining about excess arguments,
2630         list them.
2631
2632 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
2633
2634         * README: Document signed integer overflow situation more
2635         accurately.
2636
2637 2007-02-25  Bruno Haible  <bruno@clisp.org>
2638
2639         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
2640         'a' or 'A' conversion.
2641
2642 2007-02-25  Bruno Haible  <bruno@clisp.org>
2643
2644         * modules/filename: Renamed from modules/pathname.
2645         (Files): Replace lib/pathname.h with lib/filename.h. Replace
2646         lib/concatpath.c with lib/concat-filename.c.
2647         (Makefile.am): Update.
2648         (Include): Replace pathname.h with filename.h.
2649         * lib/filename.h: Renamed from lib/pathname.h.
2650         (concatenated_filename): Renamed from concatenated_pathname.
2651         * lib/concat-filename.c: Renamed from lib/concatpath.c.
2652         (concatenated_filename): Renamed from concatenated_pathname.
2653         * lib/findprog.c: Include filename.h instead of pathname.h.
2654         (find_in_path): Update.
2655         * lib/javacomp.c: Include filename.h instead of pathname.h.
2656         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
2657         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
2658         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
2659         is_oldgcj_14_13_usable, is_javac_usable): Update.
2660         * lib/javaexec.c: Include filename.h instead of pathname.h.
2661         (execute_java_class): Update.
2662         * modules/findprog: Update.
2663         * modules/javacomp: Update.
2664         * modules/javaexec: Update.
2665         * MODULES.html.sh (File system functions): Add 'filename', remove
2666         'pathname'.
2667
2668 2007-02-25  Bruno Haible  <bruno@clisp.org>
2669
2670         * modules/printf-frexpl-tests: New file.
2671         * tests/test-printf-frexpl.c: New file.
2672
2673         * modules/printf-frexpl: New file.
2674         * lib/printf-frexpl.h: New file.
2675         * lib/printf-frexpl.c: New file.
2676         * m4/printf-frexpl.m4: New file.
2677
2678 2007-02-25  Bruno Haible  <bruno@clisp.org>
2679
2680         * modules/printf-frexp-tests: New file.
2681         * tests/test-printf-frexp.c: New file.
2682
2683         * modules/printf-frexp: New file.
2684         * lib/printf-frexp.h: New file.
2685         * lib/printf-frexp.c: New file.
2686         * m4/printf-frexp.m4: New file.
2687
2688 2007-02-25  Bruno Haible  <bruno@clisp.org>
2689
2690         Assume automake >= 1.10 for the tests.
2691         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
2692         * modules/arctwo-tests: Likewise.
2693         * modules/argp-tests: Likewise.
2694         * modules/avltree-list-tests: Likewise.
2695         * modules/avltree-oset-tests: Likewise.
2696         * modules/avltreehash-list-tests: Likewise.
2697         * modules/carray-list-tests: Likewise.
2698         * modules/crc-tests: Likewise.
2699         * modules/des-tests: Likewise.
2700         * modules/gc-arcfour-tests: Likewise.
2701         * modules/gc-arctwo-tests: Likewise.
2702         * modules/gc-des-tests: Likewise.
2703         * modules/gc-hmac-md5-tests: Likewise.
2704         * modules/gc-hmac-sha1-tests: Likewise.
2705         * modules/gc-md2-tests: Likewise.
2706         * modules/gc-md4-tests: Likewise.
2707         * modules/gc-md5-tests: Likewise.
2708         * modules/gc-pbkdf2-sha1-tests: Likewise.
2709         * modules/gc-rijndael-tests: Likewise.
2710         * modules/gc-sha1-tests: Likewise.
2711         * modules/gc-tests: Likewise.
2712         * modules/getaddrinfo-tests: Likewise.
2713         * modules/hmac-md5-tests: Likewise.
2714         * modules/hmac-sha1-tests: Likewise.
2715         * modules/linked-list-tests: Likewise.
2716         * modules/linkedhash-list-tests: Likewise.
2717         * modules/lock-tests: Likewise.
2718         * modules/md2-tests: Likewise.
2719         * modules/md4-tests: Likewise.
2720         * modules/md5-tests: Likewise.
2721         * modules/rbtree-list-tests: Likewise.
2722         * modules/rbtree-oset-tests: Likewise.
2723         * modules/rbtreehash-list-tests: Likewise.
2724         * modules/read-file-tests: Likewise.
2725         * modules/rijndael-tests: Likewise.
2726         * modules/stdint-tests: Likewise.
2727         * modules/tls-tests: Likewise.
2728
2729 2007-02-24  Bruno Haible  <bruno@clisp.org>
2730
2731         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
2732         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
2733         function; instead check whether isnan with a double argument links.
2734         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
2735         function; instead check whether isnan with a 'long double' argument
2736         links.
2737         Reported by Eric Blake <ebb9@byu.net>.
2738
2739 2007-02-24  Bruno Haible  <bruno@clisp.org>
2740
2741         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
2742         defined.
2743         * lib/isnanl.c: Remove all code. Just include isnan.c.
2744         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
2745
2746 2007-02-25  Jim Meyering  <jim@meyering.net>
2747
2748         Avoid conflicting types for 'unsetenv' on FreeBSD.
2749         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
2750         conflicting with FreeBSD's (5.0 and 6.1) function declaration
2751         in stdlib.h.
2752
2753 2007-02-24  Bruno Haible  <bruno@clisp.org>
2754
2755         * modules/isnanl-nolibm-tests: New file.
2756         * tests/test-isnanl.c: New file.
2757
2758         * modules/isnanl-nolibm: New file.
2759         * lib/isnanl.h: New file.
2760         * lib/isnanl.c: New file.
2761         * m4/isnanl.m4: New file.
2762
2763 2007-02-24  Bruno Haible  <bruno@clisp.org>
2764
2765         * modules/isnan-nolibm-tests: New file.
2766         * tests/test-isnan.c: New file.
2767
2768         * modules/isnan-nolibm: New file.
2769         * lib/isnan.h: New file.
2770         * lib/isnan.c: New file.
2771         * m4/isnan.m4: New file.
2772
2773 2007-02-24  Bruno Haible  <bruno@clisp.org>
2774
2775         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
2776         assume that an exponent fits in 20 bits.
2777
2778 2007-02-24  Jim Meyering  <jim@meyering.net>
2779
2780         * m4/regex.m4: Update the description of the configure-time option,
2781         --without-included-regex, to state accurately what the defaults are,
2782         and perhaps to give people an idea why using this option is risky.
2783
2784 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
2785
2786         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
2787         loops on small arguments.  This attempts to avoid the problem
2788         Bruno Haible reported for AIX 4.3.2 in
2789         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
2790
2791 2007-02-23  Bruno Haible  <bruno@clisp.org>
2792
2793         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
2794         Needed for help2man.
2795
2796 2007-02-23  Karl Berry  <karl@gnu.org>
2797
2798         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
2799         exists, foo.h should be cvs-ignored, not committed.
2800
2801 2007-02-23  Eric Blake  <ebb9@byu.net>
2802
2803         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
2804         * lib/stat-time.h (includes): Likewise.
2805         * lib/utimecmp.c (includes): Likewise.
2806         * lib/utimens.h (includes): Likewise.
2807         * lib/getdate.y (includes): Also include "timespec.h" for use
2808         internal to the module.
2809         * modules/utimens (Depends-on): Revert yesterday's patch.
2810         * modules/nanosleep (Depends-on): Add missing dependency.
2811
2812 2007-02-22  Bruno Haible  <bruno@clisp.org>
2813
2814         * lib/glob.c: Don't include getlogin_r.h.
2815
2816 2007-02-22  Jim Meyering  <jim@meyering.net>
2817
2818         * modules/utimens (Depends-on): Add timespec, required for
2819         utimens.h's inclusion of timespec.h.
2820
2821 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
2822
2823         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
2824         long unreadable paths in GNU/Linux.  Problem reported by Andreas
2825         Schwab in
2826         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
2827         I'll try to think of a better way to fix the Solaris problem.
2828
2829         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
2830         like glibc; on Solaris 10, it fails with errno == EINVAL.
2831         POSIX says the behavior is unspecified if the first argument is NULL,
2832         so play it safe and never pass NULL to the system getcwd.
2833
2834 2007-02-21  Jim Meyering  <jim@meyering.net>
2835
2836         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
2837         of gettimeofday.  It would conflict with the one now always
2838         provided via sys_time_.h.  Reported by Matthew Woehlke, as
2839         an IRIX 6.5 build failure.
2840
2841 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
2842
2843         Minor fixups to port to Solaris 10 with Sun C 5.8.
2844         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
2845         * modules/getcwd (Depends-on): Add dirfd.
2846         * lib/putenv.c (putenv): #undef it.
2847         (rpl_putenv): New decl.
2848         (malloc, free): Include <stdlib.h> rather than prototyping separately.
2849
2850 2007-02-20  Bruno Haible  <bruno@clisp.org>
2851
2852         * modules/stdio-tests: New file.
2853         * tests/test-stdio.c: New file.
2854
2855         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
2856         (Depends-on): Add stdio.
2857         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
2858         (Include): Use <stdio.h> instead of vsnprintf.h.
2859         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
2860         HAVE_DECL_VSNPRINTF.
2861         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
2862
2863         * modules/snprintf (Files): Remove lib/snprintf.h.
2864         (Depends-on): Add stdio.
2865         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
2866         (Include): Use <stdio.h> instead of snprintf.h.
2867         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
2868         HAVE_DECL_SNPRINTF.
2869         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
2870         * lib/getaddrinfo.c: Likewise.
2871
2872         * modules/stdio: New file.
2873         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
2874         * lib/snprintf.h: Remove file.
2875         * lib/vsnprintf.h: Remove file.
2876         * lib/.cppi-disable: Remove snprintf.h.
2877         * m4/stdio_h.m4: New file.
2878         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
2879
2880 2007-02-20  Jim Meyering  <jim@meyering.net>
2881
2882         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
2883         used by e.g., mingw.  From Bruno Haible.
2884
2885 2007-02-19  Bruno Haible  <bruno@clisp.org>
2886
2887         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
2888         warnings.
2889         Reported by Ben Pfaff <blp@cs.stanford.edu>.
2890
2891 2007-02-19  Bruno Haible  <bruno@clisp.org>
2892
2893         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
2894         from mingw users.
2895
2896 2007-02-19  Bruno Haible  <bruno@clisp.org>
2897
2898         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
2899         warnings.
2900         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
2901
2902 2007-02-19  Jim Meyering  <jim@meyering.net>
2903
2904         Don't use FD after a successful "fdopendir (fd)".
2905         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
2906         Reset it by calling dirfd on the just-obtained DIR*.
2907
2908         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
2909         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
2910
2911 2007-02-18  Bruno Haible  <bruno@clisp.org>
2912
2913         * lib/readlink.c: Include <unistd.h>.
2914         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
2915         HAVE_READLINK.
2916         * modules/readlink (Depends-on): Add unistd.
2917         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2918         (Include): Add <unistd.h>.
2919
2920         * lib/getlogin_r.h: Remove file.
2921         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
2922         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
2923         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
2924         HAVE_DECL_GETLOGIN_R.
2925         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
2926         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2927         (Include): Use <unistd.h> instead of getlogin_r.h.
2928
2929         * lib/getcwd.h: Remove file.
2930         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
2931         * lib/xgetcwd.c: Likewise.
2932         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
2933         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
2934         * modules/getcwd (Files): Remove lib/getcwd.h.
2935         (Depends-on): Add unistd.
2936         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2937         (Include): Use <unistd.h> instad of getcwd.h.
2938
2939         * lib/ftruncate.c: Include <unistd.h> first.
2940         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
2941         Set HAVE_FTRUNCATE.
2942         * modules/ftruncate (Depends-on): Add unistd.
2943         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2944
2945         * lib/fchdir.c: Include <unistd.h> first.
2946         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
2947         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
2948         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
2949         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2950         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
2951
2952         * lib/dup2.c: Include <unistd.h> first.
2953         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
2954         HAVE_DUP2.
2955         * modules/dup2 (Depends-on): Add unistd.
2956         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2957
2958         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
2959         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
2960         REPLACE_CHOWN. Don't define chown as a macro here.
2961         * modules/chown (Depends-on): Add unistd.
2962         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2963
2964         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
2965         Add definition for GL_LINK_WARNING.
2966         (chown, dup2): New declarations.
2967         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
2968         link warning.
2969         (ftruncate): New declaration.
2970         (getcwd): New declaration, taken from old getcwd.h.
2971         (getlogin_r): New declaration, taken from old getlogin_r.h.
2972         (readlink): New declaration.
2973         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
2974         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
2975         (gl_PREREQ_UNISTD): Remove macro.
2976         (gl_UNISTD_MODULE_INDICATOR): New macro.
2977         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
2978         many new variables. Don't set UNISTD_H.
2979         * modules/unistd (Description): Change.
2980         (Depends-on): Add link-warning.
2981         (configure.ac): Update.
2982         (Makefile.am): Create unistd.h always. Substitute many new variables
2983         into it.
2984
2985 2007-02-18  Bruno Haible  <bruno@clisp.org>
2986
2987         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
2988         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
2989         HAVE_GETSUBOPT.
2990         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
2991         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
2992         * lib/getsubopt.h: Remove file.
2993         * modules/getsubopt (Files): Remove lib/getsubopt.h.
2994         (Depends-on): Add stdlib.
2995         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
2996         (Includes): Use <stdlib.h> instead of getsubopt.h.
2997         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
2998         Set HAVE_GETSUBOPT.
2999         * lib/getsubopt.c: Don't include getsubopt.h.
3000
3001 2007-02-18  Bruno Haible  <bruno@clisp.org>
3002
3003         * modules/fchdir (Depends-on): Add dup2.
3004
3005 2007-02-18  Bruno Haible  <bruno@clisp.org>
3006
3007         * lib/stdlib_.h: Handle glibc's special invocation convention
3008         specially.
3009
3010 2007-02-18  Bruno Haible  <bruno@clisp.org>
3011
3012         * modules/stdlib-tests: New file.
3013         * tests/test-stdlib.c: New file.
3014
3015         * modules/mkstemp (Files): Remove lib/mkstemp.h.
3016         (Depends-on): Add stdlib.
3017         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
3018         (Includes): Use <stdlib.h> instead of mkstemp.h.
3019         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
3020         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
3021         * lib/mkstemp.c: Don't include mkstemp.h.
3022         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
3023         * lib/stdlib--.h: Don't include mkstemp.h.
3024
3025         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
3026         (Depends-on): Add stdlib.
3027         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
3028         (Includes): Use <stdlib.h> instead of mkdtemp.h.
3029         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
3030         HAVE_MKDTEMP.
3031         * lib/mkdtemp.c: Don't include mkdtemp.h.
3032         * lib/clean-temp.c: Don't include mkdtemp.h.
3033
3034         * modules/exit (Files): Remove lib/exit.h.
3035         (Depends-on): Add stdlib.
3036         (Makefile.am): Remove lib_SOURCES.
3037         (Include): Use <stdlib.h> instead of exit.h.
3038         * lib/argmatch.c: Don't include exit.h.
3039         * lib/execute.c: Likewise.
3040         * lib/pagealign_alloc.c: Likewise.
3041         * lib/pipe.c: Likewise.
3042         * lib/wait-process.c: Likewise.
3043         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
3044         * lib/exitfail.c: Likewise.
3045         * lib/savewd.c: Likewise.
3046         * lib/xsetenv.c: Likewise.
3047
3048         * modules/stdlib: New file.
3049         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
3050         and extra comments about mkstemp().
3051         * lib/exit.h: Remove file.
3052         * lib/mkdtemp.h: Remove file.
3053         * lib/mkstemp.h: Remove file.
3054         * m4/stdlib_h.m4: New file.
3055         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
3056
3057 2007-02-18  Bruno Haible  <bruno@clisp.org>
3058
3059         * modules/math-tests: New file.
3060         * tests/test-math.c: New file.
3061
3062         * modules/math: New file.
3063         * modules/mathl (Files): Remove lib/mathl.h.
3064         (Depends-on): Add math.
3065         (Makefile.am): Don't mention mathl.h.
3066         (Include): Use <math.h> instead of mathl.h.
3067         * lib/math_.h: New file.
3068         * lib/mathl.h: Remove file.
3069         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
3070         mathl.h.
3071         * lib/asinl.c: Likewise.
3072         * lib/atanl.c: Likewise.
3073         * lib/ceill.c: Likewise.
3074         * lib/cosl.c: Likewise.
3075         * lib/expl.c: Likewise.
3076         * lib/floorl.c: Likewise.
3077         * lib/frexpl.c: Likewise.
3078         * lib/ldexpl.c: Likewise.
3079         * lib/logl.c: Likewise.
3080         * lib/sincosl.c: Likewise.
3081         * lib/sinl.c: Likewise.
3082         * lib/sqrtl.c: Likewise.
3083         * lib/tanl.c: Likewise.
3084         * lib/trigl.c: Likewise.
3085         * m4/math_h.m4: New file.
3086         * MODULES.html.sh (Mathematics): Add math.
3087
3088 2007-02-17  Bruno Haible  <bruno@clisp.org>
3089
3090         * modules/wctype-tests: New file.
3091         * tests/test-wctype.c: New file.
3092
3093         * modules/wchar-tests: New file.
3094         * tests/test-wchar.c: New file.
3095
3096         * modules/unistd-tests: New file.
3097         * tests/test-unistd.c: New file.
3098
3099         * modules/time-tests: New file.
3100         * tests/test-time.c: New file.
3101
3102         * modules/sysexits-tests: New file.
3103         * tests/test-sysexits.c: New file.
3104
3105         * modules/sys_time-tests: New file.
3106         * tests/test-sys_time.c: New file.
3107
3108         * modules/sys_stat-tests: New file.
3109         * tests/test-sys_stat.c: New file.
3110
3111         * modules/sys_socket-tests: New file.
3112         * tests/test-sys_socket.c: New file.
3113
3114         * modules/sys_select-tests: New file.
3115         * tests/test-sys_select.c: New file.
3116
3117         * modules/string-tests: New file.
3118         * tests/test-string.c: New file.
3119
3120         * modules/stdbool-tests: New file.
3121         * tests/test-stdbool.c: New file.
3122
3123         * modules/netinet_in-tests: New file.
3124         * tests/test-netinet_in.c: New file.
3125
3126         * modules/inttypes-tests: New file.
3127         * tests/test-inttypes.c: New file.
3128
3129         * modules/fcntl-tests: New file.
3130         * tests/test-fcntl.c: New file.
3131
3132         * modules/byteswap-tests: New file.
3133         * tests/test-byteswap.c: New file.
3134
3135         * modules/arpa_inet-tests: New file.
3136         * tests/test-arpa_inet.c: New file.
3137
3138 2007-02-17  Bruno Haible  <bruno@clisp.org>
3139
3140         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
3141         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
3142         if the corresponding module is not enabled. Emit link warnings if
3143         the function is used nevertheless.
3144         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
3145         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
3146         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
3147         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
3148         * modules/inttypes (Depends-on): Add link-warning.
3149         (Makefile.am): Copy the contents of build-aux/link-warning.h into
3150         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
3151         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
3152         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
3153         * modules/imaxdiv (configure.ac): Likewise.
3154         * modules/strtoimax (configure.ac): Likewise.
3155         * modules/strtoumax (configure.ac): Likewise.
3156
3157 2007-02-17  Bruno Haible  <bruno@clisp.org>
3158
3159         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
3160         gl_STRING_MODULE_INDICATOR_DEFAULTS.
3161         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
3162         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
3163
3164 2007-02-17  Bruno Haible  <bruno@clisp.org>
3165
3166         * modules/link-warning: New file.
3167         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
3168         * lib/string_.h (GL_LINK_WARNING): Remove definition.
3169         * modules/string (Depends-on): Add link-warning.
3170         (Makefile.am): Copy the contents of build-aux/link-warning.h into
3171         string.h.
3172         * MODULES.html.sh (Support for building libraries and executables): Add
3173         link-warning.
3174
3175 2007-02-17  Bruno Haible  <bruno@clisp.org>
3176
3177         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
3178         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
3179         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
3180         long lines.
3181
3182 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
3183             Bruno Haible  <bruno@clisp.org>
3184
3185         * modules/tmpfile: New file.
3186         * lib/tmpfile.c: New file.
3187         * m4/tmpfile.m4: New file.
3188         * MODULES.html.sh (func_all_modules): New section "Input/output".
3189
3190 2007-02-15  Bruno Haible  <bruno@clisp.org>
3191
3192         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
3193         (supports_delete_on_close): New function.
3194         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
3195
3196 2007-02-14  Bruno Haible  <bruno@clisp.org>
3197
3198         * modules/mbspcasecmp-tests: New file.
3199         * tests/test-mbspcasecmp.sh: New file.
3200         * tests/test-mbspcasecmp.c: New file.
3201
3202         New module mbspcasecmp.
3203         * modules/mbspcasecmp: New file.
3204         * lib/mbspcasecmp.c: New file.
3205         * lib/string_.h (strncasecmp): Change warning message.
3206         (mbspcasecmp): New declaration.
3207         * m4/mbspcasecmp.m4: New file.
3208         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3209         GNULIB_MBSPCASECMP.
3210         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
3211         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
3212
3213 2007-02-14  Bruno Haible  <bruno@clisp.org>
3214
3215         * modules/mbsncasecmp-tests: New file.
3216         * tests/test-mbsncasecmp.sh: New file.
3217         * tests/test-mbsncasecmp.c: New file.
3218
3219         New module mbsncasecmp.
3220         * modules/mbsncasecmp: New file.
3221         * lib/mbsncasecmp.c: New file.
3222         * lib/string_.h (mbsncasecmp): New declaration.
3223         * m4/mbsncasecmp.m4: New file.
3224         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3225         GNULIB_MBSNCASECMP.
3226         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
3227         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
3228
3229 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
3230
3231         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
3232         Verify that it doesn't overlap with our flags.
3233         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
3234         do not have the desired effect in multibyte locales; instead, use
3235         mbscasecmp.
3236         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
3237         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
3238         we don't require GNU fnmatch ourselves (if our users require it, they
3239         should do so explicitly).
3240
3241         Fix regex code so it doesn't rely on strcasecmp.
3242         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
3243         Otherwise, include gnulib's langinfo.h.
3244         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
3245         undesirable behavior in non-C locales.  Instead, rely on localecharset.
3246         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
3247         * modules/regex (FILES): Remove m4/codeset.m4.
3248         (Depends-on): Add localcharset.  Remove strcase.
3249
3250 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3251
3252         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
3253         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
3254
3255 2007-02-13  Bruno Haible  <bruno@clisp.org>
3256
3257         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
3258         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
3259
3260 2007-02-12  Bruno Haible  <bruno@clisp.org>
3261
3262         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
3263         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
3264         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
3265         time warning rather than a link error.
3266
3267 2007-02-12  Bruno Haible  <bruno@clisp.org>
3268
3269         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
3270         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
3271         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
3272
3273 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
3274
3275         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
3276         args, not 2.
3277
3278 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
3279
3280         New module 'time', so that apps can include <time.h> as per
3281         POSIX and GNU instead of separate include files like time_r.h
3282         and timegm.h.  This implementation tries out a simpler approach
3283         for replacing decls in standard include files (as compared to
3284         the string module), somewhat as an experiment.
3285
3286         * config/srclist.txt: Comment out mktime.c for now.
3287         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
3288         since it doesn't apply any more.  Use generic wording instead.
3289         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
3290         'time'.
3291         * lib/time_.h, m4/time_h.m4, modules/time: New files.
3292         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
3293         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
3294         Don't include <sys/types.h>; no longer needed since we assume C89.
3295         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
3296         * lib/strftime.c: Likewise.
3297         * lib/time_r.c: Likewise.
3298         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
3299         * lib/nanosleep.c: Include <time.h> first, to check interface.
3300         * lib/strptime.c: Likewise.
3301         * lib/time_r.c: Likewise.
3302         * lib/timegm.c: Likewise.
3303         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
3304         needed.
3305         * lib/timegm.c: Don't include timegm.h; no longer needed.
3306         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
3307         time.h now handles any problems in that area.
3308         (struct timespec, nanosleep): Remove; time.h now arranges for these.
3309         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
3310         that time.h defines struct timespec.
3311         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
3312         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
3313         handles that.
3314         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
3315         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
3316         needed.  Set REPLACE_LOCALTIME.
3317         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
3318         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
3319         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
3320         nanosleep; time_h.m4 now does that.  Don't require
3321         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
3322         module handles this now.
3323         * modules/getdate (Depends-on): Remove timespec.  Add time.
3324         * modules/nanosleep (Depends-on): Likewise.
3325         * modules/stat-time (Depends-on): Likewise.
3326         * modules/nanosleep (Include): Include time.h, not timespec.h.
3327         * modules/strptime (Files): Remove lib/strptime.h.
3328         (Depends-on): Add extensions, time.
3329         (Include): Include time.h, not strptime.h.
3330         * modules/time_r (Files): Remove lib/time_r.h.
3331         (Depends-on): Add time.
3332         (Include): Include time.h, not time_r.h.
3333         * modules/timegm: Likewise.
3334         * modules/timespec (Description): Now does timespec-related decls
3335         of our own, instead of struct timespec itself.
3336         (Depends-on): Add time; remove extensions.
3337         (Maintainer): Add self.
3338         * modules/utimecmp (Depends-on): Add time; remove timespec.
3339         * modules/utimens (Depends-on): Likewise.
3340         * modules/xnanosleep (Depends-on): Likewise.
3341
3342 2007-02-11  Bruno Haible  <bruno@clisp.org>
3343
3344         * lib/c-strstr.c: Include allocsa.h.
3345         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
3346         * lib/c-strcasestr.c: Include allocsa.h.
3347         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
3348         * lib/strcasestr.c: Include allocsa.h.
3349         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
3350         * lib/mbsstr.c: Include allocsa.h.
3351         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
3352         allocsa/freesa instead of malloc/free.
3353         * lib/mbscasestr.c: Include allocsa.h.
3354         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
3355         allocsa/freesa instead of malloc/free.
3356         * modules/c-strstr (Depends-on): Add allocsa.
3357         * modules/c-strcasestr (Depends-on): Likewise.
3358         * modules/strcasestr (Depends-on): Likewise.
3359         * modules/mbsstr (Depends-on): Likewise.
3360         * modules/mbscasestr (Depends-on): Likewise.
3361
3362 2007-02-11  Bruno Haible  <bruno@clisp.org>
3363
3364         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
3365
3366         * modules/mbsspn-tests: New file.
3367         * tests/test-mbsspn.sh: New file.
3368         * tests/test-mbsspn.c: New file.
3369
3370 2007-02-11  Bruno Haible  <bruno@clisp.org>
3371
3372         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
3373
3374         * modules/mbspbrk-tests: New file.
3375         * tests/test-mbspbrk.sh: New file.
3376         * tests/test-mbspbrk.c: New file.
3377
3378 2007-02-11  Bruno Haible  <bruno@clisp.org>
3379
3380         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
3381         unneeded cast.
3382
3383         * modules/mbscspn-tests: New file.
3384         * tests/test-mbscspn.sh: New file.
3385         * tests/test-mbscspn.c: New file.
3386
3387 2007-02-11  Bruno Haible  <bruno@clisp.org>
3388
3389         * modules/mbscasecmp-tests: New file.
3390         * tests/test-mbscasecmp.sh: New file.
3391         * tests/test-mbscasecmp.c: New file.
3392
3393 2007-02-11  Bruno Haible  <bruno@clisp.org>
3394
3395         Ensure O(n) worst-case complexity of mbscasestr.
3396         * lib/mbscasestr.c: Include stdbool.h.
3397         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
3398         functions.
3399         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
3400         the bookkeeping indicates that it's worth it.
3401         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
3402
3403         * modules/mbscasestr-tests: New file.
3404         * tests/test-mbscasestr1.c: New file.
3405         * tests/test-mbscasestr2.sh: New file.
3406         * tests/test-mbscasestr2.c: New file.
3407         * tests/test-mbscasestr3.sh: New file.
3408         * tests/test-mbscasestr3.c: New file.
3409         * tests/test-mbscasestr4.sh: New file.
3410         * tests/test-mbscasestr4.c: New file.
3411         * m4/locale-tr.m4: New file.
3412
3413 2007-02-11  Bruno Haible  <bruno@clisp.org>
3414
3415         Ensure O(n) worst-case complexity of mbsstr.
3416         * lib/mbsstr.c: Include stdbool.h.
3417         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
3418         functions.
3419         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
3420         bookkeeping indicates that it's worth it.
3421         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
3422
3423         * modules/mbsstr-tests: New file.
3424         * tests/test-mbsstr1.c: New file.
3425         * tests/test-mbsstr2.sh: New file.
3426         * tests/test-mbsstr2.c: New file.
3427         * tests/test-mbsstr3.sh: New file.
3428         * tests/test-mbsstr3.c: New file.
3429         * m4/locale-fr.m4: New file.
3430
3431 2007-02-11  Bruno Haible  <bruno@clisp.org>
3432
3433         * lib/mbsrchr.c (mbsrchr): Fix bug.
3434
3435         * modules/mbsrchr-tests: New file.
3436         * tests/test-mbsrchr.sh: New file.
3437         * tests/test-mbsrchr.c: New file.
3438
3439 2007-02-11  Bruno Haible  <bruno@clisp.org>
3440
3441         * lib/mbschr.c (mbschr): Fix bug.
3442
3443         * modules/mbschr-tests: New file.
3444         * tests/test-mbschr.sh: New file.
3445         * tests/test-mbschr.c: New file.
3446         * m4/locale-zh.m4: New file.
3447
3448 2007-02-11  Bruno Haible  <bruno@clisp.org>
3449
3450         Support for copying multibyte string iterators.
3451         * lib/mbiter.h: Include <string.h>.
3452         (mbiter_multi_copy): New function.
3453         (mbi_copy): New macro.
3454         * lib/mbuiter.h: Include <string.h>.
3455         (mbuiter_multi_copy): New function.
3456         (mbui_copy): New macro.
3457
3458 2007-02-11  Bruno Haible  <bruno@clisp.org>
3459
3460         New module mbslen.
3461         * modules/mbslen: New file.
3462         * lib/mbslen.c: New file.
3463         * lib/string_.h (mbslen): New declaration.
3464         * m4/mbslen.m4: New file.
3465         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3466         GNULIB_MBSLEN.
3467         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
3468         * MODULES.html.sh (Internationalization functions): Add mbslen.
3469
3470 2007-02-11  Bruno Haible  <bruno@clisp.org>
3471
3472         Ensure O(n) worst-case complexity of strcasestr substitute.
3473         * lib/strcasestr.c: Include stdbool.h.
3474         (knuth_morris_pratt): New function.
3475         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
3476         bookkeeping indicates that it's worth it.
3477         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
3478
3479         * modules/strcasestr-tests: New file.
3480         * tests/test-strcasestr.c: New file.
3481
3482 2007-02-11  Bruno Haible  <bruno@clisp.org>
3483
3484         Ensure O(n) worst-case complexity of c_strcasestr.
3485         * lib/c-strcasestr.c: Include stdbool.h, string.h.
3486         (knuth_morris_pratt): New function.
3487         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
3488         the bookkeeping indicates that it's worth it.
3489         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
3490
3491         * modules/c-strcasestr-tests: New file.
3492         * tests/test-c-strcasestr.c: New file.
3493
3494 2007-02-11  Bruno Haible  <bruno@clisp.org>
3495
3496         Ensure O(n) worst-case complexity of c_strstr.
3497         * lib/c-strstr.c: Include stdbool.h, string.h.
3498         (knuth_morris_pratt): New function.
3499         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
3500         bookkeeping indicates that it's worth it.
3501         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
3502
3503         * lib/c-strstr.c: Complete rewrite for maintainability.
3504
3505         * modules/c-strstr-tests: New file.
3506         * tests/test-c-strstr.c: New file.
3507
3508 2007-02-11  Bruno Haible  <bruno@clisp.org>
3509
3510         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
3511         5.2.1 and earlier, whereby \055 was treated just like the range
3512         delimiter '-'.
3513         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
3514
3515 2007-02-08  Bruno Haible  <bruno@clisp.org>
3516
3517         * modules/regex (Depends-on): Add stdbool.
3518         Reported by Dalibor Topic <robilad@kaffe.org>.
3519
3520 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
3521
3522         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
3523         Prefer returning from main to exiting from it.
3524         Remove unnecessary parens after sizeof.
3525
3526 2007-02-05  Bruno Haible  <bruno@clisp.org>
3527
3528         New module mbssep.
3529         * modules/mbssep: New file.
3530         * lib/mbssep.c: New file.
3531         * lib/string_.h (strsep): Add a conditional link warning.
3532         (mbssep): New declaration.
3533         * m4/mbssep.m4: New file.
3534         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3535         GNULIB_MBSSEP.
3536         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
3537         * MODULES.html.sh (Internationalization functions): Add mbssep.
3538
3539 2007-02-05  Bruno Haible  <bruno@clisp.org>
3540
3541         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
3542         Optimize search in case of 1 delimiter.
3543
3544 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
3545
3546         * lib/acl.h: Include sys/types.h before sys/acl.h.
3547
3548 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
3549
3550         Merge upstream fix for glibc bugzilla #3957:
3551
3552         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
3553
3554         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
3555         bit for RE_HAT_LISTS_NOT_NEWLINE.
3556         (build_charclass_op): Remove bogus comment.
3557
3558 2007-02-05  Simon Josefsson  <simon@josefsson.org>
3559
3560         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
3561
3562 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
3563
3564         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
3565         * lib/memmem.c [!defined _LIBC]: Include config.h.
3566
3567 2007-02-04  Bruno Haible  <bruno@clisp.org>
3568
3569         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
3570         warning message.
3571
3572 2007-02-04  Bruno Haible  <bruno@clisp.org>
3573
3574         New module mbstok_r.
3575         * modules/mbstok_r: New file.
3576         * lib/mbstok_r.c: New file.
3577         * lib/string_.h (strtok_r): Change argument names to match the
3578         comments. Add a conditional link warning.
3579         (mbstok_r): New declaration.
3580         * m4/mbstok_r.m4: New file.
3581         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3582         GNULIB_MBSTOK_R.
3583         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
3584         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
3585
3586 2007-02-04  Bruno Haible  <bruno@clisp.org>
3587
3588         New module mbsspn.
3589         * modules/mbsspn: New file.
3590         * lib/mbsspn.c: New file.
3591         * lib/string_.h (strspn): Add a conditional link warning.
3592         (mbsspn): New declaration.
3593         * m4/mbsspn.m4: New file.
3594         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3595         GNULIB_MBSSPN.
3596         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
3597         * MODULES.html.sh (Internationalization functions): Add mbsspn.
3598
3599 2007-02-04  Bruno Haible  <bruno@clisp.org>
3600
3601         New module mbspbrk.
3602         * modules/mbspbrk: New file.
3603         * lib/mbspbrk.c: New file.
3604         * lib/string_.h (strpbrk): Add a conditional link warning.
3605         (mbspbrk): New declaration.
3606         * m4/mbspbrk.m4: New file.
3607         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3608         GNULIB_MBSPBRK.
3609         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
3610         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
3611
3612 2007-02-04  Bruno Haible  <bruno@clisp.org>
3613
3614         New module mbscspn.
3615         * modules/mbscspn: New file.
3616         * lib/mbscspn.c: New file.
3617         * lib/string_.h (strcspn): Add a conditional link warning.
3618         (mbscspn): New declaration.
3619         * m4/mbscspn.m4: New file.
3620         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3621         GNULIB_MBSCSPN.
3622         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
3623         * MODULES.html.sh (Internationalization functions): Add mbscspn.
3624
3625 2007-02-04  Bruno Haible  <bruno@clisp.org>
3626
3627         New module mbscasestr, reduced goal of strcasestr.
3628         * modules/mbscasestr: New file.
3629         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
3630         (mbscasestr): Renamed from strcasestr.
3631         * lib/strcasestr.c: Don't include mbuiter.h.
3632         (strcasestr): Remove support for multibyte locales.
3633         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
3634         Change the conditional link warning.
3635         (mbscasestr): New declaration.
3636         * m4/mbscasestr.m4: New file.
3637         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
3638         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
3639         REPLACE_STRCASESTR.
3640         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
3641         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
3642         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
3643         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
3644         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
3645         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
3646         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
3647         (Depends-on): Remove mbuiter.
3648         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
3649
3650 2007-02-04  Bruno Haible  <bruno@clisp.org>
3651
3652         Simplify handling of strncasecmp.
3653         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
3654         the conditional link warning.
3655         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
3656         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
3657         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
3658         * modules/strcase (configure.ac): Don't invoke
3659         gl_STRING_MODULE_INDICATOR.
3660         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
3661
3662 2007-02-04  Bruno Haible  <bruno@clisp.org>
3663
3664         New module mbscasecmp, reduced goal of strcasecmp.
3665         * modules/mbscasecmp: New file.
3666         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
3667         (mbscasecmp): Renamed from strcasecmp.
3668         * lib/strcasecmp.c: Don't include mbuiter.h.
3669         (strcasecmp): Remove support for multibyte locales.
3670         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
3671         Change the conditional link warning.
3672         (mbscasecmp): New declaration.
3673         * m4/mbscasecmp.m4: New file.
3674         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
3675         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
3676         REPLACE_STRCASECMP.
3677         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
3678         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3679         GNULIB_MBSCASECMP.
3680         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
3681         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
3682         * modules/strcase (Files): Remove m4/mbrtowc.m4.
3683         (Depends-on): Remove mbuiter.
3684         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
3685
3686 2007-02-04  Bruno Haible  <bruno@clisp.org>
3687
3688         New module mbsstr. Remove module strstr.
3689         * modules/mbsstr: New file.
3690         * modules/strstr: Remove file.
3691         * lib/mbsstr.c: Renamed from lib/strstr.c.
3692         (mbsstr): Renamed from strstr.
3693         * lib/string_.h (strstr): Remove declaration. Change the conditional
3694         link warning.
3695         (mbsstr): New declaration.
3696         * m4/mbsstr.m4: New file.
3697         * m4/strstr.m4: Remove file.
3698         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
3699         REPLACE_STRSTR.
3700         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
3701         Don't initialize GNULIB_STRSTR.
3702         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
3703         substitute GNULIB_STRSTR and REPLACE_STRSTR.
3704         * MODULES.html.sh (Internationalization functions): Add mbsstr.
3705         (Support for systems lacking ANSI C 89): Remove strstr.
3706
3707 2007-02-04  Bruno Haible  <bruno@clisp.org>
3708
3709         New module mbsrchr.
3710         * modules/mbsrchr: New file.
3711         * lib/mbsrchr.c: New file.
3712         * lib/string_.h (strrchr): Add a conditional link warning.
3713         (mbsrchr): New declaration.
3714         * m4/mbsrchr.m4: New file.
3715         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3716         GNULIB_MBSRCHR.
3717         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
3718         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
3719
3720 2007-02-04  Bruno Haible  <bruno@clisp.org>
3721
3722         New module mbschr.
3723         * modules/mbschr: New file.
3724         * lib/mbschr.c: New file.
3725         * lib/string_.h (strchr): Add a conditional link warning.
3726         (mbschr): New declaration.
3727         * m4/mbschr.m4: New file.
3728         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3729         GNULIB_MBSCHR.
3730         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
3731         * MODULES.html.sh (Internationalization functions): Add mbschr.
3732
3733 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
3734
3735         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
3736
3737         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
3738
3739 2007-02-04  Bruno Haible  <bruno@clisp.org>
3740
3741         New module description section 'configure.ac-early'.
3742         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
3743         (func_get_autoconf_early_snippet): New function.
3744         (func_import, func_create_testdir): Use it. Remove special cases for
3745         modules 'extensions' and 'lock'.
3746         * modules/extensions (configure.ac-early): Require
3747         gl_USE_SYSTEM_EXTENSIONS.
3748         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
3749
3750 2007-02-04  Bruno Haible  <bruno@clisp.org>
3751
3752         Make use of gcj-4.3's -fsource and -ftarget option.
3753         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
3754         and if so try the options -fsource and -ftarget.
3755         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
3756         source_version, ftarget_option, target_version arguments.
3757         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
3758         (is_envjavac_oldgcj_14_14_usable): Renamed from
3759         is_envjavac_gcj_14_14_usable.
3760         (is_envjavac_oldgcj_14_13_usable): Renamed from
3761         is_envjavac_gcj_14_13_usable.
3762         (is_gcj_present): Update.
3763         (is_gcj_43, is_gcj43_usable): New functions.
3764         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
3765         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
3766         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
3767         try the options -fsource and -ftarget.
3768
3769 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
3770
3771         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
3772         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
3773         larger value.
3774
3775 2007-02-03  Jim Meyering  <jim@meyering.net>
3776
3777         Give tools a better chance to allocate space for very large buffers.
3778         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
3779
3780         Make pwd and readlink work also when run with an unreadable parent dir
3781         on systems with openat support.
3782         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
3783         provided getcwd function, even when we have openat support.
3784         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
3785
3786 2007-02-02  Bruno Haible  <bruno@clisp.org>
3787
3788         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
3789         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
3790         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
3791         portability problems if one of these functions is only used on specific
3792         platforms.
3793         Reported by Paul Eggert.
3794
3795 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
3796
3797         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
3798         is causing more trouble than it's curing.
3799         * lib/regex_internal.h (__mempcpy): Remove.
3800         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
3801         (and make the code a tad smaller to boot).
3802         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
3803
3804 2007-02-02  Jim Meyering  <jim@meyering.net>
3805
3806         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
3807         section, not in the Makefile.am: one.
3808
3809 2007-02-02  Eric Blake  <ebb9@byu.net>
3810
3811         * lib/strchrnul.c: Always include config.h first.
3812
3813         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
3814         gnulib strstr is not necessary here.
3815
3816 2007-02-02  Simon Josefsson  <simon@josefsson.org>
3817
3818         * m4/socklen.m4: Fix typo.
3819
3820 2007-02-02  Eric Blake  <ebb9@byu.net>
3821
3822         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
3823         * modules/netinet_in (Makefile.am): Likewise.
3824
3825 2007-02-01  Bruno Haible  <bruno@clisp.org>
3826
3827         * lib/string_.h (GL_LINK_WARNING): New macro.
3828         (strcasecmp, strstr, strcasestr): If provided by the system,
3829         conditionally define as a macro that leads to a warning instead of to
3830         an error.
3831         (strncasecmp): Conditionally define as a macro that leads to a warning.
3832
3833 2007-02-01  Karl Berry  <karl@gnu.org>
3834
3835         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
3836
3837 2007-02-01  Bruno Haible  <bruno@clisp.org>
3838
3839         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
3840         renamings.
3841
3842 2007-02-01  Eric Blake  <ebb9@byu.net>
3843
3844         * modules/regex (Depends-on): Revert dependence on mempcpy.
3845         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
3846         module's definition of mempcpy.
3847         Reported by Paul Eggert.
3848
3849 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
3850
3851         * lib/string_.h: If the gnulib module XYZ is not present, undefine
3852         the symbol XYZ before redefining it.  This fixes a problem with
3853         programs that don't use XYZ, when compiled on systems that define
3854         XYZ to something else.
3855
3856 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
3857
3858         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
3859         occurs when "mkdir -m foo" creates a setgid directory that is (1)
3860         writeable to group or other and (2) is intended to have a special
3861         mode bit that is set or cleared.  In such a case, the directory
3862         should be neither group- nor other-writeable until the special
3863         mode bits are right.
3864
3865 2007-01-31  Eric Blake  <ebb9@byu.net>
3866
3867         * modules/mountlist (Depends-on): Add strstr.
3868
3869         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
3870         bug.
3871         * modules/string (Makefile.am): Remove redundant replacement.
3872         * modules/regex (Depends-on): Add mempcpy.
3873
3874 2007-01-31  Bruno Haible  <bruno@clisp.org>
3875
3876         New module description field 'Link'.
3877         * gnulib-tool (func_usage): Document --extract-link-directive.
3878         (sed_extract_prog): Recognize 'Link' directive.
3879         (func_get_link_directive): New function.
3880         (func_import): Show summary of link directives.
3881         Handle --extract-link-directive option.
3882         * modules/acl (Link): New section.
3883         * modules/clock-time (Link): New section.
3884         * modules/euidaccess (Link): New section.
3885         * modules/gettext (Link): New section.
3886         * modules/iconv (Link): New section.
3887         * modules/lock (Link): New section.
3888         * modules/nanosleep (Link): New section.
3889         * modules/readline (Link): New section.
3890
3891 2007-01-27  Bruno Haible  <bruno@clisp.org>
3892
3893         Enforce the use of gnulib modules for unportable <string.h> functions.
3894         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
3895         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
3896         (gl_HEADER_STRING_H_BODY): Require it.
3897         * lib/string_.h: If the gnulib module XYZ is not present, redefine
3898         the symbol XYZ to one that gives a link error.
3899         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
3900         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
3901         * modules/mempcpy (configure.ac): Likewise.
3902         * modules/memrchr (configure.ac): Likewise.
3903         * modules/stpcpy (configure.ac): Likewise.
3904         * modules/stpncpy (configure.ac): Likewise.
3905         * modules/strcase (configure.ac): Likewise.
3906         * modules/strcasestr (configure.ac): Likewise.
3907         * modules/strchrnul (configure.ac): Likewise.
3908         * modules/strdup (configure.ac): Likewise.
3909         * modules/strndup (configure.ac): Likewise.
3910         * modules/strnlen (configure.ac): Likewise.
3911         * modules/strpbrk (configure.ac): Likewise.
3912         * modules/strsep (configure.ac): Likewise.
3913         * modules/strstr (configure.ac): Likewise.
3914         * modules/strtok_r (configure.ac): Likewise.
3915
3916 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
3917
3918         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
3919
3920 2007-01-30  Jim Meyering  <jim@meyering.net>
3921
3922         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
3923
3924 2007-01-29  Bruno Haible  <bruno@clisp.org>
3925
3926         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
3927         * lib/execute.c: Likewise.
3928         * lib/pipe.c: Likewise.
3929         * lib/printf-args.h: Likewise.
3930         * lib/printf-args.c: Likewise.
3931         * lib/printf-parse.c: Likewise.
3932         * lib/vasnprintf.c: Likewise.
3933
3934 2007-01-29  Eric Blake  <ebb9@byu.net>
3935
3936         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
3937         declaration.
3938
3939 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
3940
3941         * lib/strptime.h (strptime): Use 'restrict' for args where
3942         POSIX requires this.
3943         * lib/strptime.c (strptime): Likewise.
3944         Change license notice from LGPL to GPL, since gnulib-tool will
3945         change this as needed.
3946         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
3947         defined.
3948         Include "strptime.h" first, to check interface.
3949         Do not #undef _LIBC and _NL_CURRENT.
3950         Do not include <stdlib.h>; no longer needed.
3951         Include "time_r.h" and declare ptime_locale_status
3952         only if _LIBC is not defined.
3953         (__P): Remove unused macro.
3954         (match_string): Bring back glibc version, but use it only if _LIBC
3955         is defined.
3956         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
3957         Remove unnecessary assertion and abort() call.
3958         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
3959         * m4/strptime.m4: Fix serial number comment.
3960         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
3961         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
3962         (Depends-on): Add time_r.
3963
3964 2007-01-29  Bruno Haible  <bruno@clisp.org>
3965
3966         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
3967         strptime.
3968         * modules/strptime (Depends-on): Add stdbool.
3969         * lib/strptime.h: Include <time.h> always. Add comments.
3970
3971 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
3972
3973         * modules/strptime: New file.
3974         * lib/strptime.h: New file.
3975         * lib/strptime.c: New file.
3976         * m4/strptime.m4: New file.
3977
3978 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
3979
3980         * MODULES.html.sh: New module mpsort.
3981         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
3982
3983         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
3984         a circularity problem with HP-UX ia64 reported by Bob Proulx in
3985         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
3986         All uses changed.
3987         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
3988         All uses changed.
3989         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
3990         to _Restrict_.
3991         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
3992         the parameter matches the prototype.
3993
3994 2007-01-28  Jim Meyering  <jim@meyering.net>
3995
3996         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
3997         sys/time.h here, reverting that part of the previous patch:
3998         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
3999
4000 2007-01-28  Bruno Haible  <bruno@clisp.org>
4001
4002         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
4003         value of $(SYS_TIME_H).
4004         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
4005         remove it conditionally, too. [added by Jim Meyering]
4006         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
4007         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
4008         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
4009         GETTIMEOFDAY_REPLACEMENT to 1.
4010
4011 2007-01-28  Bruno Haible  <bruno@clisp.org>
4012
4013         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
4014         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
4015         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
4016         Set UNISTD_H instead of UNISTD_H2.
4017         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
4018
4019 2007-01-28  Bruno Haible  <bruno@clisp.org>
4020
4021         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
4022         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
4023
4024 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4025
4026         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
4027         (func_create_testdir): Ensure C locale for `grep' and `tr'
4028         character ranges.
4029         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
4030         ACLOCAL_AMFLAGS parsing state machine.
4031
4032 2007-01-27  Bruno Haible  <bruno@clisp.org>
4033
4034         * modules/unistr/base: Update.
4035
4036 2007-01-27  Bruno Haible  <bruno@clisp.org>
4037
4038         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
4039         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
4040         * modules/unistr/u32-mbtouc-unsafe: Renamed from
4041         modules/unistr/u32-mbtouc.
4042         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
4043         * lib/unistr.h: Update.
4044         * lib/linebreak.c: Update.
4045         * modules/unistr/u32-mbtouc: Renamed from
4046         modules/unistr/u32-mbtouc-safe.
4047         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
4048         * lib/unistr.h: Update.
4049         * lib/unistr/u32-to-u8.c: Update.
4050         * lib/unistr/u32-to-u16.c: Update.
4051
4052 2007-01-27  Bruno Haible  <bruno@clisp.org>
4053
4054         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
4055         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
4056         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
4057         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
4058         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
4059         * modules/unistr/u16-mbtouc-unsafe: Renamed from
4060         modules/unistr/u16-mbtouc.
4061         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
4062         * lib/unistr.h: Update.
4063         * lib/linebreak.c: Update.
4064         * modules/linebreak: Update.
4065         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
4066         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
4067         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
4068         * modules/unistr/u16-mbtouc: Renamed from
4069         modules/unistr/u16-mbtouc-safe.
4070         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
4071         * lib/unistr.h: Update.
4072         * lib/unistr/u16-to-u8.c: Update.
4073         * modules/unistr/u16-to-u8: Update.
4074         * lib/unistr/u16-to-u32.c: Update.
4075         * modules/unistr/u16-to-u32: Update.
4076
4077 2007-01-27  Bruno Haible  <bruno@clisp.org>
4078
4079         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
4080         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
4081         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
4082         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
4083         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
4084         * modules/unistr/u8-mbtouc-unsafe: Renamed from
4085         modules/unistr/u8-mbtouc.
4086         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
4087         * lib/unistr.h: Update.
4088         * lib/striconveh.c: Update.
4089         * modules/striconveh: Update.
4090         * lib/linebreak.c: Update.
4091         * modules/linebreak: Update.
4092         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
4093         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
4094         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
4095         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
4096         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
4097         * lib/unistr.h: Update.
4098         * lib/striconveh.c: Update.
4099         * modules/striconveh: Update.
4100         * lib/unistr/u8-to-u16.c: Update.
4101         * modules/unistr/u8-to-u16: Update.
4102         * lib/unistr/u8-to-u32.c: Update.
4103         * modules/unistr/u8-to-u32: Update.
4104
4105 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4106
4107         Sync from Libtool.
4108         * lib/argz.c: Do not include strings.h nor memory.h, include
4109         string.h unconditionally.  Patch by Simon Josefsson.
4110
4111 2007-01-27  Bruno Haible  <bruno@clisp.org>
4112
4113         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
4114         from gl_HEADER_STRING_H_BODY.
4115         (gl_HEADER_STRING_H_BODY): Require it.
4116         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
4117         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
4118         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
4119         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
4120         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
4121         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
4122         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
4123         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
4124         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
4125         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
4126         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
4127         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
4128         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
4129         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
4130         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
4131
4132 2007-01-27  Bruno Haible  <bruno@clisp.org>
4133
4134         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
4135         check_PROGRAMS into noinst_PROGRAMS.
4136         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
4137         check_PROGRAMS in this case.
4138         (func_import): Set for_test to false.
4139         (func_create_testdir): Set for_test to true.
4140
4141 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
4142             Bruno Haible  <bruno@clisp.org>
4143
4144         * modules/strcasestr (Files): Remove lib/strcasestr.h.
4145         (Depends-on): Add string.
4146         (Includes): Use <string.h> instead of strcasestr.h.
4147         * modules/string (Makefile.am): Also substitute the value of
4148         REPLACE_STRCASESTR.
4149         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
4150         assume strcasestr is declared in <string.h> not <strings.h>. Also
4151         set REPLACE_STRCASESTR.
4152         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
4153         REPLACE_STRCASESTR.
4154         * lib/strcasestr.h: Remove file.
4155         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
4156         * lib/string_.h (strcasestr): New declaration.
4157
4158 2007-01-27  Bruno Haible  <bruno@clisp.org>
4159
4160         * lib/string_.h: Use 'extern'.
4161
4162 2007-01-27  Jim Meyering  <jim@meyering.net>
4163
4164         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
4165         of set-but-not-used local, "q".
4166
4167         * lib/mempcpy.c: Include <config.h> before <string.h>.
4168         This fixes a compilation error on HP-UX, due to the system's
4169         "restrict"-using mempcpy prototype.
4170
4171 2007-01-26  Bruno Haible  <bruno@clisp.org>
4172
4173         Small optimization.
4174         * lib/javacomp.c: Include c-strstr.h.
4175          (is_envjavac_gcj): Use c_strstr instead of strstr.
4176         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
4177
4178 2007-01-26  Bruno Haible  <bruno@clisp.org>
4179
4180         * MODULES.html.sh (Unicode string functions): Add the new modules.
4181
4182         * modules/uniconv/u32-strconv-to-locale: New file.
4183         * lib/uniconv/u32-strconv-to-locale.c: New file.
4184
4185         * modules/uniconv/u16-strconv-to-locale: New file.
4186         * lib/uniconv/u16-strconv-to-locale.c: New file.
4187
4188         * modules/uniconv/u8-strconv-to-locale: New file.
4189         * lib/uniconv/u8-strconv-to-locale.c: New file.
4190
4191         * modules/uniconv/u32-strconv-from-locale: New file.
4192         * lib/uniconv/u32-strconv-from-locale.c: New file.
4193
4194         * modules/uniconv/u16-strconv-from-locale: New file.
4195         * lib/uniconv/u16-strconv-from-locale.c: New file.
4196
4197         * modules/uniconv/u8-strconv-from-locale: New file.
4198         * lib/uniconv/u8-strconv-from-locale.c: New file.
4199
4200         * modules/uniconv/u32-strconv-to-enc: New file.
4201         * lib/uniconv/u32-strconv-to-enc.c: New file.
4202         * modules/uniconv/u32-strconv-to-enc-tests: New file.
4203         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
4204
4205         * modules/uniconv/u16-strconv-to-enc: New file.
4206         * lib/uniconv/u16-strconv-to-enc.c: New file.
4207         * lib/uniconv/u-strconv-to-enc.h: New file.
4208         * modules/uniconv/u16-strconv-to-enc-tests: New file.
4209         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
4210
4211         * modules/uniconv/u8-strconv-to-enc: New file.
4212         * lib/uniconv/u8-strconv-to-enc.c: New file.
4213         * modules/uniconv/u8-strconv-to-enc-tests: New file.
4214         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
4215
4216         * modules/uniconv/u32-strconv-from-enc: New file.
4217         * lib/uniconv/u32-strconv-from-enc.c: New file.
4218         * modules/uniconv/u32-strconv-from-enc-tests: New file.
4219         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
4220
4221         * modules/uniconv/u16-strconv-from-enc: New file.
4222         * lib/uniconv/u16-strconv-from-enc.c: New file.
4223         * modules/uniconv/u16-strconv-from-enc-tests: New file.
4224         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
4225
4226         * modules/uniconv/u8-strconv-from-enc: New file.
4227         * lib/uniconv/u8-strconv-from-enc.c: New file.
4228         * lib/uniconv/u-strconv-from-enc.h: New file.
4229         * modules/uniconv/u8-strconv-from-enc-tests: New file.
4230         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
4231
4232         * modules/uniconv/u32-conv-from-enc: New file.
4233         * lib/uniconv/u32-conv-from-enc.c: New file.
4234         * modules/uniconv/u32-conv-from-enc-tests: New file.
4235         * tests/uniconv/test-u32-conv-from-enc.c: New file.
4236
4237         * modules/uniconv/u16-conv-from-enc: New file.
4238         * lib/uniconv/u16-conv-from-enc.c: New file.
4239         * lib/uniconv/u-conv-from-enc.h: New file.
4240         * modules/uniconv/u16-conv-from-enc-tests: New file.
4241         * tests/uniconv/test-u16-conv-from-enc.c: New file.
4242
4243         * modules/uniconv/u8-conv-from-enc: New file.
4244         * lib/uniconv/u8-conv-from-enc.c: New file.
4245         * modules/uniconv/u8-conv-from-enc-tests: New file.
4246         * tests/uniconv/test-u8-conv-from-enc.c: New file.
4247
4248         * modules/uniconv/base: New file.
4249         * lib/uniconv.h: New file.
4250
4251 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
4252
4253         * doc/gnulib-tool.texi (Initial import): Update to match current
4254         behavior with strdup module.
4255         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
4256         * lib/memmem.h: Remove; all uses removed.  This is now done
4257         by <string.h>.
4258         * lib/mempcpy.h: Likewise.
4259         * lib/memrchr.h: Likewise.
4260         * lib/stpcpy.h: Likewise.
4261         * lib/stpncpy.h: Likewise.
4262         * lib/strcase.h: Likewise.
4263         * lib/strchrnul.h: Likewise.
4264         * lib/strdup.h: Likewise.
4265         * lib/strndup.h: Likewise.
4266         * lib/strnlen.h: Likewise.
4267         * lib/strpbrk.h: Likewise.
4268         * lib/strsep.h: Likewise.
4269         * lib/strstr.h: Likewise.
4270         * lib/strtok_r.h: Likewise.
4271         * lib/string_.h: New file.
4272         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
4273         Rely on <string.h> instead.
4274         * lib/canon-host.c: Likewise.
4275         * lib/chdir-long.c: Likewise.
4276         * lib/concatpath.c: Likewise.
4277         * lib/exclude.c: Likewise.
4278         * lib/fchdir.c: Likewise.
4279         * lib/getaddrinfo.c: Likewise.
4280         * lib/getcwd.c: Likewise.
4281         * lib/getsubopt.c: Likewise.
4282         * lib/glob.c: Likewise.
4283         * lib/hard-locale.c: Likewise.
4284         * lib/iconvme.c: Likewise.
4285         * lib/javacomp.c: Likewise.
4286         * lib/mempcpy.c: Likewise.
4287         * lib/memrchr.c: Likewise.
4288         * lib/regex_internal.h: Likewise.
4289         * lib/stpncpy.c: Likewise.
4290         * lib/strcasecmp.c: Likewise.
4291         * lib/strchrnul.c: Likewise.
4292         * lib/strdup.c: Likewise.
4293         * lib/striconv.c: Likewise.
4294         * lib/striconveh.c: Likewise.
4295         * lib/striconveha.c: Likewise.
4296         * lib/strncasecmp.c: Likewise.
4297         * lib/strndup.c: Likewise.
4298         * lib/strnlen.c: Likewise.
4299         * lib/strsep.c: Likewise.
4300         * lib/strstr.c: Likewise.
4301         * lib/strtok_r.c: Likewise.
4302         * lib/userspec.c: Likewise.
4303         * lib/w32spawn.h: Likewise.
4304         * lib/xstrndup.c: Likewise.
4305         * lib/mountlist.c (strstr): Remove decl.
4306         * m4/string_h.m4: New file.
4307         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
4308         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
4309         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
4310         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
4311         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
4312         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
4313         Set REPLACE_STRCASECMP if necessary.
4314         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
4315         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
4316         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
4317         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
4318         HAVE_DECL_STRDUP if necessary.
4319         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
4320         since gl_FUNC_STRNDUP does that now.
4321         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
4322         Check for decl here...
4323         (gl_PREREQ_STRNLEN): ... not here.
4324         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
4325         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
4326         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
4327         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
4328         necessary.
4329         * modules/string: New file.
4330         * modules/memmem (Files): Remove special-purpose include file.
4331         (Depends-on): Add string.
4332         (Include): Include <string.h>, not the removed file.
4333         * modules/mempcpy: Likewise.
4334         * modules/memrchr: Likewise.
4335         * modules/stpcpy: Likewise.
4336         * modules/stpncpy: Likewise.
4337         * modules/strcase: Likewise.
4338         * modules/strchrnul: Likewise.
4339         * modules/strdup: Likewise.
4340         * modules/strndup: Likewise.
4341         * modules/strnlen: Likewise.
4342         * modules/strpbrk: Likewise.
4343         * modules/strsep: Likewise.
4344         * modules/strstr: Likewise.
4345         * modules/strtok_r: Likewise.
4346         * tests/test-dirname.c: Don't include "strdup.h", since
4347         <string.h> now suffices.
4348         * tests/test-memmem.c: Don't include "memmem.h", since
4349         <string.h> now suffices.
4350
4351 2007-01-25  Bruno Haible  <bruno@clisp.org>
4352
4353         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
4354         *resultp is 0.
4355
4356         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
4357         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
4358         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
4359         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
4360
4361         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
4362         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
4363         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
4364         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
4365         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
4366         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
4367
4368 2007-01-24  Bruno Haible  <bruno@clisp.org>
4369
4370         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
4371         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
4372         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
4373         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
4374         gl_FUNC_FTS_CORE.
4375         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
4376         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
4377         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
4378         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
4379         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
4380         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
4381         gl_FUNC_FCHOWNAT.
4382         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
4383         gl_FUNC_STRFTIME.
4384         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
4385         Reported by Ralf Wildenhues.
4386
4387 2007-01-24  Bruno Haible  <bruno@clisp.org>
4388
4389         Drop AC_REQUIRE calls that are redundant with the module dependencies.
4390         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
4391         gl_GETADDRINFO.
4392         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
4393         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
4394         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
4395
4396 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
4397
4398         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
4399         Don't use 'exit'; just return from 'main'.
4400         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
4401
4402         * lib/fnmatch_.h: Readjust white space and comments to match
4403         glibc, to avoid spurious diffs.
4404
4405 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
4406
4407         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
4408         2004-12-01 change by Jakub Jelinek, since this code won't compile
4409         if !LIBC.  Problem reported by Bob Proulx.
4410
4411 2007-01-23  Bruno Haible  <bruno@clisp.org>
4412
4413         * lib/striconveh.c: Include c-strcaseeq.h.
4414         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
4415         * modules/striconveh (Depends-on): Add c-strcaseeq.
4416
4417 2007-01-23  Bruno Haible  <bruno@clisp.org>
4418
4419         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
4420
4421         * modules/c-strcaseeq: New file.
4422         * lib/c-strcaseeq.h: New file.
4423
4424         * modules/streq: New file.
4425         * lib/streq.h: New file.
4426
4427 2007-01-23  Bruno Haible  <bruno@clisp.org>
4428
4429         * modules/striconveha-tests: New file.
4430         * tests/test-striconveha.c: New file.
4431
4432         * lib/striconveha.h: Include <stdbool.h>.
4433         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
4434         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
4435         (mem_iconveha_notranslit): Renamed from mem_iconveha.
4436         (mem_iconveha): New function.
4437         (str_iconveha_notranslit): Renamed from str_iconveha.
4438         (str_iconveha): New function.
4439         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
4440         c-strcase.
4441
4442 2007-01-23  Bruno Haible  <bruno@clisp.org>
4443
4444         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
4445         encodings without forgiving before trying any encoding with handler.
4446         (str_iconveha): Try all encodings without forgiving before trying any
4447         encoding with handler.
4448
4449 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
4450
4451         Import the following changes from libc.
4452
4453         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
4454
4455         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
4456
4457         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
4458
4459         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
4460         normal_bracket label.
4461
4462         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
4463
4464         [BZ #361]
4465         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
4466         to normal_bracket after fetching the next character.
4467
4468 2007-01-22  Bruno Haible  <bruno@clisp.org>
4469
4470         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
4471         argument.
4472         * lib/striconveh.c (iconv_carefully_1): New function.
4473         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
4474         argument.
4475         (str_cd_iconveh): Update.
4476         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
4477         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
4478         * tests/test-striconveh.c (MAGIC): New macro.
4479         (new_offsets): New function.
4480         (main): Test call with and without offsets.
4481
4482 2007-01-22  Bruno Haible  <bruno@clisp.org>
4483
4484         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
4485         * modules/sys_select (Makefile.am): Likewise.
4486         * modules/sys_socket (Makefile.am): Likewise.
4487         * modules/sys_time (Makefile.am): Likewise.
4488
4489 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
4490
4491         * modules/gettimeofday (License): Change from GPL to LGPL, since
4492         gettimeofday is a library function.
4493
4494 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4495
4496         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
4497
4498 2007-01-21  Bruno Haible  <bruno@clisp.org>
4499
4500         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
4501
4502 2007-01-21  Bruno Haible  <bruno@clisp.org>
4503
4504         * modules/striconveha: New file.
4505         * lib/striconveha.h: New file.
4506         * lib/striconveha.c: New file.
4507         * MODULES.html.sh (Internationalization functions): Add striconveha.
4508         * lib/striconv.c (str_iconv): Optimize the case of an empty input
4509         string.
4510         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
4511
4512 2007-01-21  Bruno Haible  <bruno@clisp.org>
4513
4514         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
4515         * lib/striconveh.c (str_iconveh): Likewise.
4516
4517 2007-01-21  Bruno Haible  <bruno@clisp.org>
4518
4519         * lib/striconveh.h (mem_iconveh): New declaration.
4520         * lib/striconveh.c (mem_iconveh): New function.
4521         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
4522
4523 2007-01-21  Bruno Haible  <bruno@clisp.org>
4524
4525         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
4526
4527         * lib/striconveh.h (mem_cd_iconveh): Change specification.
4528         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
4529         original result buffer.
4530         (str_cd_iconveh): Update.
4531         * tests/test-striconveh.c (main): Update.
4532
4533         * lib/striconv.h (mem_cd_iconv): Change specification.
4534         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
4535         result buffer.
4536         (str_cd_iconv): Update.
4537         * tests/test-striconv.c (main): Update.
4538
4539 2007-01-21  Bruno Haible  <bruno@clisp.org>
4540
4541         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
4542
4543 2007-01-20  Jim Meyering  <jim@meyering.net>
4544
4545         * lib/userspec.c (parse_with_separator): If a user or group string
4546         starts with "+", skip the corresponding name-to-ID look-up, since
4547         such a look-up must fail: user and group names may not include "+".
4548
4549 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
4550
4551         * lib/poll.c: Include sys/time.h and time.h unconditionally,
4552         since we now assume the sys_time module.
4553         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
4554         check for sys/time.h; no longer needed.
4555         * modules/poll (Depends-on): Depend on sys_time.
4556
4557 2007-01-18  Bruno Haible  <bruno@clisp.org>
4558
4559         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
4560         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
4561
4562         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
4563         gettimeofday.
4564
4565         * tests/test-gettimeofday.c: Include <time.h>.
4566         (dummy): Remove variable.
4567
4568         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
4569         gl_HEADER_SYS_TIME_H.
4570         (gl_HEADER_SYS_TIME_H): New macro.
4571
4572         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
4573         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4574         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
4575         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
4576         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4577         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
4578         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
4579         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4580         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
4581         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
4582         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4583
4584         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
4585         last change; it caused a compilation error when cross-compiling to
4586         Cygwin.
4587
4588 2007-01-18  Jim Meyering  <jim@meyering.net>
4589
4590         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
4591         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
4592         than the race-prone "test -d sys || mkdir sys".
4593         (configure.ac): Use AC_PROG_MKDIR_P.
4594         * modules/sys_select: Likewise.
4595         * modules/sys_socket: Likewise.
4596         * modules/sys_time: Likewise.
4597
4598 2007-01-18  Eric Blake  <ebb9@byu.net>
4599
4600         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
4601         replace gettimeofday.
4602         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
4603         name, to avoid infinite recursion.
4604
4605 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
4606
4607         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
4608         module sys_time.
4609         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
4610         assume timespec.h defines struct timeval.
4611         * lib/settime.c: Likewise.
4612         * lib/utimens.c: Likewise.
4613         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
4614         since we now assume the gettimeofday module.
4615         * lib/tempname.c (__gen_tempname): Likewise.
4616         * lib/gettimeofday.h: Remove.
4617         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
4618         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
4619         Include <time.h>, for 'time()'.
4620         (localtime_buffer_addr): Also use this workaround if
4621         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
4622         to simplify the uses.  All uses changed.
4623         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
4624         that #undef is inside {}, and 'const' follows type name consistently.
4625         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
4626         (gettimeofday): Do not use the maximum possible value for
4627         tv->tv_usec, since that might break usages other than ls.c.
4628         Instead, we'll leave ls.c alone.  This undoes today's patch
4629         by Bruno.  Add a compile-time warning for 1s-clock resolution;
4630         we've never observed the problem but might as well keep the
4631         canary.
4632         * lib/nanosleep.c: Include timespec.h first, for interface check.
4633         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
4634         now assume the sys_time module.
4635         * lib/tempname.c: Likewise.
4636         * lib/timespec.h: Likewise.
4637         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
4638         needed.
4639         * lib/strftime.c: Likewise.
4640         * lib/timespec.h: Likewise.
4641         * lib/posixtm.c: Include posixtm.h first, for interface check.
4642         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
4643         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
4644         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
4645         * lib/sys_time_.h: New file.
4646         * lib/timespec.h (struct timespec): Use long int, not long.
4647         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
4648         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
4649         Remove obsolescent call to AC_HEADER_TIME.
4650         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
4651         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
4652         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
4653         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
4654         Likewise.
4655         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
4656         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
4657         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
4658         into the sys_time module.  Check for gettimeofday just once.
4659         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
4660         for gettimeofday signature to just check the signature.  Merely
4661         compile it, since linking doesn't test signature.  Improve test for
4662         whether gettimeofday.o is actually needed.
4663         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
4664         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
4665         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
4666         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4667         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
4668         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
4669         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
4670         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
4671         than worrying about sys/time.h.
4672         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
4673         Don't bother worrying about TIME_WITH_SYS_TIME.
4674         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
4675         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
4676         * m4/sys_time_h.m4: New file.
4677         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
4678         Don't include sys/time.h.  Return from main rather than exiting.
4679         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
4680         all uses changed.
4681         * modules/gethrxtime (Depends-on): Add sys_time.
4682         * modules/gettime (Depends-on): Likewise.
4683         * modules/gettimeofday (Depends-on): Likewise.
4684         * modules/nanosleep (Depends-on): Likewise.
4685         * modules/settime (Depends-on): Likewise.
4686         * modules/tempname (Depends-on): Likewise.
4687         * modules/utimens (Depends-on): Likewise.
4688         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
4689         (Include:) Change back to <sys/time.h>.
4690         (Maintainer:) Add self.
4691         * modules/sys_time: New file.
4692         * modules/tempname (Depends-on): Add gettimeofday.
4693         * tests/test-gettimeofday.c: Include <sys/time.h>
4694         rather than gettimeofday.h.
4695
4696 2007-01-17  Bruno Haible  <bruno@clisp.org>
4697
4698         * gnulib-tool (func_get_license): Revert last patch. Instead, let
4699         the license default to GPL.
4700         (func_create_testdir): Don't complain if a module is LGPL and its
4701         tests module depends on GPLed modules.
4702
4703 2007-01-17  Bruno Haible  <bruno@clisp.org>
4704
4705         * lib/gettimeofday.c (gettimeofday): Add code for the case
4706         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
4707         maximum possible value for tv->tv_usec, rather than the minimum one.
4708
4709 2005-10-08  Martin Lambers  <marlam@marlam.de>
4710 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
4711 2007-01-16  Bruno Haible  <bruno@clisp.org>
4712
4713         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
4714         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
4715         gl_FUNC_GETTIMEOFDAY.
4716         (Include): Add gettimeofday.h.
4717         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
4718         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
4719         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
4720         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
4721         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
4722         * lib/gettimeofday.h: New file.
4723         * lib/gettimeofday.c: Include <sys/timeb.h>.
4724         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
4725         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4726         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
4727         fall back on time().
4728
4729         * tests/test-gettimeofday.c: New file.
4730         * modules/gettimeofday-tests: New file.
4731
4732 2007-01-16  Eric Blake  <ebb9@byu.net>
4733
4734         * modules/fnmatch (Depends-on): Depend on wchar.
4735         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
4736         * m4/fnmatch.m4: Likewise.
4737         * modules/mbchar (Makefile.am): Assume <wchar.h>.
4738         * m4/mbchar.m4: Likewise.
4739         * modules/mbswidth (Depends-on): Depend on wchar.
4740         * lib/mbswidth.c: Assume <wchar.h>.
4741         * m4/mbswidth.m4: Likewise.
4742         * modules/quotearg (Depends-on): Depend on wchar.
4743         * lib/quotearg.c: Assume <wchar.h>.
4744         * m4/quotearg.m4: Likewise.
4745         * modules/regex (Depends-on): Depend on wchar.
4746         * lib/regex_internal.h: Assume <wchar.h>.
4747         * m4/regex.m4: Likewise.
4748         * modules/stdint (Depends-on): Depend on wchar.
4749         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
4750         * m4/stdint.m4: Likewise.
4751         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
4752         * modules/strftime (Depends-on): Depend on wchar.
4753         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
4754         * modules/strtol (Depends-on): Depend on wchar.
4755         * lib/strtol.c: Assume <wchar.h>.
4756         * modules/wcwidth (Depends-on): Depend on wchar.
4757         * lib/wcwidth.h: Assume <wchar.h>.
4758         * m4/wcwidth.m4: Likewise.
4759
4760 2007-01-16  Bruno Haible  <bruno@clisp.org>
4761
4762         * modules/csharpexec-script: New, created from...
4763         * modules/csharpexec: ... this.
4764
4765 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
4766
4767         * modules/javaexec-script: New, created from...
4768         * modules/javaexec: ... this.
4769
4770 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4771
4772         * modules/poll (Dependencies): Add sys_select.
4773
4774 2007-01-15  Jim Meyering  <jim@meyering.net>
4775
4776         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
4777         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
4778         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
4779         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
4780
4781 2007-01-15  Bruno Haible  <bruno@clisp.org>
4782
4783         * modules/striconveh: New file.
4784         * lib/striconveh.h: New file.
4785         * lib/striconveh.c: New file.
4786         * MODULES.html.sh (Internationalization functions): Add striconveh.
4787
4788         * modules/striconveh-tests: New file.
4789         * tests/test-striconveh.c: New file.
4790
4791 2007-01-15  Bruno Haible  <bruno@clisp.org>
4792
4793         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
4794         not from GNU libiconv or GNU libc.
4795
4796 2007-01-15  Bruno Haible  <bruno@clisp.org>
4797
4798         * doc/gnulib-intro.texi (Copyright): Explain the different license
4799         terms for module descriptions, autoconf macros, tests, documentation.
4800
4801 2007-01-14  Bruno Haible  <bruno@clisp.org>
4802
4803         * modules/striconv-tests: New file.
4804         * tests/test-striconv.c: New file.
4805
4806 2007-01-14  Bruno Haible  <bruno@clisp.org>
4807
4808         * modules/iconv-tests: New file.
4809         * tests/test-iconv.c: New file.
4810
4811 2007-01-14  Bruno Haible  <bruno@clisp.org>
4812
4813         * gnulib-tool (func_get_license): For test modules, use the license of
4814         the main module.
4815
4816 2007-01-14  Bruno Haible  <bruno@clisp.org>
4817
4818         * modules/iconv (Include): Clarify that <iconv.h> can only be included
4819         if iconv is found to exist.
4820
4821 2007-01-14  Bruno Haible  <bruno@clisp.org>
4822
4823         * modules/c-ctype-tests: New file.
4824         * tests/test-c-ctype.c: New file.
4825
4826 2007-01-14  Bruno Haible  <bruno@clisp.org>
4827
4828         * modules/binary-io-tests: New file.
4829         * tests/test-binary-io.sh: New file.
4830         * tests/test-binary-io.c: New file.
4831
4832 2007-01-14  Bruno Haible  <bruno@clisp.org>
4833
4834         * modules/array-oset-tests: New file.
4835         * tests/test-array_oset.c: New file.
4836
4837 2007-01-14  Bruno Haible  <bruno@clisp.org>
4838
4839         * modules/array-list-tests: New file.
4840         * tests/test-array_list.c: New file.
4841
4842 2007-01-14  Bruno Haible  <bruno@clisp.org>
4843
4844         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
4845         and make.
4846         Reported by Simon Josefsson in
4847         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
4848
4849 2007-01-14  Bruno Haible  <bruno@clisp.org>
4850
4851         * modules/allocsa-tests: New file.
4852         * tests/test-allocsa.c: New file.
4853
4854 2007-01-14  Bruno Haible  <bruno@clisp.org>
4855
4856         * modules/fchdir (Depends-on): Add absolute-header.
4857         * modules/unistd (Depends-on): Likewise.
4858
4859 2006-12-30  Bruno Haible  <bruno@clisp.org>
4860
4861         * modules/fchdir: New file.
4862         * modules/unistd (Files): Add lib/unistd_.h.
4863         (Makefile.am): Generate unistd.h from unistd_.h.
4864         * lib/fchdir.c: New file.
4865         * lib/dirent_.h: New file.
4866         * lib/unistd_.h: New file.
4867         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
4868         * m4/fchdir.m4: New file.
4869         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
4870         (gl_HEADER_UNISTD): Invoke it.
4871         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
4872         function.
4873         * lib/backupfile.c (opendir, closedir): Undefine.
4874         * lib/chown.c (open, close): Undefine.
4875         * lib/clean-temp.c (open, close): Undefine.
4876         * lib/copy-file.c (open, close): Undefine.
4877         * lib/execute.c (open, close): Undefine.
4878         * lib/fsusage.c (open, close): Undefine.
4879         * lib/gc-gnulib.c (open, close): Undefine.
4880         * lib/getcwd.c (opendir, closedir): Undefine.
4881         * lib/glob.c (opendir, closedir): Undefine.
4882         * lib/javacomp.c (open, close): Undefine.
4883         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
4884         * lib/openat-proc.c (open, close): Undefine.
4885         * lib/pagealign_alloc.c (open, close): Undefine.
4886         * lib/pipe.c (open, close): Undefine.
4887         * lib/progreloc.c (open, close): Undefine.
4888         * lib/savedir.c (opendir, closedir): Undefine.
4889         * lib/utime.c (open, close): Undefine.
4890         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
4891
4892 2007-01-10  Bruno Haible  <bruno@clisp.org>
4893
4894         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
4895
4896 2007-01-12  Eric Blake  <ebb9@byu.net>
4897
4898         Provide a robust <wchar.h>.  Further simplifications are now
4899         possible in other modules, but not included here.
4900         * modules/wchar: New module.
4901         * m4/wchar.m4: New file.
4902         * lib/wchar_.h: Likewise.
4903         * modules/mbchar (Depends-on): Depend on wchar, as the first use
4904         of the new module.
4905         * MODULES.html.sh (Extended multibyte and wide character utilities):
4906         New section.
4907
4908 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
4909
4910         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
4911         to a reasonable default for memory allocation.
4912         (xreadlink): Don't allocate a huge buffer, to work around a buggy
4913         file system that reports garbage st_size values for symlinks.
4914         Problem reported by Liyang Hu.
4915
4916 2007-01-11  Simon Josefsson  <simon@josefsson.org>
4917
4918         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
4919         Emacs .#* auto-save files).
4920
4921 2007-01-11  Bruno Haible  <bruno@clisp.org>
4922
4923         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
4924         directory.
4925
4926 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
4927
4928         Use @...@ consistently in lib/wctype_.h.
4929         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
4930         on it being set to 1 or 0.
4931         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
4932         go back to AC_SUBSTing it.
4933         * modules/wctype (Makefile.am): Undo previous change.
4934
4935 2007-01-10  Eric Blake  <ebb9@byu.net>
4936
4937         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
4938         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
4939         * modules/wctype (Makefile.am): Likewise.
4940         Reported by Chris McGuire.
4941
4942 2007-01-10  Jim Meyering  <jim@meyering.net>
4943
4944         fts.c: a small readability/maintainability improvement
4945         * lib/fts.c (fts_read): Make this code slightly more readable and
4946         maintainable by hoisting the "sp->fts_cur = p" assignments to
4947         immediately follow the statements that set P.  Derived from
4948         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
4949
4950 2007-01-10  Eric Blake  <ebb9@byu.net>
4951
4952         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
4953         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
4954         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
4955         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
4956         Reported by Chris McGuire.
4957
4958 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4959
4960         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
4961         in sed script.
4962
4963 2007-01-09  Bruno Haible  <bruno@clisp.org>
4964
4965         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
4966         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
4967         variables.
4968         (func_module): Use them.
4969
4970 2007-01-09  Bruno Haible  <bruno@clisp.org>
4971
4972         * modules/unistr/base: New file.
4973         * lib/unistr.h: New file.
4974
4975         * modules/unistr/u8-to-u16: New file.
4976         * lib/unistr/u8-to-u16.c: New file.
4977
4978         * modules/unistr/u8-to-u32: New file.
4979         * lib/unistr/u8-to-u32.c: New file.
4980
4981         * modules/unistr/u16-to-u8: New file.
4982         * lib/unistr/u16-to-u8.c: New file.
4983
4984         * modules/unistr/u16-to-u32: New file.
4985         * lib/unistr/u16-to-u32.c: New file.
4986
4987         * modules/unistr/u32-to-u8: New file.
4988         * lib/unistr/u32-to-u8.c: New file.
4989
4990         * modules/unistr/u32-to-u16: New file.
4991         * lib/unistr/u32-to-u16.c: New file.
4992
4993         * modules/unistr/u8-check: New file.
4994         * modules/unistr/u16-check: New file.
4995         * modules/unistr/u32-check: New file.
4996         * lib/unistr/u8-check.c: New file.
4997         * lib/unistr/u16-check.c: New file.
4998         * lib/unistr/u32-check.c: New file.
4999
5000         * modules/unistr/u8-chr: New file.
5001         * modules/unistr/u16-chr: New file.
5002         * modules/unistr/u32-chr: New file.
5003         * lib/unistr/u8-chr.c: New file.
5004         * lib/unistr/u16-chr.c: New file.
5005         * lib/unistr/u32-chr.c: New file.
5006
5007         * modules/unistr/u8-cmp: New file.
5008         * modules/unistr/u16-cmp: New file.
5009         * modules/unistr/u32-cmp: New file.
5010         * lib/unistr/u8-cmp.c: New file.
5011         * lib/unistr/u16-cmp.c: New file.
5012         * lib/unistr/u32-cmp.c: New file.
5013
5014         * modules/unistr/u8-cpy: New file.
5015         * modules/unistr/u16-cpy: New file.
5016         * modules/unistr/u32-cpy: New file.
5017         * lib/unistr/u8-cpy.c: New file.
5018         * lib/unistr/u16-cpy.c: New file.
5019         * lib/unistr/u32-cpy.c: New file.
5020         * lib/unistr/u-cpy.h: New file.
5021
5022         * modules/unistr/u8-cpy-alloc: New file.
5023         * modules/unistr/u16-cpy-alloc: New file.
5024         * modules/unistr/u32-cpy-alloc: New file.
5025         * lib/unistr/u8-cpy-alloc.c: New file.
5026         * lib/unistr/u16-cpy-alloc.c: New file.
5027         * lib/unistr/u32-cpy-alloc.c: New file.
5028         * lib/unistr/u-cpy-alloc.h: New file.
5029
5030         * modules/unistr/u8-endswith: New file.
5031         * modules/unistr/u16-endswith: New file.
5032         * modules/unistr/u32-endswith: New file.
5033         * lib/unistr/u8-endswith.c: New file.
5034         * lib/unistr/u16-endswith.c: New file.
5035         * lib/unistr/u32-endswith.c: New file.
5036         * lib/unistr/u-endswith.h: New file.
5037
5038         * modules/unistr/u8-mblen: New file.
5039         * modules/unistr/u16-mblen: New file.
5040         * modules/unistr/u32-mblen: New file.
5041         * lib/unistr/u8-mblen.c: New file.
5042         * lib/unistr/u16-mblen.c: New file.
5043         * lib/unistr/u32-mblen.c: New file.
5044
5045         * modules/unistr/u8-mbtouc: New file.
5046         * modules/unistr/u16-mbtouc: New file.
5047         * modules/unistr/u32-mbtouc: New file.
5048         * lib/unistr/u8-mbtouc.c: New file.
5049         * lib/unistr/u16-mbtouc.c: New file.
5050         * lib/unistr/u32-mbtouc.c: New file.
5051
5052         * modules/unistr/u8-mbtouc-safe: New file.
5053         * modules/unistr/u16-mbtouc-safe: New file.
5054         * modules/unistr/u32-mbtouc-safe: New file.
5055         * lib/unistr/u8-mbtouc-safe.c: New file.
5056         * lib/unistr/u16-mbtouc-safe.c: New file.
5057         * lib/unistr/u32-mbtouc-safe.c: New file.
5058
5059         * modules/unistr/u8-move: New file.
5060         * modules/unistr/u16-move: New file.
5061         * modules/unistr/u32-move: New file.
5062         * lib/unistr/u8-move.c: New file.
5063         * lib/unistr/u16-move.c: New file.
5064         * lib/unistr/u32-move.c: New file.
5065         * lib/unistr/u-move.h: New file.
5066
5067         * modules/unistr/u8-next: New file.
5068         * modules/unistr/u16-next: New file.
5069         * modules/unistr/u32-next: New file.
5070         * lib/unistr/u8-next.c: New file.
5071         * lib/unistr/u16-next.c: New file.
5072         * lib/unistr/u32-next.c: New file.
5073
5074         * modules/unistr/u8-prev: New file.
5075         * modules/unistr/u16-prev: New file.
5076         * modules/unistr/u32-prev: New file.
5077         * lib/unistr/u8-prev.c: New file.
5078         * lib/unistr/u16-prev.c: New file.
5079         * lib/unistr/u32-prev.c: New file.
5080
5081         * modules/unistr/u8-set: New file.
5082         * modules/unistr/u16-set: New file.
5083         * modules/unistr/u32-set: New file.
5084         * lib/unistr/u8-set.c: New file.
5085         * lib/unistr/u16-set.c: New file.
5086         * lib/unistr/u32-set.c: New file.
5087         * lib/unistr/u-set.h: New file.
5088
5089         * modules/unistr/u8-startswith: New file.
5090         * modules/unistr/u16-startswith: New file.
5091         * modules/unistr/u32-startswith: New file.
5092         * lib/unistr/u8-startswith.c: New file.
5093         * lib/unistr/u16-startswith.c: New file.
5094         * lib/unistr/u32-startswith.c: New file.
5095         * lib/unistr/u-startswith.h: New file.
5096
5097         * modules/unistr/u8-stpcpy: New file.
5098         * modules/unistr/u16-stpcpy: New file.
5099         * modules/unistr/u32-stpcpy: New file.
5100         * lib/unistr/u8-stpcpy.c: New file.
5101         * lib/unistr/u16-stpcpy.c: New file.
5102         * lib/unistr/u32-stpcpy.c: New file.
5103         * lib/unistr/u-stpcpy.h: New file.
5104
5105         * modules/unistr/u8-stpncpy: New file.
5106         * modules/unistr/u16-stpncpy: New file.
5107         * modules/unistr/u32-stpncpy: New file.
5108         * lib/unistr/u8-stpncpy.c: New file.
5109         * lib/unistr/u16-stpncpy.c: New file.
5110         * lib/unistr/u32-stpncpy.c: New file.
5111         * lib/unistr/u-stpncpy.h: New file.
5112
5113         * modules/unistr/u8-strcat: New file.
5114         * modules/unistr/u16-strcat: New file.
5115         * modules/unistr/u32-strcat: New file.
5116         * lib/unistr/u8-strcat.c: New file.
5117         * lib/unistr/u16-strcat.c: New file.
5118         * lib/unistr/u32-strcat.c: New file.
5119         * lib/unistr/u-strcat.h: New file.
5120
5121         * modules/unistr/u8-strchr: New file.
5122         * modules/unistr/u16-strchr: New file.
5123         * modules/unistr/u32-strchr: New file.
5124         * lib/unistr/u8-strchr.c: New file.
5125         * lib/unistr/u16-strchr.c: New file.
5126         * lib/unistr/u32-strchr.c: New file.
5127
5128         * modules/unistr/u8-strcmp: New file.
5129         * modules/unistr/u16-strcmp: New file.
5130         * modules/unistr/u32-strcmp: New file.
5131         * lib/unistr/u8-strcmp.c: New file.
5132         * lib/unistr/u16-strcmp.c: New file.
5133         * lib/unistr/u32-strcmp.c: New file.
5134
5135         * modules/unistr/u8-strcpy: New file.
5136         * modules/unistr/u16-strcpy: New file.
5137         * modules/unistr/u32-strcpy: New file.
5138         * lib/unistr/u8-strcpy.c: New file.
5139         * lib/unistr/u16-strcpy.c: New file.
5140         * lib/unistr/u32-strcpy.c: New file.
5141         * lib/unistr/u-strcpy.h: New file.
5142
5143         * modules/unistr/u8-strcspn: New file.
5144         * modules/unistr/u16-strcspn: New file.
5145         * modules/unistr/u32-strcspn: New file.
5146         * lib/unistr/u8-strcspn.c: New file.
5147         * lib/unistr/u16-strcspn.c: New file.
5148         * lib/unistr/u32-strcspn.c: New file.
5149         * lib/unistr/u-strcspn.h: New file.
5150
5151         * modules/unistr/u8-strdup: New file.
5152         * modules/unistr/u16-strdup: New file.
5153         * modules/unistr/u32-strdup: New file.
5154         * lib/unistr/u8-strdup.c: New file.
5155         * lib/unistr/u16-strdup.c: New file.
5156         * lib/unistr/u32-strdup.c: New file.
5157         * lib/unistr/u-strdup.h: New file.
5158
5159         * modules/unistr/u8-strlen: New file.
5160         * modules/unistr/u16-strlen: New file.
5161         * modules/unistr/u32-strlen: New file.
5162         * lib/unistr/u8-strlen.c: New file.
5163         * lib/unistr/u16-strlen.c: New file.
5164         * lib/unistr/u32-strlen.c: New file.
5165         * lib/unistr/u-strlen.h: New file.
5166
5167         * modules/unistr/u8-strmblen: New file.
5168         * modules/unistr/u16-strmblen: New file.
5169         * modules/unistr/u32-strmblen: New file.
5170         * lib/unistr/u8-strmblen.c: New file.
5171         * lib/unistr/u16-strmblen.c: New file.
5172         * lib/unistr/u32-strmblen.c: New file.
5173
5174         * modules/unistr/u8-strmbtouc: New file.
5175         * modules/unistr/u16-strmbtouc: New file.
5176         * modules/unistr/u32-strmbtouc: New file.
5177         * lib/unistr/u8-strmbtouc.c: New file.
5178         * lib/unistr/u16-strmbtouc.c: New file.
5179         * lib/unistr/u32-strmbtouc.c: New file.
5180
5181         * modules/unistr/u8-strncat: New file.
5182         * modules/unistr/u16-strncat: New file.
5183         * modules/unistr/u32-strncat: New file.
5184         * lib/unistr/u8-strncat.c: New file.
5185         * lib/unistr/u16-strncat.c: New file.
5186         * lib/unistr/u32-strncat.c: New file.
5187         * lib/unistr/u-strncat.h: New file.
5188
5189         * modules/unistr/u8-strncmp: New file.
5190         * modules/unistr/u16-strncmp: New file.
5191         * modules/unistr/u32-strncmp: New file.
5192         * lib/unistr/u8-strncmp.c: New file.
5193         * lib/unistr/u16-strncmp.c: New file.
5194         * lib/unistr/u32-strncmp.c: New file.
5195
5196         * modules/unistr/u8-strncpy: New file.
5197         * modules/unistr/u16-strncpy: New file.
5198         * modules/unistr/u32-strncpy: New file.
5199         * lib/unistr/u8-strncpy.c: New file.
5200         * lib/unistr/u16-strncpy.c: New file.
5201         * lib/unistr/u32-strncpy.c: New file.
5202         * lib/unistr/u-strncpy.h: New file.
5203
5204         * modules/unistr/u8-strnlen: New file.
5205         * modules/unistr/u16-strnlen: New file.
5206         * modules/unistr/u32-strnlen: New file.
5207         * lib/unistr/u8-strnlen.c: New file.
5208         * lib/unistr/u16-strnlen.c: New file.
5209         * lib/unistr/u32-strnlen.c: New file.
5210         * lib/unistr/u-strnlen.h: New file.
5211
5212         * modules/unistr/u8-strpbrk: New file.
5213         * modules/unistr/u16-strpbrk: New file.
5214         * modules/unistr/u32-strpbrk: New file.
5215         * lib/unistr/u8-strpbrk.c: New file.
5216         * lib/unistr/u16-strpbrk.c: New file.
5217         * lib/unistr/u32-strpbrk.c: New file.
5218         * lib/unistr/u-strpbrk.h: New file.
5219
5220         * modules/unistr/u8-strrchr: New file.
5221         * modules/unistr/u16-strrchr: New file.
5222         * modules/unistr/u32-strrchr: New file.
5223         * lib/unistr/u8-strrchr.c: New file.
5224         * lib/unistr/u16-strrchr.c: New file.
5225         * lib/unistr/u32-strrchr.c: New file.
5226
5227         * modules/unistr/u8-strspn: New file.
5228         * modules/unistr/u16-strspn: New file.
5229         * modules/unistr/u32-strspn: New file.
5230         * lib/unistr/u8-strspn.c: New file.
5231         * lib/unistr/u16-strspn.c: New file.
5232         * lib/unistr/u32-strspn.c: New file.
5233         * lib/unistr/u-strspn.h: New file.
5234
5235         * modules/unistr/u8-strstr: New file.
5236         * modules/unistr/u16-strstr: New file.
5237         * modules/unistr/u32-strstr: New file.
5238         * lib/unistr/u8-strstr.c: New file.
5239         * lib/unistr/u16-strstr.c: New file.
5240         * lib/unistr/u32-strstr.c: New file.
5241         * lib/unistr/u-strstr.h: New file.
5242
5243         * modules/unistr/u8-strtok: New file.
5244         * modules/unistr/u16-strtok: New file.
5245         * modules/unistr/u32-strtok: New file.
5246         * lib/unistr/u8-strtok.c: New file.
5247         * lib/unistr/u16-strtok.c: New file.
5248         * lib/unistr/u32-strtok.c: New file.
5249         * lib/unistr/u-strtok.h: New file.
5250
5251         * modules/unistr/u8-uctomb: New file.
5252         * modules/unistr/u16-uctomb: New file.
5253         * modules/unistr/u32-uctomb: New file.
5254         * lib/unistr/u8-uctomb.c: New file.
5255         * lib/unistr/u16-uctomb.c: New file.
5256         * lib/unistr/u32-uctomb.c: New file.
5257
5258         * MODULES.html.sh (Unicode string functions): Add the new modules.
5259
5260 2007-01-08  Bruno Haible  <bruno@clisp.org>
5261
5262         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
5263         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
5264         subdirectories.
5265
5266 2007-01-08  Karl Berry  <karl@gnu.org>
5267
5268         * doc/error.texi: mention that main() fns must set program_name
5269         when progname is used.
5270
5271 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
5272
5273         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
5274         WCTYPE_H is empty, for the benefit of builds from non-distclean
5275         directories.  Problem reported by Eric Blake in
5276         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
5277
5278 2007-01-08  Bruno Haible  <bruno@clisp.org>
5279
5280         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
5281         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
5282         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
5283         PROVIDE_CANONICALIZE_FILENAME_MODE.
5284         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
5285
5286 2007-01-08  Bruno Haible  <bruno@clisp.org>
5287
5288         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
5289         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
5290         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
5291         * lib/fts.c: Likewise.
5292         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
5293
5294 2006-12-25  Bruno Haible  <bruno@clisp.org>
5295
5296         * modules/utf8-ucs4-safe: New file.
5297         * lib/utf8-ucs4-safe.h: New file.
5298         * lib/unistr/utf8-ucs4-safe.c: New file.
5299
5300         * modules/utf16-ucs4-safe: New file.
5301         * lib/utf16-ucs4-safe.h: New file.
5302         * lib/unistr/utf16-ucs4-safe.c: New file.
5303
5304         * MODULES.html.sh (Unicode string functions): Add the new modules.
5305
5306 2007-01-08  Bruno Haible  <bruno@clisp.org>
5307
5308         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
5309         (Depends-on): Add unitypes.
5310         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
5311         (u8_mbtouc_aux): Move out to separate file.
5312         (u8_mbtouc): Use ucs4_t, uint8_t types.
5313         * lib/unistr/utf8-ucs4.c: New file.
5314
5315         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
5316         (Depends-on): Add unitypes.
5317         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
5318         (u16_mbtouc_aux): Move out to separate file.
5319         (u16_mbtouc): Use ucs4_t, uint16_t types.
5320         * lib/unistr/utf16-ucs4.c: New file.
5321
5322         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
5323         (Depends-on): Add unitypes.
5324         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
5325         (u8_uctomb_aux): Move out to separate file.
5326         (u8_uctomb): Use ucs4_t, uint8_t types.
5327         * lib/unistr/ucs4-utf8.c: New file.
5328
5329         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
5330         (Depends-on): Add unitypes.
5331         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
5332         (u16_uctomb_aux): Move out to separate file.
5333         (u16_uctomb): Use ucs4_t, uint16_t types.
5334         * lib/unistr/ucs4-utf16.c: New file.
5335
5336 2006-12-25  Bruno Haible  <bruno@clisp.org>
5337
5338         * modules/unitypes: New file.
5339         * lib/unitypes.h: New file.
5340         * MODULES.html.sh (func_all_modules): New section "Unicode string
5341         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
5342         this section. Add unitypes.
5343
5344 2007-01-08  Bruno Haible  <bruno@clisp.org>
5345
5346         Avoid variable names that conflict with those from libtool.
5347         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
5348         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
5349         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
5350         library_names_spec to acl_library_names_spec, hardcode_* to
5351         acl_hardcode_*.
5352         Reported by Ralf Wildenhues.
5353
5354 2007-01-08  Bruno Haible  <bruno@clisp.org>
5355
5356         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
5357         definition.
5358         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
5359         definition.
5360         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
5361         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
5362         definition.
5363         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
5364         definition.
5365         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
5366         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
5367         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
5368         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
5369         definition.
5370         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
5371         definition.
5372         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
5373         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
5374         GC_USE_<algorithm>.
5375         * lib/gc-libgcrypt.c: Likewise.
5376         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
5377         * modules/gc-arctwo (configure.ac): Likewise.
5378         * modules/gc-des (configure.ac): Likewise.
5379         * modules/gc-hmac-md5 (configure.ac): Likewise.
5380         * modules/gc-hmac-sha1 (configure.ac): Likewise.
5381         * modules/gc-md2 (configure.ac): Likewise.
5382         * modules/gc-md4 (configure.ac): Likewise.
5383         * modules/gc-md5 (configure.ac): Likewise.
5384         * modules/gc-random (configure.ac): Likewise.
5385         * modules/gc-rijndael (configure.ac): Likewise.
5386         * modules/gc-sha1 (configure.ac): Likewise.
5387
5388 2007-01-08  Bruno Haible  <bruno@clisp.org>
5389
5390         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
5391         macro definition.
5392         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
5393         definition.
5394         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
5395         definition.
5396         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
5397         * modules/fcntl-safer (configure.ac): Likewise.
5398         * modules/fopen-safer (configure.ac): Likewise.
5399         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
5400         GNULIB_FWRITEERROR macro definition.
5401
5402 2007-01-08  Bruno Haible  <bruno@clisp.org>
5403
5404         * m4/gnulib-common.m4: New file.
5405         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
5406         (func_get_filelist): Add m4/gnulib-common.m4.
5407
5408 2007-01-08  Bruno Haible  <bruno@clisp.org>
5409
5410         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
5411         command.
5412
5413 2007-01-08  Jim Meyering  <jim@meyering.net>
5414
5415         Use a more robust test for a "can't happen" condition.
5416         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
5417         narrowed the st_size value.  Presuming the "can't happen" condition
5418         is true, that narrowing could conceivably convert an invalid st_size
5419         value into a valid one.  Instead, use a change based on Matthew
5420         Woehlke's original patch.
5421
5422         Slight readability improvement: use an assert-like macro
5423         in place of literal "abort ()" uses.
5424         * lib/fts.c (fts_assert): Define.
5425         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
5426         Use this macro instead of a bare 'abort'.
5427
5428 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
5429
5430         Don't worry about using IRIX 5.3's wctype.h broken definitions;
5431         simply work around them.
5432         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
5433         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
5434         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
5435         declaring.
5436         Don't bother to define as macros, since the standard doesn't require it.
5437         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
5438         longer worry about IRIX 5.3.
5439         (HAVE_WCTYPE_CTMP_BUG): Remove.
5440
5441 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
5442
5443         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
5444         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
5445         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
5446         Problems reported by Georg Schwarz for IRIX 5.3.
5447
5448         * gnulib-tool (autoconf_minversion): Take the maximum version number
5449         found, not the minimum.  Problem reported by James Youngman.
5450
5451 2007-01-03  Karl Berry  <karl@gnu.org>
5452
5453         * doc/error.texi: new file, explaining interaction with progname.
5454         * doc/gnulib.texi: include it.  Update copyright.
5455
5456 2007-01-03  Simon Josefsson  <simon@josefsson.org>
5457
5458         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
5459         AC_CANONICAL_HOST, to improve autobuild outputs.
5460
5461 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
5462             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
5463
5464         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
5465         sockets, server sockets, and other file descriptors.  Count errors
5466         to compute the return value.  Reorder the code a bit to be easier
5467         to follow.  Don't set event bits that were not requested (except
5468         POLLERR and POLLHUP).
5469
5470 2007-01-01  Bruno Haible  <bruno@clisp.org>
5471
5472         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
5473
5474 2007-01-03  Jim Meyering  <jim@meyering.net>
5475
5476         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
5477
5478 2007-01-02  Bruno Haible  <bruno@clisp.org>
5479
5480         * modules/settime (Include): Require timespec.h.
5481         * modules/nanosleep (Include): Likewise.
5482
5483 2007-01-01  Bruno Haible  <bruno@clisp.org>
5484
5485         * gnulib-tool (func_emit_copyright_notice): Bump year.
5486         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
5487
5488 2007-01-01  Bruno Haible  <bruno@clisp.org>
5489
5490         Improve support for OpenBSD.
5491         * build-aux/config.rpath (libname_spec): Export.
5492         (library_names_spec): New variable. Export.
5493         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
5494         library_names_spec from the config.rpath output. Locate shared library
5495         through the name pattern in library_names_spec.
5496
5497 2007-01-01  Eric Blake  <ebb9@byu.net>
5498
5499         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
5500
5501 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
5502
5503         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
5504         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
5505         assume the C locale, and avoid an "eval" that could cause trouble.
5506         Problem with SORT reported by Bob Proulx.
5507
5508         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
5509         Define.  Trivial patch from Henning Nielsen Lund, originally
5510         sent to bug-grep@gnu.org today.
5511
5512 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
5513
5514         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
5515         struct stat.  Problem reported by Henning Nielsen Lund.
5516         * lib/acl.c: Include acl.h first, to check interface.  Don't
5517         bother to include sys/types.h and sys/stat.h again.
5518
5519 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
5520
5521         Import the following change from libc; problem reported by
5522         Sven Verdoolaege.
5523
5524         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
5525
5526         [BZ #1373]
5527         * lib/argp.h: Remove __NTH for __argp_usage inline function.
5528
5529 2006-12-28  Jim Meyering  <jim@meyering.net>
5530
5531         * build-aux/announce-gen: Do not assume that the package
5532         builds any of tar.gz, tar.bz2, and .xdelta files.
5533         Suggestion from Simon Josefsson.
5534
5535 2006-12-28  Simon Josefsson  <simon@josefsson.org>
5536
5537         * modules/announce-gen: New file.
5538
5539 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
5540
5541         * lib/mbchar.h: Just include <wctype.h>; the wctype module
5542         handles its gotchas now.
5543         * lib/mbswidth.c: Likewise.
5544         * lib/wcwidth.h: Likewise.
5545         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
5546         and iswcntrl; the wctype module does this stuff now.
5547         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
5548         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
5549         * modules/mbchar (Depends-on): Add wctype.
5550         * modules/mbswidth (Depends-on): Likewise.
5551         * modules/wcwidth (Depends-on): Likewise.
5552
5553 2006-12-27  Eric Blake  <ebb9@byu.net>
5554
5555         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
5556         module uses more than what <wctype.h> is required to provide.
5557
5558 2006-12-26  Eric Blake  <ebb9@byu.net>
5559
5560         * gnulib-tool (sed_extract_prog): Avoid space-tab.
5561
5562 2006-12-26  Eric Blake  <ebb9@byu.net>
5563
5564         * modules/absolute-header: New module.
5565         * modules/fcntl (Depends-on): Depend on it.
5566         * modules/inttypes (Depends-on): Likewise.
5567         * modules/stdint (Depends-on): Likewise.
5568         * modules/sys_stat (Depends-on): Likewise.
5569         * modules/wctype (Depends-on): Likewise.
5570         * MODULES.html.sh (Support for building libraries and
5571         executables): Document it.
5572
5573 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
5574
5575         * gnulib-tool (SED): Remove, undoing previous change.
5576         The problem was that it broke coreutils on Solaris, because
5577         "sed --posix" leaked into a makefile.
5578         (sed): New alias, if 'alias' and GNU sed.
5579
5580 2006-12-24  Jim Meyering  <jim@meyering.net>
5581
5582         Work around an fchownat bug in glibc-2.4:
5583         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
5584         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
5585         in spite of the -P option.
5586         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
5587         New macros.
5588         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
5589         * modules/openat (Files): Add lib/fchownat.c.
5590         * lib/openat.c (fchownat): Don't define here.  Move to...
5591         * lib/fchownat.c: ...this new file.
5592
5593 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
5594
5595         Fix bug reported by Bruno Haible in
5596         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
5597         where quotearg.c didn't compile on Mac OS X 10.2 because it
5598         lacks <wchar.h> and wint_t.
5599         * lib/wctype_.h (__wctype_wint_t): New type.
5600         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
5601         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
5602         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
5603         Arg is now of type __wctype_wint_t, not wint_t.
5604         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
5605         substitute HAVE_WINT_T.
5606         * modules/wctype (Files): Add m4/wint_t.m4.
5607         (wctype.h): Substitute HAVE_WINT_T.
5608
5609 2006-12-23  Bruno Haible  <bruno@clisp.org>
5610
5611         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
5612
5613 2006-12-23  Bruno Haible  <bruno@clisp.org>
5614
5615         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
5616         S_ISLNK.
5617         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
5618         mingw.
5619
5620 2006-12-22  Bruno Haible  <bruno@clisp.org>
5621
5622         * lib/copy-file.c: Include acl.h.
5623         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
5624         Close the file descriptors only after being done with copy_acl.
5625         * modules/copy-file (Depends-on): Add acl.
5626
5627 2006-12-22  Bruno Haible  <bruno@clisp.org>
5628
5629         * gnulib-tool (SED): New variable.
5630         Use $SED instead of sed everywhere.
5631
5632 2006-12-22  Bruno Haible  <bruno@clisp.org>
5633
5634         * modules/no-c++: New file.
5635         * m4/no-c++.m4: New file.
5636         * MODULES.html.sh (Support for building libraries and executables):
5637         Add no-c++.
5638
5639 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
5640
5641         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
5642         Include <limits.h>, and use its INT_MAX to rewrite the
5643         j loop so that it does not overflow 'int'.  Problem reported by
5644         Ralf Wildenhues in
5645         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
5646         Play it safe by shifting left by 1 rather than multiplying by 2,
5647         as GCC is less likely to optimize this away when the value
5648         is signed (when it assumes overflow leads to undefined behavior).
5649         Also, don't assume time_t uses two's complement.
5650
5651 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
5652
5653         * MODULES.html.sh: New module wctype.
5654         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
5655         * lib/fnmatch.c: Don't bother to include <wchar.h> before
5656         <wctype.h>, since the new wctype module should fix this.
5657         * lib/quotearg.c: Include <wctype.h> unconditionally, since
5658         the wctype module should arrange for it.
5659         * lib/regex_internal.h: Likewise.
5660         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
5661         since the wctype module should handle this now.
5662         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
5663         * modules/fnmatch (Depends-on): Add wctype.
5664         * modules/quotearg (Depends-on): Likewise.
5665         * modules/regex (Depends-on): Likewise.
5666
5667 2006-12-19  Bruno Haible  <bruno@clisp.org>
5668
5669         * lib/strdup.h [C++]: Wrap definitions in extern "C".
5670         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
5671
5672 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5673
5674         * modules/savewd (Depends-on): Fix dependency on fcntl.
5675
5676 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
5677
5678         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
5679         conforms to C99, rather than relying on the user's environment
5680         setting of STDINT_H.
5681
5682 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
5683         and Eric Blake  <ebb9@byu.net>
5684
5685         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
5686         This is more consistent with the other defines here.
5687         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
5688         Port to z/OS.  Problem reported by Paul Gilmartin.
5689         Change local vars to use gl_ prefix rather than ac_.
5690         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
5691         with other defines.
5692         * modules/double-slash-root: New module.
5693         * modules/dirname (Files): Remove m4/double-slash-root.m4.
5694         (Depends-on): Add double-slash-root.
5695         * MODULES.html.sh (File system functions): Mention new module.
5696
5697 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
5698
5699         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
5700         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
5701         This is for the benefit of gzip, which doesn't do i18n.
5702
5703 2006-12-12  Jim Meyering  <jim@meyering.net>
5704
5705         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
5706         Reported by Andreas Schwab <schwab@suse.de>.
5707
5708 2006-12-12  Bruno Haible  <bruno@clisp.org>
5709
5710         Merge these changes.
5711         2006-09-05  Bruno Haible  <bruno@clisp.org>
5712         * lib/iconvme.c (iconv_string): No need to save and restore errno when
5713         iconv_alloc succeeded.
5714         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
5715         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
5716         test for " && dest " at the end - dest is always != NULL there. Call
5717         iconv with 4xNULL arguments initially, to reset the state. Call iconv
5718         with 2xNULL arguments, also to flush the state storage. Handle the
5719         IRIX iconv behaviour. Realloc the final result, to throw away unused
5720         memory.
5721
5722 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
5723
5724         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
5725         and fchmodat unconditionally, since glibc 2.4 has them.
5726         Problem reported by Arkadiusz Miskiewicz.
5727
5728 2006-12-10  Bruno Haible  <bruno@clisp.org>
5729
5730         * gnulib-tool (func_import): Show the include files only for those
5731         modules that are copied and specified.
5732         Reported by Karl Berry.
5733
5734 2006-12-08  Jim Meyering  <jim@meyering.net>
5735
5736         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
5737         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
5738
5739         * build-aux/announce-gen: Add two new options, both optional:
5740         --bootstrap-tools=TOOL_LIST
5741               a comma-separated list of tools, e.g.,
5742               autoconf,automake,bison,gnulib
5743         --gnulib-snapshot-date=DATE
5744               if gnulib is in the bootstrap tool list,
5745               then report this as the snapshot date.
5746               If not specified, use the current date/time.
5747               If you specify a date here, be sure it's UTC.
5748
5749 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5750
5751         * tests/test-argp-2.sh: Fix test to match actual output.
5752         (func_compare): Fix sed script to be portable.
5753
5754 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
5755
5756         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
5757         workaround for this case.  It is not autoconfigured now; offhand
5758         it's hard to see how to autoconfigure it.
5759
5760 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
5761
5762         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
5763         a directory that is about to be chowned.  Such a directory's
5764         initial file permissions should permit the owner only and this
5765         should not be changed until after the chown, since the group and
5766         other bits would be incorrect if they granted permission before
5767         the chown.
5768
5769         Fix porting problem for iswctype reported by Georg Schwarz in:
5770         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
5771         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
5772         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
5773         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
5774         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
5775
5776 2006-12-03  Jim Meyering  <jim@meyering.net>
5777
5778         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
5779         p->fts_statp may not yet be defined.
5780         (fts_read): Instead, set it in the caller, once p->fts_statp is
5781         sure to be defined, and corresponds to a top-level directory.
5782         This bug made du -x fail.  Here's the coreutils test case:
5783         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
5784         Reported by Mike Frysinger.
5785
5786 2006-12-01  Jim Meyering  <jim@meyering.net>
5787
5788         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
5789         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
5790         Reported by Simon Josefsson.
5791
5792 2006-11-30  Jim Meyering  <jim@meyering.net>
5793
5794         * m4/warning.m4: Use the all-permissive copyright notice
5795         recommended by RMS (rather than LGPL).
5796         * m4/vararrays.m4: Likewise.
5797         * m4/flexmember.m4: Likewise.
5798
5799 2006-11-29  Bruno Haible  <bruno@clisp.org>
5800
5801         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5802         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
5803         using +=.
5804         Reported by Simon Josefsson <simon@josefsson.org>.
5805
5806 2006-11-28  James Youngman <jay@gnu.org>
5807
5808         * README: Advise users that they might find the bug-gnulib@gnu.org
5809         and autotools-announce@gnu.org mailing lists useful.
5810
5811 2006-11-28  Bruno Haible  <bruno@clisp.org>
5812
5813         * m4/ptrdiff_max.m4: Remove file.
5814
5815 2006-11-21  Bruno Haible  <bruno@clisp.org>
5816
5817         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
5818         _AC_COMPUTE_INT.
5819         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
5820         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
5821         _AC_COMPUTE_INT.
5822         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
5823         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
5824         _AC_COMPUTE_INT.
5825         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
5826
5827 2006-11-28  Jim Meyering  <jim@meyering.net>
5828
5829         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
5830         warning from "gcc -Wshadow" about shadowing the builtin.
5831
5832 2006-11-27  Bruno Haible  <bruno@clisp.org>
5833
5834         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
5835         _AC_COMPUTE_INT.
5836         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
5837
5838 2006-11-27  Bruno Haible  <bruno@clisp.org>
5839             Paul Eggert  <eggert@cs.ucla.edu>
5840
5841         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
5842
5843 2006-11-26  Bruno Haible  <bruno@clisp.org>
5844
5845         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5846         noinst_LTLIBRARIES.
5847
5848 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
5849             Bruno Haible  <bruno@clisp.org>
5850
5851         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
5852         if compiling with "gcc -ansi".
5853
5854 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
5855
5856         Fix some incompatibilities with gcc -ansi -pedantic.
5857         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
5858         if compiling pedantically with GCC, unless it's C99 or later.
5859         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
5860         it mishandles gcc -ansi -pedantic as well.
5861         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
5862         if gcc -pedantic.
5863         * lib/regexec.c (check_node_accept_bytes): Don't use auto
5864         initializers for struct if -pedantic, unless it's C99 or later.
5865
5866 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
5867
5868         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
5869         Don't close an fd more than once. Identical atimes indicate
5870         success, not failure.
5871
5872 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
5873
5874         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
5875
5876 2006-11-23  Jim Meyering  <jim@meyering.net>
5877
5878         * build-aux/announce-gen: New file.  From coreutils.
5879
5880 2006-11-22  Jim Meyering  <jim@meyering.net>
5881
5882         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
5883         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
5884         (fts_read): Use a temporary to narrow the overused st_size member
5885         before using it in a switch statement.  Reported by Matthew Woehlke.
5886
5887         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
5888         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
5889
5890 2006-11-20  Bruno Haible  <bruno@clisp.org>
5891
5892         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
5893         changequote instead of pairs of brackets.
5894         Reported by Andreas Schwab <schwab@suse.de>.
5895
5896 2006-11-21  Jim Meyering  <jim@meyering.net>
5897
5898         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
5899         so as to remain compatible with older compilers.
5900         Patch from Michael Deutschmann.
5901
5902 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
5903
5904         * MODULES.html.sh (File system functions): Add openat.
5905
5906         * lib/openat.h (rpl_fstatat): New macro, if
5907         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
5908         (fstatat): Define to rpl_fstatat under the same conditions,
5909         unless COMPILING_FSTATAT.
5910         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
5911         seems to have the bug.
5912         * lib/fstatat.c: New file.
5913         * modules/openat (Files): Add it.
5914
5915 2006-11-20  Bruno Haible  <bruno@clisp.org>
5916
5917         * Makefile: New file.
5918
5919 2006-11-20  Jim Meyering  <jim@meyering.net>
5920
5921         The beginnings of syntax-related checks for gnulib.
5922         * lib/Makefile: New file.
5923         * lib/t-idcache: New script.  Ensure that the two halves of
5924         idcache.c stay in sync.
5925
5926         * lib/idcache.c: Adjust comments in user- and group- portions to
5927         be more accurate, and to be consistent with one another.
5928
5929 2006-11-20  Jim Meyering  <jim@meyering.net>
5930
5931         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
5932         continue using the flexible array member (thus, this module performs
5933         half as many malloc calls), with the addition that...
5934         (getgroup, getuser): Consistently record a non-match via an empty
5935         "name" string, and map an empty string match to a NULL return value.
5936         * modules/idcache (Depends-on): Re-add flexmember.
5937
5938         * lib/idcache.c (getuser): Remove all uses of the register keyword.
5939         (getuidbyname, getgroup, getgidbyname): Likewise.
5940
5941         Use cleaner syntax: NULL rather than 0.
5942         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
5943
5944 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
5945
5946         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
5947         It mishandled the case where the group was missing.
5948         Problem reported by Greg Schafer.
5949         * modules/idcache: Likewise.
5950
5951 2006-11-18  Jim Meyering  <jim@meyering.net>
5952
5953         * check-module (%exempt_header): Add exception for some
5954         conditionally-included headers.
5955
5956         * modules/i-ring (Depends-on): Add verify.
5957         (License): Change to LGPL.
5958
5959 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
5960
5961         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
5962         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
5963         and inttostr.h.  Use snprintf rather than uinttostr, so that
5964         LGPLed code doesn't depend on GPLed.
5965
5966 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
5967
5968         * modules/inline (License): Change from GPL to LGPL.
5969
5970 2006-11-17  Jim Meyering  <jim@meyering.net>
5971
5972         * modules/d-type (License): Switch to LGPL.
5973
5974 2006-11-15  Bruno Haible  <bruno@clisp.org>
5975
5976         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
5977
5978 2006-11-15  Eric Blake  <ebb9@byu.net>
5979
5980         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
5981         the module dependency.
5982
5983 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5984             Bruno Haible  <bruno@clisp.org>
5985
5986         * gnulib-tool (func_create_testdir): Add license consistency check.
5987
5988 2006-11-15  Eric Blake  <ebb9@byu.net>
5989
5990         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
5991         random "(cached)" in configure output.
5992
5993 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5994
5995         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
5996         test for conforming inttypes.h is both announced and cached.
5997
5998         * MODULES.html.sh (seen_modules, seen_files): New variables.
5999         (func_module): Rewrite to use a few less gnulib-tool and sed
6000         invocations.  Avoid a couple of quadratic algorithms for ...
6001         (missed_modules, missed_files): ... these, with ...
6002         (func_append, func_tmpdir): ... these new functions, from
6003         gnulib-tool.  Analogously, install traps for cleanup.
6004
6005         * tests/test-gc.c (main): Remove unused variables.
6006         * tests/test-read-file.c: Include stdlib.h, for 'free'.
6007
6008 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
6009
6010         * modules/inttostr (License): Change to LGPL.
6011
6012 2006-11-14  Eric Blake  <ebb9@byu.net>
6013
6014         * modules/tempname (License): Change to LGPL.
6015
6016 2006-11-14  Eric Blake  <ebb9@byu.net>
6017
6018         * doc/functions.texi (Function Portability): *printf functions on
6019         Cygwin now understand all POSIX size specifiers.
6020
6021 2006-11-14  Bruno Haible  <bruno@clisp.org>
6022
6023         * modules/c-ctype (License): Change to LGPL.
6024
6025 2006-11-12  Bruno Haible  <bruno@clisp.org>
6026
6027         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
6028         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
6029         for GNOME libraries, for which the include files are installed in
6030         subdirectories of $prefix/include.
6031
6032 2006-11-12  Bruno Haible  <bruno@clisp.org>
6033
6034         * m4/lib-link.m4: Require at least autoconf-2.54.
6035         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
6036         name to underscores for the --with option.
6037
6038 2006-11-13  Bruno Haible  <bruno@clisp.org>
6039
6040         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
6041         the tests directory.
6042         Reported by Ralf Wildenhues.
6043
6044 2006-11-13  Bruno Haible  <bruno@clisp.org>
6045
6046         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
6047         (func_emit_initmacro_end): Undo the override here.
6048         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
6049         Works around the famous automake error in coreutils.
6050
6051 2006-11-13  Eric Blake  <ebb9@byu.net>
6052
6053         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
6054         element, not its node.
6055
6056 2006-11-12  Bruno Haible  <bruno@clisp.org>
6057
6058         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
6059         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
6060
6061 2006-11-12  Bruno Haible  <bruno@clisp.org>
6062
6063         * gnulib-tool: New option --local-symlink.
6064         (func_usage): Document it.
6065         (lsymbolic): New variable.
6066         (func_import, func_create_testdir): If --symlink was not specified,
6067         test whether --local-symlink was specified and the file comes from
6068         the local_gnulib_dir.
6069
6070 2006-11-12  Bruno Haible  <bruno@clisp.org>
6071
6072         * gnulib-tool (func_ln): New function.
6073         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
6074
6075 2006-11-12  Bruno Haible  <bruno@clisp.org>
6076
6077         Finish support for source files in subdirectories.
6078         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
6079         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
6080         AUTOMAKE_OPTIONS.
6081         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
6082
6083 2006-11-12  Bruno Haible  <bruno@clisp.org>
6084
6085         * gnulib-tool (func_get_automake_snippet): Synthesize also an
6086         EXTRA_lib_SOURCES augmentation.
6087         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
6088
6089 2006-11-12  Jim Meyering  <jim@meyering.net>
6090
6091         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
6092         file descriptors.  This also averts a failure on systems with
6093         native openat support when a traversed directory lacks "x" access.
6094         * lib/fts_.h: Include "i-ring.h"
6095         (struct FTS) [fts_fd_ring]: New member.
6096         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
6097         (FCHDIR): Add parentheses.
6098         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
6099         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
6100         When descending, rather than simply closing the previous
6101         fts_cwd_fd value, push that file descriptor onto the ring.
6102         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
6103         (fts_open): Initialize the new fd_ring member.
6104         (fts_close): Clear the ring.
6105         (fts_safe_changedir): When possible, use our new fd_ring to skip
6106         the diropen and fstat and dev/ino comparison that would normally
6107         accompany a virtual `chdir ("..")'.
6108
6109         * modules/fts (Depends-on): Add i-ring.
6110         * modules/i-ring: New module.
6111         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
6112         * m4/i-ring.m4: New file.
6113
6114 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6115
6116         * gnulib-tool (func_create_testdir): Fix replacement of
6117         `build-aux' in configure.ac.  Run autotools in gltests
6118         subdirectory.
6119         (func_create_testdir, func_create_megatestdir, test): There is
6120         no need for '--force' in most autotool invocations in a new
6121         tree.  Actually fail the whole test if any of the tools, or the
6122         configure or make stages fail.
6123
6124         Sync from Automake.
6125         * build-aux/gnupload: Revert last change.  Add pointer to upload
6126         instructions of the GNU Maintenance Instructions.
6127         Suggestion by Karl Berry.
6128
6129 2006-11-10  Jim Meyering  <jim@meyering.net>
6130
6131         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
6132
6133 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
6134
6135         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
6136         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
6137         (bind_textdomain_codeset) [! ENABLE_NLS]:
6138         Evaluate all the arguments.  That way, callers get compatible behavior
6139         if the arguments have side effects.  Also, it avoids some GCC
6140         diagnostics in some cases; Joel E. Denny reported problems when Bison
6141         was configured with --enable-gcc-warnigs.
6142
6143 2006-11-10  Jim Meyering  <jim@meyering.net>
6144
6145         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
6146         relevant options in CFLAGS (like -O, -fno-inline) are taken into
6147         account.
6148
6149 2006-11-10  Jim Meyering  <jim@meyering.net>
6150
6151         * modules/inline: New file/module.
6152         * modules/xalloc (Files): Remove m4/inline.m4.
6153         (Depends-on): Add inline, instead.
6154         * modules/oset: Likewise.
6155         * modules/list: Likewise.
6156
6157 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
6158
6159         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
6160         Problem reported by Matthew Woehlke.
6161
6162 2006-11-09  Bruno Haible  <bruno@clisp.org>
6163
6164         * lib/tempname.c (gen_tempname): Remove variant that invokes
6165         __gen_tempname.
6166         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
6167         __gen_tempname.
6168
6169 2006-11-08  Bruno Haible  <bruno@clisp.org>
6170
6171         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
6172         to 'yes' instead of 'cross-compiling'.
6173
6174 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
6175
6176         * lib/quotearg.h (quotearg_free): New decl.
6177         * lib/quotearg.c (quotearg_free): New function.
6178         (slot0, nslots, slotvec0, slotvec):
6179         Now file-scope so that quotearg_free can get at them.
6180
6181 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6182
6183         Sync from Automake.
6184         * build-aux/gnupload: Add missing 'gnu' to example URL.
6185         Report by Karl Berry.
6186
6187 2006-11-08  Bruno Haible  <bruno@clisp.org>
6188
6189         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
6190         Suggested by Paul Eggert.
6191
6192 2006-11-08  Jim Meyering  <jim@meyering.net>
6193
6194         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
6195         It's already included if !_LIBC.
6196         (fts_safe_changedir): Add a comment.
6197
6198 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
6199
6200         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
6201         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
6202         Matthew Woehlke.
6203
6204         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
6205         definitions up, to avoid colliding with change below.
6206         (static_inline) [HAVE_INLINE]: New macro.
6207         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
6208         Provide extern decls when !HAVE_INLINE.  Do not define unless
6209         static_inline is defined, either by us or by xmalloc.c.  Use
6210         static_inline rather than static inline.
6211         (XCALLOC): Optimize sizeof(T) = 1 case.
6212         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
6213
6214 2006-11-07  Bruno Haible  <bruno@clisp.org>
6215
6216         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
6217         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
6218         AC_C_INLINE.
6219         * modules/xalloc (Files): Add m4/inline.m4.
6220
6221 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6222
6223         * README: Fix typo.
6224         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
6225         (Miscellanous Notes): ...from this.
6226
6227 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
6228
6229         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
6230         Mention that offsetof should be used instead of sizeof.
6231         From Bruno Haible.
6232
6233 2006-11-07  Bruno Haible  <bruno@clisp.org>
6234
6235         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
6236
6237 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
6238
6239         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
6240         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
6241         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
6242         (gl_tree_add_before, gl_tree_add_after):
6243         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
6244         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
6245         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
6246         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
6247         (gl_linked_add_after, gl_linked_add_at): Likewise.
6248         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
6249         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
6250         (gl_tree_add_before, gl_tree_add_after): Likewise.
6251         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
6252         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
6253         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
6254
6255 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6256
6257         * lib/gl_oset.h: Use C comment style, not C++ comment style.
6258
6259 2006-11-06  Bruno Haible  <bruno@clisp.org>
6260
6261         * m4/inline.m4: New file.
6262         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
6263         * modules/list (Files): Add m4/inline.m4.
6264         * modules/oset (Files): Likewise.
6265
6266 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
6267
6268         * lib/idcache.c: Include <stddef.h>, for offsetof.
6269         (struct userid.name): Change from char * to a flexible array member.
6270         All uses changed.
6271         * modules/idcache (Depends-on): Add flexmember.
6272
6273         * MODULES.html.sh (Core language properties): New module flexmember.
6274         * modules/flexmember, m4/flexmember.m4: New files.
6275
6276         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
6277         inline functions that are identical with the old xnmalloc_inline,
6278         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
6279         that we can avoid some unnecessary integer multiplications and
6280         divisions in the common case where the element size is known at
6281         compile time.
6282         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
6283         needed.
6284         (xnboundedmalloc): Remove.
6285         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
6286         arguments, for consistency with rest of this header.
6287         (xcharalloc): Rewrite using XNMALLOC.
6288         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
6289         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
6290         versions have been moved to lib/xalloc.h and renamed to be the
6291         non-*_inline versions.
6292         (xmalloc, xrealloc): Implement without reference to the xnmalloc
6293         and xnrealloc functions, since those functions are now inline and
6294         now call us.
6295         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
6296         renaming described above.
6297         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
6298         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
6299         captures the dependency in AC_C_INLINE.
6300
6301         New module canonicalize-lgpl, proposed by Charles Wilson in
6302         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
6303         with a few small changes afterwards.
6304         * MODULES.html.sh (File system functions): New module
6305         canonicalize-lgpl.
6306         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
6307         and canonicalize_file_name.
6308         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
6309         * modules/canonicalize-lgpl: New files.
6310
6311 2006-11-05  Bruno Haible  <bruno@clisp.org>
6312
6313         * gnulib-tool (func_import, func_create_testdir): Create directories
6314         also for files in subdirectories of lib/.
6315
6316 2006-11-05  Bruno Haible  <bruno@clisp.org>
6317
6318         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
6319         ANSI C compliant.
6320
6321 2006-11-03  Bruno Haible  <bruno@clisp.org>
6322
6323         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
6324         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
6325         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
6326         (xnboundedmalloc): New inline function.
6327         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
6328         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
6329         xmalloc.
6330         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
6331         xmalloc.
6332         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
6333         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
6334         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
6335         xmalloc.
6336         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
6337         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
6338         xmalloc.
6339         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
6340         gl_tree_add_after): Use XMALLOC instead of xmalloc.
6341         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
6342         xmalloc.
6343         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
6344         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
6345         gl_tree_add_after): Use XMALLOC instead of xmalloc.
6346         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
6347         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
6348         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
6349         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
6350
6351 2006-11-03  Bruno Haible  <bruno@clisp.org>
6352
6353         * lib/c-ctype.h [C++]: Define functions without name mangling.
6354         * lib/fwriteerror.h [C++]: Likewise.
6355         * lib/gcd.h [C++]: Likewise.
6356         * lib/linebreak.h [C++]: Likewise.
6357
6358 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
6359
6360         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
6361         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
6362         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
6363         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
6364         Check for functions and headers just once.
6365         Check for declaration of canonicalize_file_name.
6366         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
6367
6368 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6369
6370         * gnulib-tool (func_import): Fix typo in actioncmd.
6371
6372 2006-11-02  Bruno Haible  <bruno@clisp.org>
6373
6374         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
6375         newline sequence in the Makefile.am snippet as a space, like "make"
6376         does.
6377         Reported by Roger Persson <perrog@gmail.com>.
6378
6379 2006-11-01  Bruno Haible  <bruno@clisp.org>
6380
6381         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
6382         already declared in <string.h>.
6383         * lib/strcase.h (strncasecmp): Don't declare it if yes.
6384
6385 2006-11-01  Bruno Haible  <bruno@clisp.org>
6386
6387         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
6388         * lib/strcase.h: Include <string.h>.
6389         (strcasecmp): Define to rpl_strcasecmp here.
6390
6391 2006-11-01  Bruno Haible  <bruno@clisp.org>
6392
6393         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
6394
6395 2006-11-01  Eric Blake  <ebb9@byu.net>
6396
6397         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
6398
6399         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
6400
6401 2006-10-29  Bruno Haible  <bruno@clisp.org>
6402
6403         Make it compile in C++ mode.
6404         * lib/full-write.c (full_rw): Add a cast.
6405
6406 2006-11-01  Bruno Haible  <bruno@clisp.org>
6407
6408         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
6409         be POSIX compliant.
6410         Reported by Roger Persson <perrog@gmail.com>.
6411
6412 2006-11-01  Eric Blake  <ebb9@byu.net>
6413
6414         * lib/getopt_.h: Fix comments.
6415
6416 2006-10-31  Eric Blake  <ebb9@byu.net>
6417
6418         * modules/tmpdir (Depends-on): Add sys_stat.
6419         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
6420         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
6421         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
6422         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
6423         tempname.
6424
6425 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
6426
6427         Avoid some C++ diagnostics reported by Bruno Haible.
6428         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
6429         xmalloc.
6430         (quotearg_alloc): Use xcharalloc rather than xmalloc.
6431         (struct slotvec): Move to top level.
6432         (quotearg_n_options): Rewrite to avoid xmalloc.
6433         * lib/xalloc.h (xcharalloc): New function.
6434         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
6435         [defined __cplusplus]: Add function template that provides result
6436         type propagation.  This part of the change is from Bruno Haible.
6437
6438 2006-10-29  Bruno Haible  <bruno@clisp.org>
6439
6440         Make it compile in C++ mode.
6441         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
6442         * lib/strnlen1.c (strnlen1): Cast memchr result.
6443         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
6444         * lib/clean-temp.c (string_equals, string_hash): Add casts.
6445         (create_temp_dir): Rename local variable 'template'.
6446         (compile_csharp_using_sscli): Add cast.
6447         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
6448         * lib/findprog.c (find_in_path): Likewise.
6449         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
6450         * lib/wait-process.c (register_slave_subprocess): Likewise.
6451
6452 2006-10-22  Bruno Haible  <bruno@clisp.org>
6453
6454         * modules/tsearch: New file.
6455         * lib/tsearch.h: New file.
6456         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
6457         * m4/tsearch.m4: New file.
6458         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
6459
6460 2006-10-29  Eric Blake  <ebb9@byu.net>
6461
6462         * lib/arcfour.c: Assume config.h.
6463         * lib/arctwo.c: Likewise.
6464         * lib/base64.c: Likewise.
6465         * lib/check-version.c: Likewise.
6466         * lib/crc.c: Likewise.
6467         * lib/des.c: Likewise.
6468         * lib/gc-gnulib.c: Likewise.
6469         * lib/gc-libgcrypt.c: Likewise.
6470         * lib/gc-pbkdf2-sha1.c: Likewise.
6471         * lib/getaddrinfo.c: Likewise.
6472         * lib/getdelim.c: Likewise.
6473         * lib/getline.c: Likewise.
6474         * lib/hmac-md5.c: Likewise.
6475         * lib/hmac-sha1.c: Likewise.
6476         * lib/iconvme.c: Likewise.
6477         * lib/md2.c: Likewise.
6478         * lib/md4.c: Likewise.
6479         * lib/memxor.c: Likewise.
6480         * lib/read-file.c: Likewise.
6481         * lib/readline.c: Likewise.
6482         * lib/rijndael-alg-fst.c: Likewise.
6483         * lib/rijndael-api-fst.c: Likewise.
6484         * lib/xgetdomainname.c: Likewise.
6485
6486 2006-10-28  Eric Blake  <ebb9@byu.net>
6487
6488         * lib/xstrndup.c: Assume config.h.
6489
6490 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
6491
6492         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
6493         stat-macros.h is now for our own macros, whereas stat_h is for
6494         macros in the <sys/stat.h> name space.
6495         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
6496         (STAT_MACROS_H): Remove.
6497         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
6498         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
6499         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
6500         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
6501         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
6502         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
6503         Move these macros to ...
6504         * lib/stat_.h: here.  Don't include stat-macros.h.
6505         * lib/canonicalize.c: Don't include stat-macros.h.
6506         * lib/chown.c: Likewise.
6507         * lib/euidaccess.c: Likewise.
6508         * lib/file-type.c: Likewise.
6509         * lib/filemode.c: Likewise.
6510         * lib/glob.c: Likewise.
6511         * lib/isapipe.c: Likewise.
6512         * lib/lchown.c: Likewise.
6513         * lib/lstat.c: Likewise.
6514         * lib/mkdir-p.c: Likewise.
6515         * lib/rmdir.c: Likewise.
6516         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
6517         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
6518         unless mkdir isn't declared, to speed up 'configure'.
6519         Always create sys/stat.h, since it's unlikely any real sys/stat.h
6520         would define all the S_* symbols.
6521         * modules/canonicalize (Depends-on):
6522         Depend on sys_stat, not stat-macros.
6523         * modules/chown: Likewise.
6524         * modules/euidaccess: Likewise.
6525         * modules/filemode: Likewise.
6526         * modules/file-type: Likewise.
6527         * modules/glob: Likewise.
6528         * modules/isapipe: Likewise.
6529         * modules/lchown: Likewise.
6530         * modules/lstat: Likewise.
6531         * modules/mkancesdirs: Likewise.
6532         * modules/rmdir: Likewise.
6533         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
6534         * modules/modechange: Likewise.
6535         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
6536         (configure.ac): Remove gl_STAT_MACROS.
6537         * modules/sys_stat (Depends-on): Remove stat-macros.
6538
6539 2006-10-27  Bruno Haible  <bruno@clisp.org>
6540
6541         * m4/signed.m4: Remove file.
6542         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
6543         invocation.
6544         * modules/vasnprintf (Files): Remove m4/signed.m4.
6545
6546 2006-10-27  Bruno Haible  <bruno@clisp.org>
6547
6548         Update to GNU gettext 0.16.
6549         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
6550         m4/inttypes-h.m4, m4/signed.m4.
6551         * m4/gettext.m4: Update to GNU gettext 0.16.
6552         * m4/intl.m4: New file, from GNU gettext.
6553         * m4/intldir.m4: New file, from GNU gettext.
6554         * config/srclist.txt: Update
6555
6556 2006-10-27  Eric Blake  <ebb9@byu.net>
6557
6558         * MODULES.html.sh: Document tempname.
6559         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
6560         dependencies.
6561         (Files): Move lib/tempname.c...
6562         * modules/tempname: ...to this new module.
6563         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
6564         (gl_PREREQ_TEMPNAME): Move...
6565         * m4/tempname.m4: ...to this new file.
6566         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
6567         * modules/sys_stat (Depends-on): Add stat-macros.
6568         * lib/stat_.h (includes): Pick up stat macros.
6569         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
6570         if stat macros are broken.
6571         * lib/tempname.c (includes): No need to include "stat-macros.h".
6572         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
6573         (direxists, __path_search) [!_LIBC]: Don't compile these in
6574         gnulib; the tmpdir module covers that.
6575         * lib/tempname.h: New file.
6576
6577 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
6578
6579         * COPYING: Explain how gnulib-tool converts licence headers.
6580         Almost all wording by Eric Blake.
6581
6582 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
6583
6584         * lib/mbchar.h (is_basic_table): Make read-only.
6585         * lib/mbchar.c (is_basic_table): Likewise.
6586         Reported by John Darrington.
6587
6588 2006-10-25  Bruno Haible  <bruno@clisp.org>
6589
6590         * lib/progname.h (set_program_name): Undefine before defining.
6591
6592 2006-10-25  Bruno Haible  <bruno@clisp.org>
6593
6594         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
6595         false for non-gcc C++ compilers.
6596         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
6597
6598 2006-10-24  Bruno Haible  <bruno@clisp.org>
6599
6600         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
6601         iconv implementations like Irix iconv.
6602
6603 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
6604
6605         * modules/vararrays: New file.
6606         * m4/vararrays.m4: New file, taken from diffutils.
6607         * MODULES.html.sh: New module vararrays.
6608
6609 2006-10-24  Karl Berry  <karl@gnu.org>
6610
6611         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
6612         Don't call GNU Unix.
6613
6614 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6615
6616         * users.txt: Add Libtool.
6617
6618         Sync from Libtool:
6619
6620         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
6621
6622         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
6623         to gnulib's policy of including config.h unconditionally.
6624
6625 2006-10-24  Bruno Haible  <bruno@clisp.org>
6626
6627         * modules/wcwidth (Files): Add m4/wint_t.m4.
6628         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
6629         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
6630
6631 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
6632
6633         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
6634         to pacify GCC with some -W flags enabled.  Problem reported by
6635         Bruno Haible.
6636
6637 2006-10-24  Jim Meyering  <jim@meyering.net>
6638
6639         * MODULES.html.sh: Remove uinttostr.  It's not a module.
6640         Reported by Karl Berry.
6641
6642 2006-10-23  Bruno Haible  <bruno@clisp.org>
6643
6644         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
6645
6646 2006-10-24  Bruno Haible  <bruno@clisp.org>
6647
6648         * lib/gl_list.h: Use C comment style, not C++ comment style.
6649
6650 2006-10-23  Eric Blake  <ebb9@byu.net>
6651
6652         * lib/getaddrinfo.c (includes): Add missing include.
6653
6654 2006-10-23  Bruno Haible  <bruno@clisp.org>
6655             Paul Eggert  <eggert@cs.ucla.edu>
6656
6657         Ability to rename obstack_free.
6658         * lib/obstack.h (__obstack_free): New macro. Declare instead of
6659         obstack_free.
6660         (obstack_free): Invoke the __obstack_free macro.
6661         * lib/obstack.c (obstack_free): Use __obstack_free macro.
6662
6663 2006-10-23  Bruno Haible  <bruno@clisp.org>
6664             Paul Eggert  <eggert@cs.ucla.edu>
6665
6666         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
6667         __argc, __argv from the declaration. (They are defined as macros on
6668         mingw.)
6669
6670 2006-10-22  Bruno Haible  <bruno@clisp.org>
6671
6672         * doc/gnulib-intro.texi: New file.
6673         * doc/gnulib.texi: Include it.
6674
6675 2006-10-21  Bruno Haible  <bruno@clisp.org>
6676
6677         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
6678         "Introduction", "Miscellanous Notes", "Particular Modules".
6679
6680 2006-10-21  Bruno Haible  <bruno@clisp.org>
6681
6682         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6683         Change mostlyclean-local rule to avoid sh syntax error from bash
6684         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
6685
6686 2006-10-23  Jim Meyering  <jim@meyering.net>
6687
6688         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
6689         in place of snprintf.
6690
6691         * modules/inttostr (Files): Add lib/uinttostr.c.
6692         * lib/uinttostr.c (inttostr): New file/function.
6693         * lib/inttostr.h (uinttostr): Declare.
6694         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
6695         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
6696         Add uinttostr.
6697         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
6698
6699 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
6700
6701         * lib/canonicalize.c (ELOOP): Define if not already defined.
6702         Problem reported by Bruno Haible in
6703         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
6704
6705 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
6706
6707         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
6708         Problem reported by Perry Smith and Ville Laurikari.
6709
6710         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
6711         uses.
6712
6713 2006-10-19  Bruno Haible  <bruno@clisp.org>
6714
6715         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
6716         for mingw.
6717
6718 2006-10-19  Bruno Haible  <bruno@clisp.org>
6719
6720         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
6721         Needed for mingw.
6722
6723 2006-10-19  Bruno Haible  <bruno@clisp.org>
6724
6725         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
6726
6727 2006-10-19  Bruno Haible  <bruno@clisp.org>
6728
6729         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
6730         it.
6731
6732 2006-10-19  Bruno Haible  <bruno@clisp.org>
6733
6734         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
6735         invocation.
6736
6737 2006-10-19  Bruno Haible  <bruno@clisp.org>
6738
6739         * gnulib-tool (func_create_testdir): Don't include ftruncate and
6740         mountlist by default.
6741
6742 2006-10-16  Bruno Haible  <bruno@clisp.org>
6743
6744         * lib/c-strstr.c: Include c-strstr.h.
6745
6746 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6747
6748         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
6749         in a slash.
6750
6751 2006-10-18  Bruno Haible  <bruno@clisp.org>
6752
6753         * lib/lock.h [C++]: Wrap definitions in extern "C".
6754
6755 2006-10-18  Bruno Haible  <bruno@clisp.org>
6756
6757         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
6758         gl_LIBOBJS list.
6759
6760 2006-10-18  Bruno Haible  <bruno@clisp.org>
6761
6762         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
6763
6764 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
6765
6766         * lib/xstrtol.h: Include gettext.h.
6767         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
6768         Problem reported by Eric Blake.
6769         * modules/xstrtol (Depends-on): Add gettext-h.
6770
6771 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
6772
6773         * lib/strftime.c (advance): New macro.
6774         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
6775         incomplete type, so you can't add 0 to it.  Problem and patch
6776         reported by Eelco Dolstra for dietlibc.
6777
6778 2006-10-18  Jim Meyering  <jim@meyering.net>
6779
6780         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
6781         type for a local, and rename it: s/up/user_proc/.
6782
6783 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
6784
6785         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
6786         READ_UTMP_USER_PROCESS.
6787         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
6788
6789 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
6790
6791         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
6792         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
6793
6794 2006-10-17  Eric Blake  <ebb9@byu.net>
6795
6796         * lib/sigprocmask.c (sigprocmask): Fix typo.
6797
6798         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
6799
6800         * modules/clean-temp (Makefile.am): Don't add to make output...
6801         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
6802         config.h.
6803
6804 2006-10-17  Bruno Haible  <bruno@clisp.org>
6805
6806         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
6807         differently if DEFAULT_TEXT_DOMAIN is set.
6808
6809 2006-10-16  Bruno Haible  <bruno@clisp.org>
6810
6811         * lib/clean-temp.c: Include fwriteerror.h.
6812
6813 2006-10-16  Bruno Haible  <bruno@clisp.org>
6814
6815         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
6816
6817 2006-10-16  Bruno Haible  <bruno@clisp.org>
6818
6819         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
6820         * lib/sigprocmask.h: Include <sys/types.h>.
6821         (sigset_t): Use the system's definition if present.
6822
6823 2006-10-17  Eric Blake  <ebb9@byu.net>
6824
6825         * lib/xvasprintf.c (includes): Assume config.h.
6826         * lib/xasprintf.c (includes): Likewise.
6827
6828 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
6829
6830         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
6831         at least as wide as intmax_t.
6832
6833 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
6834
6835         (Imported from Automake.)
6836         * build-aux/gnupload: Update to version 1.1 of directive file.
6837
6838 2006-10-16  Eric Blake  <ebb9@byu.net>
6839
6840         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
6841         match Automake 1.10a.
6842
6843 2006-10-14  Bruno Haible  <bruno@clisp.org>
6844
6845         * modules/sigprocmask: New file.
6846         * lib/sigprocmask.h: New file.
6847         * lib/sigprocmask.c: New file.
6848         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
6849         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
6850         request sigprocmask.o.
6851         (gl_PREREQ_SIGPROCMASK): New macro.
6852         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
6853         (Depends-on): Add sigprocmask.
6854         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
6855         gt_SIGNALBLOCKING. Test for 'raise' only once.
6856         * lib/fatal-signal.c: Include sigprocmask.h.
6857         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
6858         unblock_fatal_signals): Define always.
6859         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
6860         sigprocmask.
6861
6862 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
6863
6864         Sync from Automake.
6865         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
6866         which incorrectly sets the mode of an existing destination
6867         directory.  In some cases the unpatched install-sh could do the
6868         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
6869         system.  We hope this is rare in practice, but it's clearly worth
6870         fixing.  Problem reported by Alex Unleashed in
6871         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
6872         Also, don't bother to check for -m bugs unless we're using -m;
6873         suggested by Stepan Kasal.
6874
6875 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6876
6877         Sync from Automake.
6878         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
6879         `-c' flag, so they appear at the same position as in %FASTDEP%
6880         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
6881         which ignores unknown options only after the first non-option.
6882         Bug report against M4 by Nelson H. F. Beebe.
6883
6884 2006-10-13  Jim Meyering  <jim@meyering.net>
6885
6886         Fix a bug in yesterday's change.
6887         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
6888         p->fts_statp->st_dev would be used uninitialized.
6889         Ensures that we always call fts_stat on the very first entry.
6890         Miklos Szeredi reported that find -xdev stopped working.
6891
6892 2006-10-12  Bruno Haible  <bruno@clisp.org>
6893
6894         * gnulib-tool (func_get_automake_snippet): Append an automatically
6895         computed EXTRA_DIST augmentation.
6896         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
6897         * modules/alloca-opt (Makefile.am): Likewise.
6898         * modules/allocsa (Makefile.am): Likewise.
6899         * modules/arcfour (Makefile.am): Likewise.
6900         * modules/arctwo (Makefile.am): Likewise.
6901         * modules/argmatch (Makefile.am): Likewise.
6902         * modules/argz (Makefile.am): Likewise.
6903         * modules/atexit (Makefile.am): Likewise.
6904         * modules/backupfile (Makefile.am): Likewise.
6905         * modules/byteswap (Makefile.am): Likewise.
6906         * modules/c-strtod (Makefile.am): Likewise.
6907         * modules/c-strtold (Makefile.am): Likewise.
6908         * modules/calloc (Makefile.am): Likewise.
6909         * modules/canon-host (Makefile.am): Likewise.
6910         * modules/canonicalize (Makefile.am): Likewise.
6911         * modules/chdir-long (Makefile.am): Likewise.
6912         * modules/chdir-safer (Makefile.am): Likewise.
6913         * modules/check-version (Makefile.am): Likewise.
6914         * modules/chown (Makefile.am): Likewise.
6915         * modules/cloexec (Makefile.am): Likewise.
6916         * modules/close-stream (Makefile.am): Likewise.
6917         * modules/closeout (Makefile.am): Likewise.
6918         * modules/crc (Makefile.am): Likewise.
6919         * modules/csharpexec (Makefile.am): Likewise.
6920         * modules/cycle-check (Makefile.am): Likewise.
6921         * modules/des (Makefile.am): Likewise.
6922         * modules/dev-ino (Makefile.am): Likewise.
6923         * modules/dirfd (Makefile.am): Likewise.
6924         * modules/dirname (Makefile.am): Likewise.
6925         * modules/dup2 (Makefile.am): Likewise.
6926         * modules/eealloc (Makefile.am): Likewise.
6927         * modules/error (Makefile.am): Likewise.
6928         * modules/euidaccess (Makefile.am): Likewise.
6929         * modules/exclude (Makefile.am): Likewise.
6930         * modules/exitfail (Makefile.am): Likewise.
6931         * modules/fcntl-safer (Makefile.am): Likewise.
6932         * modules/fcntl (Makefile.am): Likewise.
6933         * modules/file-type (Makefile.am): Likewise.
6934         * modules/fileblocks (Makefile.am): Likewise.
6935         * modules/filemode (Makefile.am): Likewise.
6936         * modules/filenamecat (Makefile.am): Likewise.
6937         * modules/fnmatch (Makefile.am): Likewise.
6938         * modules/fopen-safer (Makefile.am): Likewise.
6939         * modules/fpending (Makefile.am): Likewise.
6940         * modules/fprintftime (Makefile.am): Likewise.
6941         * modules/free (Makefile.am): Likewise.
6942         * modules/fsusage (Makefile.am): Likewise.
6943         * modules/ftruncate (Makefile.am): Likewise.
6944         * modules/fts (Makefile.am): Likewise.
6945         * modules/gc-arcfour (Makefile.am): Likewise.
6946         * modules/gc-des (Makefile.am): Likewise.
6947         * modules/gc-hmac-md5 (Makefile.am): Likewise.
6948         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
6949         * modules/gc-md4 (Makefile.am): Likewise.
6950         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
6951         * modules/gc-sha1 (Makefile.am): Likewise.
6952         * modules/gc (Makefile.am): Likewise.
6953         * modules/getaddrinfo (Makefile.am): Likewise.
6954         * modules/getcwd (Makefile.am): Likewise.
6955         * modules/getdelim (Makefile.am): Likewise.
6956         * modules/getdomainname (Makefile.am): Likewise.
6957         * modules/getgroups (Makefile.am): Likewise.
6958         * modules/gethostname (Makefile.am): Likewise.
6959         * modules/gethrxtime (Makefile.am): Likewise.
6960         * modules/getline (Makefile.am): Likewise.
6961         * modules/getloadavg (Makefile.am): Likewise.
6962         * modules/getlogin_r (Makefile.am): Likewise.
6963         * modules/getndelim2 (Makefile.am): Likewise.
6964         * modules/getopt (Makefile.am): Likewise.
6965         * modules/getpagesize (Makefile.am): Likewise.
6966         * modules/getpass-gnu (Makefile.am): Likewise.
6967         * modules/getpass (Makefile.am): Likewise.
6968         * modules/getsubopt (Makefile.am): Likewise.
6969         * modules/gettime (Makefile.am): Likewise.
6970         * modules/gettimeofday (Makefile.am): Likewise.
6971         * modules/getugroups (Makefile.am): Likewise.
6972         * modules/getusershell (Makefile.am): Likewise.
6973         * modules/glob (Makefile.am): Likewise.
6974         * modules/group-member (Makefile.am): Likewise.
6975         * modules/hard-locale (Makefile.am): Likewise.
6976         * modules/hash (Makefile.am): Likewise.
6977         * modules/hmac-md5 (Makefile.am): Likewise.
6978         * modules/hmac-sha1 (Makefile.am): Likewise.
6979         * modules/human (Makefile.am): Likewise.
6980         * modules/idcache (Makefile.am): Likewise.
6981         * modules/imaxabs (Makefile.am): Likewise.
6982         * modules/imaxdiv (Makefile.am): Likewise.
6983         * modules/inet_ntop (Makefile.am): Likewise.
6984         * modules/inet_pton (Makefile.am): Likewise.
6985         * modules/intprops (Makefile.am): Likewise.
6986         * modules/inttostr (Makefile.am): Likewise.
6987         * modules/inttypes (Makefile.am): Likewise.
6988         * modules/isapipe (Makefile.am): Likewise.
6989         * modules/javaversion (Makefile.am): Likewise.
6990         * modules/lchmod (Makefile.am): Likewise.
6991         * modules/lchown (Makefile.am): Likewise.
6992         * modules/localcharset (Makefile.am): Likewise.
6993         * modules/long-options (Makefile.am): Likewise.
6994         * modules/lstat (Makefile.am): Likewise.
6995         * modules/malloc (Makefile.am): Likewise.
6996         * modules/mathl (Makefile.am): Likewise.
6997         * modules/mbchar (Makefile.am): Likewise.
6998         * modules/md2 (Makefile.am): Likewise.
6999         * modules/md4 (Makefile.am): Likewise.
7000         * modules/md5 (Makefile.am): Likewise.
7001         * modules/memcasecmp (Makefile.am): Likewise.
7002         * modules/memchr (Makefile.am): Likewise.
7003         * modules/memcmp (Makefile.am): Likewise.
7004         * modules/memcoll (Makefile.am): Likewise.
7005         * modules/memcpy (Makefile.am): Likewise.
7006         * modules/memmem (Makefile.am): Likewise.
7007         * modules/memmove (Makefile.am): Likewise.
7008         * modules/mempcpy (Makefile.am): Likewise.
7009         * modules/memrchr (Makefile.am): Likewise.
7010         * modules/memset (Makefile.am): Likewise.
7011         * modules/memxor (Makefile.am): Likewise.
7012         * modules/mkancesdirs (Makefile.am): Likewise.
7013         * modules/mkdir-p (Makefile.am): Likewise.
7014         * modules/mkdir (Makefile.am): Likewise.
7015         * modules/mkdtemp (Makefile.am): Likewise.
7016         * modules/mkstemp (Makefile.am): Likewise.
7017         * modules/mktime (Makefile.am): Likewise.
7018         * modules/modechange (Makefile.am): Likewise.
7019         * modules/mountlist (Makefile.am): Likewise.
7020         * modules/nanosleep (Makefile.am): Likewise.
7021         * modules/obstack (Makefile.am): Likewise.
7022         * modules/openat (Makefile.am): Likewise.
7023         * modules/pagealign_alloc (Makefile.am): Likewise.
7024         * modules/pathmax (Makefile.am): Likewise.
7025         * modules/physmem (Makefile.am): Likewise.
7026         * modules/poll (Makefile.am): Likewise.
7027         * modules/posixtm (Makefile.am): Likewise.
7028         * modules/posixver (Makefile.am): Likewise.
7029         * modules/putenv (Makefile.am): Likewise.
7030         * modules/quote (Makefile.am): Likewise.
7031         * modules/quotearg (Makefile.am): Likewise.
7032         * modules/raise (Makefile.am): Likewise.
7033         * modules/read-file (Makefile.am): Likewise.
7034         * modules/readline (Makefile.am): Likewise.
7035         * modules/readlink (Makefile.am): Likewise.
7036         * modules/readtokens (Makefile.am): Likewise.
7037         * modules/readutmp (Makefile.am): Likewise.
7038         * modules/realloc (Makefile.am): Likewise.
7039         * modules/regex (Makefile.am): Likewise.
7040         * modules/rename-dest-slash (Makefile.am): Likewise.
7041         * modules/rename (Makefile.am): Likewise.
7042         * modules/rijndael (Makefile.am): Likewise.
7043         * modules/rmdir (Makefile.am): Likewise.
7044         * modules/rpmatch (Makefile.am): Likewise.
7045         * modules/safe-read (Makefile.am): Likewise.
7046         * modules/safe-write (Makefile.am): Likewise.
7047         * modules/same-inode (Makefile.am): Likewise.
7048         * modules/same (Makefile.am): Likewise.
7049         * modules/save-cwd (Makefile.am): Likewise.
7050         * modules/savedir (Makefile.am): Likewise.
7051         * modules/setenv (Makefile.am): Likewise.
7052         * modules/settime (Makefile.am): Likewise.
7053         * modules/sha1 (Makefile.am): Likewise.
7054         * modules/sig2str (Makefile.am): Likewise.
7055         * modules/snprintf (Makefile.am): Likewise.
7056         * modules/stat-macros (Makefile.am): Likewise.
7057         * modules/stat-time (Makefile.am): Likewise.
7058         * modules/stdbool (Makefile.am): Likewise.
7059         * modules/stdint (Makefile.am): Likewise.
7060         * modules/stdlib-safer (Makefile.am): Likewise.
7061         * modules/stpcpy (Makefile.am): Likewise.
7062         * modules/stpncpy (Makefile.am): Likewise.
7063         * modules/strcase (Makefile.am): Likewise.
7064         * modules/strcasestr (Makefile.am): Likewise.
7065         * modules/strchrnul (Makefile.am): Likewise.
7066         * modules/strcspn (Makefile.am): Likewise.
7067         * modules/strdup (Makefile.am): Likewise.
7068         * modules/strerror (Makefile.am): Likewise.
7069         * modules/strftime (Makefile.am): Likewise.
7070         * modules/strndup (Makefile.am): Likewise.
7071         * modules/strnlen (Makefile.am): Likewise.
7072         * modules/strpbrk (Makefile.am): Likewise.
7073         * modules/strsep (Makefile.am): Likewise.
7074         * modules/strstr (Makefile.am): Likewise.
7075         * modules/strtod (Makefile.am): Likewise.
7076         * modules/strtoimax (Makefile.am): Likewise.
7077         * modules/strtok_r (Makefile.am): Likewise.
7078         * modules/strtol (Makefile.am): Likewise.
7079         * modules/strtoll (Makefile.am): Likewise.
7080         * modules/strtoul (Makefile.am): Likewise.
7081         * modules/strtoull (Makefile.am): Likewise.
7082         * modules/strtoumax (Makefile.am): Likewise.
7083         * modules/strverscmp (Makefile.am): Likewise.
7084         * modules/sys_socket (Makefile.am): Likewise.
7085         * modules/sys_stat (Makefile.am): Likewise.
7086         * modules/sysexits (Makefile.am): Likewise.
7087         * modules/time_r (Makefile.am): Likewise.
7088         * modules/timegm (Makefile.am): Likewise.
7089         * modules/timespec (Makefile.am): Likewise.
7090         * modules/tmpfile-safer (Makefile.am): Likewise.
7091         * modules/trim (Makefile.am): Likewise.
7092         * modules/unistd-safer (Makefile.am): Likewise.
7093         * modules/unlinkdir (Makefile.am): Likewise.
7094         * modules/unlocked-io (Makefile.am): Likewise.
7095         * modules/userspec (Makefile.am): Likewise.
7096         * modules/utime (Makefile.am): Likewise.
7097         * modules/utimecmp (Makefile.am): Likewise.
7098         * modules/utimens (Makefile.am): Likewise.
7099         * modules/vasnprintf (Makefile.am): Likewise.
7100         * modules/vasprintf (Makefile.am): Likewise.
7101         * modules/vsnprintf (Makefile.am): Likewise.
7102         * modules/xalloc (Makefile.am): Likewise.
7103         * modules/xgetcwd (Makefile.am): Likewise.
7104         * modules/xnanosleep (Makefile.am): Likewise.
7105         * modules/xreadlink (Makefile.am): Likewise.
7106         * modules/xstrtod (Makefile.am): Likewise.
7107         * modules/xstrtol (Makefile.am): Likewise.
7108         * modules/xstrtold (Makefile.am): Likewise.
7109         * modules/yesno (Makefile.am): Likewise.
7110         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
7111
7112 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
7113
7114         * modules/error (Makefile.am): Distribute files through
7115         EXTRA_DIST, not lib_SOURCES.
7116
7117 2006-10-12  Eric Blake  <ebb9@byu.net>
7118
7119         * modules/error (Makefile.am): Distribute files in /lib.
7120         * modules/obstack (Makefile.am): Likewise.
7121
7122 2006-10-12  Bruno Haible  <bruno@clisp.org>
7123
7124         * modules/acl (Makefile.am): Distribute all files in lib/ through
7125         EXTRA_DIST.
7126         * modules/arcfour (Makefile.am): Likewise.
7127         * modules/arctwo (Makefile.am): Likewise.
7128         * modules/argmatch (Makefile.am): Likewise.
7129         * modules/argz (Makefile.am): Likewise.
7130         * modules/atexit (Makefile.am): Likewise.
7131         * modules/backupfile (Makefile.am): Likewise.
7132         * modules/c-strtod (Makefile.am): Likewise.
7133         * modules/c-strtold (Makefile.am): Likewise.
7134         * modules/calloc (Makefile.am): Likewise.
7135         * modules/canon-host (Makefile.am): Likewise.
7136         * modules/canonicalize (Makefile.am): Likewise.
7137         * modules/chdir-long (Makefile.am): Likewise.
7138         * modules/chdir-safer (Makefile.am): Likewise.
7139         * modules/check-version (Makefile.am): Likewise.
7140         * modules/chown (Makefile.am): Likewise.
7141         * modules/cloexec (Makefile.am): Likewise.
7142         * modules/close-stream (Makefile.am): Likewise.
7143         * modules/closeout (Makefile.am): Likewise.
7144         * modules/crc (Makefile.am): Likewise.
7145         * modules/cycle-check (Makefile.am): Likewise.
7146         * modules/des (Makefile.am): Likewise.
7147         * modules/dirfd (Makefile.am): Likewise.
7148         * modules/dirname (Makefile.am): Likewise.
7149         * modules/dup2 (Makefile.am): Likewise.
7150         * modules/euidaccess (Makefile.am): Likewise.
7151         * modules/exclude (Makefile.am): Likewise.
7152         * modules/exitfail (Makefile.am): Likewise.
7153         * modules/fcntl-safer (Makefile.am): Likewise.
7154         * modules/file-type (Makefile.am): Likewise.
7155         * modules/fileblocks (Makefile.am): Likewise.
7156         * modules/filemode (Makefile.am): Likewise.
7157         * modules/filenamecat (Makefile.am): Likewise.
7158         * modules/fnmatch (Makefile.am): Likewise.
7159         * modules/fopen-safer (Makefile.am): Likewise.
7160         * modules/fpending (Makefile.am): Likewise.
7161         * modules/fprintftime (Makefile.am): Likewise.
7162         * modules/free (Makefile.am): Likewise.
7163         * modules/fsusage (Makefile.am): Likewise.
7164         * modules/ftruncate (Makefile.am): Likewise.
7165         * modules/fts (Makefile.am): Likewise.
7166         * modules/gc (Makefile.am): Likewise.
7167         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
7168         * modules/getaddrinfo (Makefile.am): Likewise.
7169         * modules/getcwd (Makefile.am): Likewise.
7170         * modules/getdelim (Makefile.am): Likewise.
7171         * modules/getdomainname (Makefile.am): Likewise.
7172         * modules/getgroups (Makefile.am): Likewise.
7173         * modules/gethostname (Makefile.am): Likewise.
7174         * modules/gethrxtime (Makefile.am): Likewise.
7175         * modules/getline (Makefile.am): Likewise.
7176         * modules/getloadavg (Makefile.am): Likewise.
7177         * modules/getlogin_r (Makefile.am): Likewise.
7178         * modules/getopt (Makefile.am): Likewise.
7179         * modules/getpass (Makefile.am): Likewise.
7180         * modules/getpass-gnu (Makefile.am): Likewise.
7181         * modules/getsubopt (Makefile.am): Likewise.
7182         * modules/gettime (Makefile.am): Likewise.
7183         * modules/gettimeofday (Makefile.am): Likewise.
7184         * modules/getugroups (Makefile.am): Likewise.
7185         * modules/getusershell (Makefile.am): Likewise.
7186         * modules/glob (Makefile.am): Likewise.
7187         * modules/group-member (Makefile.am): Likewise.
7188         * modules/hard-locale (Makefile.am): Likewise.
7189         * modules/hash (Makefile.am): Likewise.
7190         * modules/hmac-md5 (Makefile.am): Likewise.
7191         * modules/hmac-sha1 (Makefile.am): Likewise.
7192         * modules/human (Makefile.am): Likewise.
7193         * modules/idcache (Makefile.am): Likewise.
7194         * modules/imaxabs (Makefile.am): Likewise.
7195         * modules/imaxdiv (Makefile.am): Likewise.
7196         * modules/inet_ntop (Makefile.am): Likewise.
7197         * modules/inet_pton (Makefile.am): Likewise.
7198         * modules/inttostr (Makefile.am): Likewise.
7199         * modules/isapipe (Makefile.am): Likewise.
7200         * modules/lchown (Makefile.am): Likewise.
7201         * modules/long-options (Makefile.am): Likewise.
7202         * modules/lstat (Makefile.am): Likewise.
7203         * modules/malloc (Makefile.am): Likewise.
7204         * modules/mathl (Makefile.am): Likewise.
7205         * modules/mbchar (Makefile.am): Likewise.
7206         * modules/md2 (Makefile.am): Likewise.
7207         * modules/md4 (Makefile.am): Likewise.
7208         * modules/md5 (Makefile.am): Likewise.
7209         * modules/memcasecmp (Makefile.am): Likewise.
7210         * modules/memchr (Makefile.am): Likewise.
7211         * modules/memcmp (Makefile.am): Likewise.
7212         * modules/memcoll (Makefile.am): Likewise.
7213         * modules/memcpy (Makefile.am): Likewise.
7214         * modules/memmem (Makefile.am): Likewise.
7215         * modules/memmove (Makefile.am): Likewise.
7216         * modules/mempcpy (Makefile.am): Likewise.
7217         * modules/memrchr (Makefile.am): Likewise.
7218         * modules/memset (Makefile.am): Likewise.
7219         * modules/memxor (Makefile.am): Likewise.
7220         * modules/mkancesdirs (Makefile.am): Likewise.
7221         * modules/mkdir (Makefile.am): Likewise.
7222         * modules/mkdir-p (Makefile.am): Likewise.
7223         * modules/mkdtemp (Makefile.am): Likewise.
7224         * modules/mkstemp (Makefile.am): Likewise.
7225         * modules/mktime (Makefile.am): Likewise.
7226         * modules/modechange (Makefile.am): Likewise.
7227         * modules/mountlist (Makefile.am): Likewise.
7228         * modules/nanosleep (Makefile.am): Likewise.
7229         * modules/openat (Makefile.am): Likewise.
7230         * modules/pagealign_alloc (Makefile.am): Likewise.
7231         * modules/physmem (Makefile.am): Likewise.
7232         * modules/poll (Makefile.am): Likewise.
7233         * modules/posixtm (Makefile.am): Likewise.
7234         * modules/posixver (Makefile.am): Likewise.
7235         * modules/putenv (Makefile.am): Likewise.
7236         * modules/quote (Makefile.am): Likewise.
7237         * modules/quotearg (Makefile.am): Likewise.
7238         * modules/raise (Makefile.am): Likewise.
7239         * modules/read-file (Makefile.am): Likewise.
7240         * modules/readline (Makefile.am): Likewise.
7241         * modules/readlink (Makefile.am): Likewise.
7242         * modules/readtokens (Makefile.am): Likewise.
7243         * modules/readutmp (Makefile.am): Likewise.
7244         * modules/realloc (Makefile.am): Likewise.
7245         * modules/regex (Makefile.am): Likewise.
7246         * modules/rename (Makefile.am): Likewise.
7247         * modules/rename-dest-slash (Makefile.am): Likewise.
7248         * modules/rijndael (Makefile.am): Likewise.
7249         * modules/rmdir (Makefile.am): Likewise.
7250         * modules/rpmatch (Makefile.am): Likewise.
7251         * modules/safe-read (Makefile.am): Likewise.
7252         * modules/safe-write (Makefile.am): Likewise.
7253         * modules/same (Makefile.am): Likewise.
7254         * modules/save-cwd (Makefile.am): Likewise.
7255         * modules/savedir (Makefile.am): Likewise.
7256         * modules/setenv (Makefile.am): Likewise.
7257         * modules/settime (Makefile.am): Likewise.
7258         * modules/sha1 (Makefile.am): Likewise.
7259         * modules/sig2str (Makefile.am): Likewise.
7260         * modules/snprintf (Makefile.am): Likewise.
7261         * modules/stdlib-safer (Makefile.am): Likewise.
7262         * modules/stpcpy (Makefile.am): Likewise.
7263         * modules/stpncpy (Makefile.am): Likewise.
7264         * modules/strcase (Makefile.am): Likewise.
7265         * modules/strcasestr (Makefile.am): Likewise.
7266         * modules/strchrnul (Makefile.am): Likewise.
7267         * modules/strcspn (Makefile.am): Likewise.
7268         * modules/strdup (Makefile.am): Likewise.
7269         * modules/strerror (Makefile.am): Likewise.
7270         * modules/strftime (Makefile.am): Likewise.
7271         * modules/strndup (Makefile.am): Likewise.
7272         * modules/strnlen (Makefile.am): Likewise.
7273         * modules/strpbrk (Makefile.am): Likewise.
7274         * modules/strsep (Makefile.am): Likewise.
7275         * modules/strstr (Makefile.am): Likewise.
7276         * modules/strtod (Makefile.am): Likewise.
7277         * modules/strtoimax (Makefile.am): Likewise.
7278         * modules/strtok_r (Makefile.am): Likewise.
7279         * modules/strtol (Makefile.am): Likewise.
7280         * modules/strtoll (Makefile.am): Likewise.
7281         * modules/strtoul (Makefile.am): Likewise.
7282         * modules/strtoull (Makefile.am): Likewise.
7283         * modules/strtoumax (Makefile.am): Likewise.
7284         * modules/strverscmp (Makefile.am): Likewise.
7285         * modules/time_r (Makefile.am): Likewise.
7286         * modules/timegm (Makefile.am): Likewise.
7287         * modules/tmpfile-safer (Makefile.am): Likewise.
7288         * modules/unistd-safer (Makefile.am): Likewise.
7289         * modules/unlinkdir (Makefile.am): Likewise.
7290         * modules/userspec (Makefile.am): Likewise.
7291         * modules/utime (Makefile.am): Likewise.
7292         * modules/utimecmp (Makefile.am): Likewise.
7293         * modules/utimens (Makefile.am): Likewise.
7294         * modules/vasnprintf (Makefile.am): Likewise.
7295         * modules/vasprintf (Makefile.am): Likewise.
7296         * modules/vsnprintf (Makefile.am): Likewise.
7297         * modules/xalloc (Makefile.am): Likewise.
7298         * modules/xgetcwd (Makefile.am): Likewise.
7299         * modules/xnanosleep (Makefile.am): Likewise.
7300         * modules/xreadlink (Makefile.am): Likewise.
7301         * modules/xstrtod (Makefile.am): Likewise.
7302         * modules/xstrtol (Makefile.am): Likewise.
7303         * modules/xstrtold (Makefile.am): Likewise.
7304         * modules/yesno (Makefile.am): Likewise.
7305
7306 2006-10-12  Jim Meyering  <jim@meyering.net>
7307
7308         * m4/getloadavg.m4: Revert the change below.
7309
7310         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
7311         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
7312         fail with a symlink, which is what coreutils' ./bootstrap now
7313         creates by default.
7314
7315 2006-10-12  Bruno Haible  <bruno@clisp.org>
7316
7317         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
7318         mingw.
7319         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
7320         MSVC and mingw explicitly.
7321
7322 2006-10-11  Simon Josefsson  <jas@extundo.com>
7323             Bruno Haible  <bruno@clisp.org>
7324
7325         Add support for multiple gnulib-tool invocations in the scope of a
7326         single configure.ac file.
7327         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
7328         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
7329         with the same contents as the _LIBADD variable.
7330         (func_emit_initmacro_start, func_emit_initmacro_end,
7331         func_emit_initmacro_done): New functions.
7332         (func_import, func_create_testdir): Invoke them. Allow the identifiers
7333         gl_LIBOBJS and gl_LTLIBOBJS.
7334
7335 2006-10-11  Bruno Haible  <bruno@clisp.org>
7336
7337         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
7338         (func_create_testdir): Don't create po/Makefile.am, don't invoke
7339         autoreconf. Instead, invoke autopoint explicitly but move back the
7340         *.m4 files from gnulib.
7341
7342 2006-10-11  Bruno Haible  <bruno@clisp.org>
7343
7344         * gnulib-tool (func_usage): Make module names after --create-testdir
7345         optional.
7346         (func_create_testdir): If no module was specified, use nearly all
7347         modules.
7348
7349 2006-10-12  Jim Meyering  <jim@meyering.net>
7350
7351         Big performance improvement for fts-based tools that use FTS_NOSTAT.
7352         Avoid spurious inode-mismatch problems on non-POSIX file systems.
7353         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
7354         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
7355         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
7356         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
7357         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
7358         (fts_set_stat_required): New function.
7359         (fts_open): Defer the calls to fts_stat, if possible or requested.
7360         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
7361         into fts_stat itself.
7362         (fts_read): Perform any required (deferred) fts_stat call.
7363         (fts_build): Likewise, for the directory we're about to open and read.
7364         In the readdir loop, carefully decide whether each entry will require
7365         an eventual call to fts_stat, using dirent.d_type info if available.
7366         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
7367         a command line argument into this function.  Update all callers.
7368         Map a return value of FTS_DOT to FTS_D for a command line argument.
7369         * modules/fts (Depends-on): Add d-type.  Alphabetize.
7370         Thanks to Miklos Szeredi for his tenacity and for the initial
7371         bug report about "find" failing on a FUSE-based file system.
7372
7373         * lib/fts.c (fts_open): Use consistent indentation.
7374
7375 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
7376
7377         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
7378         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
7379         reported by Jim Meyering.  All uses of cache variables renamed
7380         to match Autoconf's.
7381         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
7382         the other one.
7383
7384         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
7385         Fix misspelling in diagnostic.
7386
7387 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
7388
7389         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
7390         defined.  Problem reported by Matthew Woehlke.
7391
7392         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
7393         Add support for Tandem NonStop R series.
7394         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
7395         Use new macro.
7396
7397         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
7398         (has_trailing_slash): Omit size arg; all callers changed.
7399         Omit 'inline', since it doesn't help performance and we'd
7400         need to configure it.
7401         Don't count //, ///, etc. as having a trailing slash.
7402         As a side effect, this removes a C99ism reported by Matthew Woehlke.
7403         (rpl_rename_dest_slash): On failure, use rename's errno rather
7404         than (in some cases) an incorrect or junk errno.
7405         Simplify code by removing need to compute length; this does
7406         cause it to make two passes instead of one over the file name,
7407         but it's worth it.
7408
7409         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
7410         change, since Autoconf's version may no longer be appropriate now
7411         that we are using CVS Autoconf's version.  Add support for Tandem.
7412
7413 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
7414             Bruno Haible  <bruno@clisp.org>
7415
7416         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
7417         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
7418         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
7419         gl_AC_TYPE_LONG_LONG.
7420
7421         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
7422         instead of HAVE_LONG_LONG.
7423         * lib/printf-args.c (printf_fetchargs): Likewise.
7424         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
7425         * lib/vasnprintf.c (VASNPRINTF): Likewise.
7426         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
7427         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
7428         gl_AC_TYPE_LONG_LONG.
7429
7430 2006-10-11  Bruno Haible  <bruno@clisp.org>
7431
7432         * m4/longlong.m4: Add comments.
7433         * m4/ulonglong.m4: Likewise.
7434
7435 2006-10-10  Bruno Haible  <bruno@clisp.org>
7436
7437         Make it possible to #define stpcpy, strdup to aliases.
7438         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
7439         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
7440
7441 2006-10-10  Bruno Haible  <bruno@clisp.org>
7442
7443         Make it possible to #define gcd to an alias.
7444         * lib/gcd.c: Include config.h.
7445
7446 2006-10-10  Bruno Haible  <bruno@clisp.org>
7447
7448         Make it possible to #define c_isascii to an alias.
7449         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
7450         defined. Undefine the macros before defining them, to avoid gcc
7451         warnings.
7452         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
7453         define NO_C_CTYPE_MACROS early.
7454
7455 2006-10-10  Bruno Haible  <bruno@clisp.org>
7456
7457         Make it possible to #define set_program_name to an alias.
7458         * lib/progname.c: Don't undefine set_program_name; instead, undefine
7459         ENABLE_RELOCATABLE early.
7460
7461 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
7462
7463         Port to Tandem NSK OSS, which has 64-bit signed int but at most
7464         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
7465         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
7466         More generally, don't assume that 64-bit signed int is available
7467         if unsigned int is, and vice versa.
7468         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
7469         unsigned symbols, not on their signed counterparts.
7470         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
7471         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
7472         (UINT64_C, UINTMAX_C):
7473         Likewise.
7474         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
7475         unsigned counterparts.
7476         (Have_long_long, Unsigned): New macros.
7477         (Int): Renamed from INT.
7478         (strtoimax): Use the new macros.
7479         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
7480         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
7481         * modules/inttypes (inttypes.h): Substitute
7482         HAVE_UNSIGNED_LONG_LONG_INT.
7483         * modules/stdint (stdint.h): Likewise.
7484         (Files): Add m4/ulonglong.m4.
7485
7486 2006-10-10  Bruno Haible  <bruno@clisp.org>
7487
7488         Fix a gcc -Wshadow warning.
7489         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
7490         to 'bucket'.
7491         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
7492         gl_linked_indexof_from_to): Likewise.
7493         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
7494         Likewise.
7495         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
7496         Likewise.
7497         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
7498         Reported by Eric Blake.
7499
7500 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
7501
7502         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
7503         for NetBSD.  Problem reported by Bruno Haible.
7504
7505 2006-10-09  Jim Meyering  <jim@meyering.net>
7506
7507         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
7508         Patch from Bruno Haible.
7509
7510 2006-10-09  Jim Meyering  <jim@meyering.net>
7511
7512         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
7513         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
7514         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
7515
7516 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
7517
7518         Don't include <config.h> twice; this doesn't work in some cases,
7519         e.g., when config.h has "#define intmax_t long long int" and
7520         we include <config.h>, <inttypes.h>, <config.h> in that order.
7521         Problem reported by Matthew Woehlke in:
7522         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
7523         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
7524         * lib/fts-cycle.c: Don't include config.h.
7525         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
7526         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
7527         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
7528         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
7529         inttypes.h.
7530         * lib/xstrtoumax.c: Likewise.
7531         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
7532         __strtol and the like, so that this module is more like its siblings.
7533         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
7534         Remove; no longer needed now that we assume gnulib inttypes.h.
7535
7536 2006-10-08  Bruno Haible  <bruno@clisp.org>
7537
7538         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
7539         option.
7540
7541 2006-10-07  Jim Meyering  <jim@meyering.net>
7542
7543         * modules/inttypes (inttypes.h): Revert what seems to have been
7544         an inadvertent part of today's change: use "|", not "/" in the
7545         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
7546
7547 2006-10-07  Bruno Haible  <bruno@clisp.org>
7548
7549         * modules/sublist: New file.
7550
7551 2006-10-07  Bruno Haible  <bruno@clisp.org>
7552
7553         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
7554         * modules/argz (argz.h): Likewise.
7555         * modules/arpa_inet (arpa/inet.h): Likewise.
7556         * modules/byteswap (byteswap.h): Likewise.
7557         * modules/configmake (configmake.h): Likewise.
7558         * modules/fcntl (fcntl.h): Likewise.
7559         * modules/fnmatch (fnmatch.h): Likewise.
7560         * modules/getopt (getopt.h): Likewise.
7561         * modules/glob (glob.h): Likewise.
7562         * modules/inttypes (inttypes.h): Likewise.
7563         * modules/netinet_in (netinet/in.h): Likewise.
7564         * modules/poll (poll.h): Likewise.
7565         * modules/stdbool (stdbool.h): Likewise.
7566         * modules/stdint (stdint.h): Likewise.
7567         * modules/sys_select (sys/select.h): Likewise.
7568         * modules/sys_socket (sys/socket.h): Likewise.
7569         * modules/sys_stat (sys/stat.h): Likewise.
7570         * modules/sysexits (sysexits.h): Likewise.
7571         * modules/unistd (unistd.h): Likewise.
7572         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7573         Add a "DO NOT EDIT" comment to the generated file.
7574         (func_import): Likewise for gnulib-comp.m4.
7575
7576 2006-10-07  Bruno Haible  <bruno@clisp.org>
7577
7578         * lib/gl_sublist.h: New file.
7579         * lib/gl_sublist.c: New file.
7580
7581 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
7582
7583         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
7584         name (relative to the original working directory) and the file
7585         name component (relative to the temporary working directory).  All
7586         callers changed.
7587         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
7588         * lib/mkdir-p.c (make_dir_parents): Likewise.
7589         * lib/mkdir-p.h (make_dir_parents): Likewise.
7590
7591 2006-10-06  Eric Blake  <ebb9@byu.net>
7592
7593         Define several macros for use by the clean-temp module.
7594         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
7595         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
7596         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
7597
7598         * lib/clean-temp.h (close_stream_temp): New declaration.
7599         * lib/clean-temp.c (includes): Pull in headers according to what
7600         other modules are in use.
7601         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
7602
7603 2006-10-06  Bruno Haible  <bruno@clisp.org>
7604
7605         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
7606         instead of fopen, fwriteerror.
7607
7608 2006-10-06  Bruno Haible  <bruno@clisp.org>
7609
7610         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
7611         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
7612         int.
7613         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
7614         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
7615         Return an error indicator.
7616         Suggested by Eric Blake.
7617
7618 2006-10-06  Bruno Haible  <bruno@clisp.org>
7619
7620         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
7621         Reported by Eric Blake.
7622
7623 2006-10-06  Bruno Haible  <bruno@clisp.org>
7624
7625         * modules/closeout (Description): Mention stderr too.
7626
7627 2006-10-06  Bruno Haible  <bruno@clisp.org>
7628         and Paul Eggert  <eggert@cs.ucla.edu>
7629
7630         * lib/closeout.c (close_stdout): Also close stderr.
7631         * lib/closeout.h: Update comment.
7632
7633 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
7634
7635         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
7636         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
7637         * lib/dirchownmod.c: Include lchown.h.
7638         * lib/lchown.c: Don't include files that lchown.h now includes.
7639         Don't declare chown, since lchown.h now does that.
7640         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
7641         (lchown): Define to rpl_chown if lchown is declared but
7642         does not exist.  Declare using a prototype if lchown is not
7643         declared.  Add a copyright notice.
7644         * lib/mkstemp.h: Include <unistd.h>.
7645         * lib/openat.c: Include lchown.h.
7646
7647         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
7648         we now test for that separately.
7649         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
7650         rather than O_NOFOLLOW, when testing whether it's possible to
7651         avoid a race condition reliably.
7652         * lib/savewd.c (savewd_chdir): Likewise.
7653
7654         Remove macros that are no longer needed now that stdint.h is
7655         reliable.
7656         * lib/fsusage.c (UINTMAX_MAX): Remove.
7657         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
7658         * lib/utimecmp.c (SIZE_MAX): Remove.
7659
7660         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
7661
7662         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
7663         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
7664         O_NOATIME works.
7665
7666 2006-10-05  Bruno Haible  <bruno@clisp.org>
7667
7668         * lib/gl_list.h (gl_sortedlist_search_from_to,
7669         gl_sortedlist_indexof_from_to): New declarations.
7670         (gl_list_implementation): New fields sortedlist_search_from_to,
7671         sortedlist_indexof_from_to.
7672         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
7673         inline functions.
7674         * lib/gl_list.c (gl_sortedlist_search_from_to,
7675         gl_sortedlist_indexof_from_to): New functions.
7676         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
7677         function.
7678         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
7679         (gl_array_sortedlist_search_from_to): New function.
7680         (gl_array_list_implementation): Update.
7681         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
7682         function.
7683         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
7684         (gl_carray_sortedlist_search_from_to): New function.
7685         (gl_carray_list_implementation): Update.
7686         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
7687         gl_linked_sortedlist_indexof_from_to): New functions.
7688         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
7689         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
7690         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
7691         gl_tree_sortedlist_indexof_from_to): New functions.
7692         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
7693         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
7694         Update.
7695         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
7696         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
7697         Update.
7698
7699 2006-10-05  Bruno Haible  <bruno@clisp.org>
7700
7701         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
7702         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
7703         (struct gl_list_implementation): Add fields search_from_to,
7704         indexof_from_to. Remove fields search, indexof.
7705         (gl_list_search): Use the search_from_to method.
7706         (gl_list_search_from, gl_list_search_from_to): New functions.
7707         (gl_list_indexof): Use the indexof_from_to method.
7708         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
7709         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
7710         (gl_list_search_from, gl_list_search_from_to): New functions.
7711         (gl_list_indexof): Use the indexof_from_to method.
7712         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
7713         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
7714         gl_array_indexof. Add start_index, end_index arguments.
7715         (gl_array_search_from_to): Renamed from gl_array_search. Add
7716         start_index, end_index arguments.
7717         (gl_array_remove, gl_array_list_implementation): Update.
7718         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
7719         gl_carray_indexof. Add start_index, end_index arguments.
7720         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
7721         start_index, end_index arguments.
7722         (gl_carray_remove, gl_carray_list_implementation): Update.
7723         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
7724         gl_linked_search. Add start_index, end_index arguments.
7725         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
7726         start_index, end_index arguments.
7727         (gl_linked_remove): Update.
7728         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
7729         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
7730         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
7731         field to 'size_t'.
7732         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
7733         gl_tree_search. Add start_index, end_index arguments.
7734         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
7735         start_index, end_index arguments.
7736         (gl_tree_remove): Update.
7737         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
7738         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
7739         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
7740         function.
7741         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
7742         gl_tree_search. Add start_index, end_index arguments.
7743         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
7744         start_index, end_index arguments.
7745         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
7746         Update.
7747         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
7748
7749 2006-10-05  Bruno Haible  <bruno@clisp.org>
7750
7751         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
7752
7753         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
7754         fwriteerror_temp): New declarations.
7755         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
7756         (descriptors): New variable.
7757         (cleanup): First, close the descriptors.
7758         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
7759         fclose_temp, fwriteerror_temp): New functions.
7760
7761 2006-10-04  Jim Meyering  <jim@meyering.net>
7762
7763         * lib/fts.c (fts_open): Tiny comment change.
7764
7765 2006-10-04  Bruno Haible  <bruno@clisp.org>
7766
7767         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
7768         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
7769         gl_LOCK_BODY.
7770         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
7771         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
7772         gl_LOCK_EARLY_BODY.
7773         (gl_LOCK): Require gl_LOCK_BODY.
7774
7775 2006-10-04  Bruno Haible  <bruno@clisp.org>
7776
7777         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
7778         (gl_oset_search_atleast): New declaration.
7779         (struct gl_oset_implementation): Add field 'search_atleast'.
7780         (gl_oset_search_atleast): New inline function.
7781         * lib/gl_oset.c (gl_oset_search_atleast): New function.
7782         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
7783         (gl_array_oset_implementation): Update.
7784         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
7785         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
7786         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
7787
7788 2006-10-04  Bruno Haible  <bruno@clisp.org>
7789
7790         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
7791
7792 2006-10-03  Bruno Haible  <bruno@clisp.org>
7793
7794         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
7795         from gl_avltreehash_list_implementation.
7796
7797 2006-10-03  Bruno Haible  <bruno@clisp.org>
7798
7799         * lib/gl_oset.c (gl_oset_add): Fix return type.
7800
7801 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
7802
7803         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
7804
7805 2006-10-02  Eric Blake  <ebb9@byu.net>
7806
7807         * modules/strnlen (Depends-on): Add extensions.
7808
7809 2006-10-02  Eric Blake  <ebb9@byu.net>
7810
7811         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
7812         definition in 2.60+.
7813
7814 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
7815
7816         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
7817         checks.
7818
7819 2006-10-02  Bruno Haible  <bruno@clisp.org>
7820
7821         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
7822         to the AUTOMAKE_OPTIONS.
7823         Reported by Jim Meyering.
7824
7825 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
7826
7827         Work around bug in Solaris 10 /proc file system:
7828         /proc/self/fd/NNN/.. isn't the parent directory of
7829         the directory whose file descriptor is NNN.  This needs to
7830         be worked around at run time, not compile time, since a
7831         program might be built on Solaris 8, where things work, and
7832         run on Solaris 10.
7833         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
7834         to use the following interface instead:
7835         (OPENAT_BUFFER_SIZE): New macro.
7836         (openat_proc_name): New function.
7837         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
7838         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
7839         Likewise.
7840         * lib/openat-proc.c: New file.
7841         * modules/openat (Files): Add lib/openat-proc.c.
7842         (Depends-on): Add same-inode, stdbool.
7843         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
7844
7845 2006-09-29  Bruno Haible  <bruno@clisp.org>
7846
7847         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
7848         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
7849         argument. Set stdout_closed before testing for ferror, not after.
7850         (fwriteerror, fwriteerror_no_ebadf): New functions.
7851
7852 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7853
7854         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
7855
7856 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
7857
7858         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
7859         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
7860
7861 2006-09-28  Jim Meyering  <jim@meyering.net>
7862
7863         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
7864         Include <unistd.h>.
7865
7866 2006-09-28  Bruno Haible  <bruno@clisp.org>
7867
7868         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
7869         * modules/linkedhash-list (Depends-on): Likewise.
7870         * modules/rbtreehash-list (Depends-on): Likewise.
7871
7872 2006-09-28  Bruno Haible  <bruno@clisp.org>
7873
7874         * lib/strndup.h: Simplify the redefinition of strndup.
7875         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
7876         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
7877
7878 2006-09-28  Bruno Haible  <bruno@clisp.org>
7879
7880         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
7881         * lib/gl_linkedhash_list.c: Likewise.
7882         * lib/gl_rbtreehash_list.c: Likewise.
7883
7884 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
7885
7886         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
7887         getaddrinfo.
7888
7889         * lib/__fpending.h: Don't include <stdio_ext.h> unless
7890         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
7891         it causes <stdio_ext.h> to cause a compile-time error.
7892         Problem reported by Nelson H. F. Beebe.
7893         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
7894         of HAVE_DECL___PENDING.
7895
7896         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
7897         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
7898         declaration.
7899
7900 2006-09-27  Jim Meyering  <jim@meyering.net>
7901
7902         This file could end up with a definition for a function
7903         named __strndup, rather than rpl_strndup on a system with
7904         incomplete weak_alias support.
7905         * lib/strndup.c (strndup): Rename from __strndup.
7906         Remove #defines that used to map __strndup to strndup.
7907         Don't use K&R prototypes.
7908         Remove LIBC-related code, since this file is not sync'd with glibc.
7909         * lib/strndup.h: Revamp, accordingly.
7910         * m4/strndup.m4: Modernize.
7911
7912 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
7913
7914         * modules/savewd (Depends-on): Add 'raise'.
7915         * lib/savewd.c: Include <signal.h>, for 'raise'.
7916
7917 2006-09-26  Jim Meyering  <jim@meyering.net>
7918
7919         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
7920         when we detect Darwin 8.7.0's acl_get_file bug.
7921         Rearrange to perform the new (below) run-test while $LIBS
7922         contains any acl-related library.  Set USE_ACL at the end.
7923         (gl_ACL_GET_FILE): New function.
7924
7925 2006-09-26  Eric Blake  <ebb9@byu.net>
7926
7927         * lib/verror.c: Include <config.h> unconditionally.
7928
7929 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
7930
7931         * modules/clock-time (Maintainer): Add self.
7932         * modules/getlogin_r (Depends-on): Add extensions.
7933
7934 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7935
7936         * modules/clock-time: New module.
7937         * modules/nanosleep (Depends-on): Add clock-time.
7938         * modules/gethrxtime (Depends-on): Likewise.
7939         * modules/gettime (Depends-on): Likewise.
7940         * modules/settime (Depends-on): Likewise.
7941
7942         * modules/fts-lgpl: Depend on openat.
7943         * modules/mkancesdirs: Depend on savewd.
7944         * modules/mkdir-p: Likewise.
7945
7946 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7947
7948         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
7949
7950         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
7951         `gl_have_arbitrary_file_name_length_limit' to
7952         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
7953         actually works between configure runs.
7954
7955 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7956             Bruno Haible  <bruno@clisp.org>
7957
7958         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
7959
7960 2006-09-25  Jim Meyering  <jim@meyering.net>
7961
7962         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
7963         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
7964
7965 2006-09-25  Eric Blake  <ebb9@byu.net>
7966
7967         * gnulib-tool (func_import, func_create_testdir): Fix typos in
7968         exec's in 2006-09-18 patch when shuffling fds.
7969
7970 2006-09-25  Bruno Haible  <bruno@clisp.org>
7971
7972         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
7973         Reported by Jim Meyering.
7974
7975 2006-09-24  Jim Meyering  <jim@meyering.net>
7976
7977         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
7978         compare a pointer against a literal "0".  That caused failures with
7979         at least HP-UX's hpcc.
7980
7981 2006-09-22  Simon Josefsson  <jas@extundo.com>
7982
7983         * modules/gc-sha1:
7984         * modules/gc-md4:
7985         * modules/gc-hmac-sha1:
7986         * modules/gc-hmac-md5:
7987         * modules/gc-des:
7988         * modules/gc-arcfour: Distribute more files.
7989
7990 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7991
7992         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
7993         (gl_linked_iterator_from_to): Initialize struct completely.
7994         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
7995         (gl_tree_iterator_from_to): Likewise
7996         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
7997         * lib/gl_array_list.c [lint] (gl_array_iterator)
7998         (gl_array_iterator_from_to): Likewise.
7999         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
8000         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
8001         (gl_carray_iterator_from_to): Likewise.
8002
8003         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
8004         * lib/md4.c (md4_process_block): Remove unused variable.
8005         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
8006         parentheses for clarity.
8007
8008 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8009
8010         * modules/bison-i18n (Depends-on): Add gettext.
8011
8012 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8013
8014         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
8015         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
8016         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
8017         also add missing comma that caused broken test.
8018         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
8019         stdlib.h, for `abort'.
8020         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
8021         variables.
8022         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
8023         include unistd.h if present, for `rmdir'.
8024         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
8025         variables.
8026         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
8027         in the process include standard headers for prototypes.
8028         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
8029         gets declared on GNU/Linux.
8030         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
8031         unistd.h, for `rmdir'.
8032         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
8033
8034         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
8035         always true.
8036         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
8037
8038         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
8039
8040 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8041
8042         * gnulib-tool (func_version): Create output all at once.  This
8043         may help avoid triggering unnecessary SIGPIPEs, and at any
8044         rate it doesn't hurt.
8045
8046 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8047             Bruno Haible  <bruno@clisp.org>
8048
8049         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
8050         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
8051         * m4/signed.m4 (bh_C_SIGNED): Likewise.
8052
8053         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
8054         (gl_FUNC_VASPRINTF): Invoke it.
8055
8056 2006-09-22  Bruno Haible  <bruno@clisp.org>
8057
8058         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
8059         getloadavg.c as first argument.
8060
8061 2006-09-22  Bruno Haible  <bruno@clisp.org>
8062
8063         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
8064         at the beginning of the gl_INIT macro.
8065         * modules/getloadavg (configure.ac): Pass $gl_source_base to
8066         gl_GETLOADAVG.
8067
8068 2006-09-22  Bruno Haible  <bruno@clisp.org>
8069
8070         * gnulib-tool (func_create_megatestdir): Don't include the config-h
8071         module.
8072         Suggested by Ralf Wildenhues.
8073
8074 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
8075
8076         Import this patch from libc:
8077
8078         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
8079
8080         * lib/regex_internal.c (re_string_reconstruct): Handle
8081         offset < pstr->valid_raw_len && pstr->offsets_needed case.
8082         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
8083         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
8084         re_string_context_at.
8085
8086         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
8087         now requires it.
8088         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
8089         gl_REGEX now does it for us.
8090         (gl_REGEX): Add test taken from
8091         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
8092
8093         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
8094         Check that large offsets work.  Modernize Autoconf usages.
8095         Prefer "yes" to mean a good thing rather than a bad.
8096         Don't put "#define mkstemp" in config.h, as this might interfere
8097         with standard system headers that "#define mkstemp mkstemp64".
8098
8099         * modules/mkstemp (Depends-on): Add extensions, so that
8100         mkstemp is visible on some platforms.
8101         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
8102         (Include): Change to "mkstemp.h" from <stdlib.h>.
8103         (Files): Add mkstemp.h.
8104
8105         * lib/mkstemp.h: New file, since some standard headers
8106         #define mkstemp.
8107         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
8108         Include "mkstemp.h".
8109         Make the _LIBC code resemble glibc original more,
8110         e.g., use K&R style.
8111         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
8112         (mkstemp): Remove, since mkstemp.h does this for us.
8113         * lib/stdlib--.h: Include mkstemp.h.
8114
8115         Import this patch from libc:
8116
8117         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
8118
8119         * lib/tempname.c (__gen_tempname): Change attempts_min
8120         into a macro.  Use preprocessor to decide how to initialize
8121         attempts [Coverity CID 67].
8122
8123 2006-09-20  Bruno Haible  <bruno@clisp.org>
8124
8125         * lib/mkdtemp.c: Import from libc.
8126         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
8127                 * sysdeps/posix/tempname.c (__gen_tempname): Change
8128                 attempts_min into a macro.  Use preprocessor to decide how to
8129                 initialize attempts [Coverity CID 67].
8130         2001-11-27  Paul Eggert  <eggert@twinsun.com>
8131                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
8132                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
8133
8134 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8135
8136         * gnulib-tool (func_exit): New function, to allow to pass the
8137         exit status portably through the trap.  Use everywhere.
8138         (--help, --version): Signal a write error.
8139         (trap): catch SIGPIPE, for write errors.
8140         Exit at the end of the trap, with the correct exit status.
8141
8142 2006-09-19  Karl Berry  <karl@gnu.org>
8143
8144         * doc/gnulib.texi: note about the license texinfo files.
8145
8146 2006-09-19  Eric Blake  <ebb9@byu.net>
8147
8148         * gnulib-tool: Avoid space-tab.
8149
8150 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
8151
8152         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
8153         that prevented coreutils 6.1 from building.  Problem reported
8154         by Petter Reinholdtsen.
8155
8156 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
8157
8158         * gnulib-tool (avoidlist): Fix typo that broke options like
8159         --avoid=lock that are used by coreutils bootstrap.
8160
8161 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
8162
8163         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
8164         more systematically.
8165
8166 2006-09-18  Jim Meyering  <jim@meyering.net>
8167
8168         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
8169
8170 2006-09-18  Bruno Haible  <bruno@clisp.org>
8171
8172         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
8173
8174 2006-09-18  Bruno Haible  <bruno@clisp.org>
8175
8176         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
8177         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
8178         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
8179         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
8180         * m4/gettext.m4: Require autoconf >= 2.52.
8181         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
8182         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
8183         of gl_cv_header_inttypes_h.
8184
8185 2006-09-18  Bruno Haible  <bruno@clisp.org>
8186
8187         * lib/javaversion.c: Include configmake.h.
8188
8189 2006-09-18  Bruno Haible  <bruno@clisp.org>
8190
8191         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
8192         avoid that the while loops be executed in a subshell.
8193
8194 2006-09-18  Bruno Haible  <bruno@clisp.org>
8195
8196         * MODULES.html.sh (func_module): Break long lines.
8197         Suggested by Bruce Korb <bkorb@gnu.org>.
8198
8199 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8200
8201         Speed up by a factor of 1.12.
8202         * gnulib-tool (nl): New variable.
8203         (func_import): Rewrite include directive extraction to only read each
8204         directive once.
8205
8206 2006-09-17  Bruno Haible  <bruno@clisp.org>
8207
8208         * modules/javaversion (Makefile.am): Remove DEFS setting.
8209         (Depends-on): Add configmake, for PKGDATADIR definition.
8210
8211 2006-09-17  Bruno Haible  <bruno@clisp.org>
8212
8213         * gnulib-tool (func_create_testdir): Rewrite all files at once.
8214
8215 2006-09-17  Bruno Haible  <bruno@clisp.org>
8216
8217         * gnulib-tool (func_append): New function, stolen from libtool.m4.
8218         (func_modules_transitive_closure, func_modules_add_dummy,
8219         func_modules_to_filelist, func_import, func_create_testdir,
8220         func_create_megatestdir, ...): Use it wherever possible.
8221         Suggested by Ralf Wildenhues.
8222
8223 2006-09-16  Karl Berry  <karl@gnu.org>
8224
8225         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
8226         to avoid sectioning errors.
8227         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
8228         [ifinfo]: blank line after @center-ed titles.
8229         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
8230         Spell FSF address consistently with others.
8231         (These changes approved by rms.)
8232
8233 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8234
8235         Speed up by a factor of 1.61.
8236         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
8237         already checked module names again.
8238
8239 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8240
8241         Speed up by a factor of 1.13.
8242         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
8243         for new_files, and the input to func_add_or_update.
8244
8245 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8246
8247         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
8248         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
8249
8250 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
8251
8252         * modules/mkancesdirs (Depends-on): Add fcntl.
8253         * modules/savewd: New file.
8254         * MODULES.html.sh (File system functions): Add savewd.
8255
8256         * modules/configmake (Makefile.am): Add support for the
8257         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
8258
8259 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
8260
8261         * m4/savewd.m4: New file.
8262
8263 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
8264
8265         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
8266         (dirchownmod): New arg FD.  All callers changed.
8267         Use FD rather than opening the directory ourself, as opening is
8268         now the caller's responsibility.
8269         * lib/dirchownmod.h: Likewise.
8270         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
8271         hosts that require <sys/types.h> before <sys/stat.h>.  Include
8272         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
8273         (test_dir): Remove.
8274         (mkancesdirs): Return length of prefix of FILE that has already
8275         been made, or -2 if there is a child doing the work.  Redo
8276         algorithm so that it is O(N) rather than O(N**2).  Optimize away
8277         ".", and treat ".." specially since it might stray back into
8278         already-created areas.  Use a subprocess if necessary.  New arg
8279         WD; all users changed.  MAKE_DIR function should now return 1
8280         if it creates a directory that is not readable.  Return -2 if
8281         a child process is spun off.
8282         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
8283         Adjust signature to match code.
8284         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
8285         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
8286         all users changed.
8287         * lib/savewd.c, lib/savewd.h: New files.
8288
8289 2006-09-15  Jim Meyering  <jim@meyering.net>
8290
8291         * modules/rename-dest-slash: New module.
8292         * MODULES.html.sh (posix_compat): Add it here.
8293
8294         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
8295
8296 2006-09-15  Jim Meyering  <jim@meyering.net>
8297
8298         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
8299         file.
8300
8301         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
8302
8303 2006-09-15  Jim Meyering  <jim@meyering.net>
8304
8305         * lib/rename-dest-slash.c (has_trailing_slash): Use
8306         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
8307         (rpl_rename_dest_slash): Perform the cheaper trailing slash
8308         test before testing whether SRC is a directory.
8309         Suggestions from Bruno Haible.
8310
8311         Avoid a warning about an unused variable.
8312         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
8313         into the #ifdef block where it's used.
8314
8315         * lib/rename-dest-slash.c: New file.
8316
8317 2006-09-14  Bruno Haible  <bruno@clisp.org>
8318
8319         * lib/allocsa.c: Include <config.h> unconditionally.
8320         * lib/asnprintf.c: Likewise.
8321         * lib/asprintf.c: Likewise.
8322         * lib/c-strcasecmp.c: Likewise.
8323         * lib/c-strcasestr.c: Likewise.
8324         * lib/c-strncasecmp.c: Likewise.
8325         * lib/c-strstr.c: Likewise.
8326         * lib/classpath.c: Likewise.
8327         * lib/clean-temp.c: Likewise.
8328         * lib/concatpath.c: Likewise.
8329         * lib/copy-file.c: Likewise.
8330         * lib/csharpcomp.c: Likewise.
8331         * lib/csharpexec.c: Likewise.
8332         * lib/execute.c: Likewise.
8333         * lib/fatal-signal.c: Likewise.
8334         * lib/findprog.c: Likewise.
8335         * lib/fwriteerror.c: Likewise.
8336         * lib/gl_array_list.c: Likewise.
8337         * lib/gl_array_oset.c: Likewise.
8338         * lib/gl_avltree_list.c: Likewise.
8339         * lib/gl_avltree_oset.c: Likewise.
8340         * lib/gl_avltreehash_list.c: Likewise.
8341         * lib/gl_carray_list.c: Likewise.
8342         * lib/gl_linked_list.c: Likewise.
8343         * lib/gl_linkedhash_list.c: Likewise.
8344         * lib/gl_list.c: Likewise.
8345         * lib/gl_oset.c: Likewise.
8346         * lib/gl_rbtree_list.c: Likewise.
8347         * lib/gl_rbtree_oset.c: Likewise.
8348         * lib/gl_rbtreehash_list.c: Likewise.
8349         * lib/imaxabs.c: Likewise.
8350         * lib/imaxdiv.c: Likewise.
8351         * lib/javacomp.c: Likewise.
8352         * lib/javaexec.c: Likewise.
8353         * lib/javaversion.c: Likewise.
8354         * lib/linebreak.c: Likewise.
8355         * lib/localcharset.c: Likewise.
8356         * lib/lock.c: Likewise.
8357         * lib/mbchar.c: Likewise.
8358         * lib/mbswidth.c: Likewise.
8359         * lib/mkdtemp.c: Likewise.
8360         * lib/pipe.c: Likewise.
8361         * lib/printf-args.c: Likewise.
8362         * lib/printf-parse.c: Likewise.
8363         * lib/progname.c: Likewise.
8364         * lib/progreloc.c: Likewise.
8365         * lib/readlink.c: Likewise.
8366         * lib/sh-quote.c: Likewise.
8367         * lib/stpcpy.c: Likewise.
8368         * lib/stpncpy.c: Likewise.
8369         * lib/strcasecmp.c: Likewise.
8370         * lib/strcasestr.c: Likewise.
8371         * lib/strcspn.c: Likewise.
8372         * lib/striconv.c: Likewise.
8373         * lib/strncasecmp.c: Likewise.
8374         * lib/strnlen1.c: Likewise.
8375         * lib/strstr.c: Likewise.
8376         * lib/strtok_r.c: Likewise.
8377         * lib/tls.c: Likewise.
8378         * lib/tmpdir.c: Likewise.
8379         * lib/unicodeio.c: Likewise.
8380         * lib/unsetenv.c: Likewise.
8381         * lib/vasnprintf.c: Likewise.
8382         * lib/vasprintf.c: Likewise.
8383         * lib/wait-process.c: Likewise.
8384         * lib/xallocsa.c: Likewise.
8385         * lib/xsetenv.c: Likewise.
8386         * lib/xstriconv.c: Likewise.
8387
8388 2006-09-13  Simon Josefsson  <jas@extundo.com>
8389
8390         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
8391         that internally, suggested by Ralf Wildenhues
8392         <Ralf.Wildenhues@gmx.de>.
8393
8394 2006-09-13  Simon Josefsson  <jas@extundo.com>
8395
8396         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
8397         @LIBOBJS@.
8398         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8399
8400 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
8401
8402         * lib/_fpending.c: Include <config.h> unconditionally, since we no
8403         longer worry about uses that don't define HAVE_CONFIG_H.
8404         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
8405         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
8406         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
8407         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
8408         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
8409         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
8410         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
8411         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
8412         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
8413         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
8414         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
8415         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
8416         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
8417         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
8418         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
8419         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
8420         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
8421         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
8422         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
8423         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
8424         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
8425         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
8426         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
8427         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
8428         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
8429         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
8430         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
8431         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
8432         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
8433         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
8434         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
8435         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
8436         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
8437         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
8438         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
8439         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
8440         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
8441         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
8442         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
8443         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
8444         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
8445         Likewise.
8446
8447 2006-09-13  Eric Blake  <ebb9@byu.net>
8448
8449         * lib/getopt.c: Fix typo in last commit.
8450
8451 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
8452
8453         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
8454         dgettext.
8455
8456 2006-09-12  Jim Meyering  <jim@meyering.net>
8457
8458         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
8459         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
8460         Reported by Nelson H. F. Beebe.
8461
8462 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8463
8464         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
8465         program_invocation_name and program_invocation_short_name are
8466         initialized.
8467         * lib/argp-namefrob.h: Move declarations of program_invocation_name
8468         and program_invocation_short_name to argp.h, so they are visible
8469         to user programs.
8470         * lib/argp.h: Likewise
8471
8472 2006-09-10  Bruno Haible  <bruno@clisp.org>
8473
8474         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
8475         m4/inttypes_h.m4, m4/uintmax_t.m4.
8476
8477 2006-09-10  Bruno Haible  <bruno@clisp.org>
8478
8479         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
8480         gl_AC_TYPE_UINTMAX_T.
8481
8482 2006-09-10  Bruno Haible  <bruno@clisp.org>
8483
8484         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
8485
8486 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8487
8488         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
8489         convention.  Text proposed by Bruno Haible.
8490         (struct argp_option): Document the use of N_() wrappers.
8491
8492         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
8493         '\v', and translate the two parts separately, instead of feeding
8494         the whole string to gettext.  This allows to exclude
8495         '\v' from the strings visible to the translator by writing doc
8496         strings as N_("..") "\v" N_("..").
8497
8498 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
8499
8500         * config/srclist.txt: Undo latest change; the bug was fixed.
8501
8502 2006-09-09  Bruno Haible  <bruno@clisp.org>
8503
8504         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
8505         assignments if building a library without libtool.
8506         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
8507         in func_emit_lib_Makefile_am.
8508         (func_import): When building a static library libfoo.a, arrange to
8509         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
8510         (func_create_testdir): Likewise.
8511         * modules/gc (configure.ac, Makefile.am): If building statically,
8512         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
8513         * modules/iconvme (configure.ac, Makefile.am): Likewise.
8514         * modules/striconv (configure.ac, Makefile.am): Likewise.
8515         Based on a suggestion by Ralf Wildenhues.
8516
8517 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8518
8519         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
8520         Check for unistd.h too, since Autoconf doesn't assume POSIX.
8521         Also:
8522
8523         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8524         Add year_2050_test to catch glibc bug 2821
8525         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
8526
8527         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8528         Prefer #ifdef to #if.
8529
8530         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
8531         Return from 'main' instead of calling 'exit'.
8532
8533 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8534
8535         * lib/mktime.c (guess_time_tm): Fix bug where mktime
8536         returned the maximum time_t value rather than (time_t) -1.
8537         Problem originally reported by William Bardwell
8538         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
8539
8540         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
8541         Moved to here ...
8542         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
8543         ... from here.
8544
8545 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8546
8547         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
8548         2821 is fixed.
8549
8550 2006-09-08  Jim Meyering  <jim@meyering.net>
8551
8552         Don't make generated files read-only.  That would bother too many
8553         people.  However, do retain the ability to work when targets are
8554         read-only: remove the destination and temporary files before writing
8555         them (when generated via sed or echo), or by using the -f option for
8556         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
8557         * modules/alloca-opt, modules/argz, modules/arpa_inet:
8558         * modules/byteswap, modules/configmake, modules/fcntl:
8559         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
8560         * modules/localcharset, modules/netinet_in, modules/poll:
8561         * modules/stdbool, modules/stdint, modules/sys_select:
8562         * modules/sys_socket, modules/sys_stat, modules/sysexits:
8563
8564 2006-09-08  Jim Meyering  <jim@meyering.net>
8565
8566         Avoid new build failure on FreeBSD 6.0.
8567         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
8568         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
8569         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
8570
8571 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8572
8573         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
8574
8575 2006-09-07  Jim Meyering  <jim@meyering.net>
8576
8577         Fix global typo in last change: use chmod u-w, not chmod u-x.
8578         Spotted by Paul Eggert and Bruce Korb.
8579         * modules/alloca-opt, modules/argz, modules/arpa_inet:
8580         * modules/byteswap, modules/configmake, modules/fcntl:
8581         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
8582         * modules/localcharset, modules/netinet_in, modules/poll:
8583         * modules/stdbool, modules/stdint, modules/sys_select:
8584         * modules/sys_socket, modules/sys_stat, modules/sysexits:
8585
8586 2006-09-06  Jim Meyering  <jim@meyering.net>
8587
8588         Make generated files be read-only.
8589         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
8590         Ensure that each generated file is now read-only.
8591         * modules/argz: Likewise.
8592         * modules/arpa_inet: Likewise.
8593         * modules/byteswap: Likewise.
8594         * modules/configmake: Likewise.
8595         * modules/fcntl: Likewise.
8596         * modules/fnmatch: Likewise.
8597         * modules/getopt: Likewise.
8598         * modules/glob: Likewise.
8599         * modules/inttypes: Likewise.
8600         * modules/netinet_in: Likewise.
8601         * modules/poll: Likewise.
8602         * modules/stdbool: Likewise.
8603         * modules/stdint: Likewise.
8604         * modules/sys_select: Likewise.
8605         * modules/sys_socket: Likewise.
8606         * modules/sys_stat: Likewise.
8607         * modules/sysexits: Likewise.
8608         * modules/localcharset: Same as above, but continue using temporary
8609         file named "t-$@" (why different?) rather than the "$@-t" used
8610         everywhere else.
8611
8612         * modules/sysexits (Makefile.am): Replace literal occurrences
8613         of "sysexit.h" more readable, and more consistent, "$@".
8614
8615 2006-09-06  Bruno Haible  <bruno@clisp.org>
8616
8617         * modules/striconv: New file.
8618         * modules/xstriconv: New file.
8619         * MODULES.html.sh (Internationalization functions): Add striconv,
8620         xstriconv.
8621
8622 2006-09-06  Bruno Haible  <bruno@clisp.org>
8623
8624         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
8625         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
8626         not using libtool correctly.
8627
8628 2006-09-06  Bruno Haible  <bruno@clisp.org>
8629
8630         * lib/striconv.h: New file.
8631         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
8632         iconvstring.c.
8633         * lib/xstriconv.h: New file.
8634         * lib/xstriconv.c: New file.
8635
8636 2006-09-06  Bruno Haible  <bruno@clisp.org>
8637
8638         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8639         lib_..._LDFLAGS.
8640
8641 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8642
8643         * lib/argz_.h: Sync from Libtool.
8644
8645         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
8646                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8647
8648         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
8649
8650 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
8651
8652         * modules/trim: New file.
8653
8654 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
8655
8656         * lib/trim.h: New file.
8657         * lib/trim.c: New file.
8658
8659 2006-09-05  Bruno Haible  <bruno@clisp.org>
8660
8661         * MODULES.html.sh (String handling): Add trim.
8662
8663 2006-09-04  Karl Berry  <karl@gnu.org>
8664
8665         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
8666         until next release.
8667
8668 2006-09-03  Bruno Haible  <bruno@clisp.org>
8669
8670         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
8671         correctly.
8672
8673 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8674
8675         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
8676         not gl_GETLOADAVG.  Omit unneeded semicolons.
8677         Problems reported by Ralf Wildenhues in
8678         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
8679         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
8680         at the end, which is the usual gnulib style.
8681
8682         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
8683         of doing all the work ourselves.
8684         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
8685         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
8686
8687 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8688
8689         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
8690         Problem reported by Ralf Wildenhues in
8691         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
8692
8693         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
8694         HAVE_STRUCT_STATFS_F_FSTYPENAME.
8695
8696 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8697
8698         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
8699         yesterday's patch by changing test -n to test -z.
8700
8701 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8702
8703         * modules/getloadavg (Files): Add m4/getloadavg.m4.
8704         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
8705         the former is now obsolescent.
8706
8707         * modules/chdir-long (Depends-on): Add fcntl.
8708
8709 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8710
8711         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
8712         obsolescent, and programs should use gnulib instead.
8713         * m4/getloadavg.m4: New file, with contents taken from Autoconf
8714         but with prefixes changed.
8715
8716 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8717
8718         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
8719         or stdbool.h, because they might not exist while configuring.
8720
8721         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
8722         Don't include unistd.h or limits.h; not needed, since chdir-long.h
8723         does that for us.
8724         (O_DIRECTORY): Remove.
8725
8726 2006-08-31  Eric Blake  <ebb9@byu.net>
8727
8728         * gnulib-tool: Don't let emacs change spaces to TAB.
8729
8730 2006-08-31  Bruno Haible  <bruno@clisp.org>
8731
8732         * gnulib-tool: When calling func_import more than once, do it in a
8733         subshell.
8734         Reported by Eric Blake <ebb9@byu.net>.
8735
8736 2006-08-31  Bruno Haible  <bruno@clisp.org>
8737
8738         * gnulib-tool (nl): Remove variable.
8739         (sed_transform_lib_file): Use more robust test for config-h module.
8740         (func_import): Fix typo in 2006-08-25 patch.
8741
8742 2006-08-31  Bruno Haible  <bruno@clisp.org>
8743
8744         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
8745         specified, augment Makefile.am variables instead of assigning them.
8746
8747 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
8748
8749         Work around a bug in both the Linux and SunOS 64-bit kernels:
8750         nanosleep mishandles sleeps for longer than 2**31 seconds.
8751         Problem reported by Frank v Waveren in
8752         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
8753         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
8754         Check for nanosleep bug.
8755         (LIB_NANOSLEEP): Append clock_gettime library if needed.
8756
8757 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
8758
8759         Work around a bug in both the Linux and SunOS 64-bit kernels:
8760         nanosleep mishandles sleeps for longer than 2**31 seconds.
8761         Problem reported by Frank v Waveren in
8762         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
8763         * lib/nanosleep.c (BILLION): New constant.
8764         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
8765         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
8766         implementation.
8767
8768 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
8769
8770         * modules/nanosleep (Depends-on): Add gettime.
8771
8772 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
8773         and Simon Josefsson  <jas@extundo.com>
8774         and Oskar Liljeblad  <oskar@osk.mine.nu>
8775
8776         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
8777         * gnulib-tool (func_import): New license type 'unmodifiable license
8778         text'.
8779         * modules/fdl: Use it.  Longer description.
8780         * module/gpl, module/lgpl: New files.
8781
8782 2006-08-30  Jim Meyering  <jim@meyering.net>
8783
8784         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
8785         shadowing the parameter.
8786
8787 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8788
8789         Sync from Libtool:
8790
8791         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8792
8793         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
8794         sharing with gnulib.  Report by Eric Blake.
8795
8796 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
8797
8798         * modules/isapipe: New file.
8799         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
8800
8801 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
8802
8803         * modules/configmake (Makefile.am): Add a comment, and omit
8804         the CONFIGMAKE_ prefix from generated macro names.  Suggested
8805         by Bruno Haible.
8806
8807 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
8808
8809         * m4/isapipe.m4: New file.
8810
8811 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
8812
8813         * lib/isapipe.c, lib/isapipe.h: New files.
8814
8815 2006-08-29  Jim Meyering  <jim@meyering.net>
8816
8817         * modules/configmake (Makefile.am): Make configmake.h depend on
8818         Makefile.  Otherwise, a stale configmake.h could hang around.
8819
8820 2006-08-29  Eric Blake  <ebb9@byu.net>
8821
8822         * lib/error.c (error_at_line, print_errno_message): Match libc, after
8823         resolution of upstream bug 3044.
8824
8825 2006-08-29  Bruno Haible  <bruno@clisp.org>
8826
8827         * modules/localcharset (Depends-on): Add configmake.
8828         (Makefile.am): Remove setting of LIBDIR through DEFS.
8829
8830 2006-08-29  Bruno Haible  <bruno@clisp.org>
8831
8832         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
8833         defined.
8834
8835 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
8836
8837         * modules/fcntl: New file.
8838         * modules/chdir-safer (Depends-on): Add fcntl.
8839         * modules/fts: Likewise.
8840         * modules/mkdir-p: Likewise.
8841
8842         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
8843         This undoes the most recent change, since we're now addressing the
8844         problem in a different way.
8845
8846         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
8847         into output, since the output might be called Makefile.am even
8848         if $makefile_name is something different.
8849         (func_import): Use $makefile_am rather than
8850         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
8851         empty.
8852
8853         * modules/inttypes (Files): Add m4/inttypes-h.m4.
8854
8855 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
8856
8857         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
8858         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
8859         recent change to stdint.m4, since we're now addressing the problem in a
8860         different way.
8861
8862 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
8863
8864         * m4/fcntl_h.m4: New file.
8865
8866 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
8867
8868         * lib/fcntl_.h: New file.
8869         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
8870         the fcntl module.
8871         * lib/dirchownmod.c: Likewise.
8872         * lib/fts.c: Likewise.
8873
8874         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
8875         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
8876         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
8877         just before including <inttypes.h>, to avoid circular inclusion.
8878
8879 2006-08-28  Jim Meyering  <jim@meyering.net>
8880
8881         * doc/visibility.texi: Actually read and correct the grammar of the
8882         sentence affected by yesterday's change.
8883
8884 2006-08-28  Eric Blake  <ebb9@byu.net>
8885
8886         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
8887         needs wrapper.
8888
8889 2006-08-28  Eric Blake  <ebb9@byu.net>
8890
8891         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
8892
8893 2006-08-28  Eric Blake  <ebb9@byu.net>
8894
8895         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
8896
8897 2006-08-28  Bruno Haible  <bruno@clisp.org>
8898
8899         * modules/c-strstr: New file, from GNU gettext.
8900         * MODULES.html.sh (String handling): Add c-strstr.
8901
8902 2006-08-28  Bruno Haible  <bruno@clisp.org>
8903
8904         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
8905         macros.
8906         Reported by Eric Blake.
8907
8908 2006-08-28  Bruno Haible  <bruno@clisp.org>
8909
8910         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
8911         (VASNPRINTF): Return a string of length > INT_MAX without failing.
8912         * lib/vasprintf.c: Include errno.h, limits.h.
8913         (EOVERFLOW): New fallback definition.
8914         (vasprintf): Test here whether the string length is > INT_MAX.
8915         * lib/vsnprintf.c: Include errno.h, limits.h.
8916         (EOVERFLOW): New fallback definition.
8917         (vsnprintf): Fix bug when generated string was too long for the buffer.
8918         Test here whether the string length is > INT_MAX.
8919
8920 2006-08-28  Bruno Haible  <bruno@clisp.org>
8921
8922         * lib/inttypes_.h (SCNX*): Remove definitions.
8923         Reported by Eric Blake.
8924
8925 2006-08-28  Bruno Haible  <bruno@clisp.org>
8926
8927         * lib/c-strstr.h: New file, from GNU gettext.
8928         * lib/c-strstr.c: New file, from GNU gettext.
8929
8930 2006-08-28  Bruno Haible  <bruno@clisp.org>
8931
8932         * gnulib-tool: Reorder some statements.
8933
8934 2006-08-28  Bruno Haible  <bruno@clisp.org>
8935
8936         * gnulib-tool: New option --makefile-name.
8937         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
8938         $makefile_name.
8939         (func_import): Write $makefile_name to the cache file, and read it from
8940         there unless explicitly specified. Use $makefile_name as file name
8941         instead of Makefile.am. Adjust the recommendations accordingly.
8942
8943 2006-08-28  Bruno Haible  <bruno@clisp.org>
8944
8945         * gnulib-tool (func_verify_module): Check against misapplying patch.
8946
8947 2006-08-28  Bruno Haible  <bruno@clisp.org>
8948
8949         * gnulib-tool (func_relativize, func_relconcat): New functions.
8950         Give an error if --local-dir is given with --update.
8951         Remove trailing slashes from $local_gnulib_dir.
8952         (func_import): Store the relativized $local_gnulib_dir in
8953         gnulib-cache.m4, and read it from there if not specified explicitly.
8954
8955 2006-08-28  Bruno Haible  <bruno@clisp.org>
8956
8957         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
8958         is the current directory. Respect also $local_gnulib_dir.
8959
8960 2006-08-28  Bruno Haible  <bruno@clisp.org>
8961             Simon Josefsson  <jas@extundo.com>
8962
8963         BeOS portability.
8964         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
8965
8966 2006-08-27  Jim Meyering  <jim@meyering.net>
8967
8968         * doc/visibility.texi: Remove duplicate word: "pointer".
8969
8970 2006-08-26  Bruno Haible  <bruno@clisp.org>
8971
8972         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
8973         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
8974         (Makefile.am): Create inttypes.h from inttypes_.h.
8975         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
8976
8977         * modules/imaxabs: New file.
8978
8979         * modules/imaxdiv: New file.
8980
8981 2006-08-26  Bruno Haible  <bruno@clisp.org>
8982
8983         * m4/inttypes.m4: New file.
8984         * m4/_inttypes_h.m4: Remove file.
8985         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
8986         PRI_MACROS_BROKEN.
8987         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
8988
8989         * m4/imaxabs.m4: New file.
8990
8991         * m4/imaxdiv.m4: New file.
8992
8993 2006-08-26  Bruno Haible  <bruno@clisp.org>
8994
8995         * lib/inttypes_.h: New file.
8996         * lib/inttypes.h: Remove file.
8997         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
8998
8999         * lib/imaxabs.c: New file.
9000
9001         * lib/imaxdiv.c: New file.
9002
9003 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
9004
9005         New config-h module, so that "make" output needn't be cluttered
9006         by -DHAVE_CONFIG_H.
9007         * MODULES.html.sh (Support for building libraries and executables):
9008         Add config-h.
9009         * modules/config-h: New file.
9010         * gnulib-tool (nl, sed_transform_lib_file): New vars.
9011         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
9012         the config-h module is used.
9013
9014         New configmake module, so that "make" output needn't be cluttered
9015         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
9016         * MODULES.html.sh (Support for building libraries and executables):
9017         Add configmake.
9018         * modules/configmake: New file.
9019
9020 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
9021
9022         * m4/config-h.m4: New file.
9023
9024 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
9025
9026         * config/srclist.txt: Add elisp-comp.
9027
9028 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
9029
9030         * MODULES.html.sh (Support for building libraries and executables):
9031         Add elisp-comp.
9032         * build-aux/elisp-comp: New file.
9033         * modules/elisp-comp: New file.
9034
9035 2006-08-24  Bruno Haible  <bruno@clisp.org>
9036
9037         * gnulib-tool (func_create_testdir): Use non-default values of
9038         sourcebase and m4base.
9039
9040 2006-08-24  Bruno Haible  <bruno@clisp.org>
9041
9042         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
9043         HTML structure.
9044
9045 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
9046
9047         * modules/openat (Depends-on): Add lchown.
9048
9049 2006-08-23  Bruno Haible  <bruno@clisp.org>
9050
9051         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
9052         of gl_LOCK_EARLY instead of gl_LOCK.
9053
9054 2006-08-23  Bruno Haible  <bruno@clisp.org>
9055
9056         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
9057         on OSF/1 to no.
9058         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
9059
9060 2006-08-23  Bruno Haible  <bruno@clisp.org>
9061
9062         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
9063         as unusable.
9064
9065         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
9066         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
9067         (gl_LOCK): New macro.
9068
9069 2006-08-22  Simon Josefsson  <jas@extundo.com>
9070
9071         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
9072         to md5 module.
9073
9074 2006-08-22  Simon Josefsson  <jas@extundo.com>
9075
9076         * MODULES.html.sh: Add "Support for maintaining and release
9077         projects".
9078
9079         * build-aux/gnupload: New file, from coreutils.
9080
9081 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
9082
9083         Avoid the need for AC_LIBSOURCES in m4 macros.
9084         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
9085         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
9086         * modules/check-version (EXTRA_DIST): Add check-version.h.
9087         * modules/crc (EXTRA_DIST): Add crc.h.
9088         * modules/des (EXTRA_DIST): Add des.h.
9089         * modules/gc (EXTRA_DIST): Add gc.h.
9090         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
9091         * modules/getline (EXTRA_DIST): Add getline.h.
9092         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
9093         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
9094         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
9095         * modules/md2 (EXTRA_DIST): Add md2.h.
9096         * modules/md4 (EXTRA_DIST): Add md4.h.
9097         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
9098         * modules/read-file (EXTRA_DIST): Add read-file.h.
9099         * modules/readline (EXTRA_DIST): Add readline.h.
9100         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
9101         rijndael-api-fst.h.
9102
9103 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
9104
9105         * m4/rijndael.m4 (gl_ARCFOUR):
9106         * m4/arctwo.m4 (gl_ARCTWO):
9107         * m4/check-version.m4 (gl_CHECK_VERSION):
9108         * m4/crc.m4 (gl_CRC):
9109         * m4/des.m4 (gl_DES):
9110         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
9111         * m4/gc.m4 (gl_GC):
9112         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
9113         * m4/getline.m4 (gl_FUNC_GETLINE):
9114         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
9115         * m4/hmac-md5.m4 (gl_HMAC_MD5):
9116         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
9117         * m4/md2.m4 (gl_MD2):
9118         * m4/md4.m4 (gl_MD4):
9119         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
9120         * m4/read-file.m4 (gl_FUNC_READ_FILE):
9121         * m4/readline.m4 (gl_FUNC_READLINE):
9122         * m4/rijndael.m4 (gl_RIJNDAEL):
9123         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
9124         to get the necessary .h files and whatnot.
9125
9126 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
9127
9128         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
9129         gnulib rather than the other way around.
9130         * config/srclistvars.sh (COREUTILS): Remove.
9131
9132 2006-08-22  Jim Meyering  <jim@meyering.net>
9133
9134         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
9135
9136         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
9137
9138 2006-08-22  Eric Blake  <ebb9@byu.net>
9139
9140         * modules/regexprops-generic: New file.
9141         * MODULES.html.sh (Support for building documentation): List it.
9142
9143 2006-08-22  Eric Blake  <ebb9@byu.net>
9144
9145         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
9146         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
9147         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
9148         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
9149
9150 2006-08-22  Bruno Haible  <bruno@clisp.org>
9151
9152         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
9153         and lib_LTLIBRARIES like the other lib_* variables.
9154
9155 2006-08-22  Bruno Haible  <bruno@clisp.org>
9156
9157         * build-aux/x-to-1.in: New file, from GNU gettext.
9158
9159 2006-08-22  Bruno Haible  <bruno@clisp.org>
9160
9161         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
9162         <utmpx.h> exists.
9163
9164 2006-08-22  Bruno Haible  <bruno@clisp.org>
9165
9166         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
9167         <utmpx.h> exists.
9168
9169 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
9170
9171         BeOS portability.
9172         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
9173         exist.
9174         Problem reported by Bruno Haible.
9175
9176 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
9177
9178         Avoid the need for AC_LIBSOURCES in m4 macros.
9179         * modules/acl (EXTRA_DIST): Add acl.h.
9180         * modules/argmatch (Files): Add m4/argmatch.m4.
9181         (configure.ac): Add gl_ARGMATCH.
9182         (EXTRA_DIST): Renamed from lib_SOURCES, for
9183         consistency with the other modules.  Remove argmatch.c.
9184         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
9185         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
9186         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
9187         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
9188         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
9189         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
9190         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
9191         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
9192         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
9193         * modules/closeout (EXTRA_DIST): Add closeout.h.
9194         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
9195         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
9196         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
9197         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
9198         dirname.h; remove basename.c and stripslash.c.
9199         * modules/exclude (EXTRA_DIST): Add exclude.h.
9200         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
9201         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
9202         * modules/file-type (EXTRA_DIST): Add file-type.h.
9203         * modules/filemode (EXTRA_DIST): Add filemode.h.
9204         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
9205         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
9206         * modules/fpending (EXTRA_DIST): Add __fpending.h.
9207         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
9208         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
9209         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
9210         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
9211         * modules/getdate (EXTRA_DIST): Add getdate.c.
9212         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
9213         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
9214         * modules/getpass (EXTRA_DIST): Add getpass.h.
9215         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
9216         * modules/group-member (EXTRA_DIST): Add group-member.h.
9217         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
9218         * modules/hash (EXTRA_DIST): Add hash.h.
9219         * modules/human (EXTRA_DIST): Add human.h.
9220         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
9221         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
9222         * modules/lchown (EXTRA_DIST): Add lchown.h.
9223         * modules/long-options (EXTRA_DIST): Add long-options.h.
9224         * modules/lstat (EXTRA_DIST): Add lstat.h.
9225         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
9226         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
9227         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
9228         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
9229         * modules/memxor (EXTRA_DIST): Add memxor.h.
9230         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
9231         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
9232         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
9233         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
9234         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
9235         * modules/physmem (EXTRA_DIST): Add physmem.h.
9236         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
9237         * modules/posixver (EXTRA_DIST): Add posixver.h.
9238         * modules/quote (EXTRA_DIST): Add quote.h.
9239         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
9240         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
9241         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
9242         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
9243         regex_internal.h regexec.c.
9244         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
9245         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
9246         * modules/same (EXTRA_DIST): Add same.h.
9247         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
9248         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
9249         * modules/savedir (EXTRA_DIST): Add savedir.h.
9250         * modules/sha1 (EXTRA_DIST): Add sha1.h.
9251         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
9252         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
9253         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
9254         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
9255         * modules/strdup (EXTRA_DIST): Add strdup.h.
9256         * modules/strftime (EXTRA_DIST): Add strftime.h.
9257         * modules/strndup (EXTRA_DIST): Add strndup.h.
9258         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
9259         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
9260         * modules/time_r (EXTRA_DIST): Add time_r.h.
9261         * modules/timespec (EXTRA_DIST): Add timespec.h.
9262         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
9263         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
9264         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
9265         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
9266         * modules/userspec (EXTRA_DIST): Add userspec.h.
9267         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
9268         * modules/utimens (EXTRA_DIST): Add utimens.h.
9269         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
9270         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
9271         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
9272         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
9273         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
9274         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
9275         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
9276         * modules/yesno (EXTRA_DIST): Add yesno.h.
9277
9278 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
9279
9280         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
9281
9282         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
9283         * m4/dev-ino.m4, same-inode.m4: Remove.
9284
9285         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
9286         * m4/acl.m4 (AC_FUNC_ACL):
9287         * m4/backupfile.m4 (gl_BACKUPFILE):
9288         * m4/c-strtod.m4 (gl_C99_STRTOLD):
9289         * m4/canon-host.m4 (gl_CANON_HOST):
9290         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
9291         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
9292         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
9293         * m4/cloexec.m4 (gl_CLOEXEC):
9294         * m4/close-stream.m4 (gl_CLOSE_STREAM):
9295         * m4/closeout.m4 (gl_CLOSEOUT):
9296         * m4/dirfd.m4 (gl_FUNC_DIRFD):
9297         * m4/dirname.m4 (gl_DIRNAME):
9298         * m4/exclude.m4 (gl_EXCLUDE):
9299         * m4/exitfail.m4 (gl_EXITFAIL):
9300         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
9301         * m4/file-type.m4 (gl_FILE_TYPE):
9302         * m4/filemode.m4 (gl_FILEMODE):
9303         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
9304         * m4/fpending.m4 (gl_FUNC_FPENDING):
9305         * m4/fprintftime.m4 (gl_FPRINTFTIME):
9306         * m4/fts.m4 (gl_FUNC_FTS):
9307         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
9308         * m4/getdate.m4 (gl_GETDATE):
9309         * m4/gethrxtime.m4 (gl_GETHRXTIME):
9310         * m4/getpagesize.m4 (gl_GETPAGESIZE):
9311         * m4/getpass.m4 (gl_FUNC_GETPASS):
9312         * m4/gettime.m4 (gl_GETTIME):
9313         * m4/getugroups.m4 (gl_GETUGROUPS):
9314         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
9315         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
9316         * m4/hard-locale.m4 (gl_HARD_LOCALE):
9317         * m4/hash.m4 (gl_HASH):
9318         * m4/idcache.m4 (gl_IDCACHE):
9319         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
9320         * m4/lchown.m4 (gl_FUNC_LCHOWN):
9321         * m4/long-options.m4 (gl_LONG_OPTIONS):
9322         * m4/lstat.m4 (gl_FUNC_LSTAT):
9323         * m4/md5.m4 (gl_MD5):
9324         * m4/memcasecmp.m4 (gl_MEMCASECMP):
9325         * m4/memcoll.m4 (gl_MEMCOLL):
9326         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
9327         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
9328         * m4/memxor.m4 (gl_MEMXOR):
9329         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
9330         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
9331         * m4/modechange.m4 (gl_MODECHANGE):
9332         * m4/mountlist.m4 (gl_MOUNTLIST):
9333         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
9334         * m4/openat.m4 (gl_FUNC_OPENAT):
9335         * m4/pathmax.m4 (gl_PATHMAX):
9336         * m4/physmem.m4 (gl_PHYSMEM):
9337         * m4/posixtm.m4 (gl_POSIXTM):
9338         * m4/posixver.m4 (gl_POSIXVER):
9339         * m4/quote.m4 (gl_QUOTE):
9340         * m4/quotearg.m4 (gl_QUOTEARG):
9341         * m4/readtokens.m4 (gl_READTOKENS):
9342         * m4/readutmp.m4 (gl_READUTMP):
9343         * m4/regex.m4 (gl_REGEX):
9344         * m4/safe-read.m4 (gl_SAFE_READ):
9345         * m4/safe-write.m4 (gl_SAFE_WRITE):
9346         * m4/same.m4 (gl_SAME):
9347         * m4/save-cwd.m4 (gl_SAVE_CWD):
9348         * m4/savedir.m4 (gl_SAVEDIR):
9349         * m4/settime.m4 (gl_SETTIME):
9350         * m4/sha1.m4 (gl_SHA1):
9351         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
9352         * m4/stat-macros.m4 (gl_STAT_MACROS):
9353         * m4/stat-time.m4 (gl_STAT_TIME):
9354         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
9355         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
9356         * m4/strdup.m4 (gl_FUNC_STRDUP):
9357         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
9358         * m4/strndup.m4 (gl_FUNC_STRNDUP):
9359         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
9360         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
9361         * m4/time_r.m4 (gl_TIME_R):
9362         * m4/timespec.m4 (gl_TIMESPEC):
9363         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
9364         * m4/unlinkdir.m4 (gl_UNLINKDIR):
9365         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
9366         * m4/userspec.m4 (gl_USERSPEC):
9367         * m4/utimecmp.m4 (gl_UTIMECMP):
9368         * m4/utimens.m4 (gl_UTIMENS):
9369         * m4/xalloc.m4 (gl_XALLOC):
9370         * m4/xgetcwd.m4 (gl_XGETCWD):
9371         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
9372         * m4/xreadlink.m4 (gl_XREADLINK):
9373         * m4/xstrtod.m4 (gl_XSTRTOD):
9374         * m4/yesno.m4 (gl_YESNO):
9375         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
9376         to get the necessary .h files and whatnot.
9377
9378 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
9379             Bruno Haible  <bruno@clisp.org>
9380
9381         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
9382         /bin/sh understanding of '!' conditional negation.
9383
9384 2006-08-21  Jim Meyering  <jim@meyering.net>
9385
9386         * modules/openat (Depends-on): Really alphabetize.
9387
9388         * modules/acl (Depends-on): Add error and quote.
9389
9390         * check-module (find_included_lib_files): Add at-func.c to the
9391         ok-to-include-more-than-once white list.
9392
9393         * modules/openat (Depends-on): Add lstat.  Alphabetize.
9394
9395 2006-08-21  Bruno Haible  <bruno@clisp.org>
9396
9397         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9398         Emit a pkgdata_DATA variable only if some snippets add contents to it.
9399         Reported by Martin Lambers <marlam@marlam.de>.
9400
9401 2006-08-21  Bruno Haible  <bruno@clisp.org>
9402
9403         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
9404         specify an installation location, don't emit a noinst_LIBRARIES or
9405         noinst_LTLIBRARIES assignment.
9406
9407 2006-08-21  Bruno Haible  <bruno@clisp.org>
9408
9409         BeOS portability.
9410         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
9411         BeOS has mbrtowc() but no <wctype.h>.
9412
9413 2006-08-21  Bruno Haible  <bruno@clisp.org>
9414
9415         BeOS portability.
9416         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
9417         exist.
9418
9419 2006-08-21  Bruno Haible  <bruno@clisp.org>
9420
9421         BeOS portability.
9422         * lib/mbchar.h: Include <wctype.h> only if it exists.
9423
9424 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9425
9426         Remove files that are no longer needed by their respective modules.
9427         * m4/obstack.m4: Remove.
9428         * m4/strerror_r.m4: Remove.
9429         * m4/uint32_t.m4: Remove.
9430         * m4/uintptr_t.m4: Remove.
9431         * m4/ullong_max.m4: Remove.
9432         * m4/xstrtoimax.m4: Remove.
9433         * m4/xstrtoumax.m4: Remove.
9434
9435         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
9436         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
9437         dependencies now capture this.
9438
9439         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
9440         Do not use AC_LIBSOURCES, since gnulib modules now do this.
9441         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
9442         * m4/human.m4 (gl_HUMAN): Likewise.
9443         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
9444         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
9445
9446         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
9447
9448         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
9449         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
9450         stdint.
9451         * m4/human.m4 (gl_HUMAN): Likewise.
9452         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
9453         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
9454         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
9455         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
9456         * m4/xstrtol (gl_XSTRTOL): Likewise.
9457
9458         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
9459         AC_TYPE_LONG_LONG_INT.
9460         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
9461         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
9462         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
9463         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
9464
9465         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
9466         on stdbool.
9467
9468         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
9469         (gl_PREREQ_XSTRTOUL): Remove.
9470
9471         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
9472
9473         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
9474         mode.
9475
9476 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9477
9478         Add and change modules to make it easier for coreutils to use
9479         gnulib-tool.
9480         * modules/backupfile (Files): Remove m4/d-ino.m4.
9481         (Depends-on): Add d-ino.
9482         * modules/cycle-check (Depends-on): Add stdint.
9483         (lib_SOURCES): Add cycle-check.h.
9484         * modules/d-ino: New module.
9485         * modules/d-type: New module.
9486         * modules/error (Files): Remove m4/strerror_r.m4.
9487         * modules/filemode (Files): Add m4/st_dm_mode.m4.
9488         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
9489         m4/inttypes_h.m4, m4/uintmax_t.m4.
9490         (Depends-on): Add stdint.
9491         (lib_SOURCES): Add fsusage.h.
9492         * modules/getcwd (Files): Remove d-ino.m4.
9493         (Depends-on): Add d-ino.
9494         * modules/getndelim2 (Depends-on): Add stdint.
9495         * modules/glob (Files): Remove m4/d-type.m4.
9496         (Depends-on): Add d-type.
9497         * modules/host-os: New module.
9498         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
9499         m4/inttypes_h.m4, m4/uintmax_t.m4.
9500         * Depends-on: Add stdint.
9501         (lib_SOURCES): Add human.h.
9502         * modules/inttostr (Files): Remove m4/intmax_t.m4,
9503         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
9504         m4/uintmax_t.m4, m4/ulonglong.m4.
9505         (Depends-on): Add stdint.
9506         (EXTRA_DIST): Add inttostr.h.
9507         * modules/lchmod: New module.
9508         * modules/link-follow: New module.
9509         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
9510         (Depends-on): Add lchmod.
9511         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
9512         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
9513         (Depends-on): Add stdint.
9514         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
9515         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
9516         (Depends-on): Add stdint.
9517         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
9518         * modules/perl: New module.
9519         * modules/regex (Depends-on): Add stdint.
9520         * modules/rmdir-errno: New module.
9521         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
9522         m4/intmax_t.m4.
9523         (Depends-on): Add stdint.
9524         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
9525         m4/uintmax_t.m4.
9526         (Depends-on): Add stdint.
9527         * modules/unlink-busy: New module.
9528         * modules/utimecmp (Depends-on): Add stdint.
9529         * modules/uptime: New module.
9530         * modules/winsz-ioctl: New module.
9531         * modules/winsz-termios: New module.
9532         * modules/xnanosleep (Depends-on): Add nanosleep.
9533         * modules/ullong_max: Remove.
9534         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
9535         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
9536         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
9537         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
9538         (Depends-on): Add inttypes.
9539         (lib_SOURCES): Add xstrtol.h.
9540         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
9541         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
9542         * MODULES.html.sh: Move 'assert' into the assert section.
9543         Move 'dummy' into the linking section.
9544         Remove ullong_max.
9545         Add section for compatibility checks for POSIX:2001 functions,
9546         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
9547         winsz-ioctl, and winsz-termios into it.
9548         Add lchmod.
9549         Add top-level Misc section and put host-os, perl, and uptime
9550         into it.
9551
9552 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9553
9554         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
9555         now assume the stdint module.  Do not include inttypes.h.
9556         * lib/fsusage.h: Likewise.
9557         * lib/getndelim2.c: Likewise.
9558         * lib/human.h: Likewise.
9559         * lib/inttostr.h: Likewise.
9560         * lib/obstack.c: Likewise.
9561         * lib/regex_internal.h: Likewise.
9562         * lib/tempname.c: Likewise.
9563         * lib/utimecmp.c: Likewise.
9564         * lib/xstrtol.h: Likewise.
9565
9566         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
9567
9568         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
9569         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
9570         * lib/xtime.h: Likewise.
9571
9572 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9573
9574         * modules/openat (Files): Add lib/fchmodat.c.
9575         Fixes problem reported by Jay Youngman.
9576
9577 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9578
9579         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
9580         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
9581
9582 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
9583             Bruno Haible  <bruno@clisp.org>
9584
9585         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
9586         and is a script that invokes bison. Tighten the code. Add comments.
9587
9588 2006-08-18  Jim Meyering  <jim@meyering.net>
9589
9590         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
9591         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
9592         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
9593         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
9594
9595 2006-08-18  Bruno Haible  <bruno@clisp.org>
9596
9597         * modules/bison-i18n: New file.
9598         * MODULES.html.sh (Internationalization functions): Add it.
9599
9600 2006-08-18  Bruno Haible  <bruno@clisp.org>
9601
9602         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
9603         sys/statvfs.h. When getmntinfo was found, check its declaration and
9604         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
9605
9606 2006-08-18  Bruno Haible  <bruno@clisp.org>
9607
9608         * m4/bison-i18n.m4: New file, from bison.
9609
9610 2006-08-18  Bruno Haible  <bruno@clisp.org>
9611
9612         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
9613         (ME_DUMMY): Treat "kernfs" as a dummy.
9614         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
9615
9616 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
9617
9618         Update from coreutils.
9619
9620         2006-08-15  Jim Meyering  <jim@meyering.net>
9621
9622         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
9623
9624         2006-01-17  Jim Meyering  <jim@meyering.net>
9625
9626         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
9627
9628         2006-01-11  Jim Meyering  <jim@meyering.net>
9629
9630         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
9631         Check for the lchmod function.
9632
9633 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
9634
9635         Update from coreutils.
9636
9637         * lib/__fpending.h: Add copyright notice.
9638         * lib/fprintftime.h: Likewise.
9639         * lib/savedir.c: Use (C) in copyright notice.
9640         * lib/savedir.h: Likewise.
9641
9642         2006-08-15  Jim Meyering  <jim@meyering.net>
9643
9644         * lib/at-func.c: New file, with the logic of all emulated at-functions.
9645         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
9646         in support of the EXPECTED_ERRNO macro.
9647         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
9648         definitions.  Instead, define the appropriate symbols and include
9649         "at-func.c".
9650         * lib/mkdirat.c (mkdirat): Likewise.
9651         * lib/fchmodat.c (fchmodat): Likewise.
9652         (ENOSYS): Remove definition.
9653         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
9654         it.  Don't include "unistd--.h" -- it wasn't ever used.
9655
9656         2006-01-17  Jim Meyering  <jim@meyering.net>
9657
9658         Rewrite fts.c not to change the current working directory,
9659         by using openat, fstatat, fdopendir, etc..
9660
9661         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
9662         (HAVE_OPENAT_SUPPORT): Define.
9663         [_LIBC] (fchdir): Don't undef or define; no longer used.
9664         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
9665         Now, this `function' always succeeds, and consumes its file descriptor
9666         parameter -- so callers must not close such FDs.  Update callers.
9667         (diropen_fd, opendirat, cwd_advance_fd): New functions.
9668         (diropen): Add parameter, SP.  Adjust all callers.
9669         Implement using diropen_fd, rather than open.
9670         (fts_open): Initialize new member, fts_cwd_fd.
9671         Remove fts_rft-setting code.
9672         (fts_close): Close fts_cwd_fd, if necessary.
9673         (__opendir2): Define in terms of opendir or opendirat,
9674         depending on whether the FST_NOCHDIR flag is set.
9675         (fts_build): Since fts_safe_changedir consumes its FD, and since
9676         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
9677         and close the dup'd file descriptor upon failure.
9678         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
9679         (fts_safe_changedir): Tweak semantics to reflect that this function
9680         now calls cwd_advance_fd and hence consumes its FD argument.
9681         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
9682         [struct FTS] (fts_rft): Remove now-unused member.
9683         [struct FTS] (fts_cycle.state): Improve comment.
9684
9685         * lib/openat.c (openat_needs_fchdir): New function.
9686         * lib/openat.h (openat_needs_fchdir): Declare it.
9687
9688 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
9689
9690         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
9691         Problem and fix reported by Pádraig Brady in
9692         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
9693
9694 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
9695
9696         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
9697
9698 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
9699
9700         * lib/memcoll.c (memcoll): Optimize for the common case where the
9701         arguments are bytewise equal.
9702
9703 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
9704
9705         * doc/regexprops-generic.texi: Add a copyright notice.
9706
9707 2006-08-15  Bruno Haible  <bruno@clisp.org>
9708
9709         * modules/tmpdir (License): Change to LGPL.
9710
9711 2006-08-15  Bruno Haible  <bruno@clisp.org>
9712
9713         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
9714         module.
9715
9716 2006-08-14  Simon Josefsson  <jas@extundo.com>
9717
9718         * config/srclist.txt: Add gnupload.
9719
9720 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
9721
9722         Change copyright notice from LGPL 2 to GPL 2, since that's the
9723         standard form used in the gnulib repository.
9724         * tests/test-lock.c: Likewise.
9725         * tests/test-stdint.c: Likewise.
9726         * tests/test-tls.c: Likewise.
9727
9728         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
9729         prelude-manager.  User shorter URLs for GNU projects, without '?'.
9730         Add copyright notice.
9731
9732         * check-module: Add copyright notice.  Output a copyright
9733         notice if "--version" is specified.
9734         * modules/COPYING: New file.
9735         * tests/test-getaddrinfo.c: Add copyright notice.
9736         * tests/test-verify.c: Likewise.
9737
9738 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
9739
9740         Change copyright notice from LGPL 2 to GPL 2, since that's the
9741         standard form used in the gnulib repository.
9742         * lib/lock.c: LGPL -> GPL.
9743         * lib/lock.h: Likewise.
9744         * lib/strnlen1.c: Likewise.
9745         * lib/strnlen1.h: Likewise.
9746         * lib/tls.c: Likewise.
9747         * lib/tls.h: Likewise.
9748         * lib/tmpdir.c: Likewise.
9749
9750         * lib/TODO: Remove; this belongs only in coreutils.
9751
9752 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
9753
9754         Add copyright notices to long-enough files that lack them, since
9755         otherwise the files aren't clearly free.  Use the same notice that
9756         getdate.texi already uses.
9757         * doc/alloca-opt.texi: Add copyright notice.
9758         * doc/alloca.texi: Likewise.
9759         * doc/ctime.texi: Likewise.
9760         * doc/functions.texi: Likewise.
9761         * doc/gcd.texi: Likewise.
9762         * doc/gnulib-tool.texi: Likewise.
9763         * doc/inet_ntoa.texi: Likewise.
9764         * doc/visibility.texi: Likewise.
9765
9766         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
9767         * doc/quote.texi: Add copyright notice.
9768
9769         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
9770         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
9771         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
9772         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
9773         is now obsolete, and give a pointer to the Sun list.
9774         Add copyright notice.
9775
9776 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
9777
9778         * config/srclistvars.sh: Add copyright notice.
9779
9780 2006-08-14  Eric Blake  <ebb9@byu.net>
9781
9782         Import the following change from libc:
9783
9784         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
9785
9786         Upstream bug 2997.
9787         * lib/misc/error.c: Add space between program name and message if file
9788         name is missing.
9789
9790 2006-08-12  Karl Berry  <karl@gnu.org>
9791
9792         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
9793         remove, these originate in gnulib now.
9794
9795 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9796
9797         * doc/Makefile (standards.info standards.html standards.dvi):
9798         Also depend on make-stds.texi.
9799
9800 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
9801
9802         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
9803         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
9804
9805         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
9806         in wchar_t.  Problem reported by Eric Blake.
9807
9808         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
9809         LEN is smaller than SIZE.  Suggested by Bruno Haible.
9810         Also, help the compiler to keep LEN in a register.
9811
9812 2006-08-11  Eric Blake  <ebb9@byu.net>
9813
9814         * users.txt: Sort.  Add tar.
9815
9816 2006-08-11  Bruno Haible  <bruno@clisp.org>
9817
9818         * users.txt: New file.
9819
9820 2006-08-11  Bruno Haible  <bruno@clisp.org>
9821
9822         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
9823         before <wchar.h>. Needed for OSF/1 and BSD/OS.
9824
9825 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
9826
9827         * modules/snprintf (Depends-on): Remove minmax.
9828         (Maintainer): Add self and Bruno.
9829
9830 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
9831
9832         * lib/.cppi-disable: Add snprintf.h, socket_.h.
9833         * lib/snprintf.c: Include <errno.h> and <limits.h>.
9834         (EOVERFLOW): Define if the system does not.
9835         Do not include "minmax.h"; it wasn't used.
9836         (snprintf): Don't assume size_t promotes to an unsigned type.
9837         Fix bug when generated string was too long for the buffer: the
9838         buffer's contents are supposed to be the initial prefix of the
9839         output.  Don't assume vasnprintf returns EOVERFLOW if the size
9840         exceeds INT_MAX; do the check ourselves.
9841
9842         Import the following changes from libc:
9843
9844         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
9845
9846         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
9847         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
9848         set wc to the byte which couldn't be converted.
9849         (re_string_reconstruct): Don't clear valid_raw_len before calling
9850         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
9851         tip_context using re_string_context_at.
9852
9853         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
9854
9855         * lib/posix/regex.h: g++ still cannot handled [restrict].
9856
9857         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
9858
9859         * lib/posix/regex.h: Remove special handling for VMS.
9860
9861 2006-08-10  Jim Meyering  <jim@meyering.net>
9862
9863         * modules/same-inode: New module.
9864         * modules/dev-ino: New module.
9865         * modules/cycle-check: Depend on these modules, rather than simply
9866         including their .h files.
9867         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
9868         required via m4/cycle-check.m4.
9869         * modules/same: Depend on new same-inode module, rather than
9870         including same-inode.h.
9871         * modules/chdir-safer: New file.
9872
9873         * modules/chown (Depends-on): Add stat-macros.
9874
9875 2006-08-10  Jim Meyering  <jim@meyering.net>
9876
9877         * m4/cycle-check.m4: New file.
9878         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
9879         * m4/dev-ino.m4, m4/same-inode.m4: New files.
9880
9881 2006-08-10  Eric Blake  <ebb9@byu.net>
9882
9883         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
9884         in from original proposal.
9885
9886 2006-08-10  Eric Blake  <ebb9@byu.net>
9887         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9888
9889         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
9890         namespace.
9891
9892 2006-08-10  Bruno Haible  <bruno@clisp.org>
9893
9894         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
9895         as well.
9896
9897 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
9898
9899         Sync from coreutils.
9900
9901         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
9902
9903         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
9904         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
9905
9906 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
9907
9908         * modules/restrict: Remove; no longer needed now that we assume
9909         Autoconf 2.59 or later.
9910         * MODULES.html.sh: Remove 'restrict'.
9911         * modules/argp (Depends-on): Remove 'restrict'.
9912         * modules/base64 (Depends-on): Likewise.
9913         * modules/gc (Depends-on): Likewise.
9914         * modules/getaddrinfo (Depends-on): Likewise.
9915         * modules/glob (Depends-on): Likewise.
9916         * modules/inet_ntop (Depends-on): Likewise.
9917         * modules/inet_pton (Depends-on): Likewise.
9918         * modules/memxor (Depends-on): Likewise.
9919         * modules/regex (Depends-on): Likewise.
9920         * modules/strtok_r (Depends-on): Likewise.
9921         * modules/time_r (Depends-on): Likewise.
9922
9923 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
9924
9925         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
9926         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
9927         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
9928         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
9929         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
9930         * m4/memxor.m4 (gl_MEMXOR): Likewise.
9931         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
9932         gl_C_RESTRICT replaced by AC_C_RESTRICT.
9933
9934         Merge from coreutils.
9935         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
9936         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
9937         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
9938         * m4/time_r.m4 (gl_TIME_R): Likewise.
9939
9940 2006-08-09  Karl Berry  <karl@gnu.org>
9941
9942         * config/srclist.txt: no more gettext-tools, per Bruno.
9943
9944 2006-08-08  Eric Blake  <ebb9@byu.net>
9945
9946         * modules/verror: New module.
9947         * MODULES.html.sh: Document it.
9948
9949 2006-08-08  Eric Blake  <ebb9@byu.net>
9950
9951         * lib/verror.h, lib/verror.c: New files.
9952
9953 2006-08-08  Eric Blake  <ebb9@byu.net>
9954
9955         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
9956         verror_at_line output complies with GNU Coding Standards even when
9957         file is NULL.
9958
9959 2006-08-07  Bruno Haible  <bruno@clisp.org>
9960
9961         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
9962         versions of AIX.
9963         Reported by Ralf Wildenhues.
9964
9965 2006-08-07  Bruno Haible  <bruno@clisp.org>
9966
9967         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
9968         in an AC_DEFUN. Needed so that the autoconf snippets can use
9969         AC_REQUIRE.
9970
9971 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9972
9973         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9974         Initialize pkgdata_DATA.
9975         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
9976         overriding it.
9977
9978 2006-08-06  Eric Blake  <ebb9@byu.net>
9979
9980         * lib/error.h: Fold in some upstream changes from glibc.
9981         * lib/error.c: Likewise.
9982
9983 2006-08-04  Bruno Haible  <bruno@clisp.org>
9984
9985         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9986         Make the mostlyclean-local rule depend on mostlyclean-generic.
9987         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
9988
9989 2006-07-31  Bruno Haible  <bruno@clisp.org>
9990
9991         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
9992         <stdlib.h>, <string.h>.
9993
9994 2006-07-30  Bruno Haible  <bruno@clisp.org>
9995
9996         * modules/readlink (License): Change to LGPL.
9997
9998 2006-07-30  Bruno Haible  <bruno@clisp.org>
9999
10000         * modules/javaversion (Makefile.am): Distribute javaversion.java and
10001         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
10002         set PKGDATADIR to point to it.
10003
10004 2006-07-30  Bruno Haible  <bruno@clisp.org>
10005
10006         * modules/csharpexec (configure.ac): Comment out macro invocation.
10007         * modules/javaexec (configure.ac): Likewise.
10008         * modules/javacomp-script (configure.ac): Likewise.
10009
10010         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
10011
10012 2006-07-30  Bruno Haible  <bruno@clisp.org>
10013
10014         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
10015         linked-list.
10016
10017 2006-07-30  Bruno Haible  <bruno@clisp.org>
10018
10019         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
10020
10021 2006-07-30  Bruno Haible  <bruno@clisp.org>
10022
10023         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10024         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
10025         get removed.
10026
10027 2006-07-29  Bruno Haible  <bruno@clisp.org>
10028
10029         Make it possible for gnulib-tool to work with locally modified or
10030         augmented gnulib repositories.
10031         * gnulib-tool (func_usage): Document --local-dir option.
10032         (local_gnulib_dir): New variable.
10033         Handle --local-dir option.
10034         (func_lookup_file): New function.
10035         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
10036         (func_get_description, func_get_filelist, func_get_description,
10037         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
10038         func_get_automake_snippet, func_get_include_directive,
10039         func_get_license, func_get_maintainer): Use func_lookup_file.
10040         (func_import, func_create_testdir): Use func_lookup_file.
10041
10042 2006-07-29  Bruno Haible  <bruno@clisp.org>
10043
10044         * modules/setenv (Depends-on): Add unistd.
10045
10046 2006-07-29  Bruno Haible  <bruno@clisp.org>
10047
10048         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
10049
10050 2006-07-29  Bruno Haible  <bruno@clisp.org>
10051
10052         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
10053
10054 2006-07-29  Bruno Haible  <bruno@clisp.org>
10055
10056         * gnulib-tool (import, update): If there is no Makefile.am, look at
10057         aclocal.m4, instead of bailing out.
10058
10059 2006-07-29  Bruno Haible  <bruno@clisp.org>
10060
10061         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
10062         Categorize the options by when they are useful.
10063
10064 2006-07-29  Bruno Haible  <bruno@clisp.org>
10065
10066         * gnulib-tool (func_usage): Document option --no-libtool.
10067         Handle option --no-libtool.
10068         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
10069         for changed semantics of $libtool variable.
10070         (func_import): Likewise. If libtool is not used, show this through
10071         an option --no-libtool.
10072         (func_create_testdir): Update.
10073
10074 2006-07-29  Bruno Haible  <bruno@clisp.org>
10075
10076         * gnulib-tool (func_import): Extend error message about missing
10077         --doc-base.
10078
10079 2006-07-29  Bruno Haible  <bruno@clisp.org>
10080
10081         * gnulib-tool (func_import): Don't create the $docbase directory if
10082         there is no file to store there.
10083
10084 2006-07-29  Bruno Haible  <bruno@clisp.org>
10085
10086         * gnulib-tool (autoconf_minversion): If a --dir option is given and
10087         relevant, look for configure.ac there, not in the current directory.
10088         Also use a simple search for AC_PREREQ, not "autoconf --trace".
10089
10090 2006-07-29  Bruno Haible  <bruno@clisp.org>
10091
10092         * gnulib-tool (SORT): New variable.
10093         (func_usage): Undocument --assume-autoconf option.
10094         Remove --assume-autoconf option handling.
10095         (autoconf_minversion): Determine from the contents of configure.ac.
10096         (func_import): Remove autoconf_minversion handling.
10097         Suggested by Eric Blake.
10098
10099 2006-07-29  Bruno Haible  <bruno@clisp.org>
10100
10101         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
10102
10103 2006-07-29  Bruno Haible  <bruno@clisp.org>
10104
10105         * config/srclist.txt (*setenv.[ch]): Remove rules.
10106
10107 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
10108
10109         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
10110
10111 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
10112
10113         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
10114         arpa/inet.h.
10115
10116 2006-07-28  Simon Josefsson  <jas@extundo.com>
10117
10118         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
10119         * modules/inet_pton (Depends-on): Likewise.
10120
10121 2006-07-28  Simon Josefsson  <jas@extundo.com>
10122
10123         * m4/netinet_in_h.m4: New file.
10124
10125 2006-07-28  Simon Josefsson  <jas@extundo.com>
10126
10127         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
10128         #include's.
10129
10130 2006-07-28  Simon Josefsson  <jas@extundo.com>
10131
10132         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
10133         #include's.
10134
10135 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
10136
10137         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
10138         setgid on directories only if they set these bits.
10139         * lib/modechange.h: Remove obsolete comment about masks.
10140
10141 2006-07-28  Eric Blake  <ebb9@byu.net>
10142
10143         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
10144         macro expansion.
10145
10146 2006-07-28  Bruno Haible  <bruno@clisp.org>
10147
10148         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
10149
10150 2006-07-28  Bruno Haible  <bruno@clisp.org>
10151
10152         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
10153
10154 2006-07-28  Bruno Haible  <bruno@clisp.org>
10155
10156         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
10157         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
10158         Define fallbacks.
10159         Avoids link error on FreeBSD 4.x.
10160         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
10161
10162         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
10163         encoding.
10164         * lib/mbswidth.c (iswcntrl): Likewise.
10165
10166 2006-07-27  Bruno Haible  <bruno@clisp.org>
10167
10168         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
10169         test.
10170
10171 2006-07-27  Bruno Haible  <bruno@clisp.org>
10172
10173         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
10174         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
10175         defined.
10176
10177 2006-07-26  Eric Blake  <ebb9@byu.net>
10178
10179         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
10180
10181 2006-07-26  Eric Blake  <ebb9@byu.net>
10182
10183         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
10184         like mingw that lack mkstemp.
10185         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
10186         avoid compilation warning on mingw.
10187
10188 2006-07-26  Bruno Haible  <bruno@clisp.org>
10189
10190         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
10191         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
10192         INT_FAST*_MIN, INTPTR_MIN.
10193
10194 2006-07-25  Bruno Haible  <bruno@clisp.org>
10195
10196         * modules/version-etc (Depends-on): Add stdarg.
10197
10198 2006-07-25  Bruno Haible  <bruno@clisp.org>
10199
10200         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
10201         complex commands.
10202
10203 2006-07-25  Bruno Haible  <bruno@clisp.org>
10204
10205         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
10206         defined in <stdarg.h> or config.h.
10207
10208 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
10209
10210         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
10211         (gl_STDIO_SAFER): Remove.
10212
10213 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
10214
10215         * MODULES.html.sh (File stream based Input/Output):
10216         Add fopen-safer, tmpfile-safer; remove stdio-safer.
10217         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
10218         * modules/fopen-safer, modules/tmpfile-safer: New files.
10219         * modules/stdio-safer: Remove.
10220
10221 2006-07-24  Bruno Haible  <bruno@clisp.org>
10222
10223         * modules/tmpdir: New file.
10224         * MODULES.html.sh (File system functions): Add it.
10225
10226 2006-07-24  Bruno Haible  <bruno@clisp.org>
10227
10228         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
10229         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
10230
10231 2006-07-24  Bruno Haible  <bruno@clisp.org>
10232
10233         * modules/clean-temp: New file.
10234
10235 2006-07-24  Bruno Haible  <bruno@clisp.org>
10236
10237         * m4/tmpdir.m4: New file, from GNU gettext.
10238
10239 2006-07-24  Bruno Haible  <bruno@clisp.org>
10240
10241         * lib/tmpdir.h: New file, from GNU gettext.
10242         * lib/tmpdir.c: New file, from GNU gettext.
10243
10244 2006-07-24  Bruno Haible  <bruno@clisp.org>
10245
10246         * lib/clean-temp.h: New file, from GNU gettext.
10247         * lib/clean-temp.c: New file, from GNU gettext.
10248
10249 2006-07-23  Eric Blake  <ebb9@byu.net>
10250
10251         * modules/stdio-safer (Files): Add tmpfile-safer.c.
10252         (Depends-on): Add binary-io.
10253
10254 2006-07-23  Eric Blake  <ebb9@byu.net>
10255
10256         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
10257
10258 2006-07-23  Eric Blake  <ebb9@byu.net>
10259
10260         * lib/tmpfile-safer.c: New file.
10261         * lib/stdio-safer.h (fopen_safer): Add prototype.
10262         * lib/stdio--.h (tmpfile): Make safer.
10263
10264 2006-07-23  Bruno Haible  <bruno@clisp.org>
10265
10266         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
10267         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
10268         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
10269         gl_linked_remove_at): Use it.
10270
10271 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
10272         and Simon Josefsson <jas@extundo.com>
10273
10274         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
10275
10276         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
10277
10278 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
10279
10280         * modules/close-stream: New file.
10281         * modules/closeout (Description): Make it clear that it exits
10282         with a diagnostic on error.
10283         (Depends-on): Add close-stream.  Remove fpending, stdbool.
10284         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
10285
10286 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
10287
10288         * m4/close-stream.m4: New file.
10289
10290 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
10291
10292         * lib/close-stream.c, lib/close-stream.h: New files.
10293
10294 2006-07-22  Bruno Haible  <bruno@clisp.org>
10295
10296         Merge from GNU gettext 0.15.
10297
10298         2006-05-01  Bruno Haible  <bruno@clisp.org>
10299
10300                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
10301
10302         2006-07-22  Bruno Haible  <bruno@clisp.org>
10303
10304                 * modules/javaversion: New file.
10305                 * MODULES.html.sh (Java): Add javaversion.
10306
10307         2006-03-12  Bruno Haible  <bruno@clisp.org>
10308
10309                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
10310
10311         2005-12-04  Bruno Haible  <bruno@clisp.org>
10312
10313                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
10314                 (untested).
10315
10316         2006-06-21  Bruno Haible  <bruno@clisp.org>
10317
10318                 Avoid warnings from recent versions of mcs.
10319                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
10320                 -o, -L, -r any more. Use options documented since mcs-1.0
10321                 instead. Similarly for -g.
10322
10323         2005-12-04  Bruno Haible  <bruno@clisp.org>
10324
10325                 * build-aux/csharpcomp.sh.in: Suffix for resources is
10326                 .resources, not .resource.
10327
10328         2005-07-09  Bruno Haible  <bruno@clisp.org>
10329
10330                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
10331                 add a .dll suffix.
10332                 Reported by Mark Junker <mjscod@gmx.de>.
10333
10334         2006-07-22  Bruno Haible  <bruno@clisp.org>
10335
10336                 * modules/gettext: Upgrade to gettext-0.15.
10337                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
10338                 m4/visibility.m4.
10339                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
10340
10341 2006-07-22  Bruno Haible  <bruno@clisp.org>
10342
10343         Merge from GNU gettext 0.15.
10344
10345         2006-03-25  Bruno Haible  <bruno@clisp.org>
10346
10347                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
10348
10349         2006-07-21  Bruno Haible  <bruno@clisp.org>
10350
10351                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
10352                 "1.1".
10353
10354         2006-05-09  Bruno Haible  <bruno@clisp.org>
10355
10356                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
10357                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
10358                 for the conftestver execution.
10359
10360         2006-05-01  Bruno Haible  <bruno@clisp.org>
10361
10362                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
10363                 optional target-version argument. Verify that the compiler
10364                 groks source of the specified source-version, or add -source
10365                 option as necessary. Verify that the compiler produces
10366                 bytecode in the specified target-version, or add -target and
10367                 -source options as necessary. Make the result of the test
10368                 available as variable CONF_JAVAC. Also log error output in
10369                 config.log.
10370
10371         2006-03-11  Bruno Haible  <bruno@clisp.org>
10372
10373                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
10374
10375         2006-05-09  Bruno Haible  <bruno@clisp.org>
10376
10377                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
10378                 CLASSPATH_SEPARATOR to a semicolon.
10379
10380         2006-03-12  Bruno Haible  <bruno@clisp.org>
10381
10382                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
10383                 available as variable CONF_JAVA, for subsequent autoconf
10384                 tests. Also log error output in config.log.
10385
10386         2006-07-19  Bruno Haible  <bruno@clisp.org>
10387
10388                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
10389                 that getline works on glibc2 systems. Needed to avoid trouble
10390                 in relocatable.c.
10391                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
10392
10393         2005-12-04  Bruno Haible  <bruno@clisp.org>
10394
10395                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
10396                 launcher (untested).
10397
10398         2005-12-04  Bruno Haible  <bruno@clisp.org>
10399
10400                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
10401
10402         2006-07-22  Bruno Haible  <bruno@clisp.org>
10403
10404                 * gettext.m4: Update from GNU gettext-0.15.
10405                 * nls.m4: Likewise.
10406                 * po.m4: Likewise.
10407                 * inttypes-pri.m4: Likewise.
10408                 * inttypes-h.m4: Renamed from inttypes.m4.
10409                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
10410
10411 2006-07-22  Bruno Haible  <bruno@clisp.org>
10412
10413         Merge from GNU gettext 0.15.
10414
10415         2005-07-05  Bruno Haible  <bruno@clisp.org>
10416
10417                 * printf-args.c (printf_fetchargs): Work around broken
10418                 definition of wint_t on mingw.
10419
10420         2005-02-12  Bruno Haible  <bruno@clisp.org>
10421
10422                 * xallocsa.h: Add extern "C" for C++.
10423
10424         2006-05-17  Bruno Haible  <bruno@clisp.org>
10425
10426                 Cygwin portability.
10427                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
10428
10429         2006-04-30  Bruno Haible  <bruno@clisp.org>
10430
10431                 * progreloc.c: Include <mach-o/dyld.h> if available.
10432                 (find_executable): Use _NSGetExecutablePath when possible.
10433
10434         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
10435
10436                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
10437                 function.
10438
10439         2005-12-29  Bruno Haible  <bruno@clisp.org>
10440
10441                 * progreloc.c (set_program_name_and_installdir): Fix
10442                 compilation error.
10443
10444         2005-12-04  Bruno Haible  <bruno@clisp.org>
10445
10446                 Cygwin portability.
10447                 * progreloc.c: Include <windows.h> also on Cygwin.
10448                 (find_executable): Add support for Cygwin.
10449                 (set_program_name_and_installdir): Handle also platforms with
10450                 nonempty EXEEXT.
10451
10452         2006-07-11  Bruno Haible  <bruno@clisp.org>
10453
10454                 * javacomp.c: Fix a comment.
10455                 Reported by Jim Meyering.
10456
10457         2006-04-30  Bruno Haible  <bruno@clisp.org>
10458
10459                 * javacomp.h (compile_java_class): Add source_version,
10460                 target_version arguments.
10461                 * javacomp.c: Rewritten to choose only a compiler that
10462                 respects the specified source_version and target_version.
10463
10464         2006-06-27  Bruno Haible  <bruno@clisp.org>
10465
10466                 Assume correct S_ISDIR macro.
10467                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
10468
10469         2006-07-22  Bruno Haible  <bruno@clisp.org>
10470
10471                 * javaversion.h: New file, from GNU gettext.
10472                 * javaversion.c: New file, from GNU gettext.
10473                 * javaversion.java: New file, from GNU gettext.
10474                 * javaversion.class: New file, from GNU gettext.
10475
10476         2006-05-17  Bruno Haible  <bruno@clisp.org>
10477
10478                 Cygwin portability.
10479                 * javaexec.c (execute_java_class): Test for jview program
10480                 also on Cygwin.
10481
10482         2006-04-09  Bruno Haible  <bruno@clisp.org>
10483
10484                 * fatal-signal.c: Don't include string.h.
10485                 (at_fatal_signal): Use a copying loop instead of memcpy.
10486
10487         2005-12-04  Bruno Haible  <bruno@clisp.org>
10488
10489                 * csharpexec.c: Add support for 'clix' launcher (untested).
10490                 (execute_csharp_using_sscli): New function.
10491                 (execute_csharp_program): Call it.
10492
10493         2006-06-21  Bruno Haible  <bruno@clisp.org>
10494
10495                 Avoid warnings from recent versions of mcs.
10496                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
10497                 -o, -L, -r any more. Use options documented since mcs-1.0
10498                 instead. Similarly for -g.
10499
10500         2005-07-09  Bruno Haible  <bruno@clisp.org>
10501
10502                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
10503                 add a .dll suffix.
10504                 Reported by Mark Junker <mjscod@gmx.de>.
10505
10506         2006-06-17  Bruno Haible  <bruno@clisp.org>
10507
10508                 * config.charset: Update for NetBSD 3.0.
10509
10510         2006-05-17  Bruno Haible  <bruno@clisp.org>
10511
10512                 Cygwin portability.
10513                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
10514
10515         2006-05-16  Bruno Haible  <bruno@clisp.org>
10516
10517                 * localcharset.c [CYGWIN]: Include <windows.h>.
10518                 (get_charset_aliases): For Cygwin, return the same CPxxx
10519                 aliases list as under WIN32.
10520                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
10521                 the environment variables. Fall back to GetACP().
10522
10523         2006-04-05  Bruno Haible  <bruno@clisp.org>
10524
10525                 * config.charset: Update Juan Manuel Guerrero's address.
10526
10527         2005-02-12  Bruno Haible  <bruno@clisp.org>
10528
10529                 * allocsa.h: Add extern "C" for C++.
10530
10531         2005-02-10  Bruno Haible  <bruno@clisp.org>
10532
10533                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
10534                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
10535
10536         2006-07-22  Bruno Haible  <bruno@clisp.org>
10537
10538                 * gettext.h: Update to GNU gettext-0.15.
10539
10540 2006-07-22  Bruno Haible  <bruno@clisp.org>
10541
10542         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
10543         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
10544         lib-prefix.m4, longdouble.m4, ssize_t.m4.
10545
10546 2006-07-21  Eric Blake  <ebb9@byu.net>
10547
10548         * modules/stdlib-safer: New file.
10549         * MODULES.html.sh (File stream based Input/Output): Add
10550         stdlib-safer.
10551
10552 2006-07-21  Eric Blake  <ebb9@byu.net>
10553
10554         * lib/stdlib-safer.h: New file from coreutils, required by
10555         stdlib--.h.
10556
10557 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
10558
10559         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
10560
10561 2006-07-20  Bruno Haible  <bruno@clisp.org>
10562
10563         * gnulib-tool: Recognize new option --assume-autoconf.
10564         (autoconf_minversion): New variable.
10565         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
10566
10567 2006-07-20  Bruno Haible  <bruno@clisp.org>
10568
10569         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
10570
10571 2006-07-19  Derek R. Price  <derek@ximbiot.com>
10572
10573         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
10574         Reindent and repaginate.
10575
10576 2006-07-19  Derek Price  <derek@ximbiot.com>
10577
10578         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
10579         Correct grammar.
10580
10581 2006-07-17  Bruno Haible  <bruno@clisp.org>
10582
10583         * modules/list: New file.
10584         * modules/array-list: New file.
10585         * modules/carray-list, modules/carray-list-tests: New files.
10586         * modules/linked-list, modules/linked-list-tests: New files.
10587         * modules/avltree-list, modules/avltree-list-tests: New files.
10588         * modules/rbtree-list, modules/rbtree-list-tests: New files.
10589         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
10590         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
10591         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
10592         * modules/oset: New file.
10593         * modules/array-oset: New file.
10594         * modules/avltree-oset, modules/avltree-oset-tests: New files.
10595         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
10596         * tests/test-carray_list.c: New file.
10597         * tests/test-linked_list.c: New file.
10598         * tests/test-avltree_list.c: New file.
10599         * tests/test-rbtree_list.c: New file.
10600         * tests/test-linkedhash_list.c: New file.
10601         * tests/test-avltreehash_list.c: New file.
10602         * tests/test-rbtreehash_list.c: New file.
10603         * tests/test-avltree_oset.c: New file.
10604         * tests/test-rbtree_oset.c: New file.
10605         * MODULES.html.sh (Container data structures): New section.
10606
10607 2006-07-17  Bruno Haible  <bruno@clisp.org>
10608
10609         * m4/gl_list.m4: New file.
10610
10611 2006-07-17  Bruno Haible  <bruno@clisp.org>
10612
10613         * lib/gl_list.h: New file.
10614         * lib/gl_list.c: New file.
10615         * lib/gl_array_list.h: New file.
10616         * lib/gl_array_list.c: New file.
10617         * lib/gl_carray_list.h: New file.
10618         * lib/gl_carray_list.c: New file.
10619         * lib/gl_linked_list.h: New file.
10620         * lib/gl_linked_list.c: New file.
10621         * lib/gl_anylinked_list1.h: New file.
10622         * lib/gl_anylinked_list2.h: New file.
10623         * lib/gl_avltree_list.h: New file.
10624         * lib/gl_avltree_list.c: New file.
10625         * lib/gl_anyavltree_list1.h: New file.
10626         * lib/gl_anyavltree_list2.h: New file.
10627         * lib/gl_rbtree_list.h: New file.
10628         * lib/gl_rbtree_list.c: New file.
10629         * lib/gl_anyrbtree_list1.h: New file.
10630         * lib/gl_anyrbtree_list2.h: New file.
10631         * lib/gl_anytree_list1.h: New file.
10632         * lib/gl_anytree_list2.h: New file.
10633         * lib/gl_linkedhash_list.h: New file.
10634         * lib/gl_linkedhash_list.c: New file.
10635         * lib/gl_anyhash_list1.h: New file.
10636         * lib/gl_anyhash_list2.h: New file.
10637         * lib/gl_avltreehash_list.h: New file.
10638         * lib/gl_avltreehash_list.c: New file.
10639         * lib/gl_rbtreehash_list.h: New file.
10640         * lib/gl_rbtreehash_list.c: New file.
10641         * lib/gl_anytreehash_list1.h: New file.
10642         * lib/gl_anytreehash_list2.h: New file.
10643
10644         * lib/gl_oset.h: New file.
10645         * lib/gl_oset.c: New file.
10646         * lib/gl_array_oset.h: New file.
10647         * lib/gl_array_oset.c: New file.
10648         * lib/gl_avltree_oset.h: New file.
10649         * lib/gl_avltree_oset.c: New file.
10650         * lib/gl_rbtree_oset.h: New file.
10651         * lib/gl_rbtree_oset.c: New file.
10652         * lib/gl_anytree_oset.h: New file.
10653
10654 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
10655
10656         * m4/mkancesdirs.m4: New file.
10657         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
10658         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
10659         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
10660         it.
10661
10662 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
10663
10664         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
10665         * lib/mkancesdirs.h: New files.
10666         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
10667         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
10668         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
10669         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
10670         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
10671         callers changed.  Revamp internals significantly, by not
10672         attempting to create directories that are temporarily more
10673         permissive than the final results.  Do not attempt to use
10674         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
10675         This removes some race conditions, fixes some bugs, and simplifies
10676         things.  Use new dirchownmod function to do owner and mode changes.
10677         * lib/mkdir-p.h: Likewise.
10678         * lib/modechange.c (octal_to_mode): New function.
10679         (struct mode_change): New member mentioned.
10680         (make_node_op_equals): New arg mentioned.  All callers changed.
10681         (mode_compile): Keep track of which mode bits the user has explicitly
10682         mentioned.
10683         (mode_adjust): New arg DIR, so that we implement the X op correctly.
10684         New arg PMODE_BITS, to keep track of which mode bits the user
10685         mentioned; it treats S_ISUID and S_ISGID speciall.
10686         All callers changed.
10687         * lib/modechange.h: Likewise.
10688
10689 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
10690
10691         * MODULES.html.sh: Add mkancestors.
10692         * modules/mkancesdirs: New module.
10693         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
10694         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
10695         The chdir-safer and afs files are now orphans; I'll remove them
10696         unless someone speaks up.
10697         Add lib/dirchownmod.c, lib/dirchownmod.h.
10698         (Depends-on): Remove alloca, chown, save-cwd, dirname.
10699         Add lchown, mkancesdirs.
10700         (Maintainer): Add self.
10701
10702 2006-07-15  Karl Berry  <karl@gnu.org>
10703
10704         * gnulib-tool: help message wording/arrangement.
10705
10706 2006-07-14  Simon Josefsson  <jas@extundo.com>
10707
10708         * doc/gnulib.texi (Libtool and Windows): New section.
10709
10710 2006-07-12  Simon Josefsson  <jas@extundo.com>
10711
10712         * modules/gendocs (License): Fix license, approved by Karl.
10713
10714 2006-07-12  Eric Blake  <ebb9@byu.net>
10715
10716         * MODULES.html.sh: Add gendocs.
10717
10718 2006-07-11  Eric Blake  <ebb9@byu.net>
10719
10720         * modules/fdl: New module, to install doc/fdl.texi.
10721         * MODULES.html.sh: Add new section for documentation modules.
10722         * gnulib-tool: Avoid space-tab.
10723         (--doc-base): New option, to manage files from doc.
10724
10725 2006-07-11  Eric Blake  <ebb9@byu.net>
10726
10727         * m4/absolute-header.m4: Fix comments to match recent change.
10728
10729 2006-07-11  Eric Blake  <ebb9@byu.net>
10730
10731         * gnulib-tool: List --doc-base before --tests-base.
10732
10733 2006-07-11  Derek R. Price  <derek@ximbiot.com>
10734
10735         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
10736
10737 2006-07-11  Bruno Haible  <bruno@clisp.org>
10738
10739         * README: Mention where to put documentation.
10740
10741 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10742
10743         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
10744
10745 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
10746
10747         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
10748         to stdint.m4.
10749
10750 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
10751
10752         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
10753         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
10754         "no/such/file/stdint.h" when there is no such file, so that
10755         the resulting C code can be parsed by dodgy compilers.
10756         Problems reported by Bob Proulx.
10757
10758 2006-07-10  Derek R. Price  <derek@ximbiot.com>
10759
10760         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
10761         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
10762         macros into the GNU _D_EXACT_NAMLEN.
10763         * lib/savedir.c:  Likewise.
10764         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
10765
10766 2006-07-10  Derek R. Price  <derek@ximbiot.com>
10767         and Paul Eggert  <eggert@cs.ucla.edu>
10768
10769         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
10770         * m4/savedir.m4:
10771         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
10772         macros into the GNU _D_EXACT_NAMLEN.
10773
10774 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
10775
10776         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
10777         around the absolute name, to work around a problem with the HP-UX
10778         11.23 native C compiler, reported by Bob Proulx.
10779
10780 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
10781
10782         * doc/maintain.texi, make-stds.texi: Sync from
10783         <http://savannah.gnu.org/projects/gnustandards>.
10784
10785 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
10786
10787         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
10788
10789 2006-07-09  Jim Meyering  <jim@meyering.net>
10790
10791         * m4/glob.m4: Remove a doubled word in a comment.
10792
10793 2006-07-09  Jim Meyering  <jim@meyering.net>
10794
10795         * lib/argp-pv.c: Remove a doubled word in a comment.
10796         * lib/check-version.c (check_version): Likewise.
10797         * lib/javacomp.c (compile_java_class): Likewise.
10798
10799 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
10800
10801         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
10802         for the benefit of people using Autoconf 2.60.  If you want to
10803         support older Autoconf versions you can copy m4/onceonly_2_57.m4
10804         (or m4/onceonly.m4, if pre-2.57) manually.
10805
10806 2006-07-08  Jim Meyering  <jim@meyering.net>
10807
10808         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
10809         comment.
10810         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
10811         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
10812         comment.
10813
10814 2006-07-08  Jim Meyering  <jim@meyering.net>
10815
10816         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
10817
10818 2006-07-07  Simon Josefsson  <jas@extundo.com>
10819
10820         * tests/test-crc.c: Change expected crc value, the test vector
10821         were probably computed using the old broken crc.c?
10822
10823 2006-07-06  Simon Josefsson  <jas@extundo.com>
10824
10825         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
10826         now the canonical place for the M4 file).
10827
10828         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
10829         from the sys_socket dependency now.
10830
10831         * modules/inet_pton (Files): Ditto.
10832
10833         * modules/inet_ntop (Files): Ditto.
10834
10835 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10836
10837         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
10838         not gl_PREREQ_GETUSERSHELL.
10839
10840 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10841
10842         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
10843         with only one argument, for Autoconf 2.60.
10844         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
10845         expand to nothing, so add a shell command to avoid syntax error.
10846         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
10847
10848 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10849
10850         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
10851
10852 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
10853
10854         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
10855         no longer needed.  Check for isblank decl.
10856         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
10857         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
10858         of existence.
10859
10860 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
10861
10862         * lib/getloadavg.c: Use __VMS, not VMS.
10863         * lib/getopt.c: Likewise.
10864         * lib/getpagesize.h: Likewise.
10865         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
10866         and probably does not work.
10867
10868 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
10869
10870         * lib/.cppi-disable: Add wcwidth.
10871         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
10872         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
10873         (ISGRAPH): Remove.  All uses changed to isgraph.
10874         (FOLD) [!defined _LIBC]: Remove special case.
10875         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
10876         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
10877         HAVE_ISBLANK.
10878         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
10879         case.
10880
10881 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
10882
10883         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
10884         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
10885         brackets.  Other minor changes to suppress some compiler
10886         warnings.
10887
10888 2006-07-06  Derek R. Price  <derek@ximbiot.com>
10889         and Paul Eggert  <eggert@cs.ucla.edu>
10890
10891         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
10892         of invoking obsolescent AC_HEADER_DIRENT macro.
10893         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
10894         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
10895         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
10896         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
10897         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
10898         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
10899         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
10900         * m4/readdir.m4: Remove; no longer needed.
10901
10902 2006-07-06  Derek R. Price  <derek@ximbiot.com>
10903         and Paul Eggert  <eggert@cs.ucla.edu>
10904
10905         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
10906         Don't worry about this obsolete case any more.
10907         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
10908         directories.
10909         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
10910         worry about this obsolete case any more.
10911         * lib/fts.c: Likewise.
10912         * lib/getcwd.c: Likewise.
10913         * lib/glob.h: Likewise.
10914         * lib/savedir.c: Likewise.
10915
10916 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
10917
10918         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
10919         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
10920         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
10921         needed.
10922         All uses removed.
10923         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
10924         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
10925         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
10926         needed.
10927         * m4/getdate.m4 (gl_GETDATE): Likewise.
10928         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
10929         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
10930         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
10931         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
10932         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
10933         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
10934         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
10935         needed.
10936
10937 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
10938
10939         * lib/memcasecmp.c: Include <limits.h>.
10940         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
10941         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
10942         Don't assume isdigit succeeds only on '0' through '9'.
10943
10944 2006-07-05  Eric Blake  <ebb9@byu.net>
10945
10946         * modules/getaddrinfo (Depends-on): Add snprintf.
10947
10948 2006-07-05  Eric Blake  <ebb9@byu.net>
10949
10950         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
10951         to avoid 'header present but could not be compiled' on cygwin.
10952
10953 2006-07-05  Eric Blake  <ebb9@byu.net>
10954
10955         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
10956         missing from netdb.h.
10957         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
10958
10959 2006-07-05  Derek R. Price  <derek@ximbiot.com>
10960
10961         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
10962         no longer needed.
10963         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
10964         * m4/getdate.m4 (gl_GETDATE): Likewise.
10965         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
10966         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
10967         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
10968         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
10969         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
10970
10971 2006-07-05  Derek R. Price  <derek@ximbiot.com>
10972
10973         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
10974         All uses of is_space replaced by isspace.
10975         * lib/exit.h: Don't talk about STDC_HEADERS.
10976         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
10977         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
10978         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
10979         replaced by isprint etc.
10980         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
10981         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
10982         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
10983         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
10984         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
10985         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
10986
10987 2006-07-05  Bruno Haible  <bruno@clisp.org>
10988
10989         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
10990         the function exists, before testing against AIX.
10991         Reported by Martin Lambers <marlam@marlam.de>.
10992
10993 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
10994
10995         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
10996         From Mark D. Baushke.
10997
10998 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
10999
11000         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
11001         to the absolute name, not just one, to bypass Sun C 5.8's
11002         "warning: #include of /usr/include/... may be non-portable".
11003
11004 2006-07-04  Eric Blake  <ebb9@byu.net>
11005
11006         * modules/dirname-tests: New test module.
11007         * tests/test-dirname.c: New file, replacing dirname.c
11008         TEST_DIRNAME section that was recently deleted.
11009
11010 2006-07-04  Bruno Haible  <bruno@clisp.org>
11011
11012         Assume ANSI C header files and <ctype.h> functions.
11013         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
11014         (mbsnwidth): Use isprint, iscntrl instead.
11015
11016 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11017
11018         Merge from coreutils.
11019         * MODULES.html.sh: Add xstrtold.
11020         * modules/xstrtold: New file.
11021         * modules/cycle-check (Files): Add lib/same-inode.h.
11022         * modules/dirname (Files): Add m4/double-slash-root.m4.
11023         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
11024         * modules/mkdir-p (Files): Add lib/same-inode.h.
11025         * modules/same (Files): Add lib/same-inode.h.
11026
11027 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11028
11029         * m4/absolute-header.m4: Renamed from full-header-path.m4.
11030         This is to keep the terminology clean; POSIX talks about
11031         "absolute pathnames", not "full pathnames", but the GNU
11032         Coding Standards say to use "path" for something else;
11033         so use "absolute" to keep both sides happy.
11034         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
11035         Set gl_absolute_header, not gl_full_header_path.
11036         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
11037         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
11038         All uses changed.
11039
11040         Merge from coreutils.
11041
11042         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
11043
11044         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
11045         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
11046         want to require the building of c-strtod.o.
11047         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
11048         needs -lm directly.
11049         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
11050
11051         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
11052
11053         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
11054         --as-needed option if available.  Problem reported by Albert Chin in
11055         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
11056         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
11057         cc merely issues a bunch of annoying warnings for --as-needed
11058         (this problem was reported by Bob Proulx).  Also, try linking with
11059         -lm to detect a bug in binutils 2.16 (this problem was reported
11060         by Ralf Wildenhues).
11061
11062         2006-06-18  Jim Meyering  <jim@meyering.net>
11063
11064         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
11065         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
11066         macro.
11067         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
11068         also check for glibc-2.4's abort-inducing bug.
11069
11070         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
11071         Low-probability clean-up should be to use rmdir to get rid of
11072         the just-created directory, not unlink.
11073
11074         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
11075         configure fail, and request a bug report to inform us about it.
11076         Add a comment that, barring reports to the contrary, in 2007 we'll
11077         assume ftruncate is universally available.
11078
11079         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
11080
11081         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
11082
11083         2006-03-12  Jim Meyering  <jim@meyering.net>
11084
11085         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
11086         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
11087         * m4/same.m4 (gl_SAME): Likewise.
11088         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
11089
11090         2006-03-11  Eric Blake  <ebb9@byu.net>
11091
11092         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
11093         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
11094         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
11095         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
11096
11097 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11098
11099         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
11100         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
11101         reported by Mark D. Baushke, one in
11102         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
11103
11104         Merge from coreutils.
11105
11106         * lib/.cppi-disable: Add stdint_.h.
11107         * lib/.cvsignore: Add stdint.h.
11108
11109         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
11110
11111         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
11112         both double and long double versions.
11113         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
11114         * lib/xstrtold.c: New file.
11115         * lib/xstrtod.h (xstrtold): New decl.
11116
11117         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
11118
11119         * lib/filemode.c (setst): Remove.
11120         (strmode): Rewrite to avoid setst.  This makes the code shorter,
11121         (arguably) clearer, and the generated code is a bit smaller on my
11122         Debian GNU/Linux stable x86 host.
11123
11124         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
11125
11126         * lib/filemode.c: Include "filemode.h" first, to test the interface.
11127         Assume that filemode.h includes sys/types.h and sys/stat.h.
11128         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
11129         (ftypelet): Reorder to put common cases first, for efficiency.
11130         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
11131         to do 'M'.
11132         (strmode): Renamed from mode_string, and now stores 12 bytes instead
11133         of 10, for compatibility with FreeBSD.  All callers changed.
11134         (filemodestring): Now stores 12 bytes instead of 10, and sets file
11135         types that can't be deduced solely from st_mode.  First arg is now a
11136         const pointer.
11137         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
11138         (strmode): Renamed from mode_string.
11139         (filemodestring): New decl.
11140         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
11141         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
11142         needed.
11143         (S_ISPORT, S_ISWHT): New macros, if not already defined.
11144
11145         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
11146
11147         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
11148         fsusage.h now does that.  Include fsusage.h first, to test interface.
11149         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
11150         at most one method (the old code could have generated decls that
11151         didn't conform to C89, not that this was ever exercised).
11152         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
11153
11154         2006-03-19  Jim Meyering  <jim@meyering.net>
11155
11156         Work even in a chroot where d_ino values for entries in "/"
11157         don't match the stat.st_ino values for the same names.
11158         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
11159         number, iterate through all entries again, using lstat instead.
11160         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
11161         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
11162
11163         * lib/getcwd.c (__getcwd): Clarify a comment.
11164         Use memcpy in place of a call to strcpy.
11165
11166         2006-03-12  Jim Meyering  <jim@meyering.net>
11167
11168         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
11169         matches that of the current directory (which we're about to chdir ".."
11170         out of), then save the dev-ino of the parent, instead.
11171
11172         * lib/same-inode.h (SAME_INODE): New file/macro.
11173         * lib/chdir-safer.c (SAME_INODE): Remove definition.
11174         Include "same-inode.h", instead.
11175         * lib/same.c: Likewise.
11176         * lib/cycle-check.h: Include "same-inode.h".
11177         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
11178         * lib/cycle-check.c (SAME_INODE): Remove definition.
11179         * lib/root-dev-ino.h: Include "same-inode.h".
11180
11181         2006-03-11  Eric Blake  <ebb9@byu.net>
11182
11183         * lib/same.c (same_name): s/base_name/last_component/
11184         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
11185         * lib/filenamecat.c (file_name_concat): Likewise.
11186
11187         2006-03-11  Eric Blake  <ebb9@byu.net>,
11188                     Paul Eggert  <eggert@cs.ucla.edu>
11189
11190         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
11191         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
11192         drive prefix.
11193         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
11194         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
11195         (last_component): New method.
11196         * lib/dirname.c (dir_len): Determine when drive letters need a
11197         subsequent slash.  Preserve // when it is special.
11198         (dir_name): Don't append dot when drive letter is absolute.
11199         [TEST_DIRNAME]: Move into a full-blown gnulib test.
11200         * lib/basename.c (base_name): New semantics - malloc the result.
11201         Preserve // when it is special.  Preserve relative files that look
11202         like drive letters.
11203         (base_len): Preserve // when it is special.
11204         (last_component): New method, similar to old base_name semantics.
11205         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
11206         base_name.  Strip redundant slashes from ///.
11207
11208 2006-07-03  Jim Meyering  <jim@meyering.net>
11209
11210         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
11211         macro is used before the first cycle_check call.
11212
11213 2006-07-03  Eric Blake  <ebb9@byu.net>
11214
11215         * modules/dirname (Depends-on): Add xstrndup.
11216
11217 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
11218
11219         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
11220         test cases, so that config.log is a bit easier to follow.
11221
11222 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
11223
11224         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
11225         both are 64 bits, since this seems to be the tradition, and this
11226         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
11227         we ever run into a host that prefers long long to long in this
11228         case, we'll need another configure-time test.  Problem reported by
11229         Jim Meyering.
11230
11231 2006-07-02  Eric Blake  <ebb9@byu.net>
11232
11233         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
11234
11235 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
11236
11237         * modules/inttypes (Depends-on): No longer depends on stdint.
11238         * modules/stdint (Description): Say more about assumptions.
11239         Say that the fast types might differ.  Say macros are used.
11240         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
11241         (Makefile.am): Revise list of substituted symbols to match
11242         new stdint.m4.
11243         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
11244         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
11245         * tests/test-stdint.c (verify_same_types)
11246         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
11247         the code conforms to C99/C89.
11248         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
11249         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
11250
11251 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
11252
11253         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
11254         but fix a bug, by requiring at least 64 bits.
11255         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
11256         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
11257         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
11258         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
11259
11260         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
11261         changes.  Make 2.59 a prerequisite.  Check and substitute for
11262         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
11263         inttypes.h.  Do not use special include files; just use the
11264         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
11265         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
11266         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
11267         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
11268         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
11269         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
11270         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
11271         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
11272         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
11273         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
11274         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
11275         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
11276         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
11277         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
11278         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
11279         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
11280         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
11281         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
11282         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
11283         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
11284         WINT_MAX.  Check for C99 conformance more strictly, by detecting
11285         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
11286         not check for things that C99 does not require, e.g., int8_t.  If
11287         a test isn't needed unless <stdint.h> isn't working, and is
11288         unlikely to be needed for any other reason, then don't do it
11289         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
11290         size_t, since we assume C89 freestanding at least.  Do not check
11291         for sig_atomic_t, wchar_t, or wint_t, since the code now does
11292         the right thing even if the types are not defined.  Instead use:
11293         (gl_STDINT_TYPE_PROPERTIES): New macro.
11294         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
11295         testing whether <sys/types.h> clashes, as Autoconf does this for
11296         us now.  All uses removed.
11297         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
11298         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
11299         (gl_CHECK_TYPE_SAME):
11300         Remove; no longer needed.
11301         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
11302         exists, since we'll return 0 anyway in that case.
11303         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
11304
11305 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
11306
11307         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
11308         possible collision with system files.
11309         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
11310         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
11311         WCHAR_MIN and WCHAR_MAX in this case.
11312         (<stddef.h>): Do not include; no longer needed.
11313         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
11314         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
11315         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
11316         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
11317         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
11318         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
11319         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
11320         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
11321         !defined(__c99))]: Include in this case too, since it's harmless
11322         now.
11323         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
11324         dangerous to do so.
11325         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
11326         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
11327         (_STDINT_MIN, _STDINT_MAX): New macros.
11328         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
11329         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
11330         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
11331         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
11332         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
11333         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
11334         macros, not typedefs; this simplifies things quite a bit.
11335         Use long int for all types narrower than int64_t.
11336         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
11337         Define in terms of long long int or int64_t or long int,
11338         not int64_t or int32_t.  This saves some compile-time testing.
11339         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
11340         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
11341         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
11342         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
11343         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
11344         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
11345         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
11346         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
11347         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
11348         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
11349         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
11350         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
11351         undef any previous version and define our own version, for
11352         simplicity and consistency with the new macros for types.
11353         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
11354         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
11355         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
11356         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
11357         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
11358         @WINT_T_SUFFIX@ to keep things simple here.
11359         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
11360         Simplify by assuming typical 8/16/32/64 host, since we're
11361         already doing that elsewhere anyway.
11362         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
11363         and assume long long int is 64 bits if available.  This
11364         speeds up 'configure'.
11365
11366 2006-07-01  Eric Blake  <ebb9@byu.net>
11367
11368         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
11369         Reported by Andreas Buening.
11370
11371 2006-07-01  Eric Blake  <ebb9@byu.net>
11372
11373         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
11374
11375 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
11376
11377         * lib/getaddrinfo.c: fixed typo
11378
11379 2006-06-29  Jim Meyering  <jim@meyering.net>
11380
11381         * modules/strftime (Maintainer): Add my name, since with the
11382         FPRINTFTIME changes strftime.c has forked from glibc.
11383
11384 2006-06-29  Eric Blake  <ebb9@byu.net>
11385
11386         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
11387
11388 2006-06-29  Eric Blake  <ebb9@byu.net>
11389
11390         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
11391
11392 2006-06-29  Eric Blake  <ebb9@byu.net>
11393
11394         * lib/stat_.h: New file.
11395
11396 2006-06-29  Eric Blake  <ebb9@byu.net>
11397
11398         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
11399         unused static function.
11400
11401 2006-06-29  Eric Blake  <ebb9@byu.net>
11402
11403         * doc/functions.texi (Function Portability): Document missing lstat
11404         on mingw.
11405
11406 2006-06-29  Eric Blake  <ebb9@byu.net>
11407
11408         * MODULES.html.sh: Add sys_stat.
11409         * modules/sys_stat: New module.
11410         * modules/mkstemp (Depends-on): Add sys_stat.
11411
11412 2006-06-29  Derek R. Price  <derek@ximbiot.com>
11413
11414         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
11415
11416 2006-06-29  Derek R. Price  <derek@ximbiot.com>
11417
11418         * m4/c-bs-a.m4: Removed.
11419
11420 2006-06-29  Derek R. Price  <derek@ximbiot.com>
11421
11422         * lib/strftime.c: Assume strftime() exists.
11423
11424 2006-06-29  Derek Price  <derek@ximbiot.com>
11425
11426         * modules/c-bs-a: Removed - \a is C89.
11427         * MODULES.html.sh: Remove c-bs-a.
11428
11429 2006-06-29  Bruno Haible  <bruno@clisp.org>
11430
11431         * modules/wcwidth (License): Change to LGPL.
11432
11433 2006-06-28  Simon Josefsson  <jas@extundo.com>
11434
11435         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
11436         on _WIN32.
11437
11438         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
11439         getnameinfo.
11440
11441 2006-06-28  Simon Josefsson  <jas@extundo.com>
11442
11443         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
11444
11445 2006-06-28  Simon Josefsson  <jas@extundo.com>
11446
11447         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
11448         functions there.  It will succeed on Windows XP, but on Windows
11449         2000 and (presumably) earlier, it will fail, and use the internal
11450         re-implementation.
11451         (use_win32_p): New function.
11452         (getaddrinfo): Use strtoul on servname, to support numeric ports.
11453         Support AI_NUMERICSERV to disable getservbyname.
11454         (getnameinfo): New function, only supports
11455         NI_NUMERICHOST|NI_NUMERICSERV for now.
11456
11457         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
11458         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
11459         getnameinfo.
11460
11461 2006-06-28  Eric Blake  <ebb9@byu.net>
11462
11463         * modules/wcwidth: New file.
11464         * modules/mbchar (Depends-on): Add wcwidth.
11465         * modules/mbswidth (Depends-on): Add wcwidth.
11466         * MODULES.html.sh: Add wcwidth.
11467
11468 2006-06-28  Eric Blake  <ebb9@byu.net>
11469
11470         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
11471         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
11472
11473 2006-06-28  Eric Blake  <ebb9@byu.net>
11474
11475         * lib/xvasprintf.h: Fix comments.
11476
11477 2006-06-28  Eric Blake  <ebb9@byu.net>
11478
11479         * lib/mbchar.h (wcwidth): Include wcwidth.h.
11480         * lib/mbswidth.c (wcwidth): Move from here...
11481         * lib/wcwidth.h: ...to this new file.
11482
11483 2006-06-28  Derek R. Price  <derek@ximbiot.com>
11484
11485         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
11486
11487         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
11488         it's obsolete.
11489         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
11490
11491 2006-06-28  Derek R. Price  <derek@ximbiot.com>
11492
11493         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
11494         Autoconf 2.60 says this stuff was obsolete.
11495
11496 2006-06-28  Bruno Haible  <bruno@clisp.org>
11497
11498         * modules/wcwidth (Files): Add m4/wchar_t.m4.
11499
11500 2006-06-28  Bruno Haible  <bruno@clisp.org>
11501
11502         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
11503         gt_TYPE_WCHAR_T.
11504
11505 2006-06-28  Bruno Haible  <bruno@clisp.org>
11506
11507         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
11508         declaration for wcwidth.
11509         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
11510
11511 2006-06-28  Bruno Haible  <bruno@clisp.org>
11512
11513         * lib/mkdtemp.c [MINGW]: Include <io.h>.
11514         (mkdir): Define using _mkdir.
11515
11516 2006-06-28  Bruno Haible  <bruno@clisp.org>
11517
11518         * lib/getaddrinfo.h: Fix POSIX URL.
11519         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
11520         _WIN32.
11521         (use_win32_p): Make static.
11522         (getaddrinfo): Reject service name if it is empty or does not consist
11523         solely of decimal digits, or if its value is > 65535.
11524         (getnameinfo): Remove useless casts.
11525
11526 2006-06-27  Simon Josefsson  <jas@extundo.com>
11527
11528         * modules/sys_select: New file, suggested by Bruno Haible, Paul
11529         Eggert and Martin Lambers.
11530
11531 2006-06-27  Simon Josefsson  <jas@extundo.com>
11532
11533         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
11534         Eggert and Martin Lambers.
11535
11536 2006-06-27  Bruno Haible  <bruno@clisp.org>
11537
11538         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
11539         result to 0, not to empty.
11540         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
11541
11542 2006-06-27  Bruno Haible  <bruno@clisp.org>
11543
11544         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
11545
11546 2006-06-26  Simon Josefsson  <jas@extundo.com>
11547
11548         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
11549         present.
11550
11551 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
11552
11553         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
11554         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
11555         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
11556
11557 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
11558
11559         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
11560
11561 2006-06-26  Bruno Haible  <bruno@clisp.org>
11562
11563         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
11564
11565 2006-06-26  Bruno Haible  <bruno@clisp.org>
11566
11567         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
11568
11569 2006-06-26  Bruno Haible  <bruno@clisp.org>
11570
11571         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
11572         SGI C compiler in pre-C99 mode.
11573         Suggested by Mark D. Baushke and Larry Jones.
11574
11575 2006-06-26  Bruno Haible  <bruno@clisp.org>
11576
11577         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
11578         WCHAR_MAX.
11579         Reported by Mark D. Baushke and Larry Jones.
11580
11581 2006-06-26  Bruno Haible  <bruno@clisp.org>
11582
11583         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
11584         in pre-C99 mode.
11585         Suggested by Mark D. Baushke and Larry Jones.
11586
11587 2006-06-23  Simon Josefsson  <jas@extundo.com>
11588             Bruno Haible  <bruno@clisp.org>
11589
11590         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
11591         Emit mostlyclean-local rule.
11592         (func_emit_tests_Makefile_am): Likewise.
11593         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
11594
11595 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
11596
11597         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
11598
11599 2006-06-23  Bruno Haible  <bruno@clisp.org>
11600
11601         * tests/test-stdint.c: Update to match ISO C 99 Technical
11602         Corrigendum 1.
11603
11604 2006-06-23  Bruno Haible  <bruno@clisp.org>
11605
11606         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
11607
11608 2006-06-23  Bruno Haible  <bruno@clisp.org>
11609
11610         * lib/stdint_.h: Treat IRIX like OpenBSD.
11611
11612 2006-06-23  Bruno Haible  <bruno@clisp.org>
11613
11614         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
11615         ISO C 99 Technical Corrigendum 1.
11616
11617 2006-06-22  Simon Josefsson  <jas@extundo.com>
11618
11619         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
11620         MinGW.
11621
11622 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
11623
11624         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
11625         needed.  Some compiler complained about some of them.  Problem reported
11626         by Larry Jones in
11627         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
11628
11629 2006-06-21  Simon Josefsson  <jas@extundo.com>
11630
11631         * tests/test-getaddrinfo.c: New file.
11632
11633         * modules/getaddrinfo-tests: New file.
11634
11635         * MODULES.html.sh: Add inet_pton.
11636
11637         * modules/inet_pton: New file.
11638
11639 2006-06-21  Simon Josefsson  <jas@extundo.com>
11640
11641         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
11642         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
11643         of using the (limited) gnulib implementation on Windows XP.
11644
11645         * m4/inet_pton.m4: New file.
11646
11647 2006-06-21  Simon Josefsson  <jas@extundo.com>
11648
11649         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
11650         variable.
11651
11652         * lib/socket_.h: Don't define WINVER.
11653
11654         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
11655         slightly modified to work in gnulib.
11656
11657 2006-06-21  Simon Josefsson  <jas@extundo.com>
11658
11659         * doc/gnulib.texi (Windows sockets): Add.
11660
11661 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
11662
11663         * lib/read-file.c (fread_file): Start with buffer allocation of
11664         0 bytes rather than 1 byte; this simplifies the code.
11665         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
11666         code to free buffer and save/restore errno.
11667         (internal_read_file): Remove unused local.
11668
11669 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
11670
11671         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
11672         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
11673         Problem reported by Denis Excoffier in
11674         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
11675
11676 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11677
11678         * modules/sys_socket, modules/socklen: Include sys/types since
11679         FreeBSD 4.x's sys/socket.h needs it.
11680
11681 2006-06-19  Simon Josefsson  <jas@extundo.com>
11682
11683         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
11684
11685 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
11686
11687         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
11688
11689 2006-06-19  Bruno Haible  <bruno@clisp.org>
11690
11691         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
11692         and FULL_PATH_INTTYPES_H in angle brackets.
11693         Reported by Mark D. Baushke <mdb@gnu.org>.
11694
11695 2006-06-17  Eric Blake  <ebb9@byu.net>
11696
11697         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
11698         errno.
11699
11700 2006-06-17  Bruno Haible  <bruno@clisp.org>
11701
11702         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
11703         <sys/inttypes.h>.
11704
11705 2006-06-17  Bruno Haible  <bruno@clisp.org>
11706
11707         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
11708         whether errno is declared. Assume <errno.h> declares errno.
11709
11710 2006-06-17  Bruno Haible  <bruno@clisp.org>
11711
11712         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
11713
11714 2006-06-17  Bruno Haible  <bruno@clisp.org>
11715
11716         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
11717         problem on Solaris 2.5.1.
11718
11719 2006-06-16  Eric Blake  <ebb9@byu.net>
11720
11721         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
11722         * lib/unicodeio.c [!defined errno]: Likewise.
11723         * lib/strtol.c [!defined errno]: Likewise.
11724         * lib/strtod.c [!defined errno]: Likewise.
11725
11726 2006-06-15  Eric Blake  <ebb9@byu.net>
11727
11728         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
11729
11730 2006-06-15  Eric Blake  <ebb9@byu.net>
11731
11732         * config/srclist.txt (ssize_t.m4): Lose sync.
11733
11734 2006-06-15  Bruno Haible  <bruno@clisp.org>
11735
11736         * modules/stdint (Files): Include m4/full-header-path.m4,
11737         m4/size_max.m4, m4/wchar_t.m4.
11738         (Makefile.am): Many more substitutions.
11739         * modules/stdint-tests: New file.
11740         * tests/test-stdint.c: New file.
11741
11742 2006-06-15  Bruno Haible  <bruno@clisp.org>
11743
11744         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
11745         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
11746         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
11747         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
11748         gl_CHECK_TYPE_SAME): New macros.
11749
11750 2006-06-15  Bruno Haible  <bruno@clisp.org>
11751
11752         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
11753
11754 2006-06-15  Bruno Haible  <bruno@clisp.org>
11755
11756         * lib/stdint_.h: Rewritten to be fully auto-configured.
11757         Fixes bug on HP-UX/IA64.
11758
11759 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
11760
11761         * lib/getdate.y (__attribute__): Don't define if already defined.
11762         Problem reported by Larry Jones.
11763         * lib/utimens.c (__attribute__): Likewise.
11764
11765 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
11766
11767         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
11768         reported by Andreas Schwab.
11769
11770 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11771             Bruno Haible  <bruno@clisp.org>
11772
11773         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
11774         check for the declaration of strnlen and a run test that exposes the
11775         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
11776         rpl_strndup.
11777
11778 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11779             Bruno Haible  <bruno@clisp.org>
11780
11781         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
11782
11783 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11784
11785         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
11786         compile test, for Tru64 4.0D.
11787
11788 2006-05-28  Karl Berry  <karl@gnu.org>
11789
11790         * config/srclist.txt (printf-args.c): lose sync.
11791
11792 2006-05-26  Martin Lambers  <marlam@marlam.de>
11793
11794         * lib/getpass.c: Updates the test for the native W32 API, and adds
11795         missing includes, thus fixing compilation warnings.
11796
11797 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
11798
11799         * lib/exclude.c (exclude_fnmatch): New function.
11800         (excluded_file_name): Call exclude_fnmatch.
11801         * lib/exclude.h (excluded_file_name): New prototype
11802
11803 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
11804
11805         * lib/tempname.c (small_open, large_open): New macros.
11806         (__open, __open64) [!_LIBC]: Remove.
11807         (__gen_tempname): Use small_open and large_open instead of __open
11808         and __open64.  This fixes a portability bug on HP-UX 11.11i
11809         reported by Simon Wing-Tang in
11810         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
11811
11812 2006-05-24  Bruno Haible  <bruno@clisp.org>
11813
11814         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
11815         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
11816         Reported by Thorsten Maerz <torte@netztorte.de> via
11817         Aaron Stone <aaron@serendipity.cx>.
11818
11819 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
11820
11821         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
11822         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
11823         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
11824         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
11825         not really conditional on the cache.
11826         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
11827
11828 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
11829
11830         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
11831         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
11832         (my_usleep): Don't mishandle maximum value.
11833
11834 2006-05-19  Jim Meyering  <jim@meyering.net>
11835
11836         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
11837
11838 2006-05-17  Bruno Haible  <bruno@clisp.org>
11839
11840         Cygwin portability.
11841         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
11842
11843 2006-05-17  Bruno Haible  <bruno@clisp.org>
11844
11845         * lib/stdint_.h: Fix recognition of Cygwin.
11846
11847 2006-05-15  Bruno Haible  <bruno@clisp.org>
11848
11849         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
11850         on libtool patch by Ralf Wildenhues.
11851
11852 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11853
11854         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
11855         test for C99 conformance; (bool) 0.5 is an integer constant
11856         expression, but (bool) -0.5 is not.  Problem reported by Fedor
11857         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
11858
11859 2006-05-11  Simon Josefsson  <jas@extundo.com>
11860
11861         * m4/xvasprintf.m4: Fix obvious typo.
11862
11863 2006-05-11  Jim Meyering  <jim@meyering.net>
11864
11865         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
11866         James Lemley.
11867
11868 2006-05-10  Simon Josefsson  <jas@extundo.com>
11869
11870         * lib/md4.c: Typo fix, update copyright years.
11871         (K1, K2): Don't use L because it turn computations into 64-bit on
11872         64-bit platforms.
11873
11874 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
11875
11876         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
11877         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
11878         unwanted sign propagation, e.g., on hosts with 64-bit int.
11879         There still are some problems with reeelly weird theoretical hosts
11880         (e.g., 33-bit int) but it's not worth worrying about now.
11881         * lib/sha1.c (rol): Likewise.
11882         (K1, K2, K3, K4): Remove unnecessary L suffix.
11883
11884 2006-05-10  Bruno Haible  <bruno@clisp.org>
11885
11886         * lib/des.c: Cast to avoid warnings.
11887
11888 2006-05-09  Bruno Haible  <bruno@clisp.org>
11889
11890         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
11891         (Depends-on): Depend also on xsize, stdarg.
11892         (configure.ac): Add gl_XVASPRINTF.
11893
11894 2006-05-09  Bruno Haible  <bruno@clisp.org>
11895
11896         * m4/xvasprintf.m4: New file.
11897
11898 2006-05-09  Bruno Haible  <bruno@clisp.org>
11899
11900         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
11901         (EOVERFLOW): Define fallback value.
11902         (xstrcat): New function.
11903         (xvasprintf): Recognize the special case of a string concatenation.
11904
11905 2006-05-08  Eric Blake  <ebb9@byu.net>
11906
11907         * gnulib-tool (func_version): Base copyright year on CVS date.
11908         (func_emit_copyright_notice): New function.
11909         (func_emit_lib_Makefile_am): Use it.
11910         (func_emit_tests_Makefile_am): Likewise.
11911         (func_import): Likewise.
11912
11913 2006-05-08  Bruno Haible  <bruno@clisp.org>
11914
11915         * modules/stdarg: New file.
11916         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
11917
11918 2006-05-08  Bruno Haible  <bruno@clisp.org>
11919
11920         * m4/stdarg.m4: New file, from GNU gettext.
11921
11922 2006-05-08  Bruno Haible  <bruno@clisp.org>
11923
11924         * config/srclist.txt (build-aux/config.rpath): different from latest
11925         release.
11926
11927 2006-05-08  Bruno Haible  <bruno@clisp.org>
11928
11929         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
11930
11931 2006-05-05  Jim Meyering  <jim@meyering.net>
11932
11933         * m4/warning.m4: New file, derived from bison's file by the same name.
11934
11935 2006-05-03  Bruno Haible  <bruno@clisp.org>
11936
11937         * lib/stdint_.h: Shorter URL.
11938         * lib/inttypes.h: Likewise.
11939
11940 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
11941
11942         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
11943
11944 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
11945
11946         * lib/verify.h: Document the internals better.  Most of this change
11947         was written by Bruno Haible.
11948
11949 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
11950
11951         * doc/verify.texi: New file, partly based on a proposal by
11952         Bruno Haible.
11953
11954 2006-05-02  Bruno Haible  <bruno@clisp.org>
11955
11956         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
11957         test from here...
11958         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
11959
11960 2006-04-29  Bruno Haible  <bruno@clisp.org>
11961
11962         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
11963         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
11964
11965 2006-04-29  Bruno Haible  <bruno@clisp.org>
11966
11967         * gnulib-tool: Make --update option actually work.
11968
11969 2006-04-29  Bruno Haible  <bruno@clisp.org>
11970
11971         * doc/gcd.texi: New file.
11972         * doc/gnulib.texi: Include it.
11973
11974 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
11975
11976         * lib/getdate.y (get_date): When adding relative date, start with the
11977         initial time, not with the result of the first mktime call.
11978
11979 2006-04-25  Bruno Haible  <bruno@clisp.org>
11980
11981         * gnulib-tool (func_import): Output the include directives in three
11982         blocks, sorted separately.
11983         Reported by Ben Pfaff <blp@cs.stanford.edu>.
11984
11985 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
11986
11987         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
11988         to define main with arguments, for C++.  Reported by Eric Blake.
11989         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
11990         Prefer 'int main ()' to 'int main (void)', for C++.
11991         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
11992         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
11993         for 'main', for C99 and C++.
11994
11995 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
11996
11997         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
11998         Don't assume that exit status -1 is valid.
11999         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
12000         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
12001         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
12002         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
12003         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
12004         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
12005         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
12006         functions can be used without declaring them, or that you can
12007         exit with status -1.
12008         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
12009
12010 2006-04-24  Karl Berry  <karl@gnu.org>
12011
12012         * config/srclist.txt (longdouble.m4): sync lost.
12013
12014 2006-04-24  Eric Blake  <ebb9@byu.net>
12015
12016         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
12017
12018 2006-04-24  Bruno Haible  <bruno@clisp.org>
12019
12020         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
12021         poll() implementation in AIX.
12022         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12023
12024 2006-04-24  Bruno Haible  <bruno@clisp.org>
12025
12026         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
12027         assigned exactly once.
12028
12029 2006-04-23  Claudio Fontana  <claudio@gnu.org>
12030             Bruno Haible  <bruno@clisp.org>
12031
12032         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
12033         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
12034         for AM_CPPFLAGS.
12035
12036 2006-04-23  Bruno Haible  <bruno@clisp.org>
12037
12038         * modules/copy-file: Depend on unistd.
12039         * modules/execute: Likewise.
12040         * modules/fatal-signal: Likewise.
12041         * modules/findprog: Likewise.
12042         * modules/mkdtemp : Likewise.
12043         * modules/pipe: Likewise.
12044         * modules/wait-process: Likewise.
12045
12046 2006-04-23  Bruno Haible  <bruno@clisp.org>
12047
12048         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
12049         condition was already detected.
12050         Reported by Ben Pfaff <blp@cs.stanford.edu>.
12051
12052 2006-04-23  Bruno Haible  <bruno@clisp.org>
12053
12054         * lib/copy-file.c: Include <unistd.h> unconditionally.
12055         * lib/execute.c: Likewise.
12056         * lib/fatal-signal.c: Likewise.
12057         * lib/findprog.c: Likewise.
12058         * lib/mkdtemp.c: Likewise.
12059         * lib/pipe.h: Likewise.
12060         * lib/pipe.c: Likewise.
12061         * lib/wait-process.h: Likewise.
12062
12063 2006-04-23  Bruno Haible  <bruno@clisp.org>
12064
12065         * gnulib-tool (func_usage): Fix --import description. Document
12066         --update.
12067         (func_import): Create temporary file in a temporary directory, if
12068         --dry-run is specified. Silence errors from 'grep' when there are no
12069         m4 files in $m4dir.
12070         (func_create_testdir): Silence errors from 'grep' when there are no
12071         m4 files in $m4dir.
12072         Reported by Karl Berry <karl@freefriends.org>.
12073
12074 2006-04-20  Bruno Haible  <bruno@clisp.org>
12075
12076         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
12077         one argument, so that the code will be portable to Autoconf 2.60.
12078         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
12079         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
12080         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
12081
12082 2006-04-19  Derek Price  <derek@ximbiot.com>
12083             Eric Blake  <ebb9@byu.net>
12084
12085         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
12086         rather than "/full/path.h".  Update comment to match.  Shorten &
12087         generalize m4_translit call via AS_TR_CPP.
12088
12089 2006-04-19  Derek Price  <derek@ximbiot.com>
12090             Eric Blake  <ebb9@byu.net>
12091
12092         * lib/inttypes.h: Correct grammar in comment.
12093
12094 2006-04-18  Derek Price  <derek@ximbiot.com>
12095             Paul Eggert  <eggert@cs.ucla.edu>
12096
12097         * modules/inttypes: New file.
12098         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
12099
12100 2006-04-18  Derek Price  <derek@ximbiot.com>
12101             Paul Eggert  <eggert@cs.ucla.edu>
12102
12103         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
12104         New files.
12105
12106 2006-04-18  Derek Price  <derek@ximbiot.com>
12107             Paul Eggert  <eggert@cs.ucla.edu>
12108
12109         * lib/inttypes.h: New file.
12110         * lib/strtoimax.c: Assume <inttypes.h>.
12111
12112 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
12113
12114         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
12115         isn't mounted.  Problem reported by Kir Kolyshkin.
12116
12117 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
12118
12119         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
12120         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
12121         Derek R. Price.
12122         * lib/regex.h (RE_DUP_MAX): Update comment to match current
12123         implementation.
12124
12125 2006-04-12  Eric Blake  <ebb9@byu.net>
12126
12127         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
12128         is now done automatically by the corresponding Autoconf macro.
12129
12130 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
12131
12132         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
12133         time_r.h.
12134
12135 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
12136
12137         Merge regex changes from libc, removing some of our
12138         POSIX-conformance changes that were rejected and redoing them in a
12139         less-intrusive way.
12140
12141         * lib/regcomp.c (re_compile_internal, init_dfa):
12142         Length arg is now size_t, not Idx.  All uses changed.
12143         (peek_token): Forward decl now says internal_function.
12144         (__re_error_msgid, __re_error_msgid_idx):
12145         Now static rather than extern with attribute_hidden.
12146         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
12147         For some reason libc prefers K&R style defns for external functions.
12148         (regerror) [!defined _LIBC]: Likewise.
12149         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
12150         (seek_collating_symbol_entry, lookup_collation_sequence_value):
12151         (build_range_exp, build_collating_symbol):
12152         Use K&R-style defn.
12153         (re_compile_fastmap): Use '\0' to memset, not 0.
12154         (utf8_sb_map): Make the calculations more obvious.
12155         (init_dfa, parse_bracket_exp, build_charclass_op):
12156         Call calloc and cast result, as glibc does.
12157         (init_word_char, fetch_token, peek_token, peek_token_bracket):
12158         (build_range_exp, build_collating_symbol):
12159         Now internal functions.
12160
12161         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
12162
12163         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
12164         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
12165         Don't depend on VMS; depend on __VMS instead, for POSIX
12166         namespace cleanness.
12167         (regoff_t): Define to ssize_t, not long int.
12168
12169         Remove the REG_ macros named below.  Instead, make the old names
12170         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
12171         __USE_GNU_REGEX.
12172         (REG_BACKSLASH_ESCAPE_IN_LISTS):
12173         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
12174         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
12175         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
12176         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
12177         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
12178         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
12179         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
12180         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
12181         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
12182         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
12183         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
12184         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
12185         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
12186         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
12187         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
12188         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
12189         (REG_NREGS):
12190         Remove.  All uses replaced by the old RE_* names.
12191         (RE_BACKSLASH_ESCAPE_IN_LISTS):
12192         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
12193         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
12194         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
12195         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
12196         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
12197         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
12198         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
12199         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
12200         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
12201         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
12202         Don't bother having these macros be independent of each others'
12203         values, since they no longer exist in the POSIX name space.
12204
12205         Rename the following member names back to their old names,
12206         unless !__USE_GNU_REGEX.  All uses changed back.
12207         (buffer): Renamed from re_buffer.
12208         (allocated): Renamed from re_allocated.
12209         (used): Renamed from re_used.
12210         (syntax): Renamed from re_syntax.
12211         (fastmap): Renamed from re_fastmap.
12212         (translate): Renamed from re_translate.
12213         (can_be_null): Renamed from re_can_be_null.
12214         (regs_allocated): Renamed from re_regs_allocated.
12215         (fastmap_accurate): Renamed from re_fastmap_accurate.
12216         (no_sub): Renamed from re_no_sub.
12217         (not_bol): Renamed from re_not_bol.
12218         (not_eol): Renamed from re_not_eol.
12219         (newline_anchor): Renamed from re_newline_anchor.
12220         (num_regs): Renamed from rm_num_regs.
12221         (start): Renamed from rm_start.
12222         (end): Renamed from rm_end.
12223
12224         (free_state): Move up a bit.
12225
12226         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
12227         #define to be empty.
12228         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
12229         when that is what is intended.
12230         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
12231         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
12232         (MAX): New macro.
12233         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
12234         All uses changed back to re_malloc, etc.  It's now the caller's
12235         responsibility to check for overflow; all callers changed.
12236         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
12237         (re_x2nrealloc): Remove.
12238         (free_state): Remove decl.
12239
12240         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
12241         (re_set_registers, re_exec):
12242         Use K&R-style defn.
12243
12244         2006-01-31  Roland McGrath  <roland@redhat.com>
12245
12246         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
12247         Reported by Mike Frysinger <vapier@gentoo.org>.
12248
12249         2006-01-15  Andreas Jaeger  <aj@suse.de>
12250
12251         [BZ #1950]
12252         * lib/regex_internal.c (re_string_reconstruct): Adjust for
12253         build_wcs_upper_buffer change.
12254         (build_wcs_upper_buffer): Change return type.
12255
12256         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
12257
12258         * lib/regex_internal.h: Include <stdint.h> if available.
12259
12260         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
12261
12262         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
12263
12264         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
12265
12266         * lib/regcomp.c: Adjust for changed secondary hash function.
12267
12268         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
12269
12270         * lib/regex.h: Pretty printing.
12271         Clean up namespace a bit.
12272
12273         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
12274
12275         * lib/regexec.c (update_cur_sifted_state, check_arrival,
12276         check_arrival_add_next_nodes): Avoid using uninitialized variable.
12277
12278         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12279                     Ulrich Drepper  <drepper@redhat.com>
12280
12281         [BZ #1302]
12282         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
12283         changed.
12284         (bitset_word_t): Renamed from bitset_word.  All uses changed.
12285
12286         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
12287
12288         [BZ #281]
12289         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
12290         * lib/regcomp.c: Remove unnecessary uses of
12291         unsigned RE_TRANSLATE_TYPE.
12292         * lib/regex_internal.h: Likewise.
12293         * lib/regex_internal.c: Likewise.
12294         * lib/regexec.c: Likewise.
12295         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
12296
12297         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
12298
12299         * lib/regexec.c (find_recover_state): Remove unnecessary
12300         initialization.
12301         (transit_state_bkref): Make DFA a const pointer.
12302         (get_subexp): Likewise.
12303         (check_arrival): Likewise.
12304         (update_cur_sifted_state): Likewise.
12305         (re_search_internal): Likewise.
12306         (prune_impossible_nodes): Likewise.
12307         (acquire_init_state_context): Likewise.
12308         (proceed_next_node): Likewise.
12309         (set_regs): Likewise.
12310         (free_fail_stack_return): Likewise.
12311         (check_arrival_expand_ecl): Mark DFA parameter as const.
12312         (check_arrival_expand_ecl_sub): Likewise.
12313         (check_subexp_limits): Likewise.
12314         (sub_epsilon_src_nodes):  Likewise.
12315         (add_epsilon_src_nodes):  Likewise.
12316         (merge_state_array): Likewise.
12317         (update_regs): Likewise.
12318         (build_trtable): Likewise.
12319         (sift_states_backward): Mark MCTX parameter as const.
12320         (build_sifted_states): Likewise.
12321         (update_cur_sifted_state): Likewise.
12322         (sift_states_mkref): Likewise.
12323         (check_arrival_expand_ecl): Mark eclosure as const.
12324         (check_dst_limits_calc_pos_1): Likewise.
12325         * lib/regex_internal.h (re_match_context_t): Make dfa a const
12326         pointer.
12327
12328         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
12329
12330         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
12331         (transit_state_sb): Likewise.
12332         (transit_state_mb): Likewise.
12333         (sift_states_iter_mb): Likewise.
12334         (check_arrival_add_next_nodes): Likewise.
12335         (check_node_accept_bytes): Change first parameter to pointer-to-const.
12336         [_LIBC] (re_search_2_stub): Use mempcpy.
12337
12338         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
12339         mbrtowc for very simple UTF-8 case.
12340
12341         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
12342         a pointer-to-const.
12343         (re_acquire_state_context): Likewise.
12344         * lib/regex_internal.h: Adjust prototypes.
12345
12346         * lib/regex.c: Prevent using C++ compilers.
12347
12348         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
12349         (re_acquire_state_context): Likewise.
12350
12351 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
12352
12353         * modules/regex (Depends-on): Add ssize_t.
12354
12355 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
12356
12357         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
12358         translation table.
12359
12360 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
12361
12362         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
12363
12364 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
12365             Bruno Haible  <bruno@clisp.org>
12366
12367         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
12368         <sys/types.h> and <inttypes.h>.
12369
12370 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12371
12372         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
12373         `__error_t_defined', so argp.h will not typedef the former.
12374
12375 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
12376
12377         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
12378         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
12379         glibc names.  Even if glibc is changed to conform to POSIX, the
12380         traditional names will be available anyway, since regex depends on
12381         the extensions module.  Also, fix a longstanding typo in the
12382         implementation of Spencer ERE test #75 from grep 2.3.  Problems
12383         reported by Emanuele Giaquinta.  Also, change sense of cached
12384         variable, so that the message makes sense.
12385
12386 2006-03-24  Simon Josefsson  <jas@extundo.com>
12387
12388         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
12389         including some doc fixes.
12390         (base64_encode_alloc): Fix +1 bug on allocation failures.
12391
12392 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12393
12394         * lib/base64.c (base64_encode): Do not read past end of array with
12395         unsanitized input on systems with CHAR_BIT > 8.
12396
12397 2006-03-24  Eric Blake  <ebb9@byu.net>
12398
12399         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
12400
12401 2006-03-22  Karl Berry  <karl@gnu.org>
12402
12403         * config/srclist.txt (*setenv.[ch]): get from coreutils.
12404         * config/srclistvars.sh (COREUTILS): new var.
12405
12406 2006-03-17  Jim Meyering  <jim@meyering.net>
12407
12408         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
12409         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
12410
12411 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
12412
12413         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
12414         no longer needs it.  Instead, check that regoff_t is as least
12415         as wide as ptrdiff_t.
12416
12417         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
12418         so that our regex.h stays compatible with the installed regex.
12419         This is helpful for installers who configure --without-included-regex.
12420         Problem reported by Emanuele Giaquinta.
12421
12422 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
12423
12424         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
12425         Typedef to long int, not to off_, as POSIX will likely change
12426         in that direction.
12427
12428 2006-03-15  Eric Blake  <ebb9@byu.net>
12429
12430         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
12431
12432 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
12433
12434         * lib/argp-help.c (validate_uparams): Fix typo
12435         * lib/argp-parse.c (argp_default_options): Consistently begin help
12436         messages with a lowercase letter.
12437
12438 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
12439
12440         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
12441         overrun buffers and shouldn't be used (much as gets shouldn't be
12442         used).
12443         * lib/time_r.c (asctime_r, ctime_r): Likewise.
12444
12445 2006-03-08  Simon Josefsson  <jas@extundo.com>
12446
12447         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
12448         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12449
12450 2006-03-08  Simon Josefsson  <jas@extundo.com>
12451
12452         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
12453         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12454
12455 2006-03-08  Simon Josefsson  <jas@extundo.com>
12456
12457         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
12458         signal that configure disabled the device.
12459
12460 2006-03-08  Simon Josefsson  <jas@extundo.com>
12461
12462         * build-aux/maint.mk: Fix refresh-po, to handle no translated
12463         languages.
12464
12465 2006-03-07  Simon Josefsson  <jas@extundo.com>
12466
12467         * modules/getopt (Depends-on): Add unistd.
12468
12469         * modules/unistd: New file.
12470
12471 2006-03-07  Simon Josefsson  <jas@extundo.com>
12472
12473         * modules/gc-random: New file.
12474
12475 2006-03-07  Simon Josefsson  <jas@extundo.com>
12476
12477         * m4/unistd_h.m4: New file.
12478
12479 2006-03-07  Simon Josefsson  <jas@extundo.com>
12480
12481         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
12482         test to be side-effect free by storing the result in the cache
12483         variable gl_cv_lib_readline, and moving the assignment of
12484         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
12485         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12486
12487 2006-03-07  Simon Josefsson  <jas@extundo.com>
12488
12489         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
12490         error on missing devices (the functions will return an error).
12491
12492         * m4/gc.m4: Move random stuff to gc-random.m4
12493
12494 2006-03-07  Simon Josefsson  <jas@extundo.com>
12495
12496         * lib/unistd_.h: New file.
12497
12498 2006-03-07  Simon Josefsson  <jas@extundo.com>
12499
12500         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
12501
12502 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
12503
12504         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
12505         Problem reported by Juan Manuel Guerrero.
12506
12507 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
12508
12509         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
12510         the unistd module.
12511         * lib/getlogin_r.c: Likewise.
12512         * lib/getlogin_r.h: Likewise.
12513         * lib/glob.c: Likewise.
12514         * lib/pagealign_alloc.c: Likewise.
12515         * lib/unistd_.h: Remove; no longer needed.
12516
12517 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
12518
12519         * MODULES.html.sh (Support for systems lacking POSIX:2001):
12520         Add unistd.
12521         * modules/c-stack (Depends-on): Add unistd.
12522         * modules/getlogin_r: Likewise.
12523         * modules/glob: Likewise.
12524         * modules/pagealign_alloc: Likewise.
12525         * modules/unistd (Files): Remove lib/unistd_.h.
12526         (EXTRA_DIST): Remove.
12527         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
12528         need unistd_.h.
12529         (MOSTLYCLEANFILES): Remove unistd.h-t.
12530
12531 2006-03-03  Simon Josefsson  <jas@extundo.com>
12532
12533         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
12534
12535 2006-03-03  Simon Josefsson  <jas@extundo.com>
12536
12537         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
12538         libidn and bison.
12539
12540 2006-03-03  Simon Josefsson  <jas@extundo.com>
12541
12542         * build-aux/maint.mk: Add indent target.
12543
12544 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
12545
12546         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
12547         our replacement poll.h in any case, to avoid a differing
12548         declaration from a system header.  Seen on AIX.
12549
12550 2006-03-01  Simon Josefsson  <jas@extundo.com>
12551
12552         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
12553         <kasal@ucw.cz>.
12554
12555 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12556
12557         * modules/gettime (Depends-on): Add extensions module.
12558         * modules/nanosleep (Depends-on): Likewise.
12559         * modules/settime (Depends-on): Likewise.
12560
12561 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12562
12563         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
12564         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
12565         pedantically.
12566         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
12567         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
12568
12569         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
12570         not "==".  Reported by Ralf Wildenhues.
12571
12572 2006-03-01  Karl Berry  <karl@gnu.org>
12573
12574         * doc/Copyright/request-*: new files, synced from gnuorg.
12575
12576 2006-03-01  Karl Berry  <karl@gnu.org>
12577
12578         * config/srclist.txt (Copyright/*): new entries.
12579
12580 2006-02-28  Simon Josefsson  <jas@extundo.com>
12581
12582         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
12583
12584 2006-02-27  Simon Josefsson  <jas@extundo.com>
12585
12586         * lib/base64.h: Indent #define's.  From Jim Meyering
12587         <jim@meyering.net>.
12588
12589 2006-02-27  Jim Meyering  <jim@meyering.net>
12590
12591         Revert the change of 2006-02-24, so these files can continue
12592         to be sync'd from gettext.
12593         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
12594         of `config.h'.
12595
12596 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
12597
12598         * modules/intprops: New file.
12599         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
12600         Add intprops.
12601         * modules/getloadavg (Files): Remove lib/intprops.h.
12602         (Depends-on): Add intprops.
12603         * modules/human: Likewise.
12604         * modules/inttostr: Likewise.
12605         * modules/openat: Likewise.
12606         * modules/sig2str: Likewise.
12607         * modules/userspec: Likewise.
12608         * modules/utimecmp: Likewise.
12609         * modules/xnanosleep: Likewise.
12610         * modules/xstrtol: Likewise.
12611
12612 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
12613
12614         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
12615         * modules/lock-tests (TESTS): Use $(EXEEXT).
12616         * modules/tls-tests: Likewise.
12617         * modules/argp-tests: Likewise.
12618         (check_PROGRAMS): New var, replacing...
12619         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
12620
12621 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12622
12623         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
12624         `config.h'.
12625
12626 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
12627
12628         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
12629
12630 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12631
12632         Sync from coreutils.
12633         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
12634         gl_CHDIR_SAFER.
12635
12636 2006-02-22  Jim Meyering  <jim@meyering.net>
12637
12638         Sync from coreutils.
12639         * m4/chdir-safer.m4: New file.
12640
12641 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
12642
12643         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
12644         AT_FDCWD exceeds INT_MAX.
12645         * lib/openat.h (AT_FDCWD): Likewise.
12646
12647 2006-02-17  Eric Blake  <address@hidden>
12648
12649         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
12650
12651 2006-02-16  Simon Josefsson  <jas@extundo.com>
12652
12653         * modules/getaddrinfo (Depends-on): Add sys_socket.
12654
12655 2006-02-15  Simon Josefsson  <jas@extundo.com>
12656
12657         * build-aux/maint.mk: Add dsyntax-check rule.
12658
12659 2006-02-15  Eric Blake  <ebb9@byu.net>
12660
12661         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
12662         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
12663         'present but cannot compile' warnings on cygwin.
12664         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
12665         use ws2tcpip.h if sys/socket.h works.
12666         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
12667         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
12668
12669 2006-02-14  Simon Josefsson  <jas@extundo.com>
12670
12671         * modules/maintainer-makefile (Files): Rename.
12672
12673         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
12674         and (the local) Makefile.cfg to maint-cfg.mk.
12675
12676         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
12677         to the latter.
12678
12679         * modules/maintainer-makefile: New module.
12680
12681         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
12682         severaly stripped to make it possible to build it up from scratch
12683         with reliable tests.
12684
12685         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
12686         fixes to permit overriding the default actions when configure and
12687         makefile are not available.
12688
12689 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
12690
12691         Sync from coreutils.
12692         * modules/lstat (Depends-on): Don't depend on xalloc.
12693         (License): Change from GPL to LGPL, since this is now simply a
12694         replacement for a libc function.
12695
12696 2006-02-14  Jim Meyering  <jim@meyering.net>
12697
12698         Sync from coreutils.
12699
12700         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
12701         failure on deficient systems, and simplify gnulib lgpl dependencies.
12702         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
12703         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
12704
12705         * lib/xalloc-die.c: Remove unused definition of N_.
12706
12707 2006-02-14  Jim Meyering  <jim@meyering.net>
12708
12709         Sync from coreutils.
12710         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
12711         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
12712         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
12713         double-quote uses of that variable, to accommodate the rare case in
12714         which getmntent is available in none of the libraries checked.  This
12715         happens at least on FreeBSD 5.0.
12716
12717 2006-02-13  Simon Josefsson  <jas@extundo.com>
12718
12719         * gnulib-tool (Usage): Fix --import, from
12720         karl@freefriends.org (Karl Berry).
12721
12722 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
12723
12724         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
12725
12726 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
12727
12728         * lib/argp-namefrob.h: Restore changes accidentally lost during the
12729         "autoupdate" on 2005-12-12.
12730
12731 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
12732
12733         * modules/closeout (Depends-on): Remove atexit.
12734
12735 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
12736
12737         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
12738         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
12739
12740 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
12741
12742         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
12743         __EXTENSIONS__ if this causes compilation to fail.  Problem
12744         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
12745         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
12746
12747 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
12748
12749         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
12750         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
12751         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
12752         All uses changed.
12753
12754 2006-01-26  Simon Josefsson  <jas@extundo.com>
12755
12756         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
12757         prototype is visible on mingw32.
12758
12759         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
12760         for mingw32.
12761
12762         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
12763         mingw32).
12764
12765 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
12766
12767         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
12768         attempt to open for write; this always fails, at least on POSIX
12769         hosts.  This reinstates the 2006-01-09 change, which was
12770         inadvertently removed.
12771
12772 2006-01-26  Bruno Haible  <bruno@clisp.org>
12773
12774         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
12775         Reported by Paul Eggert.
12776
12777 2006-01-26  Bruno Haible  <bruno@clisp.org>
12778             Paul Eggert  <eggert@cs.ucla.edu>
12779
12780         * lib/stdbool_.h (_Bool)
12781         [(! (defined __cplusplus || defined __BEOS__)
12782           && !defined __GNUC__
12783           && !(defined __HP_cc || defined __xlc__
12784                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
12785                || defined __sgi))]:
12786         #define to signed char in these cases too; this simplifies
12787         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
12788         etc., separately) and makes it more conservative.
12789
12790 2006-01-25  Simon Josefsson  <jas@extundo.com>
12791
12792         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
12793         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
12794         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
12795
12796 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
12797
12798         * lib/argp-namefrob.h: Bugfix. Remove stray #
12799
12800 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
12801
12802         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
12803         so that we test the test.
12804         Check for yet another HP-UX cc bug involving *bool |= bool.
12805
12806 2006-01-25  Karl Berry  <karl@gnu.org>
12807
12808         * config/srclist.txt (vasnprintf.c): sync lost.
12809
12810 2006-01-25  Jim Meyering  <jim@meyering.net>
12811
12812         Sync from the stable (b5) branch of coreutils:
12813
12814         * lib/fts.c (fts_children): Don't let close() clobber errno from
12815         failed fchdir().
12816
12817         * lib/fts.c (fts_stat): When following a symlink-to-directory,
12818         don't necessarily interpret stat-fails+lstat-succeeds as indicating
12819         a dangling symlink.  That can also happen at least for ELOOP.
12820         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
12821         FYI, this bug predates the inclusion of fts.c in coreutils.
12822
12823         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
12824         in their own block, so pre-c99 compilers don't object.
12825
12826         Avoid the double-free (first in fts_read, second in fts_close) that
12827         would occur when an `active' directory is made inaccessible (e.g.,
12828         via chmod a-x) during a traversal.
12829         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
12830         before returning.  Reproduce this failure by
12831         mkdir -p a/b; cd a; chmod a-x . b
12832         Reported by Stavros Passas.
12833
12834 2006-01-25  Jim Meyering  <jim@meyering.net>
12835
12836         * lib/fileblocks.c: Remove more useless parentheses.
12837         * lib/readutmp.h: Likewise.
12838
12839 2006-01-25  Bruno Haible  <bruno@clisp.org>
12840
12841         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
12842         warnings.
12843         Reported by Paul Eggert.
12844
12845 2006-01-25  Bruno Haible  <bruno@clisp.org>
12846
12847         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
12848         rid of a trap command. For Solaris sh.
12849         Reported by Mark D. Baushke <mdb@gnu.org>.
12850
12851 2006-01-24  Simon Josefsson  <jas@extundo.com>
12852
12853         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
12854         Bruno.
12855
12856 2006-01-24  Karl Berry  <karl@gnu.org>
12857
12858         * config/srclist.txt (argp-namefrob.h): sync lost.
12859
12860 2006-01-24  Jim Meyering  <jim@meyering.net>
12861
12862         * modules/openat (Files): Add lib/intprops.h.
12863         From Mark D. Baushke.
12864
12865 2006-01-24  Jim Meyering  <jim@meyering.net>
12866
12867         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
12868         Reported by Mark D. Baushke.
12869
12870 2006-01-24  Jim Meyering  <jim@meyering.net>
12871
12872         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
12873
12874 2006-01-24  Bruno Haible  <bruno@clisp.org>
12875
12876         * modules/strnlen (Maintainer): Change from glibc to all.
12877
12878 2006-01-24  Bruno Haible  <bruno@clisp.org>
12879
12880         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
12881         Patch by Paul Eggert.
12882
12883 2006-01-24  Bruno Haible  <bruno@clisp.org>
12884
12885         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
12886         already has it.
12887         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
12888         2005-11-26.
12889
12890         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
12891         'signed char' to avoid problems with the built-in _Bool type.
12892         Reported by Paul Eggert on 2005-11-26.
12893
12894 2006-01-24  Bruno Haible  <bruno@clisp.org>
12895
12896         * gnulib-tool (func_import): Avoid constructing complicated sed
12897         expressions inside backquote.
12898         Report and solution by Mark D. Baushke <mdb@gnu.org>.
12899
12900 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
12901
12902         These changes imported from libc.
12903         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
12904         test and two separate function calls.
12905         * lib/strndup.c (__strndup): Add libc_hidden_def.
12906
12907 2006-01-23  Simon Josefsson  <jas@extundo.com>
12908
12909         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
12910         Remove the test_*_SOURCES variable: automake infers it by default.
12911         * modules/tls-tests: Likewise.
12912
12913 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
12914
12915         Work around porting bugs reported by Dieter in
12916         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
12917         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
12918         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
12919         Include "getopt.h" first, to check interface.
12920         (getenv): Declare only if defined HAVE_DECL_GETENV &&
12921         !HAVE_DECL_GETENV.
12922         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
12923         (__strndup): Revert to K&R-style function dfns, the glibc style.
12924         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
12925         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
12926         Include strnlen.h first, to get prototype properly.
12927         (strnlen): Renamed from __strnlen.
12928         Remove weak alias.
12929
12930 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
12931
12932         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
12933
12934 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
12935
12936         * config/srclist.txt: Adjust to reflect glibc reorganization.
12937         This affects only comments.
12938
12939 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12940
12941          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
12942          Reported by Bruce Korb <bkorb@gnu.org>.
12943
12944 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
12945
12946         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
12947         to pacify gcc -Wswitch-default.
12948
12949 2006-01-22  Bruno Haible  <bruno@clisp.org>
12950
12951         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
12952         temporary buffer for sprintf, take into account the precision also
12953         for 'd', 'i', 'u', 'o', 'x', 'X'.
12954
12955 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
12956
12957         * modules/argp-tests: New module
12958         * tests/test-argp.c: New file
12959         * tests/test-argp-2.sh: New file
12960
12961 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
12962
12963         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
12964         (__argp_base_name): Removed
12965         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
12966         typo.
12967         (__argp_base_name): Provide macro definition or extern declaration
12968         depending on the configuration
12969
12970 2006-01-20  Simon Josefsson  <jas@extundo.com>
12971
12972         * modules/inet_ntop (Depends-on): Depend on sys_socket.
12973
12974 2006-01-20  Simon Josefsson  <jas@extundo.com>
12975
12976         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
12977
12978 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12979
12980         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
12981         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
12982         Suggested by Bruno Haible.
12983
12984 2006-01-20  Karl Berry  <karl@gnu.org>
12985
12986         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
12987         until changes propagate, I guess.
12988
12989 2006-01-19  Simon Josefsson  <jas@extundo.com>
12990
12991         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
12992
12993 2006-01-19  Simon Josefsson  <jas@extundo.com>
12994
12995         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
12996
12997 2006-01-19  Simon Josefsson  <jas@extundo.com>
12998
12999         * gnulib-tool: Set check_PROGRAMS.
13000
13001         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
13002         modules/des-tests, modules/gc-arcfour-tests,
13003         modules/gc-arctwo-tests, modules/gc-des-tests,
13004         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
13005         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
13006         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
13007         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
13008         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
13009         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
13010         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
13011         test_*_SOURCES.
13012
13013 2006-01-18  Simon Josefsson  <jas@extundo.com>
13014
13015         * modules/socklen (Depends-on): Depend on sys_socket.
13016
13017 2006-01-18  Simon Josefsson  <jas@extundo.com>
13018
13019         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
13020         modules/des-tests, modules/gc-arcfour-tests,
13021         modules/gc-arctwo-tests, modules/gc-des-tests,
13022         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
13023         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
13024         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
13025         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
13026         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
13027         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
13028         $(EXEEXT) to automake TESTS variable, for mingw32.
13029
13030 2006-01-17  Simon Josefsson  <jas@extundo.com>
13031
13032         * modules/socklen (Include): Need sys/socket.h.
13033
13034 2006-01-17  Bruno Haible  <bruno@clisp.org>
13035
13036         * modules/ssize_t (Include): Add <sys/types.h>.
13037
13038 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
13039
13040         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
13041         it's not portable and it doesn't work with cross-compiles.
13042         Problem reported by Bruno Haible.  Fix missing-$ typo in
13043         'test "gl_cv_ignore_unused_libraries" ...' that prevented
13044         -zignore from being used with Sun's C compiler.
13045
13046 2006-01-12  Simon Josefsson  <jas@extundo.com>
13047
13048         * lib/base64.c: Fix warning, reported by Bruno Haible
13049         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
13050
13051 2006-01-12  Bruno Haible  <bruno@clisp.org>
13052
13053         * modules/ldd: New file.
13054         * build-aux/ldd.sh.in: New file.
13055         * MODULES.html.sh (Support for building libraries and executables): Add
13056         ldd.
13057
13058 2006-01-12  Bruno Haible  <bruno@clisp.org>
13059
13060         * m4/ldd.m4: New file.
13061
13062 2006-01-12  Bruno Haible  <bruno@clisp.org>
13063
13064         * gnulib-tool (func_import, func_create_testdir): Don't go into an
13065         endless loop while replacing $auxdir with build-aux.
13066
13067 2006-01-11  Simon Josefsson  <jas@extundo.com>
13068
13069         * lib/stdint_.h (SIZE_MAX): Add missing (.
13070
13071 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
13072
13073         Sync from coreutils.
13074         * lib/md5.c: Fix commentary typos.
13075         (alignof, UNALIGNED_P): No need for a GCC-specific version.
13076         * lib/md5.h (__attribute__): Remove; unused.
13077         * lib/sha1.c: Fix commentary to match md5 better.
13078         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
13079         so that we don't need to worry about alignment.  All uses changed.
13080         This merges the 2005-10-28 md5 change into sha1.
13081
13082 2006-01-11  Jim Meyering  <jim@meyering.net>
13083
13084         Sync from coreutils.
13085         * lib/md5.c (OP): Fix spacing.
13086
13087 2006-01-11  Bruno Haible  <bruno@clisp.org>
13088
13089         Ensure automatic ordering between gl_LOCK and gl_ARGP.
13090         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
13091         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
13092
13093 2006-01-11  Bruno Haible  <bruno@clisp.org>
13094
13095         Ensure automatic ordering between gl_LOCK and gl_ARGP.
13096         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
13097         the "early" section as well.
13098
13099 2006-01-11  Bruno Haible  <bruno@clisp.org>
13100
13101         Avoid "ar: no archive members specified" error on MacOS X.
13102         * gnulib-tool (func_modules_add_dummy): New function.
13103         (func_import, func_create_testdir): Invoke it.
13104
13105 2006-01-11  Bruno Haible  <bruno@clisp.org>
13106
13107         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
13108         with $auxdir in AC_CONFIG_FILES statements.
13109
13110 2006-01-11  Bruno Haible  <bruno@clisp.org>
13111
13112         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13113         Initialize also noinst_HEADERS to empty.
13114
13115 2006-01-11  Bruno Haible  <bruno@clisp.org>
13116
13117         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
13118         variables.
13119         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
13120         autoreconf.
13121
13122 2006-01-11  Bruno Haible  <bruno@clisp.org>
13123
13124         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
13125         overridable by the user.
13126         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
13127
13128 2006-01-10  Simon Josefsson  <jas@extundo.com>
13129
13130         * modules/sys_socket: New file.
13131
13132 2006-01-10  Simon Josefsson  <jas@extundo.com>
13133
13134         * m4/sys_socket_h.m4: New file.
13135
13136 2006-01-10  Simon Josefsson  <jas@extundo.com>
13137
13138         * lib/socket_.h: New file.
13139
13140 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
13141
13142         * modules/readutmp (Maintainer): Add myself.
13143
13144 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
13145
13146         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
13147         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
13148         People who are still concerned with buggy memcmp implementations
13149         can invoke gl_FUNC_MEMCMP themselves.
13150
13151 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
13152
13153         * lib/regex_internal.h (BITSET_WORD_BITS):
13154         Work around a bug in 64-bit PGC (before version 6.1-2), where the
13155         preprocessor mishandles large unsigned values as if they were signed.
13156         Problem reported by Claudio Fontana in
13157         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
13158
13159 2006-01-10  Jim Meyering  <jim@meyering.net>
13160
13161         Avoid the double-free (first in fts_read, second in fts_close) that
13162         would occur when an `active' directory is made inaccessible (e.g.,
13163         via chmod a-x) during a traversal.
13164         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
13165         before returning.  Reproduce this failure by
13166         mkdir -p a/b; cd a; chmod a-x . b
13167         Reported by Stavros Passas.
13168
13169         Sync from coreutils.
13170         * lib/sha1.c: Tweak grammar in a comment.
13171
13172 2006-01-10  Jim Meyering  <jim@meyering.net>
13173
13174         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
13175         Patch by Joerg Sonnenberger.
13176
13177 2006-01-10  Bruno Haible  <bruno@clisp.org>
13178
13179         * modules/readutmp: Depend on module free.
13180         * modules/strtok_r: Depend on module restrict.
13181
13182 2006-01-10  Bruno Haible  <bruno@clisp.org>
13183
13184         * modules/gettext (configure.ac): Add an invocation of
13185         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
13186
13187 2006-01-10  Bruno Haible  <bruno@clisp.org>
13188
13189         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
13190         Reported by Werner Lemberg <wl@gnu.org>.
13191
13192 2006-01-10  Bruno Haible  <bruno@clisp.org>
13193
13194         * lib/localcharset.c: Update from GNU gettext.
13195
13196 2006-01-10  Bruno Haible  <bruno@clisp.org>
13197
13198         * lib/argp.h (__const): Remove macro. Use const instead.
13199         * lib/argp-fmtstream.h (__const): Likewise.
13200         * lib/glob_.h (__const): Remove macro.
13201         * lib/glob-libc.h: Use const instead of __const.
13202
13203 2006-01-10  Bruno Haible  <bruno@clisp.org>
13204
13205         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
13206         variable.
13207         Needed to avoid an automake error regarding the 'gettext' module.
13208
13209 2006-01-09  Simon Josefsson  <jas@extundo.com>
13210
13211         * modules/inet_ntop (Depends-on): Add restrict.
13212
13213 2006-01-09  Simon Josefsson  <jas@extundo.com>
13214
13215         * modules/gc-rijndael-tests (License): Put under LGPL.
13216
13217         * modules/gc-des-tests (License): Likewise.
13218
13219         * modules/gc-arcfour-tests (License): Likewise.
13220
13221         * modules/gc-arctwo-tests (License): Likewise.
13222
13223         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
13224
13225         * modules/gc-hmac-sha1-tests (Files): Likewise.
13226
13227         * modules/gc-hmac-md5-tests (License): Likewise.
13228
13229         * modules/gc-sha1-tests (License): Likewise.
13230
13231         * modules/gc-md5-tests (License): Likewise.
13232
13233         * modules/gc-md4-tests (License): Likewise.
13234
13235         * modules/gc-md2-tests (License): Likewise.
13236
13237         * modules/gc-tests (License): Likewise.
13238
13239         * modules/des-tests (License): Likewise.
13240
13241         * modules/md4-tests (License): Likewise.
13242
13243         * modules/md2-tests (License): Likewise.
13244
13245 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
13246
13247         Sync from coreutils:
13248
13249         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
13250         * modules/lib-ignore: New file.
13251         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
13252         chdir-safer.m4, lchmod.m4.
13253         * modules/openat: Add mkdirat.c, openat-priv.h.
13254
13255 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
13256
13257         Sync from coreutils.
13258         * m4/lib-ignore.m4: New file.
13259         * m4/lchmod.m4: New file.
13260
13261 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
13262
13263         Sync from coreutils.
13264         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
13265         for write access: POSIX says that must fail.
13266         * lib/fts.c (diropen): Likewise.
13267         * lib/save-cwd.c (save_cwd): Likewise.
13268         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
13269         well, for minor improvements on hosts that lack O_DIRECTORY.
13270         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
13271         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
13272         Fall back on chown if open failed with EACCES.
13273
13274         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
13275         Report an error at compile-time if only a 1-second nominal clock
13276         resolution is found.
13277
13278         * lib/lchmod.h: New file.
13279         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
13280         (make_dir_parents): Use lchown rather than chown, and
13281         lchmod rather than chmod.
13282
13283         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
13284         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
13285         "proc" reported by n0dalus.
13286
13287         * lib/mountlist.c: Include <limits.h>.
13288         (dev_from_mount_options)
13289         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
13290         New function.  It no longer assumes "dev=" has the System V meaning
13291         on Linux (since it doesn't).  It also parses "dev=" more carefully.
13292         (read_file_system_list)
13293         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
13294         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
13295         dev= in that case.
13296
13297         * lib/posixtm.h (PDS_PRE_2000): New macro.
13298         * lib/posixtm.c (year): Arg is now syntax_bits rather than
13299         allow_century.  All usages changed.  Reject dates outside the range
13300         1969-1999 if PDS_PRE_2000 is used.
13301
13302 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
13303
13304         Sync from coreutils.
13305         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
13306         (Time of day items): Mention the possibility of leap seconds.
13307         Problem reported by Dr. David Alan Gilbert.
13308
13309 2006-01-09  Jim Meyering  <jim@meyering.net>
13310
13311         Sync from coreutils.
13312
13313         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
13314
13315         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
13316
13317         * lib/modechange.c (mode_compile): Reject an invalid mode string
13318         that starts with an octal digit.  From Andreas Gruenbacher.
13319
13320         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
13321         and dup to open_safer and dup_safer, respectively.
13322         (openat_permissive): Fix typo in comment.
13323
13324         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
13325         "gettext.h"; either no longer needed or are guaranteed by openat.h.
13326         (_): Remove; no longer needed.
13327         (openat): Renamed from rpl_openat; no need for rpl_openat
13328         since openat.h renames openat for us.
13329         Replace most of the body with a call to openat_permissive,
13330         to avoid duplicate code.
13331         Port to (probably hypothetical) environments were mode_t is
13332         wider than int.
13333         (openat_permissive): Require mode arg, so that we can check
13334         types better.  Put it just after flags.  Change cwd failure
13335         indicator from pointer-to-bool to pointer-to-errno-value.
13336         All callers changed.
13337         Invoke openat_save_fail and/or openat_restore_fail if
13338         cwd_errno is null, so that openat can call us.
13339         (openat_permissive, fdopendir, fstatat, unlinkat):
13340         Simplify errno handling to avoid some duplicate code,
13341         as it's OK to set errno on success.
13342         * lib/openat.h: Revamp code so that function macros depend on
13343         __OPENAT_PREFIX only, not also on AT_FDCWD.
13344         (openat_ro): Remove.  Caller changed to use openat_permissive.
13345         (openat_permissive): Now a macro, if not a function.
13346         (openat_restore_fail, openat_save_fail): Now always functions,
13347         since mkdirat needs them even if __OPENAT_PREFIX is defined.
13348
13349         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
13350         and openat.c.
13351         * lib/mkdirat.c: Include openat-priv.h.
13352         Remove definitions of macros defined therein.
13353         * lib/openat.c: Likewise.
13354
13355         * lib/mkdirat.c (mkdirat): New file and function.
13356         * lib/openat.h (mkdirat): Declare.
13357
13358         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
13359
13360         * lib/openat.h (openat_permissive): Declare.
13361         (openat_ro): Define.
13362
13363         * lib/openat.c (EXPECTED_ERRNO): New macro.
13364         (openat_permissive): New function -- used in remove.c rewrite.
13365         (all functions): Set errno just before returning, only if there
13366         was an actual failure.
13367         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
13368
13369         Emulate openat-family functions using Linux's procfs, if possible.
13370         Idea and some code based on Ulrich Drepper's glibc changes.
13371
13372         * lib/openat.c: (BUILD_PROC_NAME): New macro.
13373         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
13374         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
13375         before falling back on save_cwd and restore_cwd.
13376         (fdopendir, fstatat, unlinkat): Likewise.
13377
13378         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
13379         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
13380
13381         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
13382         as second argument to va_arg.  Otherwise, some versions of gcc
13383         warn that `if this code is reached, the program will abort'.
13384
13385 2006-01-09  Jim Meyering  <jim@meyering.net>
13386
13387         Sync from coreutils.
13388         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
13389         Require openat-priv.h.
13390
13391 2006-01-09  Bruno Haible  <bruno@clisp.org>
13392
13393         * modules/strnlen (Include): Use strnlen.h.
13394
13395 2006-01-09  Bruno Haible  <bruno@clisp.org>
13396
13397         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
13398
13399 2006-01-09  Bruno Haible  <bruno@clisp.org>
13400
13401         * lib/sysexit_.h (EX_OK): New macro.
13402         Suggested by Martin Lambers <marlam@marlam.de>.
13403
13404 2006-01-09  Bruno Haible  <bruno@clisp.org>
13405
13406         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
13407         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
13408
13409 2006-01-09  Bruno Haible  <bruno@clisp.org>
13410
13411         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
13412         numbers.
13413
13414 2006-01-09  Bruno Haible  <bruno@clisp.org>
13415
13416         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
13417         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
13418         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
13419         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
13420
13421 2006-01-09  Bruno Haible  <bruno@clisp.org>
13422
13423         * build-aux/javacomp.sh.in: New file, moved from lib/.
13424         * modules/javacomp-script (Files): Update.
13425         (configure.ac): Add AC_CONFIG_FILES invocation.
13426         (EXTRA_DIST): Remove variable.
13427
13428         * build-aux/javaexec.sh.in: New file, moved from lib/.
13429         * modules/javaexec (Files): Update.
13430         (configure.ac): Add AC_CONFIG_FILES invocation.
13431         (EXTRA_DIST): Remove javaexec.sh.in.
13432
13433         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
13434         * modules/csharpcomp-script (Files): Update.
13435         (configure.ac): Add AC_CONFIG_FILES invocation.
13436         (EXTRA_DIST): Remove variable.
13437
13438         * build-aux/csharpexec.sh.in: New file, moved from lib/.
13439         * modules/csharpexec (Files): Update.
13440         (configure.ac): Add AC_CONFIG_FILES invocation.
13441         (EXTRA_DIST): Remove csharpexec.sh.in.
13442
13443 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
13444
13445         Sync from coreutils.
13446
13447         Add POSIX ACL support
13448         * lib/acl.h (copy_acl, set_acl): Add declarations.
13449         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
13450         systems other than Linux.
13451         (chmod_or_fchmod): New function: use fchmod when possible,
13452         and chmod otherwise.
13453         (file_has_acl): Add a POSIX ACL implementation, with a
13454         Linux-specific subcase.
13455         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
13456         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
13457         acls are unsupported.
13458         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
13459         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
13460         are unsupported.
13461
13462 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
13463
13464         Sync from coreutils.
13465         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
13466
13467 2006-01-07  Bruno Haible  <bruno@clisp.org>
13468
13469         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
13470         gl_EARLY.
13471
13472 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
13473
13474         * lib/strftime.c (tzname): Don't declare if it is already #defined.
13475         Problem reported for Mingw by Mark Junker.
13476
13477 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
13478
13479         * README: Gnulib normally doesn't generate a tarball.
13480
13481 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
13482
13483         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
13484         long int, not int, for nanosecond counts, so that people who are
13485         used to POSIX struct timespec won't be surprised.  Reported by Jim
13486         Meyering.
13487
13488 2005-12-28  Bruno Haible  <bruno@clisp.org>
13489
13490         * build-aux/config.rpath: Update from GNU gettext.
13491
13492 2005-12-16  Jim Meyering  <jim@meyering.net>
13493
13494         * modules/fprintftime: New module.
13495         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
13496
13497 2005-12-16  Jim Meyering  <jim@meyering.net>
13498
13499         * m4/fprintftime.m4: New file.
13500
13501 2005-12-16  Jim Meyering  <jim@meyering.net>
13502
13503         * lib/fprintftime.c, lib/fprintftime.h: New files.
13504
13505 2005-12-15  Simon Josefsson  <jas@extundo.com>
13506
13507         * modules/socklen (configure.ac): Fix M4 macro name, to align with
13508         new m4/socklen.m4.
13509
13510 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
13511
13512         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
13513         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
13514
13515 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
13516
13517         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
13518         * lib/argp-help.c (fill_in_uparams): Check if the constructed
13519         struct uparams is valid. Fall back to the default values if it is
13520         not.
13521
13522 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13523
13524         * modules/argp (Files): Add argp-pin.c
13525         (Depends-on): dirname
13526         (lib_SOURCES): Add argp-pin.c
13527
13528 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13529
13530         * m4/argp.m4:  Check if program_invocation_name and
13531         program_invocation_short_name are declared and define appropriate
13532         macros if they are not.
13533
13534 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13535
13536         * lib/argp-help.c (__argp_base_name): New function
13537         (__argp_short_program_name): Rewrite using __argp_base_name
13538         * lib/argp-namefrob.h: Define program_invocation_name and
13539         program_invocation_short_name if requested
13540         (__argp_base_name): Add prototype
13541         * lib/argp-parse.c (argp_def): Use gettext wrappers
13542         (argp_default_parser): Use __argp_base_name
13543         * lib/argp-pin.c: New file. Defines program_invocation_name and
13544         program_invocation_short_name on systems that lack them.
13545
13546 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
13547
13548         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
13549         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
13550         porting problem reported by Georg Schwarz in
13551         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
13552
13553 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
13554
13555         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
13556         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
13557         porting problem reported by Georg Schwarz in
13558         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
13559
13560 2005-12-05  Bruno Haible  <bruno@clisp.org>
13561
13562         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
13563         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
13564         Reported by Mark Junker <mjscod@gmx.de>.
13565
13566 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
13567
13568         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
13569         Use implementation from Albert Chin, with some
13570         comments/corrections by Stepan Kasal and myself.
13571
13572 2005-12-02  Bruno Haible  <bruno@clisp.org>
13573
13574         * gnulib-tool (func_import): Accept GPLed build tool modules when
13575         --lgpl is given.
13576         * modules/csharpcomp-script: New file.
13577         * modules/csharpcomp: Depend on it.
13578         * modules/javacomp-script: New file.
13579         * modules/javacomp: Depend on it.
13580         Suggested by Simon Josefsson.
13581
13582 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
13583
13584         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
13585         statement, to work around an HP-UX 10.20 compiler bug reported by
13586         Peter O'Gorman.
13587
13588 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
13589
13590         * modules/savedir (Depends-on): Add openat.
13591
13592 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
13593
13594         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
13595         (uintmax_t) [defined uintmax_t]: Do not declare.
13596         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
13597         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
13598         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
13599         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
13600         sake of portability to weird hosts that C allows (though we don't
13601         know of any practical examples).
13602
13603         * lib/savedir.h (fdsavedir): New decl.
13604         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
13605         contains most of the former guts of savedir.
13606         (savedir): Use savedirstream.
13607         Include "openat.h".
13608
13609 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
13610
13611         * modules/obstack (Files): Add m4/ulonglong.m4.
13612         Problem reported by Davide Angelocola.
13613
13614 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
13615
13616         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
13617         coreutils no longer futzes with rounding modes.
13618
13619 2005-11-14  Jim Meyering  <jim@meyering.net>
13620
13621         * lib/mkstemp-safer.c: Include <config.h>, required for possible
13622         replacement of mkstemp.
13623
13624 2005-11-10  Simon Josefsson  <jas@extundo.com>
13625
13626         * lib/readline.c: Remove EOL.
13627
13628 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13629
13630         * modules/gethrxtime (Depends-on): Add gettime.
13631
13632 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13633
13634         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
13635         or gettimeofday; no longer needed.
13636
13637 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13638
13639         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
13640         time business.
13641         (gethrxtime) [! (HAVE_NANOUPTIME
13642         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
13643         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
13644         our own approximation.
13645
13646 2005-11-08  Eric Blake  <ebb9@byu.net>
13647
13648         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
13649
13650 2005-11-08  Eric Blake  <ebb9@byu.net>
13651
13652         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
13653
13654 2005-11-04  Bruno Haible  <bruno@clisp.org>
13655
13656         * gnulib-tool: Implement --update mode.
13657
13658 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
13659
13660         Fix porting problem reported by Theodoros V. Kalamatianos.
13661         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
13662         Don't assume that futimes failing means we must fail.
13663
13664 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
13665
13666         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
13667         variables to suggest the intended function of the PATH_MAX check.
13668
13669 2005-10-30  Kean Johnston  <jkj@sco.com>
13670
13671         Trivial changes to support SCO systems.
13672         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
13673         as PATH_MAX.
13674         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
13675         where __ptr is null when no I/O is pending.
13676
13677 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13678
13679         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
13680         leave errno alone.  Problem reported by Dmitry V. Levin.
13681
13682 2005-10-28  Simon Josefsson  <jas@extundo.com>
13683
13684         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
13685         Test more.
13686
13687         * tests/test-gc-md2.c, tests/test-md2.c: New files.
13688
13689         * modules/md2, modules/md2-tests: New files.
13690
13691 2005-10-28  Simon Josefsson  <jas@extundo.com>
13692
13693         * m4/inet_ntop.m4: More tests.
13694
13695         * m4/gc-md2.m4, md2.m4: New file.
13696
13697 2005-10-28  Simon Josefsson  <jas@extundo.com>
13698
13699         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
13700         "restrict" keywords, as per POSIX.  Protect the function
13701         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
13702         Don't use K&R prototypes.  Check the sprintf return values.
13703         Re-define EAFNOSUPPORT if not present.  Indent.
13704
13705         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
13706         suggested by Bruno Haible <bruno@clisp.org>.
13707
13708         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
13709
13710         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
13711
13712         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
13713         libgcrypt).
13714
13715         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
13716
13717         * lib/md2.h, lib/md2.c: New files.
13718
13719 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
13720
13721         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
13722         errno alone.  Problem reported by Frederic Jolliton.
13723
13724 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
13725
13726         * modules/verify (License): Change from GPL to LGPL.  This is a
13727         tiny module and there are apparently near-equivalents that are
13728         under the BSD license.
13729
13730 2005-10-24  Simon Josefsson  <jas@extundo.com>
13731
13732         * modules/sha1: Relicense to LGPL.
13733
13734 2005-10-24  Simon Josefsson  <jas@extundo.com>
13735
13736         * lib/md4.h: Shrink buffer size, now that we changed the type.
13737
13738 2005-10-23  Simon Josefsson  <jas@extundo.com>
13739
13740         * gnulib-tool (func_import): Fix --tests-base.
13741
13742 2005-10-22  Simon Josefsson  <jas@extundo.com>
13743
13744         * modules/arcfour (Depends-on): Need stdint.
13745
13746 2005-10-22  Simon Josefsson  <jas@extundo.com>
13747
13748         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
13749         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
13750
13751 2005-10-22  Simon Josefsson  <jas@extundo.com>
13752
13753         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
13754         suggested by Bruno Haible <bruno@clisp.org>.
13755
13756 2005-10-22  Simon Josefsson  <jas@extundo.com>
13757
13758         * lib/crc.h: Include stddef.h, for size_t.
13759
13760 2005-10-22  Simon Josefsson  <jas@extundo.com>
13761
13762         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
13763         arcfour_context struct (simplify test vector testing in GNU
13764         Shishi).
13765
13766 2005-10-21  Simon Josefsson  <jas@extundo.com>
13767
13768         * modules/des, modules/des-tests: New files.
13769
13770         * modules/gc-des, modules/gc-des-tests: New files.
13771
13772         * tests/test-des.c, tests/test-gc-des.c: New file.
13773
13774 2005-10-21  Simon Josefsson  <jas@extundo.com>
13775
13776         * modules/arctwo, modules/arctwo-tests: New files.
13777
13778         * tests/test-arctwo.c: New file.
13779
13780         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
13781
13782         * tests/test-gc-arctwo.c: New file.
13783
13784 2005-10-21  Simon Josefsson  <jas@extundo.com>
13785
13786         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
13787         Bruno Haible <bruno@clisp.org>.
13788
13789         * m4/gc-des.m4: New file.
13790
13791 2005-10-21  Simon Josefsson  <jas@extundo.com>
13792
13793         * m4/arctwo.m4: New file.
13794
13795         * m4/gc-arctwo.m4: New file.
13796
13797 2005-10-21  Simon Josefsson  <jas@extundo.com>
13798
13799         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
13800         block.
13801
13802 2005-10-21  Simon Josefsson  <jas@extundo.com>
13803
13804         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
13805         <bruno@clisp.org>.
13806
13807         * lib/hmac-sha1.c (hmac_sha1): Likewise.
13808
13809         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
13810         Bruno Haible <bruno@clisp.org>.
13811
13812         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
13813         <bruno@clisp.org>.
13814
13815 2005-10-21  Simon Josefsson  <jas@extundo.com>
13816
13817         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
13818
13819 2005-10-21  Simon Josefsson  <jas@extundo.com>
13820
13821         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
13822
13823 2005-10-21  Simon Josefsson  <jas@extundo.com>
13824
13825         * lib/des.h, lib/des.c: New files.
13826
13827         * lib/gc-gnulib.c: Support DES.c
13828
13829 2005-10-21  Simon Josefsson  <jas@extundo.com>
13830
13831         * lib/arctwo.h, lib/arctwo.c: New files.
13832
13833         * lib/gc-gnulib.c: Support ARCTWO.
13834
13835 2005-10-21  Simon Josefsson  <jas@extundo.com>
13836
13837         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
13838         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
13839
13840 2005-10-21  Simon Josefsson  <jas@extundo.com>
13841
13842         * gnulib-tool (func_import, func_create_testdir): Define automake
13843         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
13844         Makefile.am snippet),
13845         suggested by Bruno Haible <bruno@clisp.org>.
13846
13847         * modules/gc (Makefile.am): Use it.
13848
13849 2005-10-21  Bruno Haible  <bruno@clisp.org>
13850
13851         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
13852         patch.
13853
13854 2005-10-19  Simon Josefsson  <jas@extundo.com>
13855
13856         * tests/test-gc-rijndael.c: New file.
13857
13858         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
13859
13860 2005-10-19  Simon Josefsson  <jas@extundo.com>
13861
13862         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
13863         interface too.
13864
13865 2005-10-19  Simon Josefsson  <jas@extundo.com>
13866
13867         * tests/test-gc-arcfour.c: New file.
13868
13869         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
13870
13871 2005-10-19  Simon Josefsson  <jas@extundo.com>
13872
13873         * modules/gc-md4, modules/gc-md4-tests: New file.
13874
13875         * tests/test-gc-md4.c: New file.
13876
13877 2005-10-19  Simon Josefsson  <jas@extundo.com>
13878
13879         * m4/gc-md4.m4: New file.
13880
13881 2005-10-19  Simon Josefsson  <jas@extundo.com>
13882
13883         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
13884         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
13885         <kasal@ucw.cz>.
13886
13887 2005-10-19  Simon Josefsson  <jas@extundo.com>
13888
13889         * m4/gc-arcfour.m4: New file.
13890
13891         * m4/gc-rijndael.m4: New file.
13892
13893 2005-10-19  Simon Josefsson  <jas@extundo.com>
13894
13895         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
13896
13897 2005-10-19  Simon Josefsson  <jas@extundo.com>
13898
13899         * lib/gc-gnulib.c: Support ARCFOUR.
13900
13901 2005-10-19  Simon Josefsson  <jas@extundo.com>
13902
13903         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
13904         support.
13905
13906         * lib/gc.h: Add ECB enum type.
13907
13908         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
13909
13910 2005-10-18  Simon Josefsson  <jas@extundo.com>
13911
13912         * tests/test-md5.c: New file.
13913
13914         * modules/md5-tests: New file.
13915
13916 2005-10-18  Simon Josefsson  <jas@extundo.com>
13917
13918         * tests/test-md4.c: New file.
13919
13920         * modules/md4, modules/md4-tests: New files.
13921
13922 2005-10-18  Simon Josefsson  <jas@extundo.com>
13923
13924         * m4/md4.m4: New file.
13925
13926 2005-10-18  Simon Josefsson  <jas@extundo.com>
13927
13928         * lib/md4.h, lib/md4.c: New files, based on md5.?.
13929
13930 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
13931
13932         * gnulib-tool (func_create_testdir): Omit the second check whether
13933         BUILT_SOURCES in nonempty.
13934
13935 2005-10-17  Simon Josefsson  <jas@extundo.com>
13936
13937         * tests/test-rijndael.c: New file.
13938
13939 2005-10-17  Simon Josefsson  <jas@extundo.com>
13940
13941         * modules/sha1: Depend on stdint instead of md5.
13942
13943         * modules/md5: Depend on stdint, remove uint32_t.
13944
13945 2005-10-17  Simon Josefsson  <jas@extundo.com>
13946
13947         * modules/gc-sha1-tests: New file.
13948
13949         * tests/test-gc-sha1.c: New file.
13950
13951 2005-10-17  Simon Josefsson  <jas@extundo.com>
13952
13953         * m4/md5.m4: Remove call to uint32_t.m4.
13954
13955 2005-10-17  Simon Josefsson  <jas@extundo.com>
13956
13957         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
13958
13959         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
13960         md5.h.
13961
13962         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
13963
13964         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
13965
13966 2005-10-17  Simon Josefsson  <jas@extundo.com>
13967
13968         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
13969
13970 2005-10-17  Simon Josefsson  <jas@extundo.com>
13971
13972         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
13973
13974 2005-10-17  Simon Josefsson  <jas@extundo.com>
13975
13976         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
13977
13978         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
13979
13980 2005-10-17  Bruno Haible  <bruno@clisp.org>
13981
13982         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
13983         that it can also be used in a test.
13984
13985 2005-10-16  Bruno Haible  <bruno@clisp.org>
13986
13987         * gnulib-tool (func_emit_tests_Makefile_am): Also define
13988         TESTS_ENVIRONMENT, so that individual tests can augment it.
13989
13990         * gnulib-tool (func_create_testdir): Use an intermediate target for
13991         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
13992         macros, like $(ALLOCA_H), which cannot be passed through the command
13993         line.
13994
13995 2005-10-15  Simon Josefsson  <jas@extundo.com>
13996
13997         * modules/rijndael-tests: New file.
13998
13999         * modules/rijndael: New file.
14000
14001 2005-10-15  Simon Josefsson  <jas@extundo.com>
14002
14003         * m4/rijndael.m4: New file.
14004
14005 2005-10-15  Simon Josefsson  <jas@extundo.com>
14006
14007         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
14008
14009         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
14010
14011 2005-10-14  Simon Josefsson  <jas@extundo.com>
14012
14013         * tests/test-arcfour.c: New file.
14014
14015         * modules/arcfour, modules/arcfour-tests: New files.
14016
14017 2005-10-14  Simon Josefsson  <jas@extundo.com>
14018
14019         * m4/arcfour.m4: New file.
14020
14021 2005-10-14  Simon Josefsson  <jas@extundo.com>
14022
14023         * lib/arcfour.h, lib/arcfour.c: New files.
14024
14025 2005-10-14  Roland McGrath  <roland@redhat.com>
14026
14027         Import from libc.  [BZ #1331]
14028         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
14029         macro argument.
14030         Reported by Matej Vela <vela@debian.org>.
14031
14032 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
14033
14034         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
14035         include <wchar.h>; no longer needed.
14036
14037 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
14038
14039         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
14040
14041 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
14042         and  Ulrich Drepper  <drepper@redhat.com>
14043
14044         Import from libc.
14045         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
14046         instead of inline stream orientation test and two separate
14047         function calls.  Pay no attention to USE_IN_LIBIO.
14048
14049 2005-10-13  Simon Josefsson  <jas@extundo.com>
14050
14051         * modules/gc-hmac-md5-tests: New file.
14052
14053         * tests/test-gc-hmac-sha1.c: New file.
14054
14055         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
14056
14057         * modules/gc-hmac-md5-tests: New file.
14058
14059         * tests/test-gc-md5.c: New file.
14060
14061         * modules/gc-md5-tests: New file.
14062
14063 2005-10-13  Simon Josefsson  <jas@extundo.com>
14064
14065         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
14066         Move memory allocation outside of loop.
14067
14068 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
14069
14070         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
14071         intermediate directory is in a read-only file system.  Problem
14072         reported by Eric Blake.
14073
14074 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
14075
14076         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
14077
14078 2005-10-12  Simon Josefsson  <jas@extundo.com>
14079
14080         * tests/test-hmac-sha1.c: New file.
14081
14082         * modules/hmac-sha1-tests: New file.
14083
14084         * modules/hmac-sha1: New file.
14085
14086 2005-10-12  Simon Josefsson  <jas@extundo.com>
14087
14088         * modules/gc-sha1: New file.
14089
14090 2005-10-12  Simon Josefsson  <jas@extundo.com>
14091
14092         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
14093
14094         * tests/test-gc-pbkdf2-sha1.c: New file.
14095
14096 2005-10-12  Simon Josefsson  <jas@extundo.com>
14097
14098         * modules/gc-md5, modules/gc-hmac-md5: New files.
14099
14100         * modules/gc (Files): Remove md5, memxor and hmac files.
14101
14102 2005-10-12  Simon Josefsson  <jas@extundo.com>
14103
14104         * m4/gc-pbkdf2-sha1.m4: New file.
14105
14106         * m4/gc-hmac-sha1.m4: New file.
14107
14108         * m4/gc-sha1: New file.
14109
14110         * m4/hmac-sha1.m4: New file.
14111
14112 2005-10-12  Simon Josefsson  <jas@extundo.com>
14113
14114         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
14115
14116         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
14117
14118 2005-10-12  Simon Josefsson  <jas@extundo.com>
14119
14120         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
14121         suggested by Bruno Haible <bruno@clisp.org>.
14122
14123 2005-10-12  Simon Josefsson  <jas@extundo.com>
14124
14125         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
14126
14127 2005-10-12  Simon Josefsson  <jas@extundo.com>
14128
14129         * lib/gc-pbkdf2-sha1.c: New file.
14130
14131         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
14132
14133 2005-10-12  Simon Josefsson  <jas@extundo.com>
14134
14135         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
14136
14137         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
14138
14139 2005-10-12  Simon Josefsson  <jas@extundo.com>
14140
14141         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
14142         GC_USE_HMAC_MD5, respectively.
14143
14144         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
14145         (gc_md5): Fix typo.
14146
14147         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
14148
14149         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
14150
14151         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
14152
14153 2005-10-12  Bruno Haible  <bruno@clisp.org>
14154
14155         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
14156         Reported by Stepan Kasal <kasal@ucw.cz>.
14157
14158 2005-10-11  Simon Josefsson  <jas@extundo.com>
14159
14160         * tests/test-crc.c: New file.
14161
14162         * modules/crc, modules/crc-tests: New files.
14163
14164 2005-10-11  Simon Josefsson  <jas@extundo.com>
14165
14166         * m4/crc.m4: New file.
14167
14168 2005-10-11  Simon Josefsson  <jas@extundo.com>
14169
14170         * lib/gc.h: Add gc_hash and gc_hash_buffer.
14171
14172         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
14173
14174         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
14175
14176 2005-10-11  Simon Josefsson  <jas@extundo.com>
14177
14178         * lib/crc.h, lib/crc.c: New files.
14179
14180         * lib/gc.h (gc_hash_buffer): Add doc.
14181
14182 2005-10-11  Bruno Haible  <bruno@clisp.org>
14183
14184         * modules/c-strcasestr: New file.
14185         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
14186
14187 2005-10-11  Bruno Haible  <bruno@clisp.org>
14188
14189         * modules/c-strcase: New file.
14190         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
14191
14192 2005-10-11  Bruno Haible  <bruno@clisp.org>
14193
14194         * lib/strcasecmp.c: Include limits.h.
14195         (strcasecmp): Avoid integer overflow on exotic platforms.
14196         * lib/strncasecmp.c: Include limits.h.
14197         (strncasecmp): Avoid integer overflow on exotic platforms.
14198         Reported by Paul Eggert.
14199
14200 2005-10-11  Bruno Haible  <bruno@clisp.org>
14201
14202         * lib/c-strcasestr.h: New file, from GNU gettext.
14203         * lib/c-strcasestr.c: New file, from GNU gettext.
14204
14205 2005-10-11  Bruno Haible  <bruno@clisp.org>
14206
14207         * lib/c-strcase.h: New file, from GNU gettext.
14208         * lib/c-strcasecmp.c: New file, from GNU gettext.
14209         * lib/c-strncasecmp.c: New file, from GNU gettext.
14210
14211 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
14212
14213         * modules/mempcpy (License): GPL -> LGPL.
14214         * modules/strchrnul (License): Likewise.
14215         * modules/sysexits (License): Likewise.
14216
14217 2005-10-08  Simon Josefsson  <jas@extundo.com>
14218
14219         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
14220
14221 2005-10-07  Simon Josefsson  <jas@extundo.com>
14222
14223         * m4/memxor.m4: Remove gl_C_RESTRICT call.
14224
14225 2005-10-06  Simon Josefsson  <jas@extundo.com>
14226
14227         * tests/test-hmac-md5.c: New file.
14228
14229         * modules/hmac-md5-tests: New file.
14230
14231         * modules/hmac-md5: New file.
14232
14233 2005-10-06  Simon Josefsson  <jas@extundo.com>
14234
14235         * m4/hmac-md5.m4: New file.
14236
14237         * m4/memxor.m4: Require gl_C_RESTRICT.
14238
14239 2005-10-06  Simon Josefsson  <jas@extundo.com>
14240
14241         * lib/memxor.c (memxor): Avoid casts and warnings.
14242
14243 2005-10-06  Simon Josefsson  <jas@extundo.com>
14244
14245         * lib/hmac-md5.c: New file.
14246
14247         * lib/hmac.h: New file.
14248
14249 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
14250
14251         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
14252         promotes to int, not unsigned int, to catch the AIX 5.3
14253         compiler bug.
14254
14255 2005-10-05  Simon Josefsson  <jas@extundo.com>
14256
14257         * modules/memxor: New file.
14258
14259         * modules/iconv (Files): Move config.rpath to havelib, it is used
14260         there.
14261
14262         * modules/havelib (Files): Add config.rpath.
14263
14264 2005-10-05  Simon Josefsson  <jas@extundo.com>
14265
14266         * m4/memxor.m4: New file.
14267
14268 2005-10-05  Simon Josefsson  <jas@extundo.com>
14269
14270         * lib/memxor.c (memxor): Fix compiler error.
14271
14272         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
14273         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
14274
14275         * lib/memxor.h, lib/memxor.c: New files.
14276
14277         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
14278         we assume all systems have it, suggested by Jim Meyering
14279         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
14280         any systems lack sys/socket.h; mingw32 is known to lack it, but we
14281         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
14282         same reasons.
14283
14284 2005-10-05  Simon Josefsson  <jas@extundo.com>
14285
14286         * config/srclist.txt: Add glibc bug 1423 for md5.h.
14287
14288 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
14289
14290         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
14291         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
14292         needed, since the source code now assumes these .h files.
14293
14294 2005-10-05  Derek Price  <derek@ximbiot.com>
14295
14296         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
14297
14298 2005-10-05  Bruno Haible  <bruno@clisp.org>
14299
14300         * modules/stdint (License): Change to LGPL.
14301
14302 2005-10-04  Simon Josefsson  <jas@extundo.com>
14303
14304         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
14305         D. Baushke" <mdb@gnu.org>.
14306
14307 2005-10-04  Bruno Haible  <bruno@clisp.org>
14308
14309         * lib/verify.h (verify_true): Provide alternative definition for C++.
14310
14311 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
14312
14313         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
14314         (SSIZE_MAX): New macro, if not already defined.
14315         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
14316         than 2 GiB.
14317
14318 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
14319
14320         Sync from coreutils.
14321         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
14322         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
14323         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
14324         ULLONG_MAX doesn't work with 2.7.2.1.
14325
14326 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
14327
14328         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
14329         From Ben Pfaff.
14330
14331         * modules/exclude (Depends-on): Depend on verify.
14332         * modules/strtoimax (Depends-on): Likewise.
14333         * modules/utimecmp (Depends-on): Likewise.
14334
14335 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
14336
14337         * lib/exclude.c: Include verify.h.
14338         (verify): Remove.  All callers changed to use verify.h's version.
14339         * lib/strtoimax.c: Likewise.
14340         * lib/utimecmp.c: Likewis.e
14341
14342         Sync from coreutils.
14343         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
14344         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
14345         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
14346         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
14347         bother returning ENOSYS if settimeofday or stime fails; just let
14348         them return whatever errno they want to return.
14349         * lib/utimens.c: Include unistd.h, for dup2.
14350         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
14351         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
14352
14353 2005-10-02  Jim Meyering  <jim@meyering.net>
14354
14355         Sync from coreutils.
14356         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
14357         from glibc-2.2.5 that fails for read-only files.
14358
14359 2005-10-02  Jim Meyering  <jim@meyering.net>
14360
14361         Sync from coreutils.
14362         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
14363         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
14364         `#if HAVE_CONFIG_H'.
14365         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
14366         Remove AT_FDCWD test.
14367         Do not consume the fd unless successful.
14368         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
14369         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
14370         block, so that we don't even try to compile it if settimeofday is
14371         available.  This works around a compilation failure on OSF1 V5.1,
14372         due to stime requiring a `long int*' while tv_sec is `int'.
14373
14374 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
14375
14376         Sync from coreutils.
14377         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
14378         against `yes', rather than just testing for nonempty.
14379
14380 2005-10-01  Simon Josefsson  <jas@extundo.com>
14381
14382         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
14383         and Darwin.
14384
14385         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
14386         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
14387         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
14388         freeaddrinfo and gai_strerror are declared by the POSIX headers.
14389         Check if struct addrinfo is declared.
14390
14391 2005-10-01  Simon Josefsson  <jas@extundo.com>
14392
14393         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
14394         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
14395         AI_* and EAI_* definitions.  Protect function declarations.
14396
14397 2005-10-01  Jim Meyering  <jim@meyering.net>
14398
14399         Sync from coreutils.
14400
14401         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
14402         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
14403         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
14404         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
14405         in the inet and nsl libraries.  Required on Solaris 5.7.
14406
14407 2005-10-01  Jim Meyering  <jim@meyering.net>
14408
14409         Sync from coreutils.
14410         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
14411         in the inet and nsl libraries.  Required on Solaris 5.7.
14412
14413 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
14414
14415         * lib/getdelim.c (getdelim): Remove unused variables.
14416
14417 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
14418
14419         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
14420         so that the code works even with ancient cpp.  Portability problem
14421         with GCC 2.7.2.1 reported by Thomas M.Ott.
14422
14423 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
14424
14425         * modules/regex (Depends-on): Add strcase.
14426
14427         * modules/gethostname (Licence): Change from GPL to LGPL, since
14428         gethostname.c is a trivial implementation of a standard library
14429         function.
14430         * modules/poll (License): Change from GPL to LGPL, since it's
14431         derived from LGPL code.
14432
14433 2005-09-27  Jim Meyering  <jim@meyering.net>
14434
14435         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
14436         HAVE_CONFIG_H.
14437
14438         * lib/intprops.h (signed_type_or_expr__): Define.
14439         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
14440         for unsigned types.
14441
14442 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
14443
14444         * lib/verify.h (verify_expr): Remove, replacing with:
14445         (verify_true): New macro that returns true instead of void.
14446         (verify_type__): Remove.
14447         (verify): Use verify_true rather than verify_type__.
14448
14449 2005-09-26  Bruno Haible  <bruno@clisp.org>
14450
14451         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
14452         is necessary.
14453         (lib_SOURCES): Remove mbchar.c.
14454         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
14455         (Files): Add m4/mbrtowc.m4.
14456         * modules/mbiter: Likewise.
14457         * modules/mbuiter: Likewise.
14458
14459 2005-09-26  Bruno Haible  <bruno@clisp.org>
14460
14461         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
14462         compile mbchar.c if they are not both present.
14463         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
14464         * m4/mbiter.m4 (gl_MBITER): Likewise.
14465         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
14466         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
14467         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
14468
14469 2005-09-25  Jim Meyering  <jim@meyering.net>
14470
14471         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
14472         also uses socklen_t.
14473
14474 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
14475
14476         * lib/utimens.c (ENOSYS): Define if not already defined.
14477         (futimens): Support having a null PATH if the file descriptor
14478         is nonnegative.
14479
14480         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
14481         Remove.
14482         (__attribute): Define to empty unless GCC 3.1 or later.
14483         This works around a core dump on OpenBSD 3.4, which has GCC
14484         2.95.3, which dumps core when given __attribute__(()).  It also
14485         simplifies other tests, since we really don't want to bother with
14486         worrying about which ancient version of GCC supported what.
14487         Original problem reported by Yoann Vandoorselaere, with part of
14488         the fix suggested by Derek Price.
14489
14490 2005-09-24  Jim Meyering  <jim@meyering.net>
14491
14492         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
14493         so we can once again use a positive bitfield width of 1 -- now we
14494         don't have to explain why we were using a bitfield width of 2.
14495
14496 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
14497
14498         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
14499         and similarly for the other external symbols.  Problem reported
14500         by James Gallager.
14501
14502         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
14503         bug reported by Jim Meyering.
14504
14505         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
14506         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
14507         not needed, since socklen is a prerequisite module.
14508
14509 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
14510
14511         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
14512         Problem reported by Eric Blake.
14513         (getaddrinfo): Initialize se so that it's not garbage.
14514         Redo internal storage allocation so that it doesn't make unportable
14515         assumptions about alignment.
14516         Fix a memory leak.
14517
14518         * lib/utimens.c (futimens): Use futimesat if available.
14519         Prefer it to futimes since it doesn't have the futimes bug.
14520
14521         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
14522         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
14523         Instead, declare a function that returns a pointer to an array,
14524         and use verify_type__ to declare the size of the array.
14525         Problem and germ of a solution reported by Bruno Haible.
14526         (verify_type__): Use 2, not 1, for bitfield size, to avoid
14527         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
14528
14529 2005-09-23  Jim Meyering  <jim@meyering.net>
14530
14531         Sync from coreutils.
14532         Correct build failure (socklen_t not defined) on at least
14533         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
14534         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
14535
14536 2005-09-23  Jim Meyering  <jim@meyering.net>
14537
14538         * modules/getaddrinfo (Depends-on): Add socklen.
14539
14540 2005-09-23  Bruno Haible  <bruno@clisp.org>
14541
14542         * tests/test-verify.c: New file.
14543
14544 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14545
14546         Sync from coreutils.
14547
14548         * modules/argmatch (Depends-on): Add verify.
14549         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
14550         unistd-safer.
14551         * modules/save-cwd (Depends-on): Likewise.
14552
14553         * modules/openat (Files): Add lib/openat-die.c.
14554         (Depends-on): Remove error, exitfail.
14555         Add dirname.
14556
14557         * modules/verify: New file.
14558         * MODULES.html.sh (Diagnostics <assert.h>): New section,
14559         with "verify" module.
14560
14561 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14562
14563         Sync from coreutils.
14564
14565         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
14566         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
14567         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
14568         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
14569         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
14570         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
14571         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
14572         Don't bother checking for string.h, stdlib.h, unistd.h.
14573         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
14574         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
14575         module's job.
14576         * m4/jm-macros.m4 (gl_MACROS): Likewise.
14577         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
14578
14579         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
14580         (gl_GETDATE): Use it.
14581
14582         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
14583
14584 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14585
14586         Sync from coreutils.
14587
14588         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
14589         stat-time.h.
14590         * lib/argmatch.h: Include verify.h
14591         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
14592         (ARGMATCH_ASSERT): Remove; unused.
14593         * lib/canonicalize.c: Assume STDC_HEADERS.
14594         * lib/exclude.c: Include "strcase.h".
14595         * lib/regex_internal.h [!defined _LIBC]: Likewise.
14596         * lib/getusershell.c: Include stdio--.h rather than stdio.h
14597         and stdio-safer.h.
14598         (getusershell): Call fopen, not fopen_safer.
14599         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
14600         Do not include unistd-safer.h.
14601         (save_cwd): Don't call fd_safer; no longer needed
14602         now that we include fcntl--.h.
14603
14604         * lib/getdate.y (relative_time): New type.
14605         (RELATIVE_TIME_0): New constant.
14606         (parser_control): Use relative_time instead of doing it ourselves.
14607         (%union): Add new relative_time rel member.
14608         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
14609         Now typeless.
14610         (relunit, relunit_snumber): Now of type rel.
14611         (zone, rel, relunit, get_date): Adjust to above changes.
14612
14613         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
14614         Do not include unistd-safer.h.
14615         (getloadavg): Don't call fd_safer; no longer needed
14616         now that we include fcntl--.h.
14617
14618         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
14619         (make_dir_parents): Treat ENOSYS like EEXIST.
14620
14621         Improve quality of diagnostics on restore_cwd failure.
14622         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
14623         (make_dir_parents): Last arg is now int * (for errno), not bool *.
14624         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
14625         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
14626         each time through the loop.  Do not diagnose restore_cwd failure;
14627         that is the caller's job (and perhaps the caller does not care).
14628
14629         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
14630         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
14631         If the file already exists but is not a directory, don't bother
14632         to try to make its parents.
14633         Close potential file descriptor leak if we can't chdir("/") (!).
14634         Don't always return true if chdir($PWD) fails; return true only
14635         if the requested action was done successfully (except for the
14636         chdir($PWD)).
14637         Don't log final directory unless we actually made it.
14638         Refactor to avoid duplicate code to fix up permissions.
14639         Don't attempt to fix up parent permissions if chdir($PWD) fails.
14640
14641         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
14642         to make it a bit faster and (I hope) clearer.
14643         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
14644         Fix bug in formats like %2N.
14645
14646         * lib/verify.h: New file.
14647
14648 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14649
14650         Sync from coreutils.
14651         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
14652
14653 2005-09-22  Jim Meyering  <jim@meyering.net>
14654
14655         Sync from coreutils.
14656
14657         * m4/lstat.m4 (gl_FUNC_LSTAT):
14658         Use AC_LIBSOURCES to require lstat.c and lstat.h.
14659         Remove obsolete comment.
14660         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
14661         * m4/xstrtod.m4: Likewise.
14662
14663         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
14664
14665 2005-09-22  Jim Meyering  <jim@meyering.net>
14666
14667         Sync from coreutils.
14668
14669         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
14670
14671         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
14672         the .tm_year member, since otherwise gcc-4.0 would now warn about
14673         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
14674
14675         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
14676         order to avoid an unsuppressible warning from gcc on 64-bit systems.
14677
14678         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
14679         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
14680         when run in a time zone for which daylight savings time is in effect
14681         for the starting date.
14682
14683         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
14684         stop us from restricting permissions of just-created absolute-named
14685         directories.
14686         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
14687         to restore initial working directory.
14688         * lib/mkdir-p.c (make_dir_parents): New parameter:
14689         different_working_dir, to tell caller if/when we change the working
14690         directory and are unable to return to the initial one.
14691         * lib/mkdir-p.h (make_dir_parents): Update prototype.
14692         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
14693         `return false'.  This fixes a bug introduced on 2004-07-30.
14694
14695         * lib/openat.c (fdopendir): Be sure to close the supplied
14696         file descriptor before returning.  This makes our replacement
14697         implementation a little closer to Solaris's, where fdopendir
14698         ties the file descriptor to the returned DIR* pointer.
14699         * lib/openat.c (unlinkat): New function.
14700         * lib/openat.h (unlinkat): Add prototype.
14701         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
14702         (openat_restore_fail): Rename from openat_restore_die.
14703         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
14704
14705         Provide an alternative to exiting immediately upon save_cwd or
14706         restore_cwd failure.  Now, an application can arrange e.g.,
14707         to perform a longjump in that case.
14708         * lib/openat.c: Include dirname.h.
14709         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
14710         (rpl_openat, fdopendir, fstatat): Call openat_save_die
14711         and openat_restore_die rather than calling error directly.
14712         Don't include "error.h" or "exitfail.h"; they're no longer needed.
14713
14714         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
14715         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
14716         define.
14717
14718         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
14719         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
14720                             int utc, int nanoseconds);
14721         Background:
14722         date should not have to allocate a megabyte of virtual memory to
14723         handle a format argument like +%1048575T.  When implemented with
14724         strftime, it must allocate such a buffer, use strftime to fill it
14725         in, print it, then free it.
14726         With fprintftime, it simply prints everything and exits.
14727         With no need for memory allocation, that's one fewer way to fail.
14728         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
14729         optional field width, not before, so we accept %9:z, not %:9z.
14730         (my_strftime): Be sure to use L_('x') for literals.
14731
14732         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
14733         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
14734         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
14735         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
14736         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
14737         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
14738         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
14739         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
14740         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
14741         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
14742         * lib/xgethostname.c, lib/xreadlink.c:
14743         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
14744
14745         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
14746         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
14747         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
14748         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
14749         and don't include <sys/file.h>).
14750
14751 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
14752
14753         Sync from coreutils.
14754
14755         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
14756         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
14757         [!LDAV_DONE]: Avoid unused variable warning.
14758
14759 2005-09-21  Bruno Haible  <bruno@clisp.org>
14760
14761         * lib/unicodeio.h (unicode_to_mb): New declaration.
14762
14763 2005-09-20  Derek Price  <derek@ximbiot.com>
14764
14765         * lib/getaddrinfo.c: Don't include <netdb.h> included from
14766         getaddrinfo.h.
14767
14768 2005-09-20  Bruno Haible  <bruno@clisp.org>
14769
14770         * gnulib-tool: Remove trailing slashes from the values specified for
14771         --source-base, --m4-base, --tests-base, --aux-dir.
14772         Suggested by Simon Josefsson <jas@extundo.com>.
14773
14774 2005-09-20  Bruno Haible  <bruno@clisp.org>
14775
14776         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
14777         func_modules_to_filelist, func_import, func_create_testdir): Make all
14778         sorting results locale-independent, so that gnulib-cache.m4 doesn't
14779         change when gnulib-tool is invoked in a different locale.
14780
14781 2005-09-19  Simon Josefsson  <jas@extundo.com>
14782
14783         * m4/socklen.m4: Fix typo.
14784
14785 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14786
14787         Use a consistent style for including <config.h>.
14788         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
14789         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
14790         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
14791         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
14792         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
14793         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
14794         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
14795         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
14796         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
14797         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
14798         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
14799         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
14800         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
14801         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
14802         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
14803         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
14804         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
14805         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
14806         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
14807         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
14808         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
14809         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
14810         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
14811         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
14812         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
14813         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
14814         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
14815         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
14816         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
14817         lib/xstrtoumax.c, lib/yesno.c:
14818         Standardize inclusion of config.h.
14819         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
14820         lib/inttostr.h:  Removed inclusion of config.h from header files.
14821         * lib/inttostr.c:  Adjusted in-tree users.
14822         * lib/timespec.h: Remove superfluous warning to include config.h.
14823         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
14824         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
14825         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
14826         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
14827         config.h with HAVE_CONFIG_H.
14828
14829 2005-09-19  Jim Meyering  <jim@meyering.net>
14830
14831         * modules/pathmax (License): Change to LGPL.
14832
14833 2005-09-19  Derek Price  <derek@ximbiot.com>
14834
14835         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
14836
14837 2005-09-19  Bruno Haible  <bruno@clisp.org>
14838
14839         * gnulib-tool (import): Provide default for --tests-base.
14840
14841 2005-09-19  Bruno Haible  <bruno@clisp.org>
14842
14843         * doc/quote.texi: New file, extracted from gnulib.texi.
14844         * doc/ctime.texi: New file, extracted from gnulib.texi.
14845         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
14846         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
14847         * doc/gnulib.texi: Include them.
14848
14849 2005-09-18  Bruno Haible  <bruno@clisp.org>
14850
14851         Portability fix.
14852         * gnulib-tool (func_readlink): New function.
14853         (func_ln_if_changed): Use it.
14854
14855 2005-09-18  Bruno Haible  <bruno@clisp.org>
14856
14857         * gnulib-tool: Support --with-tests also with --import.
14858         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
14859         (func_import): Use variables $testsbase and $inctests. Emit a
14860         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
14861         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
14862         SUBDIRS += $testsdir.
14863         (func_create_testdir): Update.
14864
14865 2005-09-18  Bruno Haible  <bruno@clisp.org>
14866
14867         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
14868         instead of $dry_run.
14869         (func_cp_if_changed, func_mv_if_changed): Remove functions.
14870         (func_ln_if_changed): Don't handle dry-run here.
14871         (func_import): In dry-run mode, detect more precisely which actions
14872         would be performed, and don't use "...ing" verbs.
14873
14874 2005-09-18  Bruno Haible  <bruno@clisp.org>
14875
14876         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
14877         (func_import): Use join on two temporary files instead of three nested
14878         loops, in order to determine which files are new or old.
14879
14880 2005-09-18  Bruno Haible  <bruno@clisp.org>
14881
14882         * gnulib-tool (func_import): Comment out code that spits out the
14883         new files with --dry-run.
14884
14885 2005-09-18  Bruno Haible  <bruno@clisp.org>
14886
14887         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
14888
14889 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
14890
14891         * lib/stat-time.h: New file.
14892         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
14893         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
14894         in a different way.
14895         (timespec_cmp): New function.
14896         * lib/utimecmp.c: Include stat-time.h.
14897         (SYSCALL_RESOLUTION): Depend on whether various struct stat
14898         members exist, not on the obsolescent ST_MTIM_NSEC.
14899         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
14900
14901 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
14902
14903         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
14904
14905 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
14906
14907         * MODULES.html.sh (File system functions): Add stat-time.
14908         * modules/stat-time: New file.
14909         * modules/timespec (Files): Remove m4/st_mtim.m4; this
14910         is now done in a different way, by the stat-time module.
14911         * modules/utimecmp (Depends-on): Add stat-time.
14912
14913 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
14914
14915         * m4/st_mtim.m4: Remove.  Superseded by...
14916         * m4/stat-time.m4: New file.
14917         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
14918         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
14919
14920 2005-09-15  Derek Price  <derek@ximbiot.com>
14921
14922         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
14923
14924 2005-09-15  Derek Price  <derek@ximbiot.com>
14925
14926         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
14927         * lib/regex_internal.c: Ditto, using this...
14928         (__GNUC_PREREQ): ...new macro.
14929         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
14930         using...
14931         (__GNUC_PREREQ): ...this new macro.
14932
14933         * lib/strstr.h: Include string.h. Define strstr as a macro here.
14934
14935 2005-09-15  Derek Price  <derek@ximbiot.com>
14936             Paul Eggert  <eggert@cs.ucla.edu>
14937
14938         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
14939         changes, consolidating in...
14940         * lib/regex_internal.h: ...this file.
14941
14942 2005-09-13  Jim Meyering  <jim@meyering.net>
14943
14944         * lib/canon-host.c: Filter through gnu indent and reword comments
14945         slightly.
14946         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
14947
14948 2005-09-13  Derek Price  <derek@ximbiot.com>
14949
14950         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
14951         failure.
14952         Reported by Jim Meyering  <jim@meyering.net>.
14953
14954 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
14955
14956         * lib/base64.c: Typo.
14957         (base64_encode): Put b64str in initialized data section.
14958
14959 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
14960
14961         Merge glibc and coreutils changes into gnulib, plus a few
14962         extra fixes.
14963         * lib/md5.c: Use #error rather than a string.
14964         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
14965         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
14966         (__attribute__): Define to empty for non recent-GCC.
14967         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
14968         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
14969         Renamed from their non-__ counterparts, with new macros replacing
14970         them if not _LIBC.  Add __THROW attribute.
14971         (rol): Remove.
14972         (struct md5_ctx): Align buffer if using GCC.
14973         * lib/sha1.h (struct sha1_ctx): Likewise.
14974         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
14975         The old name was backwards.
14976         (NOTSWAP): Remove; not used.
14977         (rol): New macro, moved here from md5.h.
14978         (sha1_process_block): Remove a FIXME that doesn't make sense.
14979
14980 2005-09-12  Derek Price  <derek@ximbiot.com>
14981
14982         Return usable errors from canon-host.
14983         * lib/canon-host.h: New file.
14984         * lib/canon-host.c (canon_host): Wrap...
14985         (canon_host_r): ...this new function, which now relies exclusively on
14986         getaddrinfo.
14987         (ch_strerror): New function.
14988         (last_cherror): New global.
14989         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
14990         interface.
14991         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
14992         void *.
14993         (freeaddrinfo): Free ai->ai_canonname when set.
14994
14995 2005-09-12  Derek Price  <derek@ximbiot.com>
14996
14997         Make canon-host require getaddrinfo.
14998         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
14999         AC_LIBSOURCE canon-host.h.  Call...
15000         (gl_PREREQ_CANON_HOST): ...this new function, which requires
15001         gl_GETADDRINFO.
15002         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
15003
15004 2005-09-12  Derek Price  <derek@ximbiot.com>
15005
15006         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
15007         LGPL.
15008         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
15009
15010 2005-09-12  Derek Price  <derek@ximbiot.com>
15011
15012         * lib/gai_strerror.c: Include config.h when available.  Include
15013         getaddrinfo.h before other headers to test interface.
15014         Reported by Larry Jones <lawrence.jones@ugs.com>.
15015
15016 2005-09-12  Derek Price  <derek@ximbiot.com>
15017             Paul Eggert  <eggert@cs.ucla.edu>
15018
15019         * modules/glob (Files): Add glob-libc.h.
15020
15021 2005-09-12  Derek Price  <derek@ximbiot.com>
15022             Paul Eggert  <eggert@cs.ucla.edu>
15023
15024         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
15025         glob_.h, glob-libc.h.
15026         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
15027
15028 2005-09-12  Derek Price  <derek@ximbiot.com>
15029             Paul Eggert  <eggert@cs.ucla.edu>
15030
15031         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
15032         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
15033         protecting things that should be done only in gnulib contexts.
15034         * lib/glob_.h: New file, containing only the glob things needed for
15035         gnulib.
15036         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
15037         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
15038         (glob, globfree, glob_pattern_p): Now defined simply in terms of
15039         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
15040         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
15041         and to respect the namespace rules better.
15042
15043 2005-09-08  Simon Josefsson  <jas@extundo.com>
15044
15045         * modules/socklen: New file.
15046
15047 2005-09-08  Simon Josefsson  <jas@extundo.com>
15048
15049         * m4/socklen.m4: New file.
15050
15051 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
15052
15053         * modules/utimens (Files): Add m4/utimbuf.m4, since
15054         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
15055         Reported by Sergey Poznyakoff.
15056
15057 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
15058
15059         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
15060         definitions, since that's the preferred style in glibc.
15061         Fix a minor spacing issue, and update copyright notice to match
15062         glibc's.
15063
15064 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
15065
15066         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
15067
15068 2005-09-06  Simon Josefsson  <jas@extundo.com>
15069
15070         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
15071         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
15072
15073 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
15074
15075         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
15076         warning.
15077
15078 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
15079
15080         * config/srclist.txt: Add glibc bug 1302.
15081
15082 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
15083
15084         Change bitset word type from unsigned int to unsigned long int,
15085         as this has better performance on typical 64-bit hosts.
15086         Port bitset code to hosts with unusual word sizes.
15087         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
15088         (build_collating_symbol):
15089         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
15090         argument is a bitset.  This is merely a style issue, but it makes
15091         it clearer that an entire array is expected.
15092         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
15093         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
15094         Port to the case where bitset_word is not the same as unsigned int.
15095         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
15096         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
15097         Likewise.
15098         * lib/regexec.c (check_dst_limits_calc_pos_1,
15099         check_subexp_matching_top):
15100         (build_trtable, group_nodes_into_DFAstates):
15101         Likewise.
15102         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
15103         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
15104         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
15105         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
15106         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
15107         * lib/regcomp.c (optimize_subexps, lower_subexp):
15108         Work even if bitset_word has holes in its bitwise representation.
15109         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
15110         * lib/regexec.c (check_dst_limits_calc_pos_1,
15111         check_subexp_matching_top):
15112         Likewise.
15113         * lib/regex_internal.c (re_string_reconstruct):
15114         Don't assume UCHAR_MAX == 255.
15115         * lib/regex_internal.h (bitset_set_all): Likewise.
15116         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
15117         All uses changed.
15118         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
15119         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
15120         All uses changed.
15121         (BITSET_WORD_MAX): New macro.
15122         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
15123         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
15124         (bitset_empty, bitset_copy):
15125         Prefer sizeof (bitset) to multiplying it out ourselves.
15126         (bitset_not_merge): Remove; unused.
15127         (bitset_contain): Return bool, not unsigned int with one bit on.
15128         All callers changed.
15129         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
15130         alignment than re_node_set; do this by defining a new internal
15131         type struct dests_alloc and using it to allocate memory.
15132
15133 2005-09-05  Bruno Haible  <bruno@clisp.org>
15134
15135         * gnulib-tool (func_import): Fix comparison in handling of symbolic
15136         links.
15137
15138 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
15139
15140         * modules/size_max (Makefile.am): Add size_max.h
15141
15142 2005-09-04  Derek Price  <derek@ximbiot.com>
15143
15144         * gnulib-tool (func_import): Fix reversed $symbolic logic.
15145
15146 2005-09-03  Simon Josefsson  <jas@extundo.com>
15147
15148         * gnulib-tool: Fix typo.
15149
15150 2005-09-03  Simon Josefsson  <jas@extundo.com>
15151
15152         * config/srclist.txt: Add glibc bug 1293.
15153
15154 2005-09-03  Derek Price  <derek@ximbiot.com>
15155
15156         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
15157         From Larry Jones <lawrence.jones@ugs.com>.
15158
15159 2005-09-02  Simon Josefsson  <jas@extundo.com>
15160
15161         * modules/socklen: New file.
15162
15163 2005-09-02  Simon Josefsson  <jas@extundo.com>
15164
15165         * modules/havelib: New module.
15166
15167         * modules/gettext, modules/iconv, modules/lock, modules/readline:
15168         Use havelib.
15169
15170 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
15171
15172         Check for arithmetic overflow when calculating sizes, to prevent
15173         some buffer-overflow issues.  These patches are conservative, in the
15174         sense that when I couldn't determine whether an overflow was possible,
15175         I inserted a run-time check.
15176         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
15177         macros.
15178         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
15179         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
15180         (re_xnrealloc, re_x2nrealloc): New inline functions.
15181         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
15182         parse_bracket_exp):
15183         (build_equiv_class, build_charclass): Check for arithmetic overflow
15184         in size expression calculations.
15185         * lib/regex_internal.c (re_string_realloc_buffers):
15186         (build_wcs_upper_buffer, re_node_set_add_intersect):
15187         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
15188         (re_dfa_add_node, register_state): Likewise.
15189         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
15190         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
15191         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
15192         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
15193
15194 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
15195
15196         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
15197         m4/ulonglong.m4.  Problem reported by Martin Lambers.
15198
15199 2005-09-02  Bruno Haible  <bruno@clisp.org>
15200
15201         Support for lib vs. lib64 distinction on biarch platforms.
15202         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
15203         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
15204         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
15205
15206 2005-09-02  Bruno Haible  <bruno@clisp.org>
15207
15208         * gnulib-tool (import): In the other first-use case, provide defaults
15209         as well.
15210
15211 2005-09-02  Bruno Haible  <bruno@clisp.org>
15212
15213         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
15214         patches not yet found in the latest gettext release.
15215
15216 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
15217
15218         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
15219         to avoid a collision with bits/local_lim.h in glibc.
15220         All uses changed.  Problem reported by Dmitry V. Levin in
15221         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
15222
15223         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
15224         bugs in int versus size_t comparisons.
15225         (re_string_context_at): Fix bug where the code assumed that
15226         Idx is signed.
15227
15228         Use bool where appropriate.
15229         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
15230         All callers changed.
15231         (calc_eclosure_iter): Likewise, for ROOT arg.
15232         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
15233         (build_charclass_op): Likewise, for NON_MATCH arg.
15234         * lib/regex_internal.c (re_string_allocate, re_string_construct):
15235         (re_string_construct_common): Likewise, for ICASE arg.
15236         * lib/regexec.c (re_search_2_stub, re_search_stub):
15237         Likewise, for RET_LEN arg.
15238         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
15239         (set_regs): Likewise, for FL_BACKTRACK arg.
15240         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
15241         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
15242         (calc_eclosure_iter, parse_bracket_exp):
15243         Use bool for internal variables that are booleans.
15244         * lib/regexec.c (re_search_internal, check_matching,
15245         proceed_next_node):
15246         (set_regs, build_sifted_states, sift_states_bkref):
15247         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
15248         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
15249         (find_collation_sequence_value):
15250         Likewise.
15251         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
15252         (re_node_set_compare):
15253         Return bool, not int. All callers changed.
15254         * lib/regexec.c (check_halt_node_context, check_dst_limits):
15255         (build_trtable, check_node_accept): Likewise.
15256         * lib/regex_internal.h: Include stdbool.h.
15257
15258         Fix bugs uncovered when converting to bool.
15259         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
15260         failure instead of charging ahead blindly.
15261         * lib/regex_internal.c (register_state): Likewise.
15262         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
15263         for freeing internal storage.
15264         (group_nodes_into_DFA_states): Use unsigned int, not int, for
15265         bitset pieces used as boolean, to avoid undefined behavior
15266         on hosts that do int overflow checking.
15267
15268 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
15269
15270         * config/srclist.txt: Add glibc bugs 1285-1287.
15271
15272 2005-09-01  Jim Meyering  <jim@meyering.net>
15273
15274         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
15275         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
15276         Require gl_STAT_MACROS, too.
15277
15278 2005-09-01  Bruno Haible  <bruno@clisp.org>
15279
15280         * gnulib-tool (import): In the first-use case, provide defaults.
15281
15282 2005-09-01  Bruno Haible  <bruno@clisp.org>
15283
15284         * gnulib-tool (func_import): Remove the .tmp files.
15285
15286 2005-09-01  Bruno Haible  <bruno@clisp.org>
15287
15288         * gnulib-tool (func_import): Fix handling of symbolic links.
15289
15290 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
15291
15292         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
15293         old glibc regex code mishandles strings longer than 2**31 bytes.
15294         This patch fixes this when the regex code is used in gnulib
15295         (i.e., outside glibc).
15296
15297         This patch should not affect the use of the regex code inside
15298         glibc.  No doubt this problem also needs to be handled for glibc
15299         as well, but the result will be an incompatible change to the
15300         glibc ABI, and the old ABI will have to be supported too.  That
15301         can be the the subject for another patch.
15302
15303         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
15304         governing whether the rest of this patch is active.  By default,
15305         the macro is disabled and the patch has no effect.
15306         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
15307         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
15308         (struct re_pattern_buffer, re_search, re_search_2, re_match):
15309         (re_match_2, re_set_registers): Use the new types.
15310         * lib/regex_internal.h (Idx, re_hashval_t): New types.
15311         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
15312         New macros.
15313         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
15314         (re_string_context_at, bin_tree_t, re_dfastate_t):
15315         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
15316         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
15317         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
15318         (re_string_char_size_at, re_string_wchar_at):
15319         (re_string_elem_size_at):
15320         Use the new types and macros to port to 64-bit hosts.
15321         Use unsigned types for internal values, so that the code
15322         mostly works even for arrays larger than SSIZE_MAX.
15323         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
15324         (search_duplicated_node, calc_eclosure_iter, fetch_number):
15325         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
15326         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
15327         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
15328         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
15329         (calc_inveclosure, parse_dup_op, build_range_exp):
15330         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
15331         (fetch_number, create_token_tree, mark_opt_subexp):
15332         Likewise.
15333         * lib/regex_internal.c (re_string_construct_common,
15334         create_ci_newstate):
15335         (create_cd_newstate, re_string_allocate, re_string_construct):
15336         (re_string_realloc_buffers, build_wcs_upper_buffer):
15337         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
15338         (re_string_reconstruct, re_string_peek_byte_case):
15339         (re_string_fetch_byte_case, re_string_context_at):
15340         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
15341         (re_node_set_init_copy, re_node_set_add_intersect):
15342         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
15343         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
15344         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
15345         (re_acquire_state, re_acquire_state_context, register_state):
15346         Likewise.
15347         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
15348         search_cur_bkref_entry):
15349         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
15350         (re_search_internal, re_search_2_stub, re_search_stub)
15351         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
15352         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
15353         (update_cur_sifted_state, check_dst_limits):
15354         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
15355         (check_subexp_limits, sift_states_bkref, merge_state_array):
15356         (check_subexp_matching_top, get_subexp, get_subexp_sub):
15357         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
15358         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
15359         (expand_bkref_cache, check_node_accept_bytes):
15360         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
15361         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
15362         (acquire_init_state_context, check_halt_node_context):
15363         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
15364         (sift_states_backward, clean_state_log_if_needed):
15365         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
15366         (find_recover_state, transit_state_sb, transit_state_mb):
15367         (transit_state_bkref, build_trtable, match_ctx_clean):
15368         Likewise.
15369         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
15370         to work around an assumption that REG_MISSING is negative.
15371
15372         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
15373         (seek_collating_symbol_entry) [defined _LIBC]:
15374         (lookup_collation_sequence_value) [defined _LIBC]:
15375         (build_range_exp, build_collating_symbol) [defined _LIBC]:
15376         Use prototypes rather than old-style function definitions.
15377         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
15378         (transit_state_sb) [0]:
15379         (find_collation_sequence_value) [defined _LIBC]: Likewise.
15380
15381         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
15382         rm_eo.
15383
15384         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
15385         (optimize_subexps, lower_subexp):
15386         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
15387         since the signed shift might overflow.  Use 1u<<31 instead.
15388         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
15389         Likewise.
15390         * lib/regexec.c (check_dst_limits_calc_pos_1,
15391         check_subexp_matching_top): Likewise.
15392
15393         * lib/regcomp.c (optimize_subexps, lower_subexp):
15394         Use CHAR_BIT rather than 8, for clarity.
15395         * lib/regexec.c (check_dst_limits_calc_pos_1):
15396         (check_subexp_matching_top): Likewise.
15397         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
15398         have to worry about portability issues when shifting it left.
15399         Remove no-longer-needed test for table_size > 0.
15400         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
15401         in a word, as the resulting behavior is undefined.
15402         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
15403         in one case, a <= should have been an <, and in another case the
15404         whole test was missing.
15405         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
15406         the standard name CHAR_BIT.
15407         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
15408         this is not true on one's complement and signed-magnitude hosts.
15409
15410         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
15411         next_last_offset.
15412         (struct re_dfa_t): Remove unused member states_alloc.
15413         * lib/regcomp.c (init_dfa): Don't initialize unused members.
15414
15415 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
15416
15417         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
15418         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
15419         and large-file glibc and in 32-bit large-file Solaris.
15420
15421 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
15422
15423         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
15424         lengths fit in regoff_t; this isn't true if regoff_t is the same
15425         width as size_t.
15426         * lib/regex.c (re_search_internal): 5th arg is LAST_START
15427         (= START + RANGE) instead of RANGE.  This avoids overflow
15428         problems when regoff_t is the same width as size_t.
15429         All callers changed.
15430         (re_search_2_stub): Check for overflow when adding the
15431         sizes of the two strings.
15432         (re_search_stub): Check for overflow when adding START
15433         to RANGE; if it occurs, substitute the extreme value.
15434
15435 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
15436
15437         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
15438
15439 2005-08-31  Jim Meyering  <jim@meyering.net>
15440
15441         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
15442         a pointer-to-const.
15443         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
15444         (register_state): Likewise.
15445         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
15446         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
15447         (group_nodes_into_DFAstates): Likewise.
15448
15449 2005-08-31  Jim Meyering  <jim@meyering.net>
15450
15451         * check-module: Add a FIXME comment.
15452
15453 2005-08-31  Eric Blake  <ebb9@byu.net>
15454
15455         * modules/unistd-safer (Files): Add unistd--.h.
15456         * modules/stdio-safer (Files): Add stdio--.h.
15457
15458 2005-08-31  Derek Price  <derek@ximbiot.com>
15459
15460         * lib/getdelim.c (getdelim): Return EOF on EOF.
15461         Reported by Larry Jones <lawrence.jones@ugs.com>.
15462
15463 2005-08-31  Bruno Haible  <bruno@clisp.org>
15464
15465         Avoid unnecessary diffs in the generated lib/Makefile.am.
15466         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
15467         the generated files.
15468         (func_import): Don't set cmd.
15469
15470 2005-08-31  Bruno Haible  <bruno@clisp.org>
15471
15472         * lib/strstr.c: Include <stddef.h>, for NULL.
15473         * lib/strcasestr.c: Likewise.
15474         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
15475
15476 2005-08-31  Bruno Haible  <bruno@clisp.org>
15477
15478         * gnulib-tool: New option --macro-prefix.
15479         (func_import): Use macro_prefix.
15480         (import): Handle option --macro-prefix.
15481
15482 2005-08-31  Bruno Haible  <bruno@clisp.org>
15483
15484         * gnulib-tool (import): Rename most ac_* variables to cached_*.
15485         Also use new variables cached_lgpl, cached_libtool.
15486
15487 2005-08-31  Bruno Haible  <bruno@clisp.org>
15488
15489         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
15490         always instantiating them.
15491
15492 2005-08-31  Bruno Haible  <bruno@clisp.org>
15493
15494         * gnulib-tool (func_import): Read the previous cached settings
15495         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
15496         earlier added by gnulib but are now dropped. Warn when a gnulib file
15497         overwrites a non-gnulib file.
15498
15499 2005-08-31  Bruno Haible  <bruno@clisp.org>
15500
15501         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
15502         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
15503         projects that don't keep autogenerated files in CVS. Put into
15504         actioncmd only the specified modules, not the transitive closure.
15505
15506 2005-08-31  Bruno Haible  <bruno@clisp.org>
15507
15508         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
15509         Create directories that shall be filled.
15510         (import): Don't look for gl_* macros in configure.ac. Recurse across
15511         all directories containing a gnulib-cache.m4 files, if meaningful.
15512
15513 2005-08-31  Bruno Haible  <bruno@clisp.org>
15514
15515         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
15516         (import): Set seen_libtool when we see gl_LIBTOOL.
15517
15518 2005-08-31  Bruno Haible  <bruno@clisp.org>
15519
15520         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
15521         declaration macro definitions from generated gnulib.m4.
15522
15523 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
15524
15525         * lib/iconvme.h: Add prototype for iconv_alloc.
15526
15527 2005-08-29  Simon Josefsson  <jas@extundo.com>
15528
15529         * lib/iconvme.c: Fix errno.
15530
15531 2005-08-29  Bruno Haible  <bruno@clisp.org>
15532
15533         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
15534         that it works when the directory contains spaces.
15535
15536 2005-08-29  Bruno Haible  <bruno@clisp.org>
15537
15538         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
15539
15540 2005-08-29  Bruno Haible  <bruno@clisp.org>
15541
15542         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
15543         Emit more advice.
15544
15545 2005-08-29  Bruno Haible  <bruno@clisp.org>
15546         and Stepan Kasal  <kasal@ucw.cz>
15547
15548         * check-module: If more parameters are given, check each of them
15549         separately; add more exceptions, as noted by Jim Meyering.
15550         (check_module): New procedure.
15551         (%exempt_header): Now contains all exceptions.
15552
15553 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
15554
15555         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
15556
15557 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
15558
15559         * lib/iconvme.c: Split iconv_string into iconv_alloc.
15560
15561 2005-08-28  Bruno Haible  <bruno@clisp.org>
15562
15563         * m4/gnulib-tool.m4: New file.
15564
15565 2005-08-27  Jim Meyering  <jim@meyering.net>
15566
15567         * modules/unistd-safer (Files): Add pipe-safer.c.
15568         * modules/fcntl-safer (Files): Add creat-safer.c.
15569
15570 2005-08-27  Jim Meyering  <jim@meyering.net>
15571
15572         * m4/stdlib-safer.m4: New file.  From coreutils.
15573         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
15574         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
15575         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
15576         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
15577         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
15578
15579 2005-08-27  Jim Meyering  <jim@meyering.net>
15580
15581         * lib/fopen-safer.c: Merge minor changes from coreutils.
15582         * lib/dup-safer.c: Likewise.
15583         * lib/fd-safer.c: Likewise.
15584
15585         Merge from coreutils.
15586         * lib/stdio--.h: New file.
15587         * lib/stdlib--.h: New file.
15588         * lib/mkstemp-safer.c: New file.
15589
15590         GNU tar needs these.
15591         * lib/pipe-safer.c: New file.
15592         * lib/creat-safer.c: New file.
15593         * lib/fcntl--.h (creat): Define to creat_safer.
15594         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
15595         * lib/unistd--.h (pipe): Define to pipe_safer.
15596         * lib/unistd-safer.h: Declare pipe_safer.
15597
15598 2005-08-26  Simon Josefsson  <jas@extundo.com>
15599
15600         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
15601         Haible <bruno@clisp.org>.
15602
15603 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
15604
15605         * lib/regex_internal.h: Remove all references to
15606         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
15607         or better.
15608         (bitset_not, bitset_merge, bitset_not_merge):
15609         (bitset_mask, re_string_allocate, re_string_construct):
15610         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
15611         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
15612         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
15613         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
15614         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
15615         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
15616         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
15617         (re_acquire_state_context):
15618         Remove unnecessary forward decls.
15619         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
15620         Put __attribute at function definition,
15621         now that the function decl has been removed.
15622         * lib/regex_internal.c (re_string_peek_byte_case):
15623         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
15624         Likewise.
15625
15626 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
15627
15628         * m4/regex.m4: Add AC_PREREQ(2.50).
15629         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
15630
15631 2005-08-25  Simon Josefsson  <jas@extundo.com>
15632
15633         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
15634         __fsetlocking.
15635
15636 2005-08-25  Simon Josefsson  <jas@extundo.com>
15637
15638         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
15639         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
15640         GLIBC specific code.
15641
15642 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15643
15644         Make regex safe for g++.  This fixes one real bug (an "err"
15645         that should have been "*err").  g++ problem reported by
15646         Sam Steingold.
15647         * lib/regex_internal.h (re_calloc): New macro, consistent with
15648         re_malloc etc.  All callers of calloc changed to use re_calloc.
15649         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
15650         not int.  All callers changed.
15651         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
15652         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
15653         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
15654         (find_recover_state): Change "err" to "*err"; this fixes what
15655         appears to be a real bug.
15656         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
15657         versus int.
15658
15659 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15660
15661         * modules/regex (Depends-on): Add malloc, since the code
15662         assumes that !malloc(0) means failure.
15663
15664 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15665
15666         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
15667
15668         alloca modernization/simplification for regex.
15669         * lib/regex.c: Remove portability cruft for alloca.  This no longer
15670         needs to be at the start of the file, and can be moved into
15671         regex_internal.h and simplified.
15672         * lib/regex_internal.h: Include <alloca.h>.
15673         (__libc_use_alloca) [!defined _LIBC]: New macro.
15674         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
15675         now works outside glibc.
15676
15677 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15678
15679         * config/srclist.txt: Add glibc bugs 1241, 1245.
15680
15681 2005-08-25  Jim Meyering  <jim@meyering.net>
15682
15683         * lib/open-safer.c: Include <config.h>.
15684         Otherwise, we'd lose LARGEFILE support in any file using
15685         e.g. "fcntl--.h"
15686
15687 2005-08-25  Bruno Haible  <bruno@clisp.org>
15688
15689         * m4/minmax.m4: Require autoconf 2.52.
15690         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
15691         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
15692         alternatives of translit over the alphabet.
15693         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
15694
15695 2005-08-24  Simon Josefsson  <jas@extundo.com>
15696
15697         * tests/test-getpass.c: New file.
15698
15699 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
15700
15701         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
15702         for GNU regex features.
15703
15704 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
15705
15706         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
15707         * lib/regex.h (regerror): Likewise.
15708
15709         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
15710         requires this.  (The code never needed it.)
15711
15712         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
15713         All uses of recently-renamed identifiers changed to use the new,
15714         POSIX-compliant names.  The code will build and run just fine
15715         without these changes, but it's better to eat our own dog food
15716         and use the standard-conforming names.
15717
15718         * lib/regex.h: Fix a multitude of POSIX name space violations.
15719         These changes have an effect only for programs that define
15720         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
15721         do not change anything for programs compiled in the normal way.
15722         Also, there is no effect on the ABI.
15723
15724         (_REGEX_SOURCE): New macro.
15725         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
15726         defined and _GNU_SOURCE is not; this fixes a name space violation.
15727
15728         Rename the following macros to obey POSIX requirements.
15729         The old names are still visible as macros if _REGEX_SOURCE is defined.
15730         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
15731         RE_BACKSLASH_ESCAPE_IN_LISTS.
15732         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
15733         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
15734         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
15735         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
15736         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
15737         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
15738         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
15739         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
15740         (REG_INTERVALS): renamed from RE_INTERVALS.
15741         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
15742         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
15743         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
15744         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
15745         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
15746         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
15747         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
15748         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
15749         RE_UNMATCHED_RIGHT_PAREN_ORD.
15750         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
15751         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
15752         (REG_DEBUG): renamed from RE_DEBUG.
15753         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
15754         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
15755         unusual, since we can't clash with the POSIX REG_ICASE.
15756         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
15757         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
15758         (REG_NO_SUB): renamed from RE_NO_SUB.
15759         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
15760         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
15761         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
15762         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
15763         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
15764         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
15765         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
15766         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
15767         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
15768         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
15769         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
15770         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
15771         RE_SYNTAX_POSIX_MINIMAL_BASIC.
15772         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
15773         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
15774         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
15775         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
15776         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
15777         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
15778         (REG_FIXED): Renamed from REGS_FIXED.
15779         (REG_NREGS): Renamed from RE_NREGS.
15780
15781         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
15782         of other REG_* macros, since POSIX says the user is allowed to
15783         #undef these macros selectively.
15784
15785         (reg_errcode_t): Update comment stating what other tables need
15786         to be consistent.
15787
15788         Rename the following enum values to obey POSIX requirements.
15789         The old names are still visible as macros.
15790         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
15791         is not defined, since GNU is supposed to be a superset of POSIX as
15792         much as possible, and since we want reg_errcode_t to be a signed
15793         type for implementation consistency.
15794         (_REG_NOERROR): Renamed from REG_NOERROR.
15795         (_REG_NOMATCH): Renamed from REG_NOMATCH.
15796         (_REG_BADPAT): Renamed from REG_BADPAT.
15797         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
15798         (_REG_ECTYPE): Renamed from REG_ECTYPE.
15799         (_REG_EESCAPE): Renamed from REG_EESCAPE.
15800         (_REG_ESUBREG): Renamed from REG_ESUBREG.
15801         (_REG_EBRACK): Renamed from REG_EBRACK.
15802         (_REG_EPAREN): Renamed from REG_EPAREN.
15803         (_REG_EBRACE): Renamed from REG_EBRACE.
15804         (_REG_BADBR): Renamed from REG_BADBR.
15805         (_REG_ERANGE): Renamed from REG_ERANGE.
15806         (_REG_ESPACE): Renamed from REG_ESPACE.
15807         (_REG_BADRPT): Renamed from REG_BADRPT.
15808         (_REG_EEND): Renamed from REG_EEND.
15809         (_REG_ESIZE): Renamed from REG_ESIZE.
15810         (_REG_ERPAREN): Renamed from REG_ERPAREN.
15811         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
15812         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
15813         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
15814         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
15815
15816         (_REG_RE_NAME, _REG_RM_NAME): New macros.
15817         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
15818         changed.  But support the old name if the new one is not defined
15819         and if _REGEX_SOURCE.
15820
15821         Change the following member names in struct re_pattern_buffer.
15822         The old names are still supported if !_REGEX_SOURCE.
15823         The new names are always supported, regardless of _REGEX_SOURCE.
15824         (re_buffer): Renamed from buffer.
15825         (re_allocated): Renamed from allocated.
15826         (re_used): Renamed from used.
15827         (re_syntax): Renamed from syntax.
15828         (re_fastmap): Renamed from fastmap.
15829         (re_translate): Renamed from translate.
15830         (re_can_be_null): Renamed from can_be_null.
15831         (re_regs_allocated): Renamed from regs_allocated.
15832         (re_fastmap_accurate): Renamed from fastmap_accurate.
15833         (re_no_sub): Renamed from no_sub.
15834         (re_not_bol): Renamed from not_bol.
15835         (re_not_eol): Renamed from not_eol.
15836         (re_newline_anchor): Renamed from newline_anchor.
15837
15838         Change the following member names in struct re_registers.
15839         The old names are still supported if !_REGEX_SOURCE.
15840         The new names are always supported, regardless of _REGEX_SOURCE.
15841         (rm_num_regs): Renamed from num_regs.
15842         (rm_start): Renamed from start.
15843         (rm_end): Renamed from end.
15844
15845         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
15846         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
15847         Prepend __ to parameter names.
15848
15849         Undo yesterday's changes.
15850
15851 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
15852
15853         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
15854         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
15855         lib/regex.c.
15856
15857 2005-08-24  Jim Meyering  <jim@meyering.net>
15858
15859         Sync from coreutils.
15860         * m4/fcntl-safer.m4: New file.
15861
15862         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
15863         and object files for this module.
15864
15865 2005-08-24  Jim Meyering  <jim@meyering.net>
15866
15867         Sync from coreutils.
15868         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
15869
15870 2005-08-24  Jim Meyering  <jim@meyering.net>
15871
15872         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
15873         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
15874
15875 2005-08-24  Jim Meyering  <jim@meyering.net>
15876
15877         * modules/fcntl-safer: New module.
15878         * modules/fts (Depends-on): Add fcntl-safer.
15879         * MODULES.html.sh (File descriptor based Input/Output):
15880         Add fcntl-safer.
15881
15882 2005-08-24  Bruno Haible  <bruno@clisp.org>
15883
15884         Support for unit test modules.
15885         * modules/README: Mention tests modules.
15886         * modules/TEMPLATE-TESTS: New file.
15887         * gnulib-tool: New options --extract-tests-module, --with-tests and
15888         --tests-base (unused for the moment).
15889         (testsbase, inctests): New variables.
15890         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
15891         (func_verify_module): Exclude TEMPLATE-TESTS.
15892         (func_verify_nontests_module, func_verify_tests_module): New functions.
15893         (func_get_dependencies): Add implicit dependency for tests modules.
15894         (func_get_tests_module): New function.
15895         (func_modules_transitive_closure): When --with-tests was specified,
15896         include the unit tests as well, unless explicitly avoided.
15897         (func_emit_lib_Makefile_am): Ignore the tests modules here.
15898         (func_emit_tests_Makefile_am): New function.
15899         (func_create_testdir): When --with-tests was specified, emit a
15900         tests/ directory.
15901         * MODULES.html.sh (Future developments): Update.
15902
15903 2005-08-24  Bruno Haible  <bruno@clisp.org>
15904
15905         * modules/tls-tests: New file.
15906         * tests/test-tls.c: New file, from GNU gettext.
15907
15908 2005-08-24  Bruno Haible  <bruno@clisp.org>
15909
15910         * modules/lock-tests: New file.
15911         * tests/test-lock.c: New file, from GNU gettext.
15912
15913 2005-08-24  Bruno Haible  <bruno@clisp.org>
15914
15915         * lib/lock.h: Add multiple inclusion guard.
15916         * lib/tls.h: Add multiple inclusion guard.
15917
15918 2005-08-24  Bruno Haible  <bruno@clisp.org>
15919
15920         * gnulib-tool: Add support for the --aux-dir option to
15921         --create-testdir, --create-megatestdir, --test, --megatest.
15922         (func_create_testdir, func_create_megatestdir): Optionally emit a
15923         AC_CONFIG_AUX_DIR directive.
15924         (create-testdir, create-megatestdir, test, megatest): Provide a
15925         default value for $auxdir.
15926
15927 2005-08-24  Bruno Haible  <bruno@clisp.org>
15928
15929         * gnulib-tool (import): Use compound statement instead of subshell
15930         where possible.
15931
15932 2005-08-24  Bruno Haible  <bruno@clisp.org>
15933
15934         * gnulib-tool (import): Change --aux-dir default to "build-aux".
15935
15936 2005-08-24  Bruno Haible  <bruno@clisp.org>
15937
15938         * gnulib-tool (func_version): Update.
15939
15940 2005-08-24  Bruno Haible  <bruno@clisp.org>
15941
15942         * gnulib-tool (func_import, func_create_testdir,
15943         func_create_megatestdir): Quote all autoconf macro arguments.
15944
15945 2005-08-24  Bruno Haible  <bruno@clisp.org>
15946
15947         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
15948         option --force, because --force causes the aclocal.m4 of each
15949         subdirectory to be newer than the corresponding config.h.in.
15950
15951 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
15952
15953         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
15954         All contents moved to gl_REGEX.
15955         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
15956         assume that it does.
15957
15958 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
15959
15960         * lib/regex.h (REG_NOSYS)
15961         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
15962         Define, since POSIX requires it as of 2001.
15963         (_REG_ENOSYS)
15964         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
15965         New private symbol, used to keep the enum signed in all cases.
15966         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
15967         Youngman in
15968         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
15969
15970         * lib/regex_internal.c (re_string_skip_chars, register_state):
15971         (calc_state_hash):
15972         Remove forward decls; no longer needed now that we use prototypes.
15973         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
15974         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
15975         (clean_state_log_if_needed): Likewise.
15976
15977 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
15978
15979         * config/srclist.txt: Add glibc bugs 1231-1233.
15980
15981 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
15982
15983         Fix problems reported by Sam Steingold in
15984         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
15985         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
15986         assumed that reg_errcode_t is a signed type, which is not
15987         necessarily true if _XOPEN_SOURCE is not defined.
15988         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
15989         since some compilers warn about it otherwise.
15990
15991 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
15992
15993         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
15994         (init_word_char, create_initial_state, duplicate_node_closure):
15995         (fetch_token, peek_token_bracket, build_range_exp):
15996         (build_collating_symbol): Remove forward decls; no longer needed
15997         now that we use prototypes.
15998
15999         * lib/regcomp.c:
16000         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
16001         (re_compile_fastmap_iter, regcomp, regerror, regfree):
16002         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
16003         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
16004         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
16005         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
16006         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
16007         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
16008         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
16009         (build_range_exp, build_collating_symbol, parse_bracket_exp):
16010         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
16011         (build_charclass, build_charclass_op, fetch_number, create_tree):
16012         (create_token_tree, mark_opt_subexp, duplicate_tree):
16013         Use prototypes rather than old-style definitions.
16014
16015         * lib/regex_internal.c:
16016         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
16017         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
16018         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
16019         (re_string_reconstruct, re_string_peek_byte_case):
16020         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
16021         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
16022         (re_node_set_init_copy, re_node_set_add_intersect):
16023         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
16024         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
16025         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
16026         (re_acquire_state, re_acquire_state_context, register_state):
16027         (create_ci_newstate, create_cd_newstate, free_state):
16028         Likewise.
16029         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
16030         re_search_2):
16031         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
16032         (re_search_internal, prune_impossible_nodes):
16033         (acquire_init_state_context, check_matching, static):
16034         (check_halt_node_context, check_halt_state_context, proceed_next_node):
16035         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
16036         (update_regs, sift_states_backward, build_sifted_states):
16037         (clean_state_log_if_needed, merge_state_array):
16038         (update_cur_sifted_state, add_epsilon_src_nodes):
16039         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
16040         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
16041         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
16042         (find_recover_state, check_subexp_matching_top, transit_state_mb):
16043         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
16044         (check_arrival, check_arrival_add_next_nodes):
16045         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
16046         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
16047         (check_node_accept_bytes, check_node_accept, extend_buffers):
16048         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
16049         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
16050         (sift_ctx_init):
16051         Likewise.
16052
16053         * lib/regex_internal.h:
16054         (re_string_allocate, re_string_construct, re_string_reconstruct):
16055         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
16056         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
16057         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
16058         (re_string_context_at, re_string_peek_byte_case):
16059         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
16060         is defined, since we now use prototypes always.
16061
16062         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
16063         C89 or better.  All uses removed.
16064
16065 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
16066
16067         * config/srclist.txt: Add glibc bugs 1220-1227.
16068
16069 2005-08-20  Jim Meyering  <jim@meyering.net>
16070
16071         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
16072         of unused local, dfa.
16073
16074 2005-08-20  Bruno Haible  <bruno@clisp.org>
16075
16076         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
16077
16078 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16079
16080         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
16081         (re_node_set_insert_last, re_dfa_add_node):
16082         Rename local variables to avoid GCC shadowing warnings.
16083
16084 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16085
16086         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
16087         [defined lint]: Suppress bogus uninitialized-variable warnings.
16088
16089         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
16090         and let the caller return REG_ESPACE if out of space.  This
16091         removes an uninitialied-variable warning with GCC 4.0.1, and also
16092         avoids taking the address of a local variable.  All callers
16093         changed.
16094
16095 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16096
16097         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
16098         $LIBCSRC/posix/regexec.c.
16099         Add glibc bug 1217 for regcomp.c.
16100
16101 2005-08-19  Jim Meyering  <jim@meyering.net>
16102
16103         * lib/regexec.c (proceed_next_node): Redo local variables to
16104         avoid GCC shadowing warnings.
16105
16106 2005-08-18  Bruno Haible  <bruno@clisp.org>
16107
16108         * lib/strstr.c (strstr): Fix return value in multibyte case.
16109         * lib/strcasestr.c (strcasestr): Likewise.
16110
16111 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
16112
16113         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
16114
16115 2005-08-17  Jim Meyering  <jim@meyering.net>
16116
16117         Make the %s format (seconds since the epoch) work for a negative
16118         number and when used with a zero-padded field width, e.g. %015s.
16119
16120         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
16121         label so that it precedes the code to set `digits'.  Otherwise,
16122         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
16123         print `00-22'.  Now, it prints `-0022', as it should.
16124
16125 2005-08-17  Bruno Haible  <bruno@clisp.org>
16126
16127         * modules/strstr (Files): Add m4/mbrtowc.m4.
16128         (Depends-on): Add mbuiter.
16129
16130 2005-08-17  Bruno Haible  <bruno@clisp.org>
16131
16132         * modules/strcasestr: New file.
16133         * MODULES.html.sh (String handling, based on ANSI C 89): Add
16134         strcasestr.
16135
16136 2005-08-17  Bruno Haible  <bruno@clisp.org>
16137
16138         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
16139
16140 2005-08-17  Bruno Haible  <bruno@clisp.org>
16141
16142         * modules/mbuiter: New file.
16143         * MODULES.html.sh (Extended multibyte and wide character utilities):
16144         Add mbuiter.
16145
16146 2005-08-17  Bruno Haible  <bruno@clisp.org>
16147
16148         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
16149         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
16150
16151 2005-08-17  Bruno Haible  <bruno@clisp.org>
16152
16153         * m4/strcasestr.m4: New file.
16154
16155 2005-08-17  Bruno Haible  <bruno@clisp.org>
16156
16157         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
16158         * lib/strstr.c: Completely rewritten, with multibyte locale support.
16159
16160 2005-08-17  Bruno Haible  <bruno@clisp.org>
16161
16162         * lib/strcasestr.h: New file.
16163         * lib/strcasestr.c: New file.
16164
16165 2005-08-17  Bruno Haible  <bruno@clisp.org>
16166
16167         * lib/strcasecmp.c: Use mbuiter.h.
16168
16169 2005-08-17  Bruno Haible  <bruno@clisp.org>
16170
16171         * lib/mbuiter.h: New file.
16172
16173 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
16174
16175         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
16176         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
16177         and gl_GETOPT are both invoked via different paths (as happens
16178         with GNU tar CVS because it uses both argp and getopt), the former
16179         wins.
16180
16181 2005-08-16  Bruno Haible  <bruno@clisp.org>
16182
16183         * modules/tls: New file.
16184         * MODULES.html.sh (Multithreading): Add tls.
16185
16186 2005-08-16  Bruno Haible  <bruno@clisp.org>
16187
16188         * modules/strnlen1: New file.
16189         * MODULES.html.sh (String handling): Add strnlen1.
16190
16191 2005-08-16  Bruno Haible  <bruno@clisp.org>
16192
16193         * modules/strcase (Files): Add m4/mbrtowc.m4.
16194         (Depends-on): Add strnlen1, mbchar.
16195
16196 2005-08-16  Bruno Haible  <bruno@clisp.org>
16197
16198         * modules/mbiter: New file.
16199         * MODULES.html.sh (Extended multibyte and wide character utilities):
16200         Add mbiter.
16201
16202 2005-08-16  Bruno Haible  <bruno@clisp.org>
16203
16204         * modules/mbfile: New file.
16205         * MODULES.html.sh (Extended multibyte and wide character utilities):
16206         Add mbfile.
16207
16208 2005-08-16  Bruno Haible  <bruno@clisp.org>
16209
16210         * modules/mbchar: New file.
16211         * MODULES.html.sh (Extended multibyte and wide character utilities):
16212         New section.
16213
16214 2005-08-16  Bruno Haible  <bruno@clisp.org>
16215
16216         * m4/tls.m4: New file, from GNU gettext.
16217
16218 2005-08-16  Bruno Haible  <bruno@clisp.org>
16219
16220         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
16221         always.
16222         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
16223
16224 2005-08-16  Bruno Haible  <bruno@clisp.org>
16225
16226         * m4/mbiter.m4: New file.
16227
16228 2005-08-16  Bruno Haible  <bruno@clisp.org>
16229
16230         * m4/mbfile.m4: New file.
16231
16232 2005-08-16  Bruno Haible  <bruno@clisp.org>
16233
16234         * m4/mbchar.m4: New file.
16235
16236 2005-08-16  Bruno Haible  <bruno@clisp.org>
16237
16238         * lib/tls.h: New file, from GNU gettext.
16239         * lib/tls.c: New file, from GNU gettext.
16240
16241 2005-08-16  Bruno Haible  <bruno@clisp.org>
16242
16243         * lib/strnlen1.h: New file.
16244         * lib/strnlen1.c: New file.
16245
16246 2005-08-16  Bruno Haible  <bruno@clisp.org>
16247
16248         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
16249         (mbi_init): Update.
16250         (mbi_avail, mbi_advance): Let the iteration end before the terminating
16251         NUL byte, not after it.
16252
16253 2005-08-16  Bruno Haible  <bruno@clisp.org>
16254
16255         * lib/strcase.h (strcasecmp): Add note in comments.
16256         * lib/strncasecmp.c: Use code from strcasecmp.c.
16257         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
16258         (strcasecmp): Work correctly in multibyte locales.
16259
16260 2005-08-16  Bruno Haible  <bruno@clisp.org>
16261
16262         * lib/mbiter.h: New file.
16263
16264 2005-08-16  Bruno Haible  <bruno@clisp.org>
16265
16266         * lib/mbfile.h: New file.
16267
16268 2005-08-16  Bruno Haible  <bruno@clisp.org>
16269
16270         * lib/mbchar.h: New file.
16271         * lib/mbchar.c: New file.
16272
16273 2005-08-16  Bruno Haible  <bruno@clisp.org>
16274
16275         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
16276         the valid ones. Makes the comparison operations transitive:
16277         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
16278         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
16279
16280 2005-08-15  Simon Josefsson  <jas@extundo.com>
16281
16282         * modules/ssize_t (License): Change to 'unlimited'.
16283
16284         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
16285
16286 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
16287
16288         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
16289         Add comments for each pending glibc patch.
16290
16291 2005-08-15  Bruno Haible  <bruno@clisp.org>
16292
16293         * lib/regex.h (__restrict_arr): Don't define to __restrict if
16294         __cplusplus is defined.
16295
16296 2005-08-14  Jim Meyering  <jim@meyering.net>
16297
16298         Sync from coreutils.
16299
16300         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
16301         Use the hash-table-based cycle-detection code not just when
16302         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
16303         Reported by James Youngman in
16304         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
16305         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
16306         FTS_TIGHT_CYCLE_CHECK.
16307         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
16308         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
16309         once again.
16310         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
16311         * lib/fts.c (fd_safer): Remove decl.
16312         Include fcntl--.h rather than unistd-safer.h
16313         (fts_safe_changedir): Don't call fd_safer; no longer needed
16314         now that we include fcntl--.h.
16315
16316 2005-08-12  Simon Josefsson  <jas@extundo.com>
16317
16318         * modules/getndelim2: Use ssize_t module.
16319         * modules/getnline: Likewise.
16320         * modules/safe-read: Likewise.
16321         * modules/xreadlink: Likewise.
16322
16323         * modules/ssize_t: New file.
16324
16325 2005-08-12  Simon Josefsson  <jas@extundo.com>
16326
16327         * m4/readline.m4: Look for termcap, curses or ncurses if required.
16328
16329 2005-08-12  Simon Josefsson  <jas@extundo.com>
16330
16331         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16332         ssize_t.
16333
16334 2005-08-12  Simon Josefsson  <jas@extundo.com>
16335
16336         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
16337         readline, getdelim and check_version.
16338         (Support for systems lacking ISO C 99: Sizes of integer types):
16339         Add size_max.
16340
16341 2005-08-12  Bruno Haible  <bruno@clisp.org>
16342
16343         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
16344
16345 2005-08-11  Simon Josefsson  <jas@extundo.com>
16346
16347         * modules/readline: New file.
16348
16349         * modules/strnlen (Files): Add strnlen.h.
16350
16351 2005-08-11  Simon Josefsson  <jas@extundo.com>
16352
16353         * m4/readline.m4: New file.
16354
16355 2005-08-11  Simon Josefsson  <jas@extundo.com>
16356
16357         * lib/readline.h, readline.c: New file.
16358
16359 2005-08-11  Simon Josefsson  <jas@extundo.com>
16360
16361         * doc/gnulib.texi (Initial import, Finishing touches): Mention
16362         gl_AVOID.
16363
16364 2005-08-11  Bruno Haible  <bruno@clisp.org>
16365
16366         * lib/strnlen.h (strnlen): Change parameter name to match comment.
16367
16368 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
16369
16370         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
16371
16372 2005-08-10  Simon Josefsson  <jas@extundo.com>
16373
16374         * tests/test-iconvme.c: New file.
16375
16376 2005-08-10  Simon Josefsson  <jas@extundo.com>
16377
16378         * m4/strnlen.m4: New file.
16379
16380         * m4/strndup.m4: Don't check for strnlen declaration, done in
16381         strnlen.m4.
16382
16383 2005-08-10  Simon Josefsson  <jas@extundo.com>
16384
16385         * lib/strndup.c: Use strnlen.h.
16386
16387         * lib/strnlen.h: New file.
16388
16389 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
16390
16391         * README: Typos.
16392
16393 2005-08-02  Simon Josefsson  <jas@extundo.com>
16394
16395         * modules/readline: New file.
16396
16397 2005-08-02  Simon Josefsson  <jas@extundo.com>
16398
16399         * modules/getdelim: New file.
16400
16401         * modules/getline: Rewrite, don't use getndelim2.
16402
16403 2005-08-02  Simon Josefsson  <jas@extundo.com>
16404
16405         * m4/getline.m4: Separate out getdelim stuff into separate module.
16406
16407         * m4/getdelim.m4: New file.
16408
16409 2005-08-02  Simon Josefsson  <jas@extundo.com>
16410
16411         * lib/getline.h, getline.c: Rewrite.
16412
16413         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
16414
16415 2005-07-31  Bruno Haible  <bruno@clisp.org>
16416
16417         * lib/lock.h (gl_lock_initializer): New macro.
16418         (gl_lock_define_initialized): Use it.
16419         (gl_rwlock_initializer): New macro.
16420         (gl_rwlock_define_initialized): Use it.
16421         (gl_recursive_lock_initializer): New macro.
16422         (gl_recursive_lock_define_initialized): Use it.
16423
16424 2005-07-30  Karl Berry  <karl@gnu.org>
16425
16426         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
16427         Report from Ben Pfaff, regarding getopt.
16428
16429 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
16430
16431         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
16432         normal way.
16433         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
16434         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
16435         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
16436         (gl_GETOPT): Use the new macros.  Most of the implementation
16437         is moved to the new macros.  This is for programs like Emacs
16438         that don't want all the functionality of gl_GETOPT.
16439
16440 2005-07-26  Bruno Haible  <bruno@clisp.org>
16441
16442         * m4/lock.m4: Update from GNU gettext.
16443
16444 2005-07-26  Bruno Haible  <bruno@clisp.org>
16445
16446         * lib/lock.h: Update from GNU gettext.
16447         * lib/lock.c: Update from GNU gettext.
16448
16449 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
16450
16451         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
16452         obsolescent AC_TRY_RUN.  Include the default includes files, for
16453         'exit'.
16454
16455 2005-07-24  Bruno Haible  <bruno@clisp.org>
16456
16457         * modules/visibility: New file.
16458         * MODULES.html.sh (Misc): Add visibility.
16459
16460 2005-07-24  Bruno Haible  <bruno@clisp.org>
16461
16462         * m4/visibility.m4: New file.
16463
16464 2005-07-24  Bruno Haible  <bruno@clisp.org>
16465
16466         * doc/visibility.texi: New file.
16467
16468 2005-07-22  Bruno Haible  <bruno@clisp.org>
16469
16470         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
16471         $(ALLOCA_H), redundant through BUILT_SOURCES.
16472         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
16473         redundant through BUILT_SOURCES.
16474         * modules/byteswap (Makefile.am): Remove explicit dependency on
16475         $(BYTESWAP_H), redundant through BUILT_SOURCES.
16476         * modules/fnmatch (Makefile.am): Remove explicit dependency on
16477         $(FNMATCH_H), redundant through BUILT_SOURCES.
16478         * modules/getopt (Makefile.am): Remove explicit dependency on
16479         $(GETOPT_H), redundant through BUILT_SOURCES.
16480         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
16481         redundant through BUILT_SOURCES.
16482         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
16483         redundant through BUILT_SOURCES.
16484         * modules/stdbool (Makefile.am): Remove explicit dependency on
16485         $(STDBOOL_H), redundant through BUILT_SOURCES.
16486         * modules/stdint (Makefile.am): Remove explicit dependency on
16487         $(STDINT_H), redundant through BUILT_SOURCES.
16488         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
16489         Remove explicit dependency on $(SYSEXITS_H).
16490         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
16491
16492 2005-07-18  Simon Josefsson  <jas@extundo.com>
16493
16494         * lib/check-version.c (check_version): Accept identical versions too.
16495
16496 2005-07-18  Bruno Haible  <bruno@clisp.org>
16497
16498         * modules/lock: New file.
16499         * MODULES.html.sh (Multithreading): New section.
16500
16501 2005-07-18  Bruno Haible  <bruno@clisp.org>
16502
16503         * m4/lock.m4: New file, from GNU gettext.
16504
16505 2005-07-18  Bruno Haible  <bruno@clisp.org>
16506
16507         * lib/lock.h: New file, from GNU gettext.
16508         * lib/lock.c: New file, from GNU gettext.
16509
16510 2005-07-18  Bruno Haible  <bruno@clisp.org>
16511
16512         * lib/lock.h (gl_once_t): New type.
16513         (gl_once_define, gl_once): New macros.
16514         * lib/lock.c (fresh_once): New variable.
16515         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
16516         functions.
16517
16518 2005-07-16  Simon Josefsson  <jas@extundo.com>
16519
16520         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
16521         workaround, suggested by Bruno.
16522
16523 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
16524
16525         * modules/xalloc (Depends-on): Add xalloc-die.
16526         * modules/xvasprintf (Depends-on): Add xalloc-die.
16527
16528 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
16529
16530         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
16531         with a minor change.
16532
16533 2005-07-15  Bruno Haible  <bruno@clisp.org>
16534
16535         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
16536         When using lib/poll.c, define poll as rpl_poll.
16537
16538 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
16539
16540         * modules/argp (Depends-on): Remove unlocked-io.
16541
16542 2005-07-14  Derek Price  <derek@ximbiot.com>
16543
16544         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
16545         for glob symlink bug.
16546
16547 2005-07-14  Bruno Haible  <bruno@clisp.org>
16548
16549         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
16550         Instead, test for *_unlocked function declarations directly.
16551
16552 2005-07-11  Simon Josefsson  <jas@extundo.com>
16553
16554         * modules/size_max: New file.
16555
16556         * modules/xsize: Depend on size_max module for size_max.m4.
16557
16558 2005-07-11  Simon Josefsson  <jas@extundo.com>
16559
16560         * lib/size_max.h: New file.
16561
16562 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
16563
16564         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
16565         copyright symbol and the year.
16566         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
16567         (version_etc_va): Use parameterized copyright notice.
16568         Reword to conform to the current GNU coding standards.
16569
16570 2005-07-11  Karl Berry  <karl@gnu.org>
16571
16572         * doc/gnulib.texi (Quoting): new node.
16573         (Initial import): more info, from Patrice.
16574
16575 2005-07-11  Bruno Haible  <bruno@clisp.org>
16576
16577         * gnulib-tool (func_usage): Document option --avoid.
16578         (Command line options): Handle --avoid.
16579         (func_acceptable): New function.
16580         (func_modules_transitive_closure): Use it.
16581
16582 2005-07-11  Bruno Haible  <bruno@clisp.org>
16583
16584         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
16585         Reported by Jim Meyering.
16586
16587 2005-07-10  Bruno Haible  <bruno@clisp.org>
16588
16589         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
16590         Needed when size_t is smaller than 'unsigned int'.
16591         Reported by Paul Eggert.
16592
16593 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16594
16595         * modules/argp (Depends-on): Add unlocked-io
16596
16597 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16598
16599         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
16600         block of defines.
16601
16602 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
16603
16604         * config/srclist.txt: Comment out regcomp.c, since we have a porting
16605         fix now.
16606
16607 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
16608         and Paul Eggert  <eggert@cs.ucla.edu>
16609
16610         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
16611         in wint_t, not wchar_t.  Remove now-unnecessary cast.
16612
16613 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16614
16615         * modules/regex (Files): Add lib/regex_internal.c,
16616         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
16617         (Depends-on): Add extensions.
16618         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
16619
16620 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16621
16622         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
16623         pathconf.
16624         * m4/same.m4 (gl_SAME): Likewise.
16625         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
16626
16627         * m4/regex.m4: Adjust to new libc regex implementation.
16628         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
16629         all the .c and .h parts of (the new) regex.
16630         Quote the m4 stuff better.
16631         Check for RE_ICASE bug of old gnulib.
16632         Check for REG_STARTEND of recent libc.
16633         Rename local variables from jm_* to gl_*.
16634         Quote operand of "test -f".
16635         Say "recent enough" version of libc, not "version 2".
16636         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
16637         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
16638         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
16639         Remove check for btowc, isascii.
16640         Require AM_LANGINFO_CODESET.
16641
16642 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16643
16644         * lib/regex.c, regex.h: Sync from libc.
16645         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
16646         * lib/regexec.c:
16647         New files, synced from libc, except that regex_internal.h
16648         currently has a small porting fix.
16649
16650 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16651
16652         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
16653         regex_internal.c, regexec.c.
16654         Add regex_internal.h too, but as a comment, since the libc version
16655         is currently broken in gnulib mode.
16656
16657 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
16658
16659         Support programs like Emacs that use gnulib but not gettext.
16660         * MODULES.html.sh (Internationalization functions): Add gettext-h.
16661         * modules/gettext-h: New file.
16662         * modules/gettext (Files): Remove lib/gettext.h.
16663         (Depends-on): Add gettext-h.
16664         (Makefile.am): Remove lib_SOURCES.
16665         * modules/argmatch, modules/c-stack, modules/closeout:
16666         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
16667         * modules/execute, modules/file-type, modules/getaddrinfo:
16668         * modules/getopt, modules/human, modules/javacomp:
16669         * modules/javaexec, modules/mkdir-p, modules/obstack:
16670         * modules/openat, modules/pagealign_alloc, modules/pipe:
16671         * modules/quotearg, modules/regex, modules/rpmatch:
16672         * modules/unicodeio, modules/userspec, modules/version-etc:
16673         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
16674         * modules/xsetenv:
16675         Depend on gettext-h, not gettext.
16676
16677 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
16678
16679         * gnulib-tool (func_import): Add support for 'public domain' license.
16680         * modules/alloca, modules/atexit, modules/memmove:
16681         Now public domain, not GPL.
16682         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
16683         * modules/realloc, modules/strerror, modules/strtod:
16684         Now LGPL, not GPL.
16685
16686 2005-07-05  Bruno Haible  <bruno@clisp.org>
16687
16688         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
16689         autoconf CVS. Needed for mingw.
16690
16691 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
16692
16693         Remove the dependency of the strftime module on the tzset module.
16694         * modules/strftime (Depends-on): Remove dependency on tzset.
16695
16696 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
16697
16698         Remove the dependency of the strftime module on the tzset module.
16699         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
16700         gl_FUNC_TZSET_CLOBBER.
16701
16702 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
16703
16704         Remove the dependency of the strftime module on the tzset module.
16705         * lib/strftime.c (my_strftime)
16706         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
16707         Copy the input structure, to work around some of the bug with
16708         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
16709         Solaris releases, you should also use the tzset module, but we won't
16710         require it as a dependency any more since we don't want LGPLed code
16711         to depend on GPLed code.
16712
16713 2005-07-02  Jim Meyering  <jim@meyering.net>
16714
16715         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
16716         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
16717         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
16718         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
16719
16720 2005-07-02  Jim Meyering  <jim@meyering.net>
16721
16722         * lib/backupfile.c (backup_args): Change a `0' to NULL.
16723
16724 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
16725
16726         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
16727         declares only 'struct timespec;' (!).
16728
16729 2005-07-01  Jim Meyering  <jim@meyering.net>
16730
16731         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
16732         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
16733         * lib/save-cwd.c, tempname.c:
16734         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
16735         and don't include <sys/file.h>).
16736
16737 2005-06-29  Jim Meyering  <jim@meyering.net>
16738
16739         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
16740         type name.  Use the variable name instead.
16741         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
16742         Likewise.
16743
16744 2005-06-28  Simon Josefsson  <jas@extundo.com>
16745
16746         * modules/check-version (Files): Add check-version.m4.
16747
16748 2005-06-28  Simon Josefsson  <jas@extundo.com>
16749
16750         * m4/check-version.m4: New file, suggested by Jim Meyering
16751         <jim@meyering.net>.
16752
16753 2005-06-28  Simon Josefsson  <jas@extundo.com>
16754
16755         * lib/check-version.h, lib/check-version.c: New files.
16756
16757 2005-06-28  Simon Josefsson  <jas@extundo.com>
16758
16759         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
16760         collision with global variable.  Better indentation.  Don't
16761         increment buffer pointer beyond buffer end.  Based on comments
16762         from Paul Eggert <eggert@cs.ucla.edu>.
16763
16764         * lib/base64.h: Indent.
16765
16766 2005-06-28  Simon Josefsson  <jas@extundo.com>
16767
16768         * doc/gnulib.texi (Library version handling): New section.
16769
16770 2005-06-28  Jim Meyering  <jim@meyering.net>
16771
16772         * check-module (find_included_lib_files): Hard-code another
16773         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
16774         but modules/fts-lgpl (correctly) does not list those files.
16775
16776         * modules/canonicalize (Files): Add lib/pathmax.h.
16777
16778 2005-06-25  Simon Josefsson  <jas@extundo.com>
16779
16780         * modules/check-version: New file.
16781
16782 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
16783
16784         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
16785         initializer of struct addrinfo, as an indication that we don't
16786         care how many members the structure has.
16787
16788 2005-06-24  Derek Price  <derek@ximbiot.com>
16789         and Bruno Haible  <bruno@clisp.org>
16790
16791         Remove stat module & update lstat.
16792         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
16793         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
16794         * m4/stat.m4: Remove this file.
16795
16796 2005-06-24  Derek Price  <derek@ximbiot.com>
16797         and Bruno Haible  <bruno@clisp.org>
16798
16799         Remove stat module & update lstat.
16800         * lib/stat.c: Remove this file...
16801         (slash_aware_lstat): ...moving this content and its support...
16802         * lib/lstat.c (rpl_lstat): ...into here.
16803         * lib/lstat.h: New file.
16804
16805 2005-06-24  Derek Price  <derek@ximbiot.com>
16806         and Bruno Haible  <bruno@clisp.org>
16807
16808         Remove stat module & update lstat.
16809         * config/srclist.txt (libc sources): Remove stat.
16810
16811 2005-06-24  Derek Price  <derek@ximbiot.com>
16812         and Bruno Haible  <bruno@clisp.org>
16813
16814         Remove stat module & update lstat.
16815         * MODULES.html.sh (stat): Remove.
16816         * MODULES.html: Regenerated.
16817         * modules/lstat (Description): Correct function name.
16818         (Files): Add "lstat.h".
16819         (Depends-on): Remove stat, add xalloc, stat-macros.
16820         * modules/stat: Remove this file.
16821         (Include): Add "lstat.h", remove <sys/stat.h>.
16822
16823 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
16824
16825         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
16826         (ranged_convert): Don't save conversion in a temporary struct.
16827         This causes a warning with GCC 4.0.0, and anyway in the typical
16828         case it's not worth the extra 100 bytes or so of code.
16829         (ranged_convert, __mktime_internal): When calling a function via a
16830         pointer P, use P () rather than (*P) (), as we now assume C89 or
16831         better.
16832
16833 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16834
16835         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
16836         "who -r" failed to give output.  Problem reported by Tim Waugh.
16837
16838         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
16839         (xcalloc): Use it to avoid needless tests.
16840         Problem reported by Jim Meyering.
16841
16842 2005-06-20  Derek Price  <derek@ximbiot.com>
16843
16844         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
16845         unnecessary for Autoconfs > 2.59c.
16846
16847 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16848
16849         * lib/argp.h (__option_is_short): Check upper limit of
16850         __key. Isprint() requires its argument to have the value
16851         of an unsigned char or EOF.
16852
16853 2005-06-16  Jim Meyering  <jim@meyering.net>
16854
16855         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
16856         when either N or S is zero.
16857
16858 2005-06-16  Derek Price  <derek@ximbiot.com>
16859
16860         * m4/bison.m4: Declare YACC & YFLAGS precious.
16861
16862 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
16863
16864         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
16865         multibyte string or pattern, fall back on unibyte matching.
16866         Problem reported by James Youngman.
16867
16868 2005-06-08  Bruno Haible  <bruno@clisp.org>
16869
16870         * modules/csharpcomp: New file.
16871         * MODULES.html.sh (C#): Add csharpcomp.
16872
16873 2005-06-08  Bruno Haible  <bruno@clisp.org>
16874
16875         * m4/csharpcomp.m4: New file, from GNU gettext.
16876
16877 2005-06-08  Bruno Haible  <bruno@clisp.org>
16878
16879         * lib/csharpcomp.h: New file, from GNU gettext.
16880         * lib/csharpcomp.c: New file, from GNU gettext.
16881         * lib/csharpcomp.sh.in: New file, from GNU gettext.
16882
16883 2005-06-08  Bruno Haible  <bruno@clisp.org>
16884
16885         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
16886         warning on mingw.
16887
16888 2005-06-07  Derek Price  <derek@ximbiot.com>
16889
16890         Sync from CVS.
16891         * lib/glob_.h: Indent nested #ifdef.
16892
16893 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
16894
16895         Sync from coreutils.
16896         Use "file name" when talking about file names, instead of "filename"
16897         or "path", as per the GNU coding standards.
16898         * lib/mkdir-p.c: Renamed from makepath.c.
16899         (make_dir_parents): Renamed from make_path.  All callers changed.
16900         * lib/mkdir-p.h: Likewise.  All includers changed.
16901         * lib/filenamecat.c: Renamed from path-concat.c.
16902         (file_name_concat): Renamed from path_concat.  All callers changed.
16903         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
16904         * lib/filenamecat.h: Likewise.  All includers changed.
16905         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
16906         in comments or local variable names.
16907         * lib/basename.c: Likewise.
16908         * lib/canonicalize.c, canonicalize.h: Likewise.
16909         * lib/dirname.c, dirname.h: Likewise.
16910         * lib/euidaccess.c: Likewise.
16911         * lib/exclude.c: Likewise
16912         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
16913         * lib/fsusage.c, fsuage.h: Likewise.
16914         * lib/fts.c, fts_.h: Likewise.
16915         * lib/getcwd.c: Likewise.
16916         * lib/getloadavg.c: Likewise.
16917         * lib/mkstemp.c: Likewise.
16918         * lib/mountlist.c, mountlist.h: Likewise.
16919         * lib/openat.c, openat.h: Likewise.
16920         * lib/readlink-stub.c: Likewise.
16921         * lib/readutmp.c, readutmp.h: Likewise.
16922         * lib/rename.c: Likewise.
16923         * lib/rmdir.c: Likewise.
16924         * lib/same.c: Likewise.
16925         * lib/savedir.c: Likewise.
16926         * lib/stripslash.c: Likewise.
16927         * lib/tempname.c: Likewise.
16928         * lib/xreadlink.c: Likewise.
16929         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
16930         All uses changed.
16931         * lib/exclude.h: Likewise.
16932
16933         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
16934         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
16935         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
16936         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
16937         * lib/pathmax.h: Include <limits.h> unconditionally, since other
16938         files have been getting away with it for years (MORE/BSD 4.3
16939         is extinct now).
16940         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
16941         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
16942
16943         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
16944         Define to 256, not 255, as per modern POSIX.
16945
16946 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
16947
16948         Sync from coreutils.
16949         Use "file name" when talking about file names, instead of "filename"
16950         or "path", as per the GNU coding standards.
16951         * MODULES.html.sh: mkdir-p renamed from makepath.
16952         filenamecat renamed from path-concat.
16953         * modules/filenamecat: Renamed from modules/path-concat.
16954         (Files): filenamecat.h and filenamecat.c renamed from
16955         path-concat.h and path-concat.c.
16956         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
16957         (Include): filenamecat.h, not path-concat.h.
16958         * modules/mkdir-p: Renamed from modules/makepath.
16959         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
16960         makepath.c.
16961         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
16962         (Include): mkdir-p.h, not makepath.h.
16963
16964 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
16965
16966         Sync from coreutils.
16967         * m4/mkdir-p.m4: Renamed from makepath.m4.
16968         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
16969         Rename files from makepath.c to mkdir-p.c, and from
16970         makepath.h to mkdir-p.h.
16971         * m4/filenamecat.m4: Renamed from path-concat.m4.
16972         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
16973         Rename files from path-concat.c to filenamecat.c,
16974         and from path-concat.h to filenamecat.h.
16975         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
16976         "file name" in local variables or comments.
16977         * m4/rename.m4: Likewise.
16978
16979 2005-06-01  Bruno Haible  <bruno@clisp.org>
16980
16981         * modules/csharpexec: New file.
16982         * MODULES.html.sh (C#): New section.
16983
16984 2005-06-01  Bruno Haible  <bruno@clisp.org>
16985
16986         * m4/csharp.m4: New file, from GNU gettext.
16987         * m4/csharpexec.m4: New file, from GNU gettext.
16988
16989 2005-06-01  Bruno Haible  <bruno@clisp.org>
16990
16991         * lib/csharpexec.h: New file, from GNU gettext.
16992         * lib/csharpexec.c: New file, from GNU gettext.
16993         * lib/csharpexec.sh.in: New file, from GNU gettext.
16994
16995 2005-05-31  Derek Price  <derek@ximbiot.com>
16996             Paul Eggert  <eggert@cs.ucla.edu>
16997
16998         Sync from cvs.
16999         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
17000
17001 2005-05-31  Derek Price  <derek@ximbiot.com>
17002             Paul Eggert  <eggert@cs.ucla.edu>
17003
17004         Sync from cvs.
17005         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
17006
17007 2005-05-29  Derek Price  <derek@ximbiot.com>
17008
17009         * config/srclist.txt (glob_.h, glob.c): Add these files.
17010
17011 2005-05-29  Derek Price  <derek@ximbiot.com>
17012
17013         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
17014         * modules/glob: New file.
17015         * modules/getlogin_r: Add link to POSIX spec in description.
17016
17017 2005-05-29  Derek Price  <derek@ximbiot.com>
17018             Paul Eggert  <eggert@cs.ucla.edu>
17019
17020         * m4/glob.m4: New file.
17021
17022 2005-05-29  Derek Price  <derek@ximbiot.com>
17023             Paul Eggert  <eggert@cs.ucla.edu>
17024
17025         * lib/glob_.h, lib/glob.c: New files.
17026
17027 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
17028
17029         * modules/fts (Files): Remove m4/inttypes-pri.m4.
17030         * modules/fts-lgpl (Depends-on): Remove gettext.
17031
17032 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
17033
17034         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
17035         and don't require gt_INTTYPES_PRI.
17036
17037 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
17038
17039         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
17040
17041         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
17042         the configuration hassle isn't worth it.
17043         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
17044         (LONGEST_MODIFIER, PRIuMAX): Remove.
17045
17046 2005-05-27  Bruno Haible  <bruno@clisp.org>
17047
17048         * lib/getlogin_r.h: Remove second include of <stddef.h>.
17049
17050 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
17051
17052         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
17053         _POSIX_PTHREAD_SEMANTICS for Solaris.
17054
17055 2005-05-25  Derek Price  <derek@ximbiot.com>
17056
17057         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
17058
17059 2005-05-25  Derek Price  <derek@ximbiot.com>
17060             Paul Eggert  <eggert@cs.ucla.edu>
17061
17062         * modules/getlogin_r, m4/getlogin_r.m4: New files.
17063         * lib/getlogin_r.c, getlogin_r.h: New files.
17064
17065 2005-05-25  Bruno Haible  <bruno@clisp.org>
17066             Derek Price  <derek@ximbiot.com>
17067
17068         * lib/getlogin_r.h: Simplify API documentation.
17069
17070 2005-05-23  Derek Price  <derek@ximbiot.com>
17071
17072         * modules/minmax (Files): Add m4/minmax.m4.
17073         (configure.ac): Add gl_MINMAX.
17074
17075 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
17076
17077         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
17078         so that unistd-safer.h (GPL'ed code) need not be included.
17079
17080 2005-05-22  Bruno Haible  <bruno@clisp.org>
17081
17082         * m4/minmax.m4: New file.
17083         Based on a patch by Derek Price <derek@ximbiot.com>.
17084
17085 2005-05-22  Bruno Haible  <bruno@clisp.org>
17086
17087         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
17088         (INT64_MIN): Fix definition.
17089         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
17090
17091         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
17092         NEED_SIGNED_INT_TYPES.
17093
17094         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
17095         HAVE_SYSTEM_INTTYPES.
17096
17097 2005-05-22  Bruno Haible  <bruno@clisp.org>
17098
17099         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
17100         Also include <sys/param.h> if it defines MIN, MAX.
17101         Based on a patch by Derek Price <derek@ximbiot.com>.
17102
17103 2005-05-21  Jim Meyering  <jim@meyering.net>
17104
17105         * modules/fts (Files): Add m4/inttypes-pri.m4.
17106         (Depends-on): Add lstat and remove gettext.  Alphabetize.
17107
17108 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17109
17110         New fts module.
17111         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
17112         (setup_dir, free_dir): New functions.
17113         (enter_dir, leave_dir): Define trivial
17114         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
17115         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
17116         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
17117         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
17118         Move to fts-cycle.c.
17119         (fts_open): Use setup_dir.
17120         (fts_close): Use free_dir.
17121         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
17122         This adds a label and some gotos, but the alternatives were messier.
17123         Check for memory allocation failure when entering a dir.
17124         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
17125         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
17126         (FTS): New member fts_cycle, that is a union that contains the
17127         old active_dir_ht and cycle_state.  All uses changed to mention
17128         fts_cycle.ht and fts_cycle.state.
17129         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
17130         fts.c, with the following changes:
17131         (setup_dir, free_dir): New functions.
17132         (enter_dir): Now returns bool.  Return true if successful, false
17133         if memory exhausted.  All callers changed.
17134         Do not bother partly cleaning up on
17135         memory allocation failure; that is free_dir's job.
17136         However, free ad if hash_insert fails, to avoid memory leak.
17137         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
17138         fts->fts_options to see which union member to use.
17139
17140 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17141
17142         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
17143         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
17144
17145 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17146
17147         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
17148
17149 2005-05-20  Jim Meyering  <jim@meyering.net>
17150
17151         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
17152         Now a macro, to pacify GCC.
17153
17154 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
17155
17156         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
17157         of -1.
17158
17159 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
17160
17161         * lib/chown.c (rpl_chown): Return -1 on failure.
17162
17163 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
17164
17165         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
17166         Don't check for stddef.h.
17167         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
17168         don't use its results.
17169         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
17170         since we include them unconditionally.  Don't require
17171         AM_STDBOOL_H, since stdbool is a prerequisite.
17172         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
17173         since we assume C89 or better.
17174         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
17175         as we don't use their results.
17176         Don't check for fchdir, memmove, memset, strrchr, as we use
17177         them unconditionally.
17178         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
17179         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
17180
17181 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
17182
17183         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
17184         Include <stddef.h> unconditionally, since we assume C89 now.
17185         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
17186         * lib/fts.c: Include fts_.h first, to check interface.
17187         Do not include intprops.h; no longer needed.
17188         Include cycle-check.h and hash.h, since fts_.h no longer does.
17189         Remove unnecessary casts of closedir to void.
17190         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
17191         decide whether to decrement nlinks.
17192         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
17193         (FTS): Use struct hash_table * instead of Hash_table, so that
17194         we no longer need to include hash.h here.
17195
17196 2005-05-18  Jim Meyering  <jim@meyering.net>
17197
17198         * modules/dirfd (License): Change to LGPL.  Most of the code
17199         is already in the public domain.
17200
17201 2005-05-18  Jim Meyering  <jim@meyering.net>
17202
17203         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
17204         Reported by Yoann Vandoorselaere.
17205
17206 2005-05-17  Jim Meyering  <jim@meyering.net>
17207
17208         * m4/fts.m4: New file, from coreutils.
17209
17210 2005-05-17  Jim Meyering  <jim@meyering.net>
17211
17212         * lib/fts.c, lib/fts_.h: New files, from coreutils.
17213
17214 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
17215
17216         Sync from coreutils.
17217         * m4/unlinkdir.m4: New file.
17218
17219 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
17220
17221         Sync from coreutils.
17222         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
17223         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
17224         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
17225         White space changes only.
17226         * lib/makepath.c (make_path): Port to hosts where leading "//" is
17227         special.
17228         * lib/yesno.c: Include getline.h, not ctype.h.
17229         (yesno): Don't remove leading white space; POSIX doesn't allow it.
17230         Use getline to remove arbitrary restriction on response length.
17231
17232 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
17233
17234         * config/srclist-update: Spell out "Street" in FSF postal
17235         mail address; this is the style the FSF seems to prefer.
17236
17237         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
17238         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
17239         this updates FSF postal mail address.
17240
17241         Sync from coreutils.
17242         * modules/unlinkdir: New file.
17243         * modules/yesno (Depends-on): Add getline.
17244         * MODULES.html.sh (File system functions): Add unlinkdir.
17245
17246 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17247
17248         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
17249         lib/strsep.h:
17250         Change the initial comment to refer to GPL, not LGPL.
17251         gnulib-tool will change it to LGPL as needed.
17252
17253         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
17254         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
17255         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
17256         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
17257         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
17258         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
17259         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
17260         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
17261         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
17262         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
17263         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
17264         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
17265         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
17266         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
17267         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
17268         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
17269         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
17270         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
17271         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
17272         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
17273         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
17274         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
17275         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
17276         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
17277         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
17278         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
17279         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
17280         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
17281         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
17282         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
17283         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
17284         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
17285         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
17286         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
17287         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
17288         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
17289         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
17290         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
17291         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
17292         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
17293         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
17294         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
17295         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
17296         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
17297         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
17298         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
17299         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
17300         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
17301         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
17302         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
17303         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
17304         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
17305         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
17306         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
17307         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
17308         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
17309         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
17310         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
17311         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
17312         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
17313         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
17314         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
17315         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
17316         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
17317         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
17318         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
17319         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
17320         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
17321         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
17322         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
17323         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
17324         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
17325         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
17326         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
17327         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
17328         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
17329         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
17330         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
17331         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
17332         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
17333         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
17334         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
17335         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
17336         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
17337         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
17338         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
17339         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
17340         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
17341         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
17342         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
17343         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
17344         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
17345         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
17346         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
17347         lib/yesno.c, lib/yesno.h:
17348         Update FSF postal mail address.
17349
17350 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17351
17352         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
17353         tests/test-memmem.c, tests/test-stpncpy.c:
17354         Update FSF postal mail address.
17355
17356 2005-05-13  Bruno Haible  <bruno@clisp.org>
17357
17358         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
17359         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
17360         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
17361         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
17362         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
17363         Add support for 64-bit integers in the MSVC compiler.
17364
17365 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17366
17367         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
17368
17369 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
17370
17371         * gnulib-tool (func_import): Sort and uniquify recommended includes.
17372
17373 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
17374
17375         * doc/getdate.texi (General date syntax): Don't say that date
17376         date --iso-8601=ns generates acceptable dates; it doesn't yet.
17377         Problem reported by Nic Ferrier.
17378
17379 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
17380
17381         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
17382         specified in ai_socktype. Fix invalid ai_protocol
17383         check. ai_protocol is usually set to 0 or depending on
17384         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
17385         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
17386         ai_socktype / ai_protocol in the returned addrinfo structure.
17387
17388 2005-05-10  Simon Josefsson  <jas@extundo.com>
17389
17390         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
17391         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
17392
17393 2005-05-10  Karl Berry  <karl@gnu.org>
17394
17395         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
17396         (from http://www.gnu.org/licenses).
17397         * doc/COPYING.LIB: also rename to COPYING.LESSER.
17398         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
17399         fdl.texi suffices.
17400
17401 2005-05-10  Karl Berry  <karl@gnu.org>
17402
17403         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
17404         (COPYING.DOC): remove.
17405
17406         * config/srclist-update: new FSF address.
17407
17408 2005-05-10  Derek Price  <derek@ximbiot.com>
17409
17410         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
17411         possible.
17412
17413 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
17414             Bruno Haible  <bruno@clisp.org>
17415
17416         * modules/inet_ntop: New file.
17417         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17418         inet_ntop.
17419
17420 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
17421             Bruno Haible  <bruno@clisp.org>
17422
17423         * m4/inet_ntop.m4: New file.
17424
17425 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
17426             Bruno Haible  <bruno@clisp.org>
17427
17428         * lib/inet_ntop.h: New file.
17429         * lib/inet_ntop.c: New file, from glibc with modifications.
17430
17431 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
17432
17433         * modules/time_r (License): Change to LGPL.
17434         * modules/extensions (License): Change to LGPL.  Actually,
17435         the license is more permissive than that, but currently gnulib-tool
17436         doesn't know how to handle more-permissive licenses.
17437
17438         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
17439         Problem reported by Dave Love.
17440
17441 2005-05-08  Jim Meyering  <jim@meyering.net>
17442
17443         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
17444         blank.
17445
17446 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
17447
17448         * modules/argmatch (Depends-on): Add stdbool.
17449         * modules/backupfile (Depends-on): Likewise.
17450         * modules/chdir-long (Depends-on): Likewise.
17451         * modules/closeout (Depends-on): Likewise.
17452         * modules/cycle-check (Depends-on): Likewise.
17453         * modules/dirname (Depends-on): Likewise.
17454         * modules/fnmatch (Depends-on): Likewise.
17455         * modules/fsusage (Depends-on): Likewise.
17456         * modules/fwriteerror (Depends-on): Likewise.
17457         * modules/getcwd (Depends-on): Likewise.
17458         * modules/getloadavg (Depends-on): Likewise.
17459         * modules/hard-locale (Depends-on): Likewise.
17460         * modules/makepath (Depends-on): Likewise.
17461         * modules/mountlist (Depends-on): Likewise.
17462         * modules/nanosleep (Depends-on): Likewise.
17463         * modules/posixtm (Depends-on): Likewise.
17464         * modules/quotearg (Depends-on): Likewise.
17465         * modules/readtokens (Depends-on): Likewise.
17466         * modules/readtokens0 (Depends-on): Likewise.
17467         * modules/readutmp (Depends-on): Likewise.
17468         * modules/save-cwd (Depends-on): Likewise.
17469         * modules/strftime (Depends-on): Likewise.
17470         * modules/userspec (Depends-on): Likewise.
17471         * modules/utimecmp (Depends-on): Likewise.
17472         * modules/xgetcwd (Depends-on): Likewise.
17473         * modules/xnanosleep (Depends-on): Likewise.
17474         * modules/xstrtod (Depends-on): Likewise.
17475         * modules/yesno (Depends-on): Likewise.
17476
17477 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
17478
17479         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
17480         needless checks.
17481
17482 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17483
17484         Merge from coreutils.  Among other things,
17485         add bulletproofing for cases where stdin, stdout, or stderr are closed.
17486         * lib/fd-safer.c: New file.
17487         * lib/fcntl-safer.h, open-safer.c: Remove.
17488         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
17489         * lib/dup-safer.c: Include unistd-safer.h first.
17490         Don't include errno.h.
17491         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
17492         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
17493         * lib/file-type.c: Rely on file-type.h change.
17494         * lib/getloadavg.c: Include unistd-safer.h.
17495         (getloadavg): Use safer open.
17496         * lib/getusershell.c: Include "stdio-safer.h".
17497         (getusershell): Use safer fopen.
17498         * lib/long-options.c (long_options): Use NULL rather than 0.
17499         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
17500         'free'.
17501         * lib/modechange.c: Likewise.
17502         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
17503         (MODE_DONE): New constant.
17504         (struct mode_change): Remove 'next' member.
17505         (make_node_op_equals): New function; like the old one of the
17506         same name, except it allocates an array.
17507         (mode_compile, mode_create_from_ref): Use it.
17508         (mode_compile): Allocate result as an array, not a linked list.
17509         Parse octal string ourself, so that we catch mistakes like "+0".
17510         (mode_adjust): Arg is an array, not a linked list.
17511         * lib/modechange.c: Include stat-macros.h, xalloc.h.
17512         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
17513         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
17514         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
17515         Remove.  This is now stat-macros.h's job.
17516         (talloc): Remove.  All callers replaced by xalloc, so that
17517         our invokers don't have to worry about reporting memory failures.
17518         (make_node_op_equals): Remove.
17519         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
17520         New constants.
17521         (struct mode_change): Moved here from modechange.h.
17522         (mode_append_entry): Remove.
17523         (mode_compile): Remove MASKED_OPS arg, since it encouraged
17524         apps to have incorrect behavior.  Use simpler algorithm for head
17525         and tail.  Don't futz with umask; that's now the job of mode_adjust.
17526         Detect more invalid usages rather than having somewhat-random behavior.
17527         Don't insert an "a=" action, as that leads to incorrect behavior.
17528         (mode_compile, mode_create_from_ref): Return NULL on error instead
17529         of an enum, since now there's only one way to have an error.  All
17530         callers changed.
17531         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
17532         at the correct time.  Simplify calculation of "+u" and its ilk.
17533         Don't mishandle "+X".
17534         (mode_free): Remove "register" and localize decls.
17535         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
17536         (struct mode_change): Move to modechange.c; callers don't
17537         need to see this stuff.
17538         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
17539         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
17540         (mode_change, mode_adjust): Reflect the new signatures noted above.
17541         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
17542         that might redefine system include files.
17543         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
17544         (my_usleep): Use NULL rather than (void *) 0.
17545         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
17546         Use siginterrupt to specify that system calls should be interrupted.
17547         (rpl_nanosleep): Move initialization of suspended closer to call of
17548         my_usleep.
17549         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
17550         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
17551         (desirable_utmp_entry): New function.
17552         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
17553         using x2nrealloc, to simplify logic.
17554         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
17555         size calculation.  Do not assume utmp file is a regular file.
17556         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
17557         (READ_UTMP_CHECK_PIDS): New constant.
17558         * lib/save-cwd.c: Include unistd-safer.h.
17559         (save_cwd): Use fd_safer.
17560         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
17561         [!_LIBC] Include "stat-macros.h" instead.
17562         * lib/unistd-safer.h (fd_safer): New decl.
17563
17564 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17565
17566         * modules/getloadavg (Depends-on): Add unistd-safer.
17567         * modules/getusershell (Depends-on): Add stdio-safer.
17568         * modules/lstat (Depends-on): Remove xalloc.
17569         * modules/mkstemp (Depends-on): Add stat-macros.
17570         * modules/modechange (Depends-on): Remove xstrtol.
17571         Add stat-macros, xalloc.
17572         * modules/save-cwd (Depends-on): Add unistd-safer.
17573         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
17574         * modules/unistd-safer (Files): Add lib/fd-safer.c
17575         (Makefile.am): Remove lib_SOURCES.
17576
17577         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
17578         Remove fcntl-safer; unistd-safer supersedes it.
17579
17580 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17581
17582         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
17583         AC_HEADER_STAT.
17584         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
17585         (gl_PREREQ_CHOWN): Remove.
17586         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
17587         it.  Don't require AC_HEADER_STAT.
17588         (gl_PREREQ_LSTAT): Remove.
17589         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
17590         Don't require AC_HEADER_STAT.
17591         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
17592         (gl_PREREQ_RMDIR): Remove.
17593         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
17594         mention stat-macros.h or AC_HEADER_STAT, since we'll make
17595         the stat-macros module a prerequisite.
17596         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
17597         * m4/filemode.m4 (gl_FILEMODE): Likewise.
17598         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
17599         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
17600         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
17601         variable names.
17602         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
17603         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
17604         variable prefixes.
17605         * m4/fcntl-safer.m4: Remove.
17606         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
17607         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
17608         Invoke gl_PREREQ_FD_SAFER.
17609         (gl_PREREQ_FD_SAFER): New macro.
17610         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
17611         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
17612         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
17613         Remove duplicate call to AC_LIBOBJ(readutmp).
17614         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
17615
17616         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
17617         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
17618
17619 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17620
17621         * MODULES.html.sh (Misc): Add byteswap.
17622
17623 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17624
17625         * modules/getcwd (Depends-on): Add extensions.
17626         * modules/openat (Depends-on): Likewise.
17627
17628 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17629
17630         * modules/byteswap: New file.
17631
17632 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17633
17634         * m4/byteswap.m4: New file.
17635
17636 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17637
17638         * lib/byteswap_.h: New file.
17639
17640 2005-04-25  Karl Berry  <karl@gnu.org>
17641
17642         * m4/gettext.m4: Update from GNU gettext 0.14.4.
17643
17644 2005-04-25  Albert Chin  <china@thewrittenword.com>
17645
17646         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
17647         Toolkit C bug.
17648
17649 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
17650
17651         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
17652         (func_ln_if_changed) Remove forcibly for no error message
17653         in case file does not exist.
17654
17655 2005-04-19  Simon Josefsson  <jas@extundo.com>
17656
17657         * gnulib-tool (Options): Make --symlink mean --symbolic.
17658
17659 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
17660
17661         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
17662
17663 2005-04-16  Simon Josefsson  <jas@extundo.com>
17664
17665         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
17666
17667 2005-04-15  Simon Josefsson  <jas@extundo.com>
17668
17669         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
17670
17671 2005-04-15  Simon Josefsson  <jas@extundo.com>
17672
17673         * gnulib-tool: Rename --symlink to --symbolic.
17674
17675 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
17676
17677         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
17678         symbolic links to files instead of copying/moving.  Add --aux-dir,
17679         specifying directory relative --dir where auxiliary build tools
17680         are placed.
17681
17682 2005-04-14  Bruno Haible  <bruno@clisp.org>
17683
17684         * modules/allocsa (License): Change to LGPL.
17685         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
17686
17687 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
17688
17689         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
17690         that "UTC +1 second" continues to work.  Problem reported
17691         by Dmitry V. Levin.
17692         (relunit_snumber): New rule.
17693         (relunit): Use it.
17694
17695 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
17696
17697         * lib/getdate.y (universal_time_zone_table): New constant.
17698         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
17699         universal_time_zone_table.
17700         (lookup_zone): Prefer universal_time_zone_table to
17701         local_time_zone_table, so that "GMT" time stamps are allowed in
17702         London during the summer.  Problem reported by Ian Abbott.
17703
17704 2005-04-12  Jim Meyering  <jim@meyering.net>
17705
17706         * lib/human.c (humblock): Set *options even when returning due to
17707         xstrtoumax conversion failure.  Thanks to a used-uninitialized
17708         warning from gcc-4.
17709
17710 2005-04-09  Jim Meyering  <jim@meyering.net>
17711
17712         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
17713         -Wuninitialized: initialize tm0.tm_year.
17714
17715 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
17716
17717         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
17718         count, since there's no maximum.  All uses changed.
17719         Add member dsts_seen.
17720         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
17721         not being INT_MAX.
17722         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
17723         Use pc_rels_seen to decide whther a date is absolute.
17724
17725         * lib/getdate.y (number): Don't overwrite year.
17726         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
17727         check.
17728
17729 2005-04-02  Simon Josefsson  <jas@extundo.com>
17730
17731         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
17732         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
17733
17734 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
17735
17736         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
17737         where no absolute path name can be longer than PATH_MAX.
17738
17739 2005-03-27  Jim Meyering  <jim@meyering.net>
17740
17741         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
17742
17743 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
17744
17745         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
17746         "one's complement" -> "ones' complement" in comment, as per Knuth.
17747         "value of type" -> "type or expression" in comment.
17748         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
17749
17750 2005-03-26  Jim Meyering  <jim@meyering.net>
17751
17752         Comment nits.
17753         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
17754         Correct typos: s/or/of/.
17755
17756 2005-03-26  Jim Meyering  <jim@meyering.net>
17757
17758         * modules/check-include-files: Move to ../ and rename to...
17759         * check-module: ...this.
17760
17761 2005-03-25  Jim Meyering  <jim@meyering.net>
17762
17763         * modules/xvasprintf (Files): Add xalloc.h.
17764
17765 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
17766
17767         * modules/gettext (Files): config/config.rpath ->
17768         build-aux/config.rpath
17769         * modules/iconv (Files): Likewise.
17770         Problem reported by Oskar Liljeblad.
17771
17772 2005-03-23  Jim Meyering  <jim@meyering.net>
17773
17774         * modules/check-include-files: New script to check for
17775         missing dependencies, multiple includes, etc.
17776
17777         * modules/c-strtold (Depends-on): Add xalloc.
17778         * modules/c-strtod (Depends-on): Add xalloc.
17779         * modules/hash (Depends-on): Add xalloc.
17780         (Files): Remove lib/xalloc.h.
17781
17782         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
17783         * modules/userspec (Files): Add lib/inttostr.h.
17784
17785 2005-03-23  Jim Meyering  <jim@meyering.net>
17786
17787         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
17788
17789 2005-03-22  Jim Meyering  <jim@meyering.net>
17790
17791         * modules/stat-macros: New module.
17792         * modules/canonicalize, modules/euidaccess, modules/file-type,
17793         * modules/filemode, modules/lchown, modules/makepath,
17794         * modules/rmdir, modules/stat: Depend on new stat-macros module
17795         rather than listing lib/stat-macros.h manually.
17796         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
17797
17798 2005-03-22  Jim Meyering  <jim@meyering.net>
17799
17800         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
17801
17802 2005-03-22  Bruno Haible  <bruno@clisp.org>
17803
17804         * config/srclist.txt: Replace target directory 'config' with
17805         'build-aux'.
17806         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
17807         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
17808         ../build-aux/.
17809
17810 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
17811
17812         * modules/chdir-long (Depends-on): Add mempcpy.
17813
17814         * modules/acl, modules/backupfile, modules/c-strtod,
17815         modules/c-strtold, modules/canon-host, modules/canonicalize,
17816         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
17817         modules/exclude, modules/exitfail, modules/file-type,
17818         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
17819         modules/getdate, modules/getline, modules/getpagesize,
17820         modules/getpass, modules/getugroups, modules/group-member,
17821         modules/hard-locale, modules/hash, modules/human, modules/idcache,
17822         modules/inttostr, modules/long-options, modules/makepath,
17823         modules/md5, modules/memcasecmp, modules/memcoll,
17824         modules/modechange, modules/mountlist, modules/path-concat,
17825         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
17826         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
17827         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
17828         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
17829         modules/strftime, modules/strndup, modules/strverscmp,
17830         modules/timespec, modules/unlocked-io, modules/userspec,
17831         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
17832         modules/yesno:
17833         Remove lib_SOURCES line from Makefile.am section, as this is now
17834         done automatically by the corresponding Autoconf macro.
17835
17836 2005-03-21  Jim Meyering  <jim@meyering.net>
17837
17838         Changes imported from coreutils.
17839
17840         * lib/cycle-check.c: Don't include xalloc.h.
17841
17842         * lib/path-concat.c: Don't include assert.h.
17843         (path_concat): Remove assertion that would have triggered
17844         for ABASE starting with more than one slash.
17845         Reported by Andreas Schwab.
17846
17847         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
17848         properly when ABASE is an absolute file name.
17849         Correct the description of this function.
17850         Include <assert.h>.
17851         Add an assertion and a test driver.
17852         This fixes a bug introduced on 2004-07-02.
17853         Andreas Schwab reported the resulting failure of cp --parents:
17854         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
17855
17856 2005-03-21  Jim Meyering  <jim@meyering.net>
17857
17858         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
17859         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
17860
17861 2005-03-21  Jim Meyering  <jim@meyering.net>
17862         and  Paul Eggert  <eggert@cs.ucla.edu>
17863
17864         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
17865         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
17866         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
17867         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
17868         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
17869         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
17870         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
17871         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
17872         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
17873         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
17874         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
17875         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
17876         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
17877         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
17878         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
17879         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
17880         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
17881         for these modules.
17882
17883 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
17884
17885         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
17886         (which shouldn't happen), generate nothing instead of returning 0
17887         immediately, so that nstrftime (NULL, ...) doesn't return 0.
17888
17889 2005-03-16  Bruno Haible  <bruno@clisp.org>
17890
17891         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
17892         HAVE_LONGLONG_64BIT.
17893
17894 2005-03-16  Bruno Haible  <bruno@clisp.org>
17895
17896         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
17897         HAVE_LONGLONG_64BIT.
17898
17899 2005-03-16  Bruno Haible  <bruno@clisp.org>
17900
17901         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
17902         HAVE_LONGLONG_64BIT.
17903
17904 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
17905
17906         * lib/strftime.c (my_strftime): Prepend space to format so that we can
17907         reliably distinguish strftime failure from empty output on POSIX
17908         hosts.
17909
17910 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
17911
17912         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
17913         (iconv_string): Don't guess a size-zero buffer, as that might cause
17914         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
17915         result would be 'too large', where 'too large' is (heuristically)
17916         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
17917         overflow concerns.  This will prevent some unwanted malloc failures
17918         when the inputs are very large.
17919
17920 2005-03-15  Karl Berry  <karl@gnu.org>
17921
17922         * config/srclist.txt (config.rpath): from gettext.
17923         * config/config.rpath: update.
17924
17925 2005-03-15  Bruno Haible  <bruno@clisp.org>
17926
17927         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
17928         to 'negate'.
17929
17930         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
17931         variable.
17932
17933         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
17934         results.
17935
17936 2005-03-14  Simon Josefsson  <jas@extundo.com>
17937
17938         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
17939         <fx@gnu.org>.
17940
17941 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
17942
17943         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
17944         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
17945         intprops.h.
17946         * lib/strtol.c: Likewise.
17947
17948 2005-03-14  Jim Meyering  <jim@meyering.net>
17949
17950         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
17951         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
17952         to be nonzero so that we (and caller) can detect the difference
17953         between a valid zero-length expansion and an error return, even
17954         when the underlying strftime fails before writing anything into
17955         that location.
17956
17957 2005-03-14  Bruno Haible  <bruno@clisp.org>
17958
17959         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
17960         Update from GNU gettext 0.14.3.
17961
17962 2005-03-10  Jim Meyering  <jim@meyering.net>
17963
17964         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
17965
17966 2005-03-10  Jim Meyering  <jim@meyering.net>
17967
17968         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
17969         so that this module works on systems without fchdir.
17970
17971 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
17972
17973         Factor int-properties macros into a single file, except for
17974         glibc-related files.
17975         * lib/intprops.h: New file.
17976         * lib/getloadavg.c: Include it instead of limits.h.
17977         (INT_STRLEN_BOUND): Remove.
17978         * lib/human.c: Include intprops.h.
17979         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
17980         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
17981         302/1000.
17982         * lib/inttostr.h: Include intprops.h instead of limits.h.
17983         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
17984         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
17985         for consistency with intprops.h.
17986         (time_t_is_integer, twos_complement_arithmetic): Use them.
17987         * lib/sig2str.h: Include <signal.h>, intprops.h.
17988         (INT_STRLEN_BOUND): Remove.
17989         * lib/strftime.c (TYPE_SIGNED): Remove.
17990         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
17991         * lib/strtol.c: Adjust comments to match intprops.h.
17992         * lib/userspec.c: Include intprops.h.
17993         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
17994         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
17995         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
17996         instead of rolling our own expressions.
17997         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
17998
17999         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
18000         instead of int.
18001         (my_strftime): Do not mishandle years close to INT_MAX, by doing
18002         the right thing even if adding 1900 would overflow.  Similarly
18003         for tm_mon + 1 and tm_yday + 1.
18004         Make %Y always equivalent to %C%y, and similarly for %G and %g.
18005         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
18006         (DO_SIGNED_NUMBER): New macro.
18007         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
18008
18009 2005-03-07  Bruno Haible  <bruno@clisp.org>
18010
18011         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
18012
18013 2005-03-07  Bruno Haible  <bruno@clisp.org>
18014
18015         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
18016
18017 2005-03-04  Derek R. Price  <derek@ximbiot.com>
18018
18019         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
18020         (func_import): Only replace files via --import when they have actually
18021         changed.
18022
18023 2005-03-03  Derek R. Price  <derek@ximbiot.com>
18024
18025         * m4/mmap-anon.m4: New file.
18026         * m4/pagealign_alloc.m4: New file.
18027
18028 2005-03-03  Derek R. Price  <derek@ximbiot.com>
18029             Bruno Haible  <bruno@clisp.org>
18030
18031         * modules/pagealign_alloc: New file.
18032         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
18033
18034 2005-03-03  Derek R. Price  <derek@ximbiot.com>
18035             Bruno Haible  <bruno@clisp.org>
18036
18037         * lib/pagealign_alloc.h: New file.
18038         * lib/pagealign_alloc.c: New file.
18039
18040 2005-03-03  Bruno Haible  <bruno@clisp.org>
18041
18042         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
18043         Use an all-permissive copyright notice, recommended by RMS.
18044
18045 2005-03-02  Bruno Haible  <bruno@clisp.org>
18046
18047         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
18048         of AIX, the replacement has to be done only after <string.h> is
18049         included, therefore not in config.h. stpncpy.h does the replacement,
18050         and stpncpy.c uses it.
18051
18052 2005-03-02  Bruno Haible  <bruno@clisp.org>
18053
18054         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
18055         stpncpy.c uses it.
18056
18057 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
18058
18059         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
18060         The workaround isn't strictly needed for POSIX conformance, and
18061         it's too much of a pain to configure and maintain.  We'll ask
18062         people to fix their kernels instead.
18063         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
18064         (NANOSLEEP_BUG_WORKAROUND): Remove.
18065         (xnanosleep): Remove the workaround.
18066
18067 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
18068
18069         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
18070         Reported by Derek Price.
18071         (Include): Add "timespec.h".
18072
18073         * modules/xnanosleep (Depends-on): Remove gethrxtime.
18074
18075 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
18076
18077         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
18078         to detect nanosleep bug.
18079
18080 2005-03-01  Bruno Haible  <bruno@clisp.org>
18081
18082         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
18083
18084 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
18085
18086         * modules/gethrxtime: New file.
18087         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
18088         (Depends-on): Add gethrxtime.
18089         (configure.ac): Add gl_XNANOSLEEP.
18090         (Makefile.am): Remove lib_SOURCES line.
18091
18092 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
18093
18094         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
18095         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
18096
18097 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
18098
18099         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
18100         * lib/timespec.h (gettime): Return void, since it always
18101         succeeds now.  All uses changed.
18102         * lib/gettime.c (gettime) Likewise.
18103         [HAVE_NANOTIME]: Prefer nanotime.
18104         Assume gettimeofday succeeds, as POSIX requires.
18105         Assime time () succeeds, since other code already does.
18106         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
18107         (timespec_subtract): Remove.
18108         (NANOSLEEP_BUG_WORKAROUND): New constant.
18109         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
18110         things considerably.  Use it only on GNU/Linux hosts, since the
18111         workaround shouldn't be needed elsewhere.
18112
18113 2005-02-24  Bruno Haible  <bruno@clisp.org>
18114
18115         * modules/gettext (Files): Add m4/glibc2.m4.
18116
18117 2005-02-24  Bruno Haible  <bruno@clisp.org>
18118
18119         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
18120         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
18121         * m4/progtest.m4:
18122         Update from GNU gettext 0.14.2.
18123         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
18124
18125 2005-02-24  Bruno Haible  <bruno@clisp.org>
18126
18127         * lib/localcharset.c: Update from GNU gettext 0.14.2.
18128         * lib/config.charset: Update from GNU gettext 0.14.2.
18129
18130 2005-02-24  Bruno Haible  <bruno@clisp.org>
18131
18132         * lib/gettext.h: Update from GNU gettext 0.14.2.
18133
18134 2005-02-23  Simon Josefsson  <jas@extundo.com>
18135
18136         * m4/iconvme.m4: New file.
18137
18138 2005-02-23  Jim Meyering  <jim@meyering.net>
18139
18140         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
18141         change.
18142         Thanks to Bruno Haible for catching it.
18143
18144 2005-02-22  Simon Josefsson  <jas@extundo.com>
18145
18146         * modules/iconvme: New file.
18147
18148         * MODULES.html.sh: Add iconvme.
18149
18150 2005-02-22  Simon Josefsson  <jas@extundo.com>
18151
18152         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
18153
18154 2005-02-22  Simon Josefsson  <jas@extundo.com>
18155
18156         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
18157
18158 2005-02-22  Jim Meyering  <jim@meyering.net>
18159
18160         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
18161         s/ifndef/ifdef/.
18162
18163 2005-02-20  Neil Conway  <neilc@samurai.com>
18164
18165         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
18166         returned by OSX/Darwin if the specified buffer is not large
18167         enough for the hostname.
18168
18169 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18170
18171         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
18172         pass it to _help, otherwise the latter coredumps trying to
18173         dereference state.root_argp.
18174
18175 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
18176
18177         * modules/chdir-long (Depends-on): Add memrchr.
18178         * modules/memrchr (Files): Add lib/memrchr.h.
18179         (Include): "memrchr.h".
18180
18181 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
18182
18183         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
18184
18185 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
18186
18187         * lib/memrchr.h: New file.
18188         * lib/chdir-long.c: Include it.
18189         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
18190         Don't bother including stddef.h.
18191
18192 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
18193
18194         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
18195         inclusion.
18196         Include <sys/types.h>, for dev_t.
18197         (ME_DUMMY, ME_REMOTE): Move from here....
18198         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
18199         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
18200         Dmitry V. Levin.
18201         Include mountlist.h first, to test the interface.
18202
18203 2005-01-29  Bruno Haible  <bruno@clisp.org>
18204
18205         * lib/progname.c (program_name): Initialize.
18206         Needed when linking statically on MacOS X.
18207
18208 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
18209
18210         Sync from coreutils.
18211         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
18212         (Depends-on): Add c-strtod.
18213         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
18214
18215 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
18216
18217         Sync from coreutils.
18218         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
18219
18220         Remove files that are specific to coreutils.
18221         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
18222
18223 2005-01-28  Bruno Haible  <bruno@clisp.org>
18224
18225         * modules/javacomp: New file.
18226         * MODULES.html.sh (Java): Add javacomp.
18227
18228 2005-01-28  Bruno Haible  <bruno@clisp.org>
18229
18230         * m4/javacomp.m4: New file, from GNU gettext.
18231
18232 2005-01-28  Bruno Haible  <bruno@clisp.org>
18233
18234         * lib/javacomp.sh.in: New file, from GNU gettext.
18235         * lib/javacomp.h: New file, from GNU gettext.
18236         * lib/javacomp.c: New file, from GNU gettext.
18237
18238 2005-01-26  Simon Josefsson  <jas@extundo.com>
18239
18240         * lib/gai_strerror.c: Use GPL in header.
18241
18242 2005-01-26  Bruno Haible  <bruno@clisp.org>
18243
18244         * modules/javaexec: New file.
18245         * MODULES.html.sh (Java): Add javaexec.
18246
18247 2005-01-26  Bruno Haible  <bruno@clisp.org>
18248
18249         * m4/javaexec.m4: New file, from GNU gettext.
18250
18251 2005-01-26  Bruno Haible  <bruno@clisp.org>
18252
18253         * lib/javaexec.sh.in: New file, from GNU gettext.
18254         * lib/javaexec.h: New file, from GNU gettext.
18255         * lib/javaexec.c: New file, from GNU gettext.
18256
18257 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18258
18259         * modules/lchown (Depends-on): Remove lchown.h
18260
18261 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18262
18263         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
18264         must be defined if the header file was not found, in order
18265         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
18266
18267 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18268
18269         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
18270         initializers for struct pentry_state.
18271         (__argp_error): Check return value of __asprintf
18272         (__argp_failure): Translate error message
18273
18274         * lib/argp-parse.c: Removed braces around the expansion of N_()
18275
18276 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
18277
18278         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
18279         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
18280         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
18281         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
18282         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
18283         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
18284         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
18285         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
18286         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
18287         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
18288         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
18289         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
18290         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
18291         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
18292         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
18293         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
18294         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
18295         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
18296         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
18297         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
18298         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
18299         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
18300         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
18301         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
18302         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
18303         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
18304         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
18305         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
18306         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
18307         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
18308         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
18309         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
18310         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
18311         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
18312         xstrtol.m4, xstrtoumax.m4, yesno.m4:
18313         Use an all-permissive copyright notice, recommended by RMS.
18314
18315 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
18316
18317         * modules/chdir-long (Depends-on): Remove mempcpy.
18318
18319 2005-01-21  Jim Meyering  <jim@meyering.net>
18320
18321         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
18322         same value as for Solaris 9.
18323
18324         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
18325         component length.  This included changing the parameter to be
18326         of type `char *' rather than `char const *'.
18327         * lib/chdir-long.h (chdir_long): Update prototype.
18328
18329         * lib/openat.c (fdopendir, fstatat): New functions.
18330         * lib/openat.h: Include headers required for use of DIR and struct
18331         stat.
18332         [AT_SYMLINK_NOFOLLOW]: Define.
18333         (fdopendir, fstatat): Add prototypes.
18334
18335 2005-01-21  Bruno Haible  <bruno@clisp.org>
18336
18337         * modules/classpath: New file.
18338         * MODULES.html.sh (Java): Add classpath.
18339
18340 2005-01-21  Bruno Haible  <bruno@clisp.org>
18341
18342         * lib/classpath.h: New file, from GNU gettext.
18343         * lib/classpath.c: New file, from GNU gettext.
18344
18345 2005-01-20  Simon Josefsson  <jas@extundo.com>
18346
18347         * modules/version-etc-fsf: New file.
18348
18349 2005-01-20  Simon Josefsson  <jas@extundo.com>
18350
18351         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
18352         * lib/version-etc.c: Remove version_etc_copyright.
18353         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
18354         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
18355
18356 2005-01-20  Simon Josefsson  <jas@extundo.com>
18357
18358         * lib/base64.h (isbase64): Add.
18359
18360         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
18361         using a unsigned prototype, don't inline.
18362         (base64_decode): Use it.
18363
18364 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
18365
18366         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
18367         it.
18368
18369 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
18370
18371         * lib/save-cwd.c (save_cwd): Remove code to support the case
18372         where fchdir is missing or flaky.
18373
18374 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
18375
18376         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
18377
18378 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
18379
18380         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
18381         AC_LIBSOURCES now does this.
18382         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
18383         with new ullong_max module.
18384
18385 2005-01-19  Bruno Haible  <bruno@clisp.org>
18386
18387         * modules/sh-quote: New file.
18388         * MODULES.html.sh (Executing programs): Add sh-quote.
18389
18390 2005-01-19  Bruno Haible  <bruno@clisp.org>
18391
18392         * lib/sh-quote.h: New file, from GNU gettext.
18393         * lib/sh-quote.c: New file, from GNU gettext.
18394
18395 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
18396
18397         Merge from coreutils.
18398         * m4/ullong_max.m4: New file.
18399         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
18400         (gl_MACROS): Assume localeconv exists.
18401
18402 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
18403
18404         Merge changes from coreutils, as described below in several
18405         changelogs dated today.
18406
18407         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
18408         (O_DIRECTORY): Remove; not needed here, since "." must be
18409         a directory.  All uses removed.
18410         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
18411         universal on Suns, and we also need to test for IRIX.
18412         Revamp code to use 'if' rather than '#if'.
18413         Avoid unnecessary comparison of cwd->desc to 0.
18414
18415         * lib/utimens.c (futimens): Robustify the previous patch, by checking
18416         for known valid error numbers rather than observed invalid ones.
18417
18418 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
18419
18420         * modules/ullong_max: New file.
18421
18422         * modules/chdir-long, modules/openat: New files.
18423         * modules/save-cwd (Depends-on): Depend on chdir-long.
18424         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
18425
18426 2005-01-18  Jim Meyering  <jim@meyering.net>
18427
18428         Merge from coreutils.
18429         * m4/chdir-long.m4, m4/openat.m4: New files.
18430         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
18431         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
18432         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
18433         is sane and DOES follow symlinks.  Besides, testing 20 different
18434         systems found no broken chown implementations.
18435         Prompted by a change in rsync's copy of this macro.
18436         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
18437
18438         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
18439
18440         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
18441         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
18442         NULL-means-set-to-current-time semantics.
18443         Remove temporary file immediately, rather than waiting
18444         for configure's at-exit trap code to do it.
18445
18446 2005-01-18  Jim Meyering  <jim@meyering.net>
18447
18448         * lib/version-etc.c (version_etc_copyright): Update copyright date.
18449
18450         * lib/utimens.c (futimens): Account for the fact that futimes
18451         can also fail with errno == ENOSYS or errno == ENOENT.
18452         Patch from Dmitry V. Levin.
18453
18454         Change the name of the robust chdir function from chdir to chdir_long.
18455         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
18456         (restore_cwd): Use chdir_long, not chdir.
18457         * lib/chdir-long.c: Renamed from chdir.c.
18458         * lib/chdir-long.h: Renamed from chdir.h.
18459         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
18460         Hurd.
18461
18462 2005-01-18  Bruno Haible  <bruno@clisp.org>
18463
18464         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
18465         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
18466         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
18467         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
18468         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
18469         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
18470         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
18471         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
18472         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
18473         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
18474         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
18475         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
18476         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
18477         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
18478         Use an all-permissive copyright notice, recommended by RMS.
18479
18480 2005-01-18  Bob Proulx  <bob@proulx.com>
18481
18482         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
18483         simplify offsetof() macro construct to avoid compile failure with
18484         native HP-UX 11.0 ANSI C compiler.
18485
18486 2005-01-17  Bruno Haible  <bruno@clisp.org>
18487
18488         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
18489         redundant because stpncpy.m4 takes care of it.
18490
18491 2005-01-17  Bruno Haible  <bruno@clisp.org>
18492
18493         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
18494
18495 2005-01-17  Bruno Haible  <bruno@clisp.org>
18496
18497         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
18498         used.
18499
18500 2005-01-17  Bruno Haible  <bruno@clisp.org>
18501
18502         * lib/fwriteerror.h (fwriteerror): Change specification to include
18503         fclose.
18504         * lib/fwriteerror.c: Include <stdbool.h>.
18505         (fwriteerror): At the end, close the file stream. Record whether
18506         stdout was already closed.
18507
18508 2005-01-17  Bruno Haible  <bruno@clisp.org>
18509
18510         * lib/execute.c (environ): Declare if needed.
18511         * lib/pipe.c (environ): Likewise.
18512         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
18513
18514 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18515
18516         * modules/argp: Depend on vsnprintf
18517
18518 2005-01-10  Jim Meyering  <jim@meyering.net>
18519
18520         * modules/closeout (Depends-on): Add atexit.
18521
18522 2005-01-06  Bruno Haible  <bruno@clisp.org>
18523
18524         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
18525
18526 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
18527
18528         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
18529         definitions to be after all include files, to avoid collisions.
18530         Problem reported by Bob Proulx.
18531
18532 2005-01-04  Jim Meyering  <jim@meyering.net>
18533
18534         Changes imported from coreutils.
18535         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
18536         as the mkstemp template, use a temporary directory and an
18537         8.3-friendly template to avoid trouble on systems like DJGPP.
18538         Reported by Juan M. Guerrero via Stepan Kasal.
18539         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
18540         close. Remove the temporary directory right away, rather than waiting
18541         for configure's at-exit trap code to do it.
18542         Suggestion from Stepan Kasal.
18543
18544 2005-01-01  Simon Josefsson  <jas@extundo.com>
18545
18546         * gnulib-tool: Print #include directives when --import'ing.
18547
18548 2004-12-28  Simon Josefsson  <jas@extundo.com>
18549
18550         * tests/test-base64.c: Include required header files.  Remove
18551         unused variables.
18552
18553 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
18554
18555         * modules/error (Depends-on): Remove gettext.
18556
18557 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
18558
18559         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
18560         not needed.  This removes a dependency on the gettext module.
18561         [defined _LIBC]: Do not include <libintl.h>; not needed.
18562
18563 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
18564
18565         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
18566         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
18567
18568 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
18569
18570         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
18571         HAVE_DECL_STRTOLD.
18572
18573 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
18574
18575         * modules/getdate (Depends-on): Remove alloca-opt.
18576
18577 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
18578
18579         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
18580
18581 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
18582
18583         * lib/argp-parse.c: Include <stddef.h>.
18584         (alignof, alignto): New macros.
18585         (parser_init): Don't assume that void * is aligned sufficiently
18586         for struct option.
18587
18588         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
18589         need to extend the stack.
18590         (YYINITDEPTH): New macro, so that the initial stack isn't overly
18591         large.
18592
18593 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18594
18595         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
18596
18597 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
18598
18599         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
18600         (2004-10-24) change.  Apparently this was a false alarm.
18601
18602         * modules/getdate: Depend on alloca-opt, not alloca.
18603
18604 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
18605
18606         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
18607         Remove now-obsolete comment about AIX.
18608         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
18609         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
18610         (YYMAXDEPTH): New macro.
18611
18612 2004-12-18  Simon Josefsson  <jas@extundo.com>
18613
18614         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
18615
18616 2004-12-18  Bruno Haible  <bruno@clisp.org>
18617
18618         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
18619
18620 2004-12-18  Bruno Haible  <bruno@clisp.org>
18621
18622         * lib/fatal-signal.c (fatal_signals): Make non-const.
18623         (init_fatal_signals): New function.
18624         (uninstall_handlers, install_handlers): Ignore signals that were set to
18625         SIG_IGN.
18626         (at_fatal_signal): Call init_fatal_signals.
18627         (init_fatal_signal_set): Likewise. Ignore signals that were set to
18628         SIG_IGN.
18629         Reported by Paul Eggert.
18630
18631 2004-12-18  Bruno Haible  <bruno@clisp.org>
18632
18633         * doc/alloca.texi: New file.
18634         * doc/alloca-opt.texi: New file.
18635
18636 2004-12-17  Jim Meyering  <jim@meyering.net>
18637
18638         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
18639         Otherwise, install-sh could exit with improper exit status when
18640         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
18641
18642 2004-12-16  Simon Josefsson  <jas@extundo.com>
18643
18644         * tests/test-base64.c: Add license.
18645
18646 2004-12-15  Stepan Kasal  <address@hidden>
18647
18648         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
18649
18650 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
18651
18652         * modules/getcwd (Files): Add m4/d-ino.m4.
18653         Suggested by Mark D. Baushke.
18654
18655 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
18656
18657         * lib/getdate.y (textint): New member "negative".
18658         (time_zone_hhmm): New function.
18659         Expect 14 shift-reduce conflicts, not 13.
18660         (o_colon_minutes): New rule.
18661         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
18662         (yylex): Set the "negative" member of signed numbers.
18663
18664 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
18665
18666         * doc/getdate.texi (Time of day items, Time zone items):
18667         Describe new formats +00:00, UTC+00:00.
18668
18669 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
18670
18671         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
18672         spurious "-l"s.  Problem reported by Stepan Kasal.
18673
18674 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
18675
18676         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
18677         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
18678
18679 2004-12-04  Simon Josefsson  <jas@extundo.com>
18680
18681         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
18682         Vandoorselaere <yoann@prelude-ids.org>.
18683
18684 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
18685
18686         Changes imported from coreutils.
18687         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
18688         exist.
18689         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
18690
18691 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
18692
18693         Changes imported from coreutils.
18694         * lib/hard-locale.c: Assume <locale.h> exists.
18695         Include "strdup.h".
18696         (GLIBC_VERSION): New macro.
18697         (hard_locale): Assume setlocale exists.
18698         Rewrite to avoid #ifdef.
18699         Use strdup rather than malloc + strcpy.
18700         * lib/human.c: Assume <locale.h> exists.
18701         (human_readable): Assume localeconv exists.
18702
18703 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
18704
18705         * modules/hard-locale (Depends-on): Add strdup.
18706
18707 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
18708
18709         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
18710         convert T2, not T.  (Imported from libc.)
18711
18712 2004-11-30  Simon Josefsson  <jas@extundo.com>
18713
18714         * modules/restrict (License): Change to LGPL.
18715
18716 2004-11-30  Simon Josefsson  <jas@extundo.com>
18717
18718         * m4/restrict.m4: Add copyright and copying conditions.
18719
18720 2004-11-30  Simon Josefsson  <jas@extundo.com>
18721
18722         * m4/base64.m4: New file.
18723
18724 2004-11-30  Simon Josefsson  <jas@extundo.com>
18725
18726         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
18727         base64.
18728
18729         * tests/test-base64.c: New file.
18730
18731         * modules/base64: New file.
18732
18733 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
18734
18735         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
18736         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
18737
18738         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
18739
18740 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
18741
18742         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
18743         (__getcwd.c): Don't restore errno; glibc doesn't.
18744         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
18745         first, falling back to our code only if its results look suspicious.
18746         Ensure that the resulting buffer is only as large as necessary.
18747
18748         * lib/readutmp.c: Include readutmp.h first.
18749         Include <errno.h>, since readutmp.h no longer does that.
18750         * lib/readutmp.h: Don't include <errno.h>,
18751         <sys/param.h>, <time.h>; not needed to establish interface.
18752         (errno): Remove decl.
18753         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
18754         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
18755         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
18756
18757 2004-11-28  Simon Josefsson  <jas@extundo.com>
18758
18759         * lib/base64.h, base64.c: New file.
18760
18761 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
18762
18763         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
18764
18765 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
18766
18767         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
18768         (Depends-on): Remove pathmax, same.  Add mempcpy.
18769         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
18770         (Makefile.am): Append getcwd.h to lib_SOURCES.
18771         (Include): Add getcwd.h.
18772         (Maintainer): Change from Jim Meyering to "all, glibc",
18773         since getdate now uses intended-for-glibc code.
18774         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
18775         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
18776
18777 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
18778
18779         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
18780         HP's ANSI C compiler.
18781         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
18782         Declaring int functions causes warnings on some modern systems and
18783         shouldn't be needed to compile on ancient ones.
18784         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
18785         defined.
18786
18787         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
18788         with the following changes.
18789         (__set_errno): Parenthesize properly.
18790         Include <stdbool.h>.
18791         (MIN, MAX, MATCHING_INO): New macros.
18792         (__getcwd): Define with prototype, not K&R form.
18793         Use heuristics to allocate default buffer on stack if possible.
18794         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
18795         behavior, and to avoid the PATH_MAX limit when computing
18796         ../../../../...
18797         Use MATCHING_INO to compare inode number to file.
18798         Check for arithmetic overflow in size calculations.
18799         Fix bug in reallocation of dot array that caused getcwd to fail
18800         on directories nested deeper than 75.
18801         Be more careful about saving errno on error.
18802         Do not use realloc; use only free+malloc, as this is a bit
18803         more flexible and avoids a needless copy operation.
18804         Do not inspect st_dev and st_ino for symbolic links; POSIX
18805         doesn't specify the latter.
18806         Check for closedir errors.
18807         Avoid needless casts.
18808         Use "#ifdef weak_alias" around weak_alias, to be like other
18809         glibc code.
18810         The following changes to getcwd.c have effect only when used in
18811         gnulib; they have no effect inside glibc proper.
18812         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
18813         as alloca isn't used.
18814         (alloca, __alloca): Likewise.
18815         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
18816         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
18817         unconditionally, as gnulib assumes C89 or better.
18818         Do not include <sys/param.h>.
18819         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
18820         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
18821         better.
18822         (NULL) [!defined NULL]: Remove; we assume C89 or better.
18823         Include <dirent.h> in a way that is compatible with modern Autoconf.
18824         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
18825         New macros, if not already defined.
18826         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
18827         Use "_LIBC", not "defined _LIBC", for consistency.
18828         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
18829         a mempcpy module.
18830         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
18831         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
18832         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
18833         credit only to Jim Meyering and adjust the copyright dates.
18834         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
18835         <stdlib.h>, <unistd.h>, "pathmax.h".
18836         Instead, include "xgetcwd.h" (first) and "getcwd.h".
18837         (INITIAL_BUFFER_SIZE): Remove.
18838         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
18839
18840 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
18841
18842         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
18843         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
18844         Use the _ONCE methods, for efficiency.
18845         Check for fcntl.h.  In test program, include <errno.h>
18846         and <fcntl.h> if available.  Remove old K&R cruft from
18847         test program.  Check for common errors in GNU/Linux,
18848         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
18849         don't do AC_LIBOBJ, as that's getcwd.m4's job.
18850         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
18851         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
18852         name accordingly.
18853         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
18854         accommodate new getcwd.c.
18855         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
18856         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
18857         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
18858         that's all we need now.
18859
18860 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18861
18862         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
18863         argp-parse.c depends on getopt internals, that means we should
18864         always use our getopt, to be on the safe side.
18865         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
18866         order not to spoil the result of an eventual previous invocation
18867         of gl_GETOPT_SUBSTITUTE.
18868
18869 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18870
18871         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
18872         redefinition warnings. To avoid them, include the defines
18873         in `#if !defined __need_getopt ... #endif'. The only place
18874         where __getopt_argv_const is used is in definitions
18875         of getopt_long and getopt_long_only below, which are as well
18876         protected by `#ifndef __need_getopt'.
18877         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
18878         __need_getopt after including <stdio.h> and <unistd.h> These
18879         headers might have defined it.
18880
18881 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
18882
18883         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
18884
18885 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
18886
18887         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
18888         (futimens): New function, which uses futimes if available.
18889         (futimens, utimens): Support timespec==NULL, with same semantics
18890         as utime and utimens.
18891         * lib/utimens.h (futimens): New decl.
18892
18893 2004-11-23  Jim Meyering  <jim@meyering.net>
18894
18895         * lib/getopt_.h: Remove trailing blanks.
18896
18897 2004-11-23  Jim Meyering  <jim@meyering.net>
18898
18899         * lib/__fpending.c: Add comment.
18900
18901 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
18902
18903         * modules/canonicalize (Depends-on): Add xreadlink.
18904         Problem reported by James Youngman.
18905
18906 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
18907
18908         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
18909         New macros.
18910         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
18911         optopt): Use them instead of invoking ## directly; otherwise, the
18912         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
18913
18914 2004-11-19  Bruno Haible  <bruno@clisp.org>
18915
18916         * lib/strtok_r.c: Move comments from here...
18917         * lib/strtok_r.h: ... to here.
18918
18919 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
18920
18921         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
18922         implementations that mishandle size_t overflow.
18923
18924 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
18925
18926         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
18927         might fail.  Problem reported by Yoann Vandoorselaere.
18928         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
18929         implementations that mishandle size_t overflow.
18930
18931 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
18932
18933         * modules/canon-host (Depends-on): Add strdup.
18934
18935 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
18936
18937         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
18938
18939 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
18940
18941         * lib/canon-host.c: Include "strdup.h".
18942         (canon_host): Use getaddrinfo if available, so that IPv6 works.
18943         Use strdup instead of malloc/strcpy to duplicate strings.
18944
18945         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
18946         (human_space_before_unit): New constant.
18947         * lib/human.c (human_readable): Support it.
18948
18949         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
18950         (xgetcwd): Set errno correctly when failing.
18951         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
18952         the failure is actually due to a PATH_MAX problem.
18953
18954         Further getopt changes to make it more likely that glibc will
18955         buy the changes back.
18956         * lib/getopt.c (POSIXLY_CORRECT): New constant.
18957         (getopt): Use it, so to preserve glibc semantic
18958         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
18959         when compiling for libc.
18960         * lib/getopt_.h (__getopt_argv_const): Bring it back.
18961         (getopt_long, getopt_long_only): Use it.
18962
18963         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
18964         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
18965         (getopt): Argv is now char * const *, as per standard.
18966         (_getopt_internal_r, _getopt_internal): Argv is now char **,
18967         not char *__getopt_argv_const *.
18968         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
18969         _getopt_long_only_r): Likewise.
18970         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
18971         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
18972         _getopt_long_r, _getopt_long_only_r): Likewise.
18973         * lib/getopt_.h (__getopt_argv_const): Remove.
18974         (getopt): Argv is now char * const *, as per standard.
18975
18976         * lib/getdate.y (tORDINAL): New token.
18977         (day, relunit): Allow it for relative times.
18978         (relative_time_table): Use tORDINAL for ordinals.
18979
18980 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
18981
18982         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
18983         Document that "second" isn't allowed as an ordinal number.
18984
18985 2004-11-16  Jim Meyering  <jim@meyering.net>
18986
18987         * modules/closeout (Depends-on): Add fpending.
18988
18989 2004-11-15  Jim Meyering  <jim@meyering.net>
18990
18991         * lib/closeout.c: Include "__fpending.h" once again.
18992         Include <stdbool.h>.
18993         (close_stdout): Don't fail just because stdout was closed initially,
18994         since some programs don't write to stdout in the normal course of
18995         operation (other than --version and --help), and we don't want this
18996         function to make e.g. `touch file >&-' fail.
18997         But do fail if it was closed and someone has tried to write to it.
18998         E.g., `printf foo >&-' must fail.
18999
19000 2004-11-13  Jim Meyering  <jim@meyering.net>
19001
19002         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
19003
19004 2004-11-12  Simon Josefsson  <jas@extundo.com>
19005
19006         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
19007         small doc fix is still pending.
19008
19009 2004-11-11  Simon Josefsson  <jas@extundo.com>
19010
19011         * modules/strtok_r: New file.
19012
19013         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19014         strtok_r.
19015
19016 2004-11-11  Simon Josefsson  <jas@extundo.com>
19017
19018         * m4/strtok_r.m4: New file.
19019
19020         * m4/getopt.m4: Replace opterr.
19021
19022 2004-11-11  Simon Josefsson  <jas@extundo.com>
19023
19024         * lib/strtok_r.h, strtok_r.c: New file.
19025
19026 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
19027
19028         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
19029         of replacing opterr, getopt, etc.  This should handle the
19030         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
19031
19032 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
19033
19034         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
19035         we can stop lying to compilers about the constness of argv when we
19036         are compiled outside glibc.
19037         (getopt, getopt_long, getopt_long_only): Use it.
19038         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
19039         _getopt_internal, getopt): Likewise.
19040         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
19041         _getopt_long_only_r): Likewise.
19042         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
19043         _getopt_long_r, _getopt_long_only_r): Likewise.
19044
19045         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
19046         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
19047         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
19048         the other external symbols.
19049         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
19050         declaration, since the above renaming now works around collisions.
19051
19052 2004-11-11  Jim Meyering  <jim@meyering.net>
19053
19054         * lib/linebreak.c: Remove trailing blanks.
19055         * lib/alloca_.h: Likewise.
19056         * lib/acosl.c: Likewise.
19057         * lib/euidaccess.c: Likewise.
19058         * lib/allocsa.h: Likewise.
19059
19060 2004-11-10  Simon Josefsson  <jas@extundo.com>
19061
19062         * m4/getaddrinfo.m4: New file.
19063
19064 2004-11-10  Simon Josefsson  <jas@extundo.com>
19065
19066         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
19067
19068 2004-11-10  Simon Josefsson  <jas@extundo.com>
19069
19070         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19071         getaddrinfo.
19072
19073         * modules/getaddrinfo: New file.
19074
19075 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
19076
19077         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
19078
19079 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
19080
19081         * lib/mktime.c (SHR): New macro, which is a portable
19082         substitute for >> that should work even on Crays.
19083         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
19084         Problem reported by Mark D. Baushke in
19085         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
19086         * lib/getdate.y (SHR): Likewise.
19087         (tm_diff): Use it.
19088         * lib/strftime.c (SHR): Likewise.
19089         (tm_diff): Use it.
19090         * lib/quotearg.c (struct quoting_options): Use unsigned int for
19091         quote_these_too, so that right shifts are well defined.  All uses
19092         changed.
19093
19094 2004-11-10  Jim Meyering  <jim@meyering.net>
19095
19096         Ensure that no close failure goes unreported.
19097         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
19098         return early when it seems there's nothing to flush.
19099         Don't include __fpending.h.
19100
19101 2004-11-10  Jim Meyering  <jim@meyering.net>
19102
19103         * modules/closeout (Depends-on): Remove fpending.
19104
19105 2004-11-10  Jim Meyering  <jim@meyering.net>
19106
19107         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
19108
19109 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
19110
19111         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
19112         gl_FUNC_STRFTIME.
19113         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
19114         and AC_REQUIRE when possible, to avoid duplicate checks.
19115         Check for <wchar.h>.
19116
19117 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
19118
19119         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
19120
19121 2004-11-09  Bruno Haible  <bruno@clisp.org>
19122
19123         * m4/sockpfaf.m4: New file.
19124
19125 2004-11-05  Bruno Haible  <bruno@clisp.org>
19126
19127         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
19128         Reported by Mark D. Baushke <mdb@cvshome.org>.
19129
19130 2004-11-04  Bruno Haible  <bruno@clisp.org>
19131
19132         2004-09-11  Bruno Haible  <bruno@clisp.org>
19133                 * allocsa.valgrind: New file.
19134         2004-02-06  Bruno Haible  <bruno@clisp.org>
19135                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
19136                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
19137                 Reported by Christopher Seip <chris.seip@hp.com>.
19138
19139 2004-11-04  Bruno Haible  <bruno@clisp.org>
19140
19141         * modules/allocsa (Files): Add lib/allocsa.valgrind.
19142         (Makefile.am): Distribute it.
19143
19144 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
19145
19146         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
19147         with errno == ERANGE if the buffer is too small.
19148         Problem reported by Mark D. Baushke.
19149
19150 2004-11-03  Albert Chin  <china@thewrittenword.com>
19151             Paul Eggert  <eggert@cs.ucla.edu>
19152
19153         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
19154         equivalent, substitute $ac_type for equivalent type rather than
19155         blindly using uint32_t *always* which won't work if uint32_t is not
19156         available.  Define _UINT32_T to work around typedef of uint32_t if
19157         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
19158         2.5.1.
19159
19160 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
19161
19162         * m4/jm-macros.m4: Sync from coreutils.
19163         (gl_MACROS): Check for mbrlen, for pathchk.
19164         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
19165
19166 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
19167
19168         * lib/xreadlink.c (MAXSIZE): New macro.
19169         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
19170         size does not exceed MAXSIZE.  Avoid cast.
19171         As suggested by Mark D. Baushke in
19172         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
19173         if readlink fails with buffer size just under MAXSIZE, try again
19174         with MAXSIZE.
19175
19176 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
19177
19178         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
19179
19180 2004-11-02  Derek R. Price  <derek@ximbiot.com>
19181         and  Paul Eggert  <eggert@cs.ucla.edu>
19182
19183         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
19184         (get_date): Overparenthesize to avoid GCC warning.
19185
19186 2004-11-02  Bruno Haible  <bruno@clisp.org>
19187
19188         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
19189         returns void.
19190
19191 2004-11-02  Bruno Haible  <bruno@clisp.org>
19192
19193         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
19194         function returns void.
19195
19196 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
19197
19198         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
19199         fflush_unlocked, flockfile, funlockfile, funlockfile,
19200         fputs_unlocked, putc_unlocked.
19201
19202 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
19203
19204         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
19205         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
19206         already declared.
19207
19208 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
19209
19210         * modules/getdate (Files): Add doc/getdate.texi.
19211         (Depends-on): Add setenv, xalloc.
19212
19213 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
19214
19215         * lib/getdate.y: Add support for TZ="foo" within a date string.
19216         Fix some bugs near time_t boundaries.  Reject dates with
19217         out-of-range components, e.g., "Sept 31".
19218         Include <stdlib.h>, "setenv.h", "xalloc.h".
19219         (ISDIGIT_LOCALE): Remove; unused.
19220         Note that the TZ and time functions used here are not reentrant.
19221         (mktime_ok, get_tz): New functions.
19222         (TZBUFSIZE): New constant.
19223         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
19224         This requires that we sometimes generate our own TZ="XXX..." setting.
19225
19226 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
19227
19228         * doc/getdate.texi: New file, from coreutils with modifications for
19229         the new TZ parsing.
19230
19231 2004-10-27  Derek R. Price  <derek@ximbiot.com>
19232
19233         * lib/mktime.c (not_equal_tm): Remove redundant check.
19234
19235 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
19236
19237         * modules/regex (lib_SOURCES): Add regex.c.
19238         Reported by James Youngman in
19239         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
19240
19241 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
19242
19243         * lib/getdate.y: Use Bison 1.875 features, and some minor
19244         code cleanups.  This change does not affect semantics.
19245         Don't include <stdlib.h>; no longer needed.
19246         Don't include unlocked-io.h; only the "#if TEST" code uses
19247         stdio, and performance isn't crucial there.
19248         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
19249         Bison 1.875 features as described below.
19250         All uses of "PC." replaced by "pc->".
19251         (YYSTYPE): Add a forward declaration.
19252         (yylex, yyerror): Use full prototypes in forward decls.
19253         Use "%pure-parser" rather than obsolescent "%pure_parser".
19254         Use %parse-param and %lex-param instead of obsolescent
19255         YYPARSE_PARAM and YYLEX_PARAM.
19256         (meridian_table, month_and_day_table, time_units_table,
19257         relative_time_table, time_zone_table, military_table,
19258         lookup_zone, lookup_word, get_date):
19259         Use NULL instead of 0 where appropriate.
19260         (to_hour): Avoid abort (), to avoid a dependency on
19261         stdlib.h.
19262         (yyerror, yylex): Now accepts parser_control * arg.
19263         (main) [TEST]: Use '\0' rather than 0 for char.
19264
19265 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
19266
19267         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
19268
19269 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
19270
19271         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
19272         It's now the caller's responsibility to handle the case where
19273         !HAVE_GETPAGESIZE && !defined getpagesize.
19274
19275         * lib/mktime.c (leapyear): Arg is long int, not int.
19276
19277 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
19278
19279         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
19280
19281 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
19282
19283         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
19284         missing.  Problem reported by James Youngman.
19285
19286 2004-10-16  Simon Josefsson  <jas@extundo.com>
19287
19288         * gnulib-tool: Fix comments.  Fix parse problem.
19289         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
19290
19291 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
19292
19293         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
19294         implementation of getopt_long.  Problem reported by Alexander Taler in:
19295         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
19296
19297 2004-10-15  Bruno Haible  <bruno@clisp.org>
19298
19299         * gnulib-tool: Untabify. Initialize supplied_libname.
19300         (func_usage): More homogenous output.
19301         (func_modules_transitive_closure, func_modules_to_filelist,
19302         func_emit_lib_Makefile_am): New functions.
19303         (func_import): New function, extracted from big case statement. Use
19304         func_get_license, func_modules_transitive_closure,
19305         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
19306         opt_lgpl. Don't use test -a, as it's not portable.
19307         (func_create_testdir): Use func_modules_transitive_closure,
19308         func_modules_to_filelist, func_emit_lib_Makefile_am.
19309
19310 2004-10-15  Bruno Haible  <bruno@clisp.org>
19311
19312         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
19313
19314 2004-10-15  Bruno Haible  <bruno@clisp.org>
19315
19316         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
19317         the portions belonging to each module.
19318         Suggested by Derek Robert Price <derek@ximbiot.com>.
19319
19320 2004-10-12  Simon Josefsson  <jas@extundo.com>
19321
19322         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
19323         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
19324         to real functions.
19325
19326 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19327
19328         * modules/vsnprintf: New file.
19329
19330 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19331
19332         * m4/vsnprintf.m4: New file.
19333
19334 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19335
19336         * lib/vsnprintf.h: New file.
19337         * lib/vsnprintf.c: New file.
19338
19339 2004-10-11  Bruno Haible  <bruno@clisp.org>
19340
19341         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
19342         vsnprintf.
19343
19344 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
19345
19346         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
19347
19348 2004-10-07  Bruno Haible  <bruno@clisp.org>
19349
19350         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
19351         fits into the provided buffer.
19352
19353 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
19354
19355         * lib/diacrit.c, diacrit.h: Add GPL notice.
19356
19357         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
19358         notice.
19359         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
19360         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
19361         This avoids a potential constant-folding bug.
19362
19363 2004-10-05  Bruno Haible  <bruno@clisp.org>
19364
19365         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
19366         for the declaration of strsep.
19367
19368 2004-10-05  Bruno Haible  <bruno@clisp.org>
19369
19370         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
19371
19372 2004-10-04  Simon Josefsson  <jas@extundo.com>
19373
19374         * modules/memmem: New file.
19375         * tests/test-memmem.c: New file.
19376         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
19377
19378 2004-10-04  Simon Josefsson  <jas@extundo.com>
19379
19380         * m4/memmem.m4: New file.
19381
19382 2004-10-04  Simon Josefsson  <jas@extundo.com>
19383
19384         * lib/memmem.h: New file.
19385         * lib/memmem.c: New file, taken from glibc.
19386
19387 2004-10-04  Simon Josefsson  <jas@extundo.com>
19388
19389         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
19390         '#ifdef USE_UNLOCKED_IO'.
19391
19392 2004-10-04  Simon Josefsson  <jas@extundo.com>
19393
19394         * config/srclist.txt: Add memmem from glibc.
19395
19396 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
19397
19398         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
19399
19400         * modules/argmatch, modules/argp, modules/closeout, modules/error,
19401         modules/exclude, modules/getdate, modules/getline,
19402         modules/getndelim2, modules/getpass, modules/getpass-gnu,
19403         modules/getusershell, modules/linebuffer, modules/md5,
19404         modules/mountlist, modules/posixtm, modules/readtokens,
19405         modules/readutmp, modules/regex, modules/sha1,
19406         modules/version-etc, modules/yesno:
19407         Remove dependency on unlocked-io.
19408
19409 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
19410
19411         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
19412
19413         * m4/unlocked-io.m4: Add copyright notice.
19414         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
19415
19416 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
19417
19418         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
19419         * lib/xmalloc.c (xmemdup): Likewise.
19420         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
19421         XFREE): Remove these long-obsolescent macros.
19422         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
19423         * lib/xstrdup.c: Remove.
19424
19425         * lib/regex.c (re_comp): Cast gettext return value to char *,
19426         Problem reported by Martin Neitzel via Mark D. Baushke.
19427
19428 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
19429
19430         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
19431         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
19432         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
19433         regex.c, sha1.c, version-etc.c, yesno.c:
19434         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
19435         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
19436         the includer's responsibility.
19437
19438         Sync from coreutils.
19439
19440         * lib/modechange.c (mode_compile): Don't decrement a pointer that
19441         points to the start of a string, as the C Standard says the
19442         resulting behavior is undefined.
19443
19444         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
19445         simple -> simple_backups, numbered_existing ->
19446         numbered_existing_backups, numbered -> numbered_backups
19447         to avoid shadowing problems.  All uses changed.
19448         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
19449         * lib/backupfile.c (check_extension, numbered_backup):
19450         Rename locals to avoid shadowing 'basename'.
19451         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
19452         once.
19453
19454         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
19455         * lib/.cvsignore: Add getopt.h.
19456
19457 2004-10-04  Bruno Haible  <bruno@clisp.org>
19458
19459         * modules/README: New file.
19460         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
19461         not a module.
19462
19463 2004-10-02  Jim Meyering  <jim@meyering.net>
19464
19465         * lib/dirfd.h, getpagesize.h: Add copyright notice.
19466
19467 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19468
19469         * modules/strsep: New file.
19470
19471 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19472
19473         * m4/strsep.m4: New file.
19474
19475 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19476
19477         * lib/strsep.h: New file.
19478         * lib/strsep.c: New file.
19479
19480 2004-10-01  Simon Josefsson  <jas@extundo.com>
19481
19482         * lib/snprintf.c (snprintf): Handle size==0.
19483
19484 2004-10-01  Simon Josefsson  <jas@extundo.com>
19485             Bruno Haible  <bruno@clisp.org>
19486
19487         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
19488         (snprintf): Declare 'args'.
19489
19490 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
19491
19492         * lib/snprintf.c: Remove comments as to why each header is needed.
19493
19494 2004-10-01  Bruno Haible  <bruno@clisp.org>
19495
19496         * MODULES.html.sh: Add strsep.
19497
19498 2004-09-30  Simon Josefsson  <jas@extundo.com>
19499
19500         * modules/snprintf: New file.
19501
19502 2004-09-30  Simon Josefsson  <jas@extundo.com>
19503
19504         * m4/snprintf.m4: New file.
19505
19506 2004-09-30  Simon Josefsson  <jas@extundo.com>
19507
19508         * lib/snprintf.h, lib/snprintf.c: New files.
19509
19510 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19511
19512         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
19513         (hol_entry_help): Never translate an empty string.
19514         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
19515         * lib/argp.h (OPTION_NO_TRANS): New option.
19516
19517 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
19518
19519         * modules/argp (Maintainer): Replace Simon Josefsson
19520         by Sergey Poznyakoff.
19521
19522 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
19523
19524         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
19525         changes merged back into glibc.
19526
19527 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
19528
19529         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
19530
19531 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
19532
19533         * lib/xvasprintf.c: Include xalloc.h.
19534         (xvasprintf): Use xalloc_die, not xmalloc_die.
19535
19536 2004-09-29  Bruno Haible  <bruno@clisp.org>
19537
19538         * modules/alloca-opt: New file, derived from modules/alloca.
19539         * modules/allocsa: Depend on alloca-opt instead of alloca.
19540         * modules/setenv: Likewise.
19541         * modules/vasnprintf: Likewise.
19542         * MODULES.html.sh: Add alloca-opt.
19543
19544 2004-09-28  Simon Josefsson  <jas@extundo.com>
19545
19546         * gnulib-tool: New parameter --lgpl, to asseert that modules are
19547         LGPL, and to replace license template from GPL to LGPL.
19548
19549 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
19550
19551         * modules/dummy: Change license to LGPL.
19552
19553 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
19554
19555         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
19556
19557 2004-09-24  Simon Josefsson  <jas@extundo.com>
19558
19559         * modules/minmax (License): Change from GPL to LGPL.
19560
19561 2004-09-23  Simon Josefsson  <jas@extundo.com>
19562
19563         * gnulib-tool (--import): Typo.
19564
19565 2004-09-23  Simon Josefsson  <jas@extundo.com>
19566
19567         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
19568
19569 2004-09-22  Bruno Haible  <bruno@clisp.org>
19570
19571         * modules/*: Add 'License' field.
19572         * gnulib-tool: Accept --extract-license option.
19573         (func_get_license): New function.
19574
19575 2004-09-21  Bruno Haible  <bruno@clisp.org>
19576
19577         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
19578         Reported by Simon Josefsson.
19579
19580 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
19581
19582         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
19583         gl_AC_TYPE_LONG_LONG.
19584
19585 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
19586
19587         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
19588
19589 2004-09-18  Simon Josefsson  <jas@extundo.com>
19590         and  Paul Eggert  <eggert@cs.ucla.edu>
19591
19592         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
19593         calls with autoreconf.  Define GL_LIB.
19594
19595 2004-09-14  Karl Berry  <karl@gnu.org>
19596
19597         * config/srclist.txt: unsync setenv.c, sigh.
19598
19599 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
19600
19601         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
19602         Problem reported by Bruno Haible in:
19603         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
19604
19605 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
19606
19607         * config/srclist.txt: Comment out argp-pvh.c.
19608
19609 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
19610
19611         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
19612         in case some system header has #define'd it.  Problem reported by
19613         Soeren D. Schulze in
19614         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
19615
19616 2004-09-09  Karl Berry  <karl@gnu.org>
19617
19618         * regex.[ch]: delete from the root.  These were supposed to be
19619                 synced with emacs cvs, but this has not happened for about
19620                 a year, and anyway nothing else uses emacs regex.[ch].
19621                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
19622                 lib/regex[.ch] is untouched.
19623
19624 2004-09-09  Bruno Haible  <bruno@clisp.org>
19625
19626         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
19627
19628 2004-09-09  Bruno Haible  <bruno@clisp.org>
19629
19630         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
19631         modifications.
19632         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
19633
19634 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
19635
19636         * modules/xvasprintf: New file.
19637         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
19638
19639 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
19640
19641         * lib/xvasprintf.h: New file.
19642         * lib/xvasprintf.c: New file.
19643         * lib/xasprintf.c: New file.
19644
19645 2004-09-08  Bruno Haible  <bruno@clisp.org>
19646
19647         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
19648
19649 2004-09-08  Bruno Haible  <bruno@clisp.org>
19650
19651         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
19652         length is > INT_MAX.
19653         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
19654         more.
19655
19656 2004-09-08  Bruno Haible  <bruno@clisp.org>
19657
19658         * lib/stdint_.h: New file, taken from GNU clisp.
19659
19660 2004-09-08  Bruno Haible  <bruno@clisp.org>
19661             Oskar Liljeblad  <oskar@osk.mine.nu>
19662
19663         * modules/stdint: New file.
19664         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
19665
19666 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19667
19668         Import from coreutils.
19669         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
19670         strings on unbounded length.  alloca's performance benefits aren't
19671         that important here.
19672         (V_STRDUP): Remove.
19673         (parse_with_separator): New function, with most of the internals
19674         of the old parse_user_spec.  Allow user to omit both user and group,
19675         for compatibility with FreeBSD.
19676         Clone only the user name, not the entire spec.
19677         Do not set *uid, *gid unless entirely successful.
19678         Avoid memory leak in some failing cases.
19679         Fix regression for USER.GROUP reported by Dmitry V. Levin in
19680         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
19681         (parse_user_spec): Rewrite to use parse_with_separator.
19682
19683 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19684
19685         * modules/userspec: Don't depend on alloca.
19686
19687 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19688
19689         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
19690
19691 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
19692
19693         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
19694         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
19695         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
19696
19697 2004-08-16  Simon Josefsson  <jas@extundo.com>
19698
19699         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
19700         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
19701         Add --dry-run for --import.
19702         Let user provided command line parameters override configure.ac
19703         settings.
19704
19705 2004-08-12  Simon Josefsson  <jas@extundo.com>
19706
19707         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
19708         as discussed with Paul Eggert in threads rooted at
19709         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
19710         and
19711         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
19712         Before, the test was empty, and relied on ELIDE_CODE in source
19713         code.)
19714         (gl_PREREQ_GETOPT): New macro.
19715         (gl_GETOPT): Use them.
19716
19717 2004-08-12  Simon Josefsson  <jas@extundo.com>
19718
19719         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
19720         * lib/getopt_.h: Renamed from getopt.h.
19721
19722 2004-08-12  Simon Josefsson  <jas@extundo.com>
19723
19724         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
19725         Change default library name from libfoo to libgnu.
19726         Now, if you have a configure.ac that says:
19727                 gl_SOURCE_BASE(gl)
19728                 gl_M4_BASE(gl/m4)
19729                 gl_MODULES(error getopt etcetera)
19730                 gl_INIT
19731         you can import all you need by running:
19732                 ../gnulib/gnulib-tool --import
19733
19734         * modules/getopt (Files): Rename getopt.h to getopt_.h.
19735         (Makefile.am): Rewrite, use logic from argz.
19736         (Include): Use <getopt.h> instead of "getopt.h".
19737
19738 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
19739
19740         * modules/argp (Files): Add m4/unlocked-io.m4.
19741         (Depends-on): Add extensions.
19742
19743 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
19744
19745         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
19746         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
19747         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
19748         Check for program_invocation_name, program_invocation_short_name,
19749         flockfile, funlockfile, features.h, _getopt_long_only_r.
19750
19751 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
19752
19753         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
19754         its complicated substitute.
19755         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
19756         and program_invocation_name.
19757         (__argp_basename) [!_LIBC]: Remove; the only use was
19758         replaced by its body.
19759         (__argp_short_program_name): Change condition from
19760         !defined __argp_short_program_name to
19761         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
19762         to match argp-namefrob.h.
19763         (__argp_failure): Don't assume strerror_r returns char *.
19764         * lib/argp-parse.c (N_): Define unconditionally.
19765         (argp_default_options): Fill out initializers with 0 to avoid
19766         gcc warnings.
19767
19768 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
19769
19770         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
19771         getopt1.c.
19772
19773 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
19774
19775         Merge from coreutils.
19776
19777         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
19778
19779         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
19780         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
19781
19782 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
19783
19784         Merge from coreutils.
19785
19786         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
19787         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
19788         for Reliant Unix 5.43.
19789
19790         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
19791         (union fooround): Use uintmax_t, not long int.
19792         The rest is a merge from libc:
19793         [defined _LIBC]: Include <shlib-compat.h>.
19794         (_obstack) [defined _LIBC]: Remove after 2.3.4.
19795
19796         * lib/settime.c (settime): Recode to avoid warning with
19797         Sun Forte C 6U2.
19798
19799         * lib/strverscmp.c: Convert to UTF-8.
19800
19801 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
19802
19803         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
19804         m4/uintmax_t.m4.
19805
19806 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
19807
19808         * modules/xalloc-die: New file.
19809         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
19810
19811         * modules/md5 (Files): Add m4/uint32_t.m4.
19812         * modules/sha1: Renamed from modules/sha.
19813         (Files):
19814         Rename lib/sha.h to lib/sha1.h.
19815         Rename lib/sha.c to lib/sha1.c.
19816         Rename m4/sha.m4 to m4/sha1.m4.
19817         (lib_SOURCES): Likewise.
19818         (configure.ac): Rename gl_SHA to gl_SHA1.
19819         (Include): sha.h -> sha1.h.
19820
19821 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
19822
19823         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
19824         * m4/sha1.m4: Renamed from sha.m4.
19825         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
19826
19827 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
19828
19829         * lib/obstack.h (obstack_empty_p):
19830         Don't assume that chunk->contents is suitably aligned.
19831         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
19832         Likewise. Problem reported by Benno in
19833         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
19834
19835         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
19836         readable.  This could be improved further but it'd take some work.
19837
19838 2004-08-08  Simon Josefsson  <jas@extundo.com>
19839
19840         * modules/xgethostname (Depends-on): Remove exit and error (not
19841         used).
19842
19843         * modules/getpass-gnu: Add getpass.h.
19844         (Depends-on): Add stdbool.
19845         * modules/getpass: Add getpass.h.
19846
19847 2004-08-08  Simon Josefsson  <jas@extundo.com>
19848
19849         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
19850         Check getpass declaration.
19851
19852 2004-08-08  Simon Josefsson  <jas@extundo.com>
19853
19854         * lib/xgethostname.c: Don't include error.h (not used).
19855
19856         * lib/getpass.h: Add.
19857         * lib/getpass.c: Include getpass.h first.
19858
19859 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
19860
19861         * lib/xalloc-die.c: New file.
19862         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
19863         All uses removed.
19864         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
19865         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
19866         xalloc-die.c.
19867         (_, N_, xalloc_die): Move to xalloc-die.c.
19868         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
19869         so that we needn't mess with xalloc_msg_memory_exhausted.
19870
19871         * lib/sha1.h: Renamed from sha.h.
19872         (SHA1_H): Renamed from _SHA_H.
19873         (sha1_ctx): Renamed from sha_ctx.
19874         (sha1_init_ctx): Renamed from sha_init_ctx.
19875         (sha1_process_block): Renamed from sha_process_block.
19876         (sha1_process_bytes): Renamed from sha_process_bytes.
19877         (sha1_finish_ctx): Renamed from sha_finish_ctx.
19878         (sha1_read_ctx): Renamed from sha_read_ctx.
19879         (sha1_stream): Renamed from sha_stream.
19880         (sha1_buffer): Renamed from sha_buffer.
19881         * lib/sha1.c: Likewise; renamed from sha.c.
19882         Do not include <sys/types.h>.
19883         Include <stddef.h> rather than <stdlib.h>.
19884
19885 2004-08-08  Bruno Haible  <bruno@clisp.org>
19886
19887         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
19888         FILESYSTEM_PREFIX_LEN.
19889         * lib/progreloc.c: Likewise.
19890         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
19891
19892 2004-08-06  Simon Josefsson  <jas@extundo.com>
19893
19894         * modules/progname (Depends-on): Don't depend on stdbool.
19895
19896 2004-08-06  Simon Josefsson  <jas@extundo.com>
19897
19898         * modules/getsubopt: New file.
19899         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19900         getsubopt.
19901
19902 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
19903
19904         More merge from coreutils.
19905
19906         * m4/utimens.m4, m4/utimecmp.m4: New files.
19907         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
19908         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
19909         prereq.m4, sha.m4: Import changes from coreutils.
19910
19911 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
19912
19913         More merge from coreutils.
19914         * modules/raise, modules/readtokens0, modules/utimens:
19915         * modules/utimecmp, module/xnanosleep: New files.
19916         * modules/strftime: Add lib/strftime.h.
19917         Change include from <time.h> to "strftime.h".
19918         * modules/yesno: Add lib/yesno.h.
19919         * modules/backupfile: Remove lib/addext.c.
19920         * modules/euidaccess: Add stat-macros.h.
19921         * modules/canonicalize, modules/euidaccess,
19922         modules/filemode, modules/lchown, modules/makepath,
19923         modules/rmdir, modules/stat: Likewise.
19924
19925 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
19926
19927         Merge from tar.
19928         * lib/argp-help.c (make_hol, hol_append): Don't assume that
19929         SIZE_MAX is a valid preprocessor constant.
19930         (__argp_basename): Change from "#ifndef _LIBC"
19931         to "#ifndef __argp_short_program_name", so that
19932         we don't compile these functions for tar.
19933
19934         More merges from coreutils.
19935         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
19936         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
19937         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
19938         * lib/addext.c: Remove; no longer needed.
19939         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
19940         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
19941         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
19942         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
19943         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
19944         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
19945         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
19946         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
19947         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
19948         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
19949         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
19950         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
19951         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
19952         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
19953         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
19954         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
19955         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
19956         Import changes from coreutils.
19957
19958 2004-08-05  Simon Josefsson  <jas@extundo.com>
19959
19960         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
19961
19962 2004-08-05  Simon Josefsson  <jas@extundo.com>
19963
19964         * m4/getsubopt.m4: New file.
19965
19966 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
19967
19968         Merge from coreutils.
19969
19970         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
19971         * m4/getcwd-path-max.m4: New files.
19972
19973         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
19974         FILESYSTEM_PREFIX_LEN ->
19975         FILE_SYSTEM_PREFIX_LEN.
19976         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
19977         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
19978         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
19979         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
19980
19981         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
19982         prerequisite modules now handle the DOS stuff.
19983         Don't check for unistd.h.
19984
19985 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
19986
19987         Merge from coreutils.
19988
19989         * lib/.gdb-history: Remove; this doesn't belong here.
19990
19991         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
19992         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
19993         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
19994         * lib/getcwd.c: New files.
19995
19996         * lib/dirname.h: Include <stdbool.h>.
19997         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
19998         for consistency with POSIX terminology.  All uses changed.
19999         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
20000         (strip_trailing_slashes): Use bool for booleans.
20001         * lib/stripslash.c (strip_trailing_slashes): Likewise.
20002
20003         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
20004         sometimes returns a positive errno value even when it succeeds.
20005         (print_errno_message) [!LIBC]: Fall back on strerror if
20006         __strerror_r fails.
20007
20008         * lib/path-concat.c (mempcpy): Don't define if a system header defines
20009         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
20010         (longest_relative_suffix): New function.
20011         (path_concat): Use it.  Assume first argument is not NULL.
20012         Port to DOS.  Omit redundant separators.
20013         Report an error instead of returning NULL.
20014         Use mempcpy instead of memcpy.
20015         (xpath_concat): Remove: not declared or used.
20016
20017         * lib/same.h: Include <stdbool.h>
20018         (same_name): Return bool, not int.
20019         * lib/same.c (same_name): Likewise.
20020         (errno): Don't declare; we assume C89 or better now.
20021
20022         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
20023         if not already defined.
20024
20025         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
20026         * lib/dup-safer.c (errno): Likewise.
20027
20028 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
20029
20030         Merge from coreutils.
20031         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
20032         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
20033         * modules/path-concat: Don't depend on strdup.
20034
20035 2004-08-03  Simon Josefsson  <jas@extundo.com>
20036
20037         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
20038         * lib/progname.h: Don't include stdbool.h.
20039
20040 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
20041
20042         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
20043         * MODULES.html.sh (func_all_modules): Remove fatal.
20044
20045 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
20046
20047         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
20048
20049 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
20050
20051         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
20052         working.
20053
20054 2004-08-02  Simon Josefsson  <jas@extundo.com>
20055
20056         * lib/getsubopt.h: New file, with comments from Bruno Haible.
20057         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
20058         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
20059
20060 2004-08-01  Simon Josefsson  <jas@extundo.com>
20061
20062         * lib/xgetdomainname.c: Include stdlib.h, for free().
20063
20064 2004-07-19  Bruno Haible  <bruno@clisp.org>
20065
20066         * MODULES.html.sh (func_all_modules): Add dummy.
20067
20068 2004-07-16  Simon Josefsson  <jas@extundo.com>
20069
20070         * modules/dummy: New file.
20071
20072 2004-07-16  Simon Josefsson  <jas@extundo.com>
20073
20074         * lib/dummy.c: New file.
20075
20076 2004-07-16  Bruno Haible  <bruno@clisp.org>
20077
20078         * lib/backupfile.h: Add extern "C" for C++.
20079         * lib/closeout.h: Likewise.
20080         * lib/copy-file.h: Likewise.
20081         * lib/findprog.h: Likewise.
20082         * lib/full-write.h: Likewise.
20083         * lib/pathname.h: Likewise.
20084         * lib/progname.h: Likewise.
20085         * lib/stpcpy.h: Likewise.
20086         * lib/stpncpy.h: Likewise.
20087         * lib/strcase.h: Likewise.
20088         * lib/strstr.h: Likewise.
20089         * lib/xalloc.h: Likewise.
20090
20091         * lib/mbswidth.h: Add extern "C" for C++.
20092         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
20093
20094 2004-07-13  Robert Millan  <robertmh@gnu.org>
20095
20096         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
20097
20098 2004-07-09  Simon Josefsson  <jas@extundo.com>
20099
20100         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
20101         failed without this.)
20102
20103 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
20104
20105         * modules/chown (Files): Add lib/fchown-stub.c, since
20106         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
20107
20108 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
20109
20110         * lib/fchown-stub.c: New file.
20111
20112 2004-06-24  Jim Meyering  <jim@meyering.net>
20113
20114         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
20115
20116 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
20117
20118         * modules/argz: Omit "#include".
20119
20120         * MODULES.html.sh (func_all_modules): Add calloc, to match
20121         2004-06-01 addition of calloc module.
20122
20123 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
20124
20125         * m4/argz.m4: New file, which is autoupdated from libtool.
20126
20127 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
20128
20129         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
20130         libtool.
20131
20132 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
20133
20134         * config/srclist-update: Don't insist on "USA." before the
20135         close-comment, as libtool omits the period and puts the */ on a
20136         separate line.
20137         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
20138         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
20139
20140 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
20141
20142         * modules/argz: New file.
20143         * MODULES.html.sh (func_all_modules): Add argz.
20144
20145 2004-06-12  Jim Meyering  <jim@meyering.net>
20146         and  Paul Eggert  <eggert@cs.ucla.edu>
20147
20148         * modules/hash (Files): Add lib/xalloc.h.
20149         * modules/pipe (Depends-on): Add wait-process.
20150         * modules/stat (Depends-on): Add xalloc.
20151         * modules/userspec (Files): Add lib/userspec.h.
20152         * modules/xstrto
20153
20154         Upgrade from gettext-0.13.
20155         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
20156         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
20157         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
20158
20159 2004-06-10  Jim Meyering  <jim@meyering.net>
20160
20161         * lib/calloc.c: New file.
20162
20163 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
20164
20165         * lib/getdate.y (yylex): Allow space between sign and number.
20166         Problem reported by Dan Jacobson.
20167
20168 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
20169
20170         Merge from coreutils CVS.
20171
20172         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
20173         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
20174         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
20175         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
20176         xstrtol.m4: Fix copyright date and/or serial number.
20177
20178         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
20179         See if we need an fchown replacement.
20180         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
20181         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
20182         and use the replacement function if we detect either defect.
20183
20184         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
20185         gl_UTIMECMP.
20186
20187 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
20188         and  Jim Meyering  <jim@meyering.net>
20189
20190         Merge from coreutils CVS.
20191
20192         * lib/stat-macros.h: New file, with contents from file-type.h
20193         and coreutils' system.h.
20194         * lib/file-type.c: Include "stat-macros.h".
20195         * lib/file-type.h (file_type): Move all macro definitions to new file,
20196         stat-macros.h.
20197
20198         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
20199         Wrap old code with this conditional.
20200         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
20201         function that does not dereference symlinks.
20202         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
20203
20204         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
20205         dependency problems.
20206         (xreadlink): Accept new arg SIZE, for efficiency.
20207         All decls and uses changed.
20208         * lib/xreadlink.h: Include <stddef.h>, for size_t.
20209
20210         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
20211         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
20212
20213         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
20214         sysexits.h.
20215
20216 2004-06-01  Jim Meyering  <jim@meyering.net>
20217
20218         * m4/calloc.m4: New file.
20219
20220 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
20221
20222         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
20223         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
20224         Also, fix a typo in a diagnostic.
20225
20226 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
20227
20228         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
20229         or AC_FUNC_REALLOC.
20230
20231 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
20232
20233         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
20234         macros to be defined.
20235         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
20236         the allocator returns NULL because the requested size is zero.
20237
20238 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20239
20240         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
20241         var.  Add comment explaining why libc still defines it.  This
20242         merges the following patch from glibc:
20243         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
20244
20245 2004-05-20  Andreas Schwab  <schwab@suse.de>
20246
20247         * m4/free.m4: Replace free if it not known to work, not the other
20248         way round.
20249
20250 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
20251
20252         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
20253         present in glibc since revision 1.1 of this file.
20254         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
20255         obstack_alignment_mask, obstack_alloc, obstack_base,
20256         obstack_blank, obstack_blank_fast, obstack_chunk_size,
20257         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
20258         obstack_grow0, obstack_init, obstack_int_grow,
20259         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
20260         obstack_next_free, obstack_object_size, obstack_ptr_grow,
20261         obstack_ptr_grow_fast, obstack_room): Remove declarations of
20262         nonexistent functions.
20263
20264 2004-05-18  Karl Berry  <karl@gnu.org>
20265
20266         * config/srclist.txt: break link for vasnprintf.c.
20267
20268 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
20269
20270         Port obstack to the AS/400, where pointers are 16 bytes wide and
20271         you cannot cast an integer to a valid pointer.  This patch is
20272         currently waiting to be integrated into glibc; see
20273         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
20274
20275         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
20276         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
20277         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
20278         (struct obstack): temp member is now a union of a pointer and
20279         an integer, instead of an integer.  All integer uses changed.
20280         This does not affect the physical layout of struct obstack,
20281         except on hosts (like the AS/400) where the size or alignment of
20282         void * is greater than that of ptrdiff_t.
20283         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
20284         __STDC__)]: Store temporary in pointer member of union, not
20285         integer member.
20286         * lib/obstack.c: Include <stddef.h>, for offsetof.
20287         (struct fooalign): Remove; it doesn't need a name.
20288         (union fooround): Change double to long double, and add void *.
20289         (DEFAULT_ALIGNMENT): Use offsetof to compute.
20290         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
20291         not a macro.  Hence the values are always int; so remove all
20292         casts-to-int in uses.
20293
20294 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
20295
20296         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
20297         we can get this patch merged into glibc.
20298
20299 2004-05-17  Derek R. Price  <derek@ximbiot.com>
20300             Paul Eggert  <eggert@cs.ucla.edu>
20301
20302         * m4/argp: Depend on alloca.
20303
20304 2004-05-17  Derek R. Price  <derek@ximbiot.com>
20305             Paul Eggert  <eggert@cs.ucla.edu>
20306
20307         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
20308         freecoding.
20309
20310 2004-05-17  Bruno Haible  <bruno@clisp.org>
20311
20312         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
20313         precision that consists of a '.' followed by an empty digit string.
20314         Patch by Tor Lillqvist <tml@iki.fi>.
20315
20316 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
20317
20318         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
20319         for backward compatibility with older code.  We need our own
20320         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
20321         it under some other name, and our alloca.h will define it.
20322
20323 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
20324             Derek Price  <derek@ximbiot.com>
20325
20326         * lib/alloca.c: Include <alloca.h>, to get our interface.
20327         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
20328         include <alloca.h> first.  Use C89 prototype for alloca; this
20329         requires including <stddef.h> for size_t.  Use extern "C" if C++.
20330         Use #elif for simplicity, since we can assume C89 now.
20331         Don't try to source the system alloca.h since it will not be found
20332         and to prevent recursively including its replacement.
20333         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
20334         * lib/regex.c: Likewise.
20335
20336 2004-05-16  Derek Price  <derek@ximbiot.com>
20337             Paul Eggert  <eggert@cs.ucla.edu>
20338
20339         getline cleanup.  This changes the getndelim2 API: both order of
20340         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
20341         no delimiter).
20342
20343         * lib/getline.c: Don't include stddef.h or stdio.h, since our
20344         interface does that.
20345         (getline): Always use getdelim, so that we don't have two
20346         copies of this code.
20347         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
20348         if available.
20349         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
20350         (GETNDELIM2_MAXIMUM): New macro.
20351         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
20352         instead of the old practice of delim2==0.  All callers changed.
20353         Return -1 on overflow, instead of returning junk.
20354         Do not set *linesize unless allocation succeeds.
20355         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
20356         that we include sys/types.h.
20357         * lib/getnline.h: Likewise.
20358         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
20359         (getndelim2): Reorder arguments.
20360         * lib/getnline.c (getnline, getndelim):
20361         Don't discard the NMAX argument.
20362         (getnline): Invoke getndelim, to avoid code duplication.
20363         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
20364         of (size_t) -1 by callers of the getnline family.
20365
20366 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20367
20368         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
20369         Check for gettimeofday.
20370         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
20371         Check for settimeofday, stime.
20372
20373 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20374
20375         * lib/nanosleep.c (suspended): Change its type from int to
20376         sig_atomic_t volatile.
20377         (first_call): Make it private to rpl_nanosleep, and have it
20378         be zero initially as that's a bit faster.
20379         (my_usleep): Round up fractional times instead of truncating them,
20380         as this is the usual meaning for 'sleep'.
20381
20382         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
20383         doesn't work.
20384         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
20385         (ENOSYS): Define if not defined.
20386         (settime): Fall back on stime if it exists and settimeofday fails.
20387         But don't bother with fallbacks if a method fails with errno == EPERM.
20388
20389 2004-05-11  Jim Meyering  <jim@meyering.net>
20390
20391         Prior to this change, the save_cwd caller required read access to the
20392         current directory on most systems (ones with the fchdir function).
20393
20394         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
20395         fails, try write-only, and finally, resort to using xgetcwd.
20396
20397 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
20398
20399         * lib/obstack.c, obstack.h: Import changes from libc.
20400
20401 2004-04-28  Bruno Haible  <bruno@clisp.org>
20402
20403         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
20404         also implicitly appends .exe to executables.
20405         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
20406         accepts Windows pathnames.
20407         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
20408         Treat Cygwin like Windows, since it now accepts Windows pathnames.
20409         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
20410         Treat Cygwin like Windows, since it now accepts Windows pathnames.
20411         Reported by Derek Robert Price <derek@ximbiot.com>.
20412
20413 2004-04-21  Karl Berry  <karl@gnu.org>
20414
20415         * config/srclist.txt (localcharset.c): break sync.
20416
20417 2004-04-20  Paul Eggert  <eggert@twinsun.com>
20418
20419         * m4/host-os.m4: Add a copyright notice.
20420
20421 2004-04-20  Jim Meyering  <jim@meyering.net>
20422
20423         Change UTILS_ to gl_ in AC_DEFINE'd names.
20424         Change utils_- and jm_-prefixed variables, too.
20425         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
20426         UTILS_FUNC_MKDIR_TRAILING_SLASH.
20427         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
20428
20429         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
20430         Don't emit trailing blanks.
20431         Also rename jm_-prefixed variables to have gl_ prefix.
20432
20433         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
20434         Also rename jm_-prefixed variables to have gl_ prefix.
20435
20436         * m4/jm-macros.m4: Reflect the renamings.
20437         * m4/prereq.m4: Likewise.
20438
20439 2004-04-20  Jim Meyering  <jim@meyering.net>
20440
20441         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
20442         memory.
20443
20444 2004-04-20  Jim Meyering  <jim@meyering.net>
20445             Bruno Haible  <bruno@clisp.org>
20446
20447         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
20448         memory when realloc fails.
20449
20450 2004-04-19  Jim Meyering  <jim@meyering.net>
20451
20452         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
20453         now that readutmp.c may call `free (0)'.
20454
20455 2004-04-19  Bruno Haible  <bruno@clisp.org>
20456
20457         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
20458         * m4/inttypes_h.m4: Likewise.
20459         * m4/stdint_h.m4: Likewise.
20460         * m4/intmax_t.m4: Likewise.
20461         * m4/uintmax_t.m4: Likewise.
20462
20463 2004-04-18  Jim Meyering  <jim@meyering.net>
20464
20465         * m4/prereq.m4: Don't forbid jm_ prefix.
20466
20467         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
20468         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
20469         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
20470         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
20471         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
20472         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
20473         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
20474         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
20475         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
20476         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
20477         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
20478         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
20479         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
20480         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
20481         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
20482         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
20483         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
20484         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
20485         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
20486
20487 2004-04-18  Jim Meyering  <jim@meyering.net>
20488
20489         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
20490         failure, don't leak memory and do call END_UTMP_ENT.
20491
20492 2004-04-16  Jim Meyering  <jim@meyering.net>
20493
20494         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
20495         coreutils' stat program.
20496         (gl_PREREQ): Don't require jm_PREREQ_STAT.
20497
20498 2004-04-11  Paul Eggert  <eggert@twinsun.com>
20499
20500         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
20501         C89.
20502         (CHAR_BIT): Remove, since we assume C89.
20503         Include <stdint.h> if available, as per current Autoconf CVS advice.
20504
20505 2004-03-31  Jim Meyering  <jim@meyering.net>
20506
20507         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
20508         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
20509         * m4/xalloc.m4: Likewise.
20510
20511 2004-03-30  Paul Eggert  <eggert@twinsun.com>
20512
20513         Merge from coreutils.
20514
20515         * m4/inttostr.m4: New file.
20516         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
20517         Require AM_STDBOOL_H and gl_TIMESPEC instead.
20518         Require gl_CLOCK_TIME.
20519         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
20520
20521 2004-03-30  Paul Eggert  <eggert@twinsun.com>
20522
20523         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
20524         not bool, to be more consistent with Unix conventions.
20525         Suggested by Bruno Haible.
20526
20527         Merge from coreutils.
20528
20529         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
20530         * lib/umaxtostr.c: New files.
20531
20532         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
20533         the usual <time.h> dance.
20534         (get_date): Change signature to support fractional time stamps.
20535         All callers changed.
20536         * lib/getdate.y: Include "getdate.h" first, as we can now
20537         assume C89 and don't need to worry about 'const'.
20538         Similarly, include "unlocked-io.h" near start, not in middle.
20539         Include <limits.h>.
20540         (textint.value): Use long int rather than int.
20541         (textint.digits): Use size_t rather than int.
20542         (BILLION, LOG10_BILLION): New constants.
20543         (parser_control): New member rel_ns.  Members day_ordinal,
20544         time_zone, month, day, hour, minutes, rel_year, rel_month,
20545         rel_day, rel_hour, rel_minutes, rel_seconds
20546         are now long int, not int.  Member seconds is now struct timespec,
20547         not int.  New member timespec_seen.  Members dates_seen, days_seen,
20548         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
20549         not int.
20550         (%union.intval): Now long int, not int.
20551         New member timespec.
20552         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
20553         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
20554         (spec): Now is a timespec or an item list.
20555         (timespec, items): New nonterminals.
20556         (time, rel, relunit, number, get_date):
20557         Add support for fractional seconds.
20558         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
20559         (gmtime, localtime, mktime): Remove decls; not needed with C89.
20560         (to_hour): First arg is now long int, not int.
20561         (to_year): Returns long int, not int.
20562         Don't treat year -70 like 70.
20563         (tm_diff): Returns long int, not int.
20564         (lookup_word): Use bool instead of int when appropriate.
20565         (yylex): Use size_t for count, not int.
20566         Detect overflow when parsing large integer constants.
20567         Add support for fractions.
20568         (get_date): Make pointers 'const' if possible.
20569         Use more-portable code to detect integer overflow.
20570         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
20571         Don't use ctime; it's not reliable if the year has >4 digits.
20572
20573         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
20574         This is for compatibility with BSD.
20575
20576         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
20577         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
20578         From coreutils' system.h.
20579
20580         * lib/userspec.c: Don't include "posixver.h".
20581         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
20582         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
20583         compatible extension.  Simplify code by removing a boolean int
20584         that was always nonzero if a string was nonnull.
20585
20586 2004-03-30  Jim Meyering  <jim@meyering.net>
20587
20588         Merge from coreutils.
20589
20590         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
20591         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
20592         on some systems one must include <grp.h> before it.
20593         Reported by Christian Krackowizer.
20594
20595 2004-03-30  Jim Meyering  <jim@meyering.net>
20596
20597         Merge from coreutils.
20598
20599         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
20600
20601         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
20602         an empty input stream.
20603
20604         * lib/readtokens.c: Include <stdbool.h>.
20605         (readtoken): Use `size_t' rather than int/long.
20606         All callers adjusted.
20607         Use `bool' rather than `int' where appropriate.
20608         Use memset rather than an explicit loop.
20609         Use x2nrealloc rather than xrealloc.
20610         Allow the use of `\0' as a delimiter.
20611         (readtokens): Likewise.
20612         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
20613
20614 2004-03-30  Jim Meyering  <jim@meyering.net>
20615
20616         * m4/realloc.m4: Remove file, since now it does no more than
20617         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
20618         the `configure.ac' section of module/realloc.
20619         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
20620
20621 2004-03-30  Bruno Haible  <bruno@clisp.org>
20622
20623         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
20624         nonnull.
20625
20626 2004-03-29  Paul Eggert  <eggert@twinsun.com>
20627
20628         Merge changes to getloadavg.c from coreutils and Emacs.
20629
20630         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
20631         Define to an expression, not to the empty string.
20632         Include cloexec.h and xalloc.h.
20633         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
20634         Use set_cloexec_flag rather than rolling our own.
20635         * lib/cloexec.c, lib/cloexec.h: New files.
20636
20637 2004-03-29  Paul Eggert  <eggert@twinsun.com>
20638
20639         * m4/cloexec.m4: New file.
20640
20641 2004-03-18  Paul Eggert  <eggert@twinsun.com>
20642
20643         * lib/getopt.h: Sync with libc CVS.
20644
20645 2004-03-18  Paul Eggert  <eggert@twinsun.com>
20646             Bruno Haible  <bruno@clisp.org>
20647
20648         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
20649         mbswidth.
20650
20651 2004-03-18  Paul Eggert  <eggert@twinsun.com>
20652             Bruno Haible  <bruno@clisp.org>
20653
20654         * lib/mbswidth.h: Include <wchar.h> only if
20655         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
20656         <wchar.h>.
20657         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
20658
20659 2004-03-09  Paul Eggert  <eggert@twinsun.com>
20660
20661         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
20662         Sync with libc CVS.
20663         * lib/getopt_int.h: New file, also synced from libc.
20664
20665 2004-03-09  Paul Eggert  <eggert@twinsun.com>
20666
20667         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
20668         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
20669         Bring back getopt.c, getopt.h, getopt1.c.
20670
20671 2004-03-07  Paul Eggert  <eggert@twinsun.com>
20672
20673         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
20674         All uses changed.  Check for sa_sigaction member; this fixes
20675         a bug first reported by Jason Andrade in
20676         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
20677
20678 2004-03-07  Paul Eggert  <eggert@twinsun.com>
20679
20680         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
20681         '#if' expressions.  Unlike the code it replaces, it does not
20682         depend on (defined _SC_PAGESIZE).  However, it does depend on
20683         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
20684         first reported by Jason Andrade in
20685         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
20686
20687 2004-02-25  Simon Josefsson  <jas@extundo.com>
20688
20689         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
20690
20691 2004-02-25  Simon Josefsson  <jas@extundo.com>
20692
20693         * lib/strdup.h: New file.
20694         * lib/strdup.c: Include it.
20695         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
20696         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
20697
20698 2004-02-23  Karl Berry  <karl@gnu.org>
20699
20700         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
20701         (from fencepost.gnu.org:/gd/gnuorg).
20702
20703 2004-02-23  Karl Berry  <karl@gnu.org>
20704
20705         * config/srclistvars.sh (GNUORG) [karl]: redefine.
20706         * config/srclist.txt: add maintain/standards documents.
20707
20708 2004-02-18  Bruno Haible  <bruno@clisp.org>
20709
20710         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
20711         Reported by Derek Robert Price <derek@ximbiot.com>.
20712
20713 2004-02-16  Karl Berry  <karl@gnu.org>
20714
20715         * config/mkinstalldirs, install-sh: update from automake.
20716
20717 2004-02-06  Karl Berry  <karl@gnu.org>
20718
20719         * m4/po.m4: update from gettext 0.14.1.
20720
20721 2004-02-06  Karl Berry  <karl@gnu.org>
20722
20723         * lib/config.charset: update from gettext 0.14.1.
20724
20725 2004-02-05  Paul Eggert  <eggert@twinsun.com>
20726
20727         Add comments and code, prompted by suggestions from Bruno Haible
20728         for sh-quote.
20729         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
20730         describing the enum quoting_style values.
20731         * lib/quotearg.c (quotearg_alloc): New function.
20732         (quotearg_buffer_restyled): Treat lone { and } as special.
20733         Treat = as special.  Work around bug with older shells
20734         that "see" a '\' that is really the 2nd byte of a multibyte char.
20735         Quote empty string with shell_quoting_style.
20736
20737 2004-02-03  Bruno Haible  <bruno@clisp.org>
20738
20739         * m4/pipe.m4: New file, from GNU gettext.
20740
20741 2004-02-03  Bruno Haible  <bruno@clisp.org>
20742
20743         * lib/pipe.h: New file, from GNU gettext.
20744         * lib/pipe.c: New file, from GNU gettext.
20745
20746 2004-01-27  Bruno Haible  <bruno@clisp.org>
20747
20748         * m4/execute.m4: New file, from GNU gettext.
20749
20750 2004-01-27  Bruno Haible  <bruno@clisp.org>
20751
20752         * lib/execute.h: New file, from GNU gettext.
20753         * lib/execute.c: New file, from GNU gettext.
20754         * lib/w32spawn.h: New file, from GNU gettext.
20755
20756 2004-01-24  Paul Eggert  <eggert@twinsun.com>
20757
20758         Merge from diffutils.
20759
20760         * lib/file-type.c (file_type): Add typed memory objects.
20761         * lib/file-type.h (S_TYPEISTMO): New macro.
20762
20763         * lib/c-stack.h (c_stack_action): Remove argv argument.
20764         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
20765         (die): Don't calculate message unless segv_action returns.
20766         (get_stack_location, min_address_from_argv, max_address_from_argv,
20767         volatile stack_base, volatile_stack_size): Remove.
20768         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
20769         that every segmentation violation is a stack overflow.  (Ouch!)
20770         See Debian bug 136249 (still outstanding) for more info about why
20771         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
20772
20773 2004-01-24  Paul Eggert  <eggert@twinsun.com>
20774
20775         Exit-status fix from coreutils.
20776
20777         Use exit_failure consistently in place of EXIT_FAILURE,
20778         so that program exit statuses are consistent on failure.
20779
20780         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
20781         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
20782         * lib/argmatch.h: Comment fix to match the above.
20783         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
20784         Now a macro referring to exit_failure, instead of a separate
20785         variable.  Include "exitfail.h" to get it.
20786         * lib/xstrtol.h: Include "exitfail.h".
20787         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
20788
20789         * lib/long-options.c (parse_long_options): Use prototype
20790         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
20791         for clarity.
20792
20793 2004-01-21  Jim Meyering  <jim@meyering.net>
20794
20795         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
20796         so as not to conflict with a different-sized __mktime_internal
20797         function in GNU libc.
20798         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
20799         Problem building statically-linked `ls' reported by Michael Brunnbauer.
20800
20801 2004-01-20  Karl Berry  <karl@gnu.org>
20802
20803         * config/config.guess: update from config.
20804
20805         * config/srclistvars.sh: GNUWWWLICENSES for karl.
20806
20807 2004-01-20  Bruno Haible  <bruno@clisp.org>
20808
20809         Safer stack allocation.
20810         * lib/setenv.c: Include allocsa.h.
20811         (alloca): Remove fallback definition.
20812         (freea): Remove macro.
20813         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
20814         instead of freea.
20815
20816 2004-01-20  Bruno Haible  <bruno@clisp.org>
20817
20818         * m4/eealloc.m4: New file, from GNU gettext.
20819
20820 2004-01-20  Bruno Haible  <bruno@clisp.org>
20821
20822         * m4/allocsa.m4: New file, from GNU gettext.
20823
20824 2004-01-20  Bruno Haible  <bruno@clisp.org>
20825
20826         * lib/xallocsa.h: New file, from GNU gettext.
20827         * lib/xallocsa.c: New file, from GNU gettext.
20828
20829 2004-01-20  Bruno Haible  <bruno@clisp.org>
20830
20831         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
20832
20833 2004-01-20  Bruno Haible  <bruno@clisp.org>
20834
20835         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
20836         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
20837         specially.
20838
20839 2004-01-20  Bruno Haible  <bruno@clisp.org>
20840
20841         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
20842         patch.
20843
20844 2004-01-20  Bruno Haible  <bruno@clisp.org>
20845
20846         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
20847
20848 2004-01-20  Bruno Haible  <bruno@clisp.org>
20849
20850         * lib/eealloc.h: New file.
20851
20852 2004-01-20  Bruno Haible  <bruno@clisp.org>
20853
20854         * lib/binary-io.h: Avoid warnings on Cygwin.
20855
20856 2004-01-20  Bruno Haible  <bruno@clisp.org>
20857
20858         * lib/allocsa.h: New file, from GNU gettext.
20859         * lib/allocsa.c: New file, from GNU gettext.
20860
20861 2004-01-18  Karl Berry  <karl@gnu.org>
20862
20863         * doc/gpl.texi, doc/lgpl.texi: new files.
20864
20865 2004-01-18  Karl Berry  <karl@gnu.org>
20866
20867         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
20868         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
20869
20870 2004-01-15  Paul Eggert  <eggert@twinsun.com>
20871
20872         Merge from coreutils.
20873
20874         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
20875         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
20876         (gl_DEFAULT_POSIX2_VERSION): Move
20877         the documentation from 'configure' into 'config.hin',
20878         so that 'configure --help' isn't burdened by it and
20879         we don't have to worry about its formatting there.
20880         Reword the documentation so that it's more succinct
20881         and can be run together into a single paragraph.
20882         * m4/same.m4 (gl_SAME): Check for pathconf.
20883
20884 2004-01-15  Paul Eggert  <eggert@twinsun.com>
20885
20886         Merge from coreutils.
20887
20888         * lib/posixver.c: Include posixver.h.
20889
20890         * lib/same.c: Include <stdbool.h>, <limits.h>.
20891         (_POSIX_NAME_MAX): Define if not defined.
20892         (MIN): New macro.
20893         (same_name): If file names are silently truncated, report
20894         that the file names are the same if they are the same after
20895         the silent truncation.
20896
20897         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
20898         conversion function.
20899         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
20900         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
20901         longer needed.
20902
20903 2004-01-15  Jim Meyering  <jim@meyering.net>
20904
20905         Merge from coreutils.
20906
20907         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
20908         if no library is required.
20909         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
20910         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
20911         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
20912         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
20913         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
20914         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
20915         value, $ac_cv_search_crypt, if it's "none required".
20916         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
20917         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
20918         not gl_FUNC_GETLOADAVG.
20919         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
20920         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
20921
20922 2004-01-15  Jim Meyering  <jim@meyering.net>
20923
20924         Merge from coreutils.
20925
20926         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
20927         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
20928         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
20929
20930         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
20931         optional configure-time default.
20932
20933         * lib/version-etc.c (version_etc_copyright): Update copyright date.
20934
20935         * lib/xreadlink.c (xreadlink): Correct outdated comment.
20936
20937 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
20938
20939         Merge from coreutils.
20940
20941         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
20942         value, $ac_cv_search_nanosleep, if it's "none required".
20943
20944 2004-01-14  Paul Eggert  <eggert@twinsun.com>
20945
20946         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
20947         with like-named macro in fnmatch.c.
20948         (EXT): Use an internal constant instead.
20949
20950         Merge fnmatch patches from glibc.
20951         * lib/fnmatch.c (mbsinit): Remove define.
20952         Add libc_hidden_ver (__fnmatch, fnmatch).
20953         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
20954         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
20955
20956 2004-01-14  Karl Berry  <karl@gnu.org>
20957
20958         * config/install-sh: update from automake.
20959
20960 2004-01-13  Karl Berry  <karl@gnu.org>
20961
20962         * config/install-sh: update from automake.
20963
20964 2004-01-09  Karl Berry  <karl@gnu.org>
20965
20966         * config/install-sh: update from automake.
20967
20968 2004-01-05  Karl Berry  <karl@gnu.org>
20969
20970         * config/config.{sub,guess}: update from config.
20971
20972 2003-12-31  Karl Berry  <karl@gnu.org>
20973
20974         * config/depcomp: update from automake.
20975
20976 2003-12-14  Karl Berry  <karl@gnu.org>
20977
20978         * lib/config.charset: update from gettext-runtime.
20979
20980 2003-12-03  Paul Eggert  <eggert@twinsun.com>
20981
20982         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
20983         Bug reported by Alfred M. Szmidt.
20984
20985 2003-12-03  Bruno Haible  <bruno@clisp.org>
20986
20987         * m4/gettext.m4: Upgrade from gettext-0.13.
20988         * m4/po.m4: Upgrade from gettext-0.13.
20989         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
20990         * m4/intmax.m4: New file, from gettext-0.13.
20991         * m4/printf-posix.m4: New file, from gettext-0.13.
20992
20993 2003-11-29  Karl Berry  <karl@gnu.org>
20994
20995         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
20996
20997 2003-11-25  Paul Eggert  <eggert@twinsun.com>
20998             Bruno Haible  <bruno@clisp.org>
20999
21000         * lib/printf-parse.h: Don't include sys/types.h.
21001         (ARG_NONE): New macro.
21002         (char_directive): Change type of *arg_index fields to size_t.
21003         * lib/printf-parse.c: Don't include sys/types.h.
21004         (SSIZE_MAX): Remove macro.
21005         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
21006         Remove unnecessary overflow check.
21007         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
21008         fields.
21009
21010 2003-11-25  Bruno Haible  <bruno@clisp.org>
21011
21012         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
21013
21014 2003-11-25  Bruno Haible  <bruno@clisp.org>
21015
21016         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
21017         gt_TYPE_SSIZE_T.
21018
21019 2003-11-24  Paul Eggert  <eggert@twinsun.com>
21020
21021         * modules/alloca: Remove dependency on xalloc.
21022
21023 2003-11-24  Paul Eggert  <eggert@twinsun.com>
21024
21025         * lib/alloca.c: Remove dependency on xalloc module.
21026         (xalloc_die): Remove.
21027         (memory_full) [!defined emacs]: New macro.
21028         [!defined emacs]: Don't include xalloc.h.
21029         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
21030         address arithmetic overflows.  Change datatypes a bit to avoid
21031         unnecessary casts.
21032
21033 2003-11-22  Jim Meyering  <jim@meyering.net>
21034
21035         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
21036         s/size/size_t/.
21037
21038 2003-11-21  Karl Berry  <karl@gnu.org>
21039
21040         * config/config.{sub,guess}: update from config.
21041
21042 2003-11-18  Karl Berry  <karl@gnu.org>
21043
21044         * config/config.{sub,guess}: update from config.
21045
21046         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
21047
21048 2003-11-17  Paul Eggert  <eggert@twinsun.com>
21049
21050         * README: Mention that S+T cannot overflow if S is the size of
21051         an existing object and T is sufficiently small.
21052
21053 2003-11-17  Jim Meyering  <jim@meyering.net>
21054
21055         On systems without utime and without a utimes function capable of
21056         dealing with a NULL struct utimbuf* argument, this utime replacement
21057         could -- in unusual circumstances -- leak a file descriptor.
21058         * lib/utime.c: Include <unistd.h> and <errno.h>.
21059         (utime_null): Be sure to close `fd' and to preserve errno.
21060         Reported by Geoff Collyer via Arnold Robbins.
21061
21062 2003-11-17  Bruno Haible  <bruno@clisp.org>
21063
21064         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
21065         (Depends-on): Add xsize.
21066
21067 2003-11-17  Bruno Haible  <bruno@clisp.org>
21068
21069         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
21070
21071 2003-11-17  Bruno Haible  <bruno@clisp.org>
21072
21073         * lib/vasnprintf.c (alloca): Remove fallback definition.
21074         (freea): Remove definition.
21075         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
21076         Reported by Paul Eggert.
21077
21078 2003-11-16  Paul Eggert  <eggert@twinsun.com>
21079             Bruno Haible  <bruno@clisp.org>
21080
21081         Protect against address arithmetic overflow.
21082         * lib/printf-args.h: Include stddef.h.
21083         (arguments): Change type of field 'count' to size_t.
21084         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
21085         'unsigned int' where appropriate.
21086         * lib/printf-parse.h: Include sys/types.h.
21087         (char_directive): Change type of *arg_index fields to ssize_t.
21088         (char_directives): Change type of fields 'count', max_*_length to
21089         size_t.
21090         * lib/printf-parse.c: Include sys/types.h and xsize.h.
21091         (SSIZE_MAX): Define fallback value.
21092         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
21093         instead of 'int' where appropriate. Check a_allocated, d_allocated
21094         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
21095         * lib/vasnprintf.c: Include xsize.h.
21096         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
21097         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
21098         overflow. Avoid wraparound when converting a width or precision from
21099         decimal to binary.
21100
21101 2003-11-16  Bruno Haible  <bruno@clisp.org>
21102
21103         Update from GNU gettext.
21104         * lib/printf-parse.c: Generalize to it can be compiled for wide
21105         strings.
21106         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
21107         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
21108         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
21109         SNPRINTF): New macros.
21110         Don't include <alloca.h> if the file is used inside libintl.
21111         (local_wcslen): New function, for Solaris 2.5.1.
21112         (VASNPRINTF): Use it instead of wcslen.
21113
21114 2003-11-16  Bruno Haible  <bruno@clisp.org>
21115
21116         * lib/xsize.h (xmax): New function.
21117         (xsum, xsum3, xsum4): Declare as "pure" functions.
21118
21119 2003-11-12  Paul Eggert  <eggert@twinsun.com>
21120
21121         * modules/xalloc (Files): Undo latest change, since xalloc.h
21122         no longer needs SIZE_MAX or PTRDIFF_MAX.
21123
21124 2003-11-12  Paul Eggert  <eggert@twinsun.com>
21125
21126         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
21127         gl_PTRDIFF_MAX.
21128
21129 2003-11-12  Paul Eggert  <eggert@twinsun.com>
21130
21131         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
21132         "return", to pacify some unknown compiler.  Problem reported
21133         by Joerg Schilling.
21134
21135 2003-11-12  Paul Eggert  <eggert@twinsun.com>
21136
21137         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
21138         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
21139         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
21140         heuristic is just as accurate as far as we know, and it removes a
21141         dependency on size_max.m4 and ptrdiff_max.m4.
21142
21143 2003-11-11  Bruno Haible  <bruno@clisp.org>
21144
21145         * modules/xsize (Files): Add m4/size_max.m4.
21146         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
21147
21148 2003-11-11  Bruno Haible  <bruno@clisp.org>
21149
21150         * m4/size_max.m4: New file.
21151         * m4/ptrdiff_max.m4: New file.
21152         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
21153         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
21154         (gl_XALLOC): Invoke it.
21155
21156 2003-11-11  Bruno Haible  <bruno@clisp.org>
21157
21158         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
21159         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
21160         defined.
21161
21162 2003-11-10  Paul Eggert  <eggert@twinsun.com>
21163
21164         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
21165         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
21166         rejected some allocations of exactly SIZE_MAX - 2 bytes.
21167         From Bruno Haible.
21168         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
21169         not (size_t) -1, since it's defined here.
21170
21171 2003-11-09  Karl Berry  <karl@gnu.org>
21172
21173         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
21174
21175 2003-11-06  Paul Eggert  <eggert@twinsun.com>
21176
21177         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
21178         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
21179         Reject sizes of exactly SIZE_MAX bytes.
21180         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
21181         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
21182
21183 2003-11-05  Bruno Haible  <bruno@clisp.org>
21184
21185         * lib/xsize.h: Include limits.h, to avoid a possible collision with
21186         SIZE_MAX defined in <limits.h> on Solaris.
21187
21188 2003-11-04  Jim Meyering  <jim@meyering.net>
21189
21190         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
21191         variable names, rather than @VAR@.
21192         * modules/poll: Likewise.
21193
21194 2003-11-04  Bruno Haible  <bruno@clisp.org>
21195
21196         * modules/xsize: New file.
21197         * modules/linebreak: Depend on xsize.
21198         * MODULES.html.sh (func_all_modules): Add xsize.
21199
21200 2003-11-04  Bruno Haible  <bruno@clisp.org>
21201
21202         * m4/xsize.m4: New file.
21203
21204 2003-11-04  Bruno Haible  <bruno@clisp.org>
21205
21206         * lib/xsize.h: New file.
21207         * lib/linebreak.c: Include xsize.h.
21208         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
21209         argument for overflow.
21210         Suggested by Paul Eggert.
21211
21212 2003-11-03  Karl Berry  <karl@gnu.org>
21213
21214         * config/config.{guess,sub}: update from config.
21215
21216 2003-11-03  Jim Meyering  <jim@meyering.net>
21217
21218         * modules/userspec (lib_SOURCES): Add userspec.h.
21219         (Include): Add "userspec.h".
21220         Improve description.
21221
21222 2003-11-03  Jim Meyering  <jim@meyering.net>
21223
21224         * lib/userspec.c: Include "userspec.h".
21225         * lib/userspec.h: New file.
21226
21227 2003-11-03  Bruno Haible  <bruno@clisp.org>
21228
21229         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
21230
21231 2003-11-03  Bruno Haible  <bruno@clisp.org>
21232
21233         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
21234         available, to avoid (extremely rare) race condition.
21235         Suggested by Paul Eggert.
21236
21237 2003-11-02  Karl Berry  <karl@gnu.org>
21238
21239         * config/srclist.txt (vasprintf.c): sync broken, sigh.
21240
21241 2003-10-31  Paul Eggert  <eggert@twinsun.com>
21242
21243         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
21244         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
21245         (read_filesystem_list): Set and use me_type_malloced.
21246         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
21247         whatever the type happens to be), for brevity and consistency.
21248         Check for size calculation overflow on Alphas running OSF/1.
21249
21250 2003-10-31  Jim Meyering  <jim@meyering.net>
21251
21252         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
21253
21254         * lib/linebuffer.c: Include <string.h> for declaration of memset.
21255
21256 2003-10-30  Paul Eggert  <eggert@twinsun.com>
21257             Bruno Haible  <bruno@clisp.org>
21258
21259         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
21260         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
21261
21262 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
21263
21264         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
21265         netbsd*-gnu*.  Suggested by Robert Millan.
21266
21267 2003-10-29  Paul Eggert  <eggert@twinsun.com>
21268
21269         * modules/group-member: Depend on stdbool.
21270
21271 2003-10-29  Paul Eggert  <eggert@twinsun.com>
21272
21273         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
21274
21275 2003-10-29  Paul Eggert  <eggert@twinsun.com>
21276
21277         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
21278         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
21279         after the 'gnu' in these cases.  This fixes some bugs in the
21280         previous change, and is based on suggestions by Robert Millan.
21281
21282 2003-10-29  Paul Eggert  <eggert@twinsun.com>
21283
21284         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
21285         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
21286         no longer needed.
21287         * lib/quotearg.c (quotearg_n_options): Use it.
21288         * lib/group-member.c: Include <stdbool.h>.
21289         (free_group_info): Arg is now const *; don't free arg.
21290         (get_group_info): Now returns bool and accepts struct group_info *,
21291         rather than returning a malloc'ed struct group_info *.
21292         All uses changed.  Check for overflow in internal size calculation.
21293
21294         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
21295         rather than xmalloc/xrealloc.
21296         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
21297         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
21298         conformance bug: the old code used a pointer after freeing the
21299         storage that it addressed.
21300         * lib/hash.c (hash_initialize): Simplify the code by using
21301         xalloc_oversized rather than doing it by hand.
21302         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
21303         the buffer preserved.  Use free and xmalloc instead.
21304         * lib/quotearg.c (quotearg_n_options): Likewise.
21305         Use a simpler test for size overflow.  Don't use xalloc_oversized
21306         because unsigned int might be wider than size_t (!); this suggests
21307         that we should switch from unsigned int to size_t for slot numbers.
21308
21309 2003-10-28  Paul Eggert  <eggert@twinsun.com>
21310
21311         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
21312         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
21313         NetBSD kernels.  Requested by Richard Stallman.
21314
21315 2003-10-27  Paul Eggert  <eggert@twinsun.com>
21316
21317         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
21318         to allocate the returned structure.  Do not allocate a subarray,
21319         as x2nrealloc will do that.
21320         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
21321         instead of xnrealloc.
21322         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
21323
21324 2003-10-27  Bruno Haible  <bruno@clisp.org>
21325
21326         * lib/stdbool_.h: Better support for BeOS.
21327
21328 2003-10-26  Paul Eggert  <eggert@twinsun.com>
21329
21330         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
21331         now uses inline.
21332
21333 2003-10-26  Paul Eggert  <eggert@twinsun.com>
21334
21335         * lib/xalloc.h (xalloc_oversized): New static inline function, for
21336         callers that want to do their own size-overflow checking.  Include
21337         <stdbool.h>, since xalloc_oversized returns bool.
21338         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
21339         to use xalloc_oversized.
21340
21341         Add two functions x2realloc, x2nrealloc, for programs that grow
21342         arrays dynamically by doubling their sizes.
21343         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
21344         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
21345         New functions.
21346
21347         Port to C99 semantics for 'inline' of external functions.
21348         Bug reported by Bruno Haible.
21349         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
21350         with the old contents of xnmalloc.
21351         (xnmalloc, xmalloc): Use it.
21352         (xnrealloc_inline): New static inline function,
21353         with the old contents of xnrealloc.
21354         (xnrealloc, xrealloc): Use it.
21355
21356         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
21357         that.
21358
21359 2003-10-26  Karl Berry  <karl@gnu.org>
21360
21361         * config/srclist.txt (COPYING.DOC): no longer available from
21362         /gd/gnuorg; don't know where the ultimate source is.
21363
21364 2003-10-25  Paul Eggert  <eggert@twinsun.com>
21365
21366         Fix several address-calculation bugs in the hash modules,
21367         plus some minor code cleanup.
21368
21369         * lib/hash.h: Include <stdbool.h>, for bool.
21370         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
21371         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
21372         hash_get_n_entries, hash_get_max_bucket_length,
21373         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
21374         hash_rehash): Use size_t rather than unsigned.
21375         * lib/hash.c (struct hash_table, hash_get_n_buckets,
21376         hash_get_n_buckets_used, hash_get_n_entries,
21377         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
21378         hash_get_entries, hash_do_for_each, hash_string, is_prime,
21379         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
21380         Likewise.
21381         (SIZE_MAX): Define if not defined.
21382         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
21383         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
21384         hash_print):
21385         Use const * when possible.
21386         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
21387         (check_tuning): Fix bug: if tuning parameters were very close to
21388         0 or 1, rounding errors could have caused subscript violations.
21389         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
21390         (hash_initialize): Add 'fail:' label
21391         to free table and return NULL, and use it to simplify code.
21392         Use calloc rather than clearing the storage ourself.
21393         (hash_initialize, hash_rehash): Check for arithmetic overflow in
21394         buffer size calculations.
21395         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
21396         Include <stddef.h>, for size_t.
21397         * lib/hash-pjw.c (hash_pjw): Likewise.
21398         Switch to method described by Bruno Haible.
21399         Include <limits.h>, for CHAR_BIT.
21400         (SIZE_BITS): New macro.
21401
21402 2003-10-23  Paul Eggert  <eggert@twinsun.com>
21403
21404         * m4/getline.m4 (AM_FUNC_GETLINE):
21405         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
21406         hosts.  Problem reported by Derek Robert Price in
21407         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
21408         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
21409         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
21410
21411 2003-10-21  Paul Eggert  <eggert@twinsun.com>
21412
21413         * lib/getndelim2.c (getndelim2): When size calculation overflows,
21414         ceiling the allocation at NMAX bytes rather than silently
21415         discarding input bytes before NMAX is reached.  This makes
21416         a difference only if NMAX exceeds SIZE_MAX / 2.
21417
21418         * lib/obstack.c: Merge from glibc.
21419         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
21420         Add libc_hidden_def (_obstack_newchunk).
21421         (_obstack_free) [! defined _LIBC]: Remove.
21422         [defined _LIBC]: Make a strong alias from obstack_free, rather than
21423         a clone of the function body.
21424         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
21425         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
21426
21427         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
21428         glibc.
21429         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
21430         arg to memcpy.
21431
21432         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
21433         (obstack_ptr_grow_fast, obstack_int_grow_fast):
21434         Don't use lvalue casts, as GCC plans to remove support for them
21435         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
21436         was also present in the non-GCC version, indicating that this
21437         code had always been buggy and had never been widely used.
21438         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
21439         Use the fast variant of each macro, rather than copying the
21440         definiens of the fast variant; that way, we'll be more likely to
21441         catch future bugs in the fast variants.
21442
21443 2003-10-20  Bruno Haible  <bruno@clisp.org>
21444
21445         * modules/wait-process: New file.
21446         * MODULES.html.sh (func_all_modules): Add wait-process.
21447
21448 2003-10-20  Bruno Haible  <bruno@clisp.org>
21449
21450         * m4/wait-process.m4: New file.
21451
21452 2003-10-20  Bruno Haible  <bruno@clisp.org>
21453
21454         * lib/wait-process.h: New file, from GNU gettext.
21455         * lib/wait-process.c: New file, from GNU gettext.
21456
21457 2003-10-19  Jim Meyering  <jim@meyering.net>
21458
21459         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
21460         HPUX 10.20.
21461
21462 2003-10-18  Karl Berry  <karl@gnu.org>
21463
21464         * config/config.guess: update from config.
21465
21466 2003-10-16  Paul Eggert  <eggert@twinsun.com>
21467
21468         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
21469         (getgroups): First arg is int, not size_t.
21470         Don't let 'free' mangle errno.
21471
21472 2003-10-16  Paul Eggert  <eggert@twinsun.com>
21473
21474         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
21475
21476 2003-10-16  Karl Berry  <karl@gnu.org>
21477
21478         * config/config.{guess,sub}: update from config.
21479
21480 2003-10-16  Jim Meyering  <jim@meyering.net>
21481
21482         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
21483         memcpy.
21484
21485 2003-10-15  Paul Eggert  <eggert@twinsun.com>
21486
21487         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
21488         (SIZE_MAX): Remove.
21489         (new_exclude, add_exclude_file): Initial size no longer needs to
21490         be a power of 2.
21491         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
21492         our own address arithmetic overflow checking.
21493
21494         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
21495         (fnmatch): Do not alloca more than 2000 wide characters;
21496         instead, use malloc for large buffers.
21497         Check for address arithmetic overflow, and return -1
21498         with errno set to ENOMEM in that case.
21499         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
21500         (NEW_PATTERN): Do not alloca more than 8000 bytes;
21501         instead, return -1.  Check for address arithmetic overflow.
21502
21503 2003-10-14  Paul Eggert  <eggert@twinsun.com>
21504
21505         Handle invalid suffixes and overflow independently, so that
21506         callers can treat them independently as needed.  Fix some bugs in
21507         suffix handling, e.g., "100k@" was not diagnosed as an invalid
21508         suffix for a human-readable blocksize.  The major caller-visible
21509         change is the addition of a new
21510         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
21511         that both overflow and suffix chars were found.
21512
21513         * lib/human.c (humblock): Don't check separately for invalid suffix
21514         char; that is xstrtoumax's job (now that its bug is fixed).
21515         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
21516         INTMAX_MAX]: New macros.
21517         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
21518         TYPE_MAXIMUM): New macros.
21519         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
21520         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
21521         if overflow occurs, as it's what __strtol does and it's more useful
21522         in practice.
21523         (__xstrtol): If __strtol reports some error other than ERANGE,
21524         reflect it to the caller as LONGINT_INVALID.  If it reports
21525         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
21526         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
21527         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
21528         value.
21529         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
21530         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
21531         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
21532         [defined UINTMAX_MAX]: New macros.
21533
21534 2003-10-14  Bruno Haible  <bruno@clisp.org>
21535
21536         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
21537
21538 2003-10-14  Bruno Haible  <bruno@clisp.org>
21539
21540         * m4/sig_atomic_t: New file, from GNU gettext.
21541         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
21542
21543 2003-10-14  Bruno Haible  <bruno@clisp.org>
21544
21545         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
21546         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
21547         Also use volatile where needed.
21548
21549 2003-10-12  Paul Eggert  <eggert@twinsun.com>
21550
21551         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
21552         Change maintainer from Bruno Haible to 'all'.
21553
21554 2003-10-12  Paul Eggert  <eggert@twinsun.com>
21555
21556         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
21557
21558 2003-10-12  Paul Eggert  <eggert@twinsun.com>
21559
21560         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
21561         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
21562         and define in terms of the other primitives.
21563         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
21564         (SIZE_MAX): Define if not already defined.
21565         (array_size_overflow): New function.
21566         (xalloc_die): Abort instead of exiting if 'error' returns.
21567         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
21568         (xmalloc, xrealloc): Use them.
21569         (xcalloc): Check for address arithmetic overflow.
21570         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
21571         a bit faster than strcpy.
21572
21573 2003-10-10  Simon Josefsson  <jas@extundo.com>
21574
21575         * modules/argp (Depends-on): Add restrict and strcase.
21576
21577 2003-10-10  Simon Josefsson  <jas@extundo.com>
21578
21579         * m4/argp.m4: Add AC_C_INLINE.
21580
21581 2003-10-08  Paul Eggert  <eggert@twinsun.com>
21582
21583         Merge getpass from libc, plus a few fixes.
21584
21585         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
21586         Include <stdbool.h>.
21587         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
21588         __fsetlocking to empty.
21589         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
21590         do include <bits/libc-lock.h>.
21591         Do not include <fcntl.h>; not needed.
21592         [_LIBC]: Include <wchar.h>.
21593         (NOTCANCEL_MODE): New macro.
21594         (flockfile, funlockfile) [_LIBC]: New macros.
21595         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
21596         [!_LIBC]: New macros.
21597         (call_fclose): New function.
21598         (getpass): Use it.  Save tty stream separately; this simplifies the
21599         code and makes it more reliable if stdin happens to equal stdout.
21600         Invoke __fsetlocking on tty.
21601         Handle thread cancellation if needed.
21602         Namespace cleanup (use __tcgetattr, __getline).
21603         Use bool for Booleans.
21604         [USE_IN_LIBIO]: Handle wide streams.
21605         [!_LIBC]: Unconditionally do the fseek, since we don't know what
21606         stream might go where.
21607
21608         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
21609         doesn't have to include <stdio.h> before us.
21610         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
21611         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
21612         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
21613         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
21614         if not declared, so that we can use getpass.c code from libc without
21615         rewriting it.
21616         (flockfile, ftrylockfile, funlockfile): New macros.
21617
21618 2003-10-08  Paul Eggert  <eggert@twinsun.com>
21619
21620         * modules/getpass: Depend on stdbool.
21621
21622 2003-10-08  Paul Eggert  <eggert@twinsun.com>
21623
21624         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
21625
21626 2003-10-07  Karl Berry  <karl@gnu.org>
21627
21628         * config/config.{guess,sub}: update from config.
21629
21630 2003-10-06  Jim Meyering  <jim@meyering.net>
21631             Bruno Haible  <bruno@clisp.org>
21632
21633         This lets translators provide better translations for the
21634         "Written by ..." part of --version output.
21635         * lib/version-etc.h: Include stdarg.h.
21636         (version_etc_copyright): Declare as readonly.
21637         (version_etc): Make this function variadic with a NULL-terminated list
21638         of author name strings.
21639         (version_etc_va): New declaration.
21640         * lib/version-etc.c: Include stdarg.h, stdlib.h.
21641         (version_etc_copyright): Declare as readonly.
21642         (version_etc_va): New function. Provide a different translatable string
21643         for each possible number of authors < 10. Abbreviate when there are 10
21644         authors or more.
21645         (version_etc): Make this function variadic. Call version_etc_va.
21646         Suggestion from Gary V. Vaughan.
21647
21648         * lib/long-options.h (parse_long_options): Change prototype: the
21649         authors string is moved to the end and becomes variadic.
21650         * lib/long-options.c: Include stdarg.h.
21651         (parse_long_options): Make this function variadic, too.
21652         Call version_etc_va, not version_etc.
21653
21654 2003-10-06  Bruno Haible  <bruno@clisp.org>
21655
21656         * modules/version-etc-2: Remove file.
21657         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
21658
21659 2003-10-06  Bruno Haible  <bruno@clisp.org>
21660
21661         * modules/fatal-signal: New file.
21662         * MODULES.html.sh (func_all_modules): Add fatal-signal.
21663
21664 2003-10-06  Bruno Haible  <bruno@clisp.org>
21665
21666         * m4/fatal-signal.m4: New file.
21667         * m4/signalblocking.m4: New file, from GNU gettext.
21668
21669 2003-10-06  Bruno Haible  <bruno@clisp.org>
21670
21671         * lib/version-etc-2.h: Remove file.
21672         * lib/version-etc-2.c: Remove file.
21673
21674 2003-10-06  Bruno Haible  <bruno@clisp.org>
21675
21676         * lib/fatal-signal.h: New file, from GNU gettext.
21677         * lib/fatal-signal.c: New file, from GNU gettext.
21678
21679 2003-10-05  Paul Eggert  <eggert@twinsun.com>
21680
21681         * README: Rework advice for preventing empty .o files.
21682         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
21683         not <sys/types.h>.
21684
21685 2003-10-04  Karl Berry  <karl@gnu.org>
21686
21687         * lib/argp*: update from libc.
21688
21689 2003-10-04  Karl Berry  <karl@gnu.org>
21690
21691         * config/config.{guess,sub}: update from config.
21692
21693 2003-10-02  Bruno Haible  <bruno@clisp.org>
21694
21695         * modules/lchown (Include): Add lchown.h.
21696         * modules/time_r (Include): Use "..." syntax.
21697         * modules/xgetdomainname (Include): Add xgetdomainname.h.
21698
21699 2003-10-01  Simon Josefsson  <jas@extundo.com>
21700
21701         * MODULES.html.sh (func_all_modules): Move gethostname from section
21702         'based on' to section 'lacking' POSIX:2001.
21703
21704 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
21705
21706         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
21707         to output mode on the same stream.
21708
21709 2003-09-29  Paul Eggert  <eggert@twinsun.com>
21710
21711         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
21712         Fix arg typo in previous patch.
21713
21714 2003-09-28  Jim Meyering  <jim@meyering.net>
21715
21716         * lib/error.c: Correct cpp indentation.
21717
21718 2003-09-27  Paul Eggert  <eggert@twinsun.com>
21719
21720         * modules/free: New file.
21721
21722 2003-09-27  Paul Eggert  <eggert@twinsun.com>
21723
21724         * m4/free.m4: New file.
21725
21726 2003-09-27  Paul Eggert  <eggert@twinsun.com>
21727
21728         * lib/minmax.h (MIN, MAX)
21729         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
21730         Omit the special code that used __typeof__, since we worry that
21731         it could be more trouble than it's worth.  See:
21732         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
21733         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
21734
21735         * lib/free.c: New file.
21736
21737 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
21738
21739         Trivial fixes to Makefile.am parts of module listings.
21740         * modules/strstr: Append strstr.h to lib_SOURCES.
21741         * modules/strcase: Likewise, for strcase.h.
21742
21743 2003-09-27  Karl Berry  <karl@gnu.org>
21744
21745         * config/mkinstalldirs: update from automake.
21746
21747 2003-09-26  Paul Eggert  <eggert@twinsun.com>
21748
21749         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
21750         (error_tail): Do not loop, reallocating temporary buffer, since
21751         the output cannot contain more wide characters than the input
21752         contains bytes, the size must be big enough already.  This avoids
21753         one potential size overflow calculation.  Check for size overflow
21754         when calculating temporary buffer size.  Free temporary buffer
21755         when done, if it was allocated with malloc; this plugs a memory
21756         leak.  Remove casts from void * to pointers, that are no longer
21757         needed now that we're assuming C89 or better.
21758
21759         Merge error changes from glibc.
21760
21761         * lib/error.c, error.h: Update copyright notice header to match glibc.
21762         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
21763         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
21764         Disable cancellation while printing error.
21765         * lib/error.h: Prepend __ to parameter names.
21766
21767 2003-09-26  Jim Meyering  <jim@meyering.net>
21768
21769         * lib/error.c (error_tail): Move some declarations
21770         into inner scope where the local variables are used.
21771
21772 2003-09-26  Bruno Haible  <bruno@clisp.org>
21773
21774         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
21775         stpncpy().
21776         Don't define stpncpy through config.h; it's now done through stpncpy.h.
21777
21778 2003-09-26  Bruno Haible  <bruno@clisp.org>
21779
21780         * lib/stpncpy.h (gnu_stpncpy): New declaration.
21781         (stpncpy): Define as alias for gnu_stpncpy.
21782         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
21783
21784 2003-09-25  Simon Josefsson  <jas@extundo.com>
21785
21786         * lib/xgetdomainname.h: New file.
21787         * lib/xgetdomainname.c: New file.
21788
21789 2003-09-25  Simon Josefsson  <jas@extundo.com>
21790             Bruno Haible  <bruno@clisp.org>
21791
21792         * modules/getdomainname: New file.
21793         * modules/xgetdomainname: New file.
21794         * MODULES.html.sh (func_all_modules): Add getdomainname,
21795         xgetdomainname.
21796
21797 2003-09-25  Simon Josefsson  <jas@extundo.com>
21798             Bruno Haible  <bruno@clisp.org>
21799
21800         * m4/getdomainname.m4: New file.
21801
21802 2003-09-25  Simon Josefsson  <jas@extundo.com>
21803             Bruno Haible  <bruno@clisp.org>
21804
21805         * lib/getdomainname.h: New file.
21806         * lib/getdomainname.c: New file.
21807
21808 2003-09-25  Karl Berry  <karl@gnu.org>
21809
21810         * lib/argp-fmtstream.c, argp-help.c: update from libc.
21811
21812 2003-09-25  Karl Berry  <karl@gnu.org>
21813
21814         * config/install-sh: update from automake.
21815
21816 2003-09-25  Bruno Haible  <bruno@clisp.org>
21817
21818         * modules/version-etc-2: New file, from modules/version-etc with
21819         modifications.
21820         * MODULES.html.sh (func_all_modules): Add version-etc-2.
21821
21822 2003-09-25  Bruno Haible  <bruno@clisp.org>
21823
21824         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
21825         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
21826
21827 2003-09-24  Simon Josefsson  <jas@extundo.com>
21828
21829         * modules/xgethostname: Add xgethostname.h.
21830
21831 2003-09-24  Paul Eggert  <eggert@twinsun.com>
21832
21833         * lib/linebuffer.c (freebuffer): Don't free the argument, just
21834         the buffer associated with the argument.  Bug reported by
21835         Simon Josefsson.
21836
21837 2003-09-24  Paul Eggert  <eggert@twinsun.com>
21838
21839         * README: Document assumptions that 'int' is at least 32 bits
21840         wide, that integer arithmetic is 2's complement without overflow,
21841         that there are no holes in integer values, that adding sizes of
21842         two nonoverlapping objects can't overflow, and that all-bits-zero
21843         yields scalar zero.  Fix spelling and capitalization typos.
21844
21845 2003-09-19  Karl Berry  <karl@gnu.org>
21846
21847         * lib/argp.h: update from libc.
21848
21849 2003-09-17  Paul Eggert  <eggert@twinsun.com>
21850
21851         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
21852         to avoid spurious warnings like "AC_RUN_IFELSE was called before
21853         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
21854
21855 2003-09-17  Paul Eggert  <eggert@twinsun.com>
21856
21857         * gnulib-tool: Use "test -h", not "test -L", for portability
21858         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
21859         (tags_regexp): Remove, since \| doesn't conform to POSIX.
21860         (sed_extract_prog): Issue s commands one-by-one, rather than
21861         using \| in one s command.
21862
21863 2003-09-16  Paul Eggert  <eggert@twinsun.com>
21864
21865         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
21866         input error, instead of returning NULL the next time we are called
21867         (and therefore losing track of errno).
21868
21869 2003-09-16  Bruno Haible  <bruno@clisp.org>
21870
21871         * gnulib-tool (func_create_testdir): Warn about duplicated
21872         dependencies.
21873
21874 2003-09-15  Paul Eggert  <eggert@twinsun.com>
21875
21876         * modules/argmatch, modules/fatal, modules/obstack,
21877         modules/xalloc, modules/xgethostname: Sort dependencies by
21878         importance, not alphabetically.
21879
21880 2003-09-15  Paul Eggert  <eggert@twinsun.com>
21881
21882         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
21883         fails, so that the caller gets the proper errno.
21884
21885         * lib/readutmp.c (read_utmp): Likewise.
21886         Check for fstat error.  Close stream and free storage
21887         when failing.
21888
21889 2003-09-14  Karl Berry  <karl@gnu.org>
21890
21891         * config/srclist.txt (strdup.c): disable for c89 changes.
21892
21893 2003-09-14  Jim Meyering  <jim@meyering.net>
21894
21895         * lib/getloadavg.c: Correct cpp indentation.
21896         * lib/strdup.c: Likewise.
21897         * lib/vasnprintf.c: Likewise.
21898
21899 2003-09-14  Bruno Haible  <bruno@clisp.org>
21900
21901         * modules/fwriteerror: New file.
21902         * MODULES.html.sh (func_all_modules): Add fwriteerror.
21903
21904 2003-09-14  Bruno Haible  <bruno@clisp.org>
21905
21906         * lib/fwriteerror.h: New file.
21907         * lib/fwriteerror.c: New file.
21908
21909 2003-09-12  Paul Eggert  <eggert@twinsun.com>
21910
21911         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
21912         modules/xgethostname, modules/xalloc: Depend on exit.
21913
21914 2003-09-12  Paul Eggert  <eggert@twinsun.com>
21915
21916         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
21917
21918         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
21919         and AC_MINIX, too, so that their extensions are available.
21920
21921         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
21922         This macro has been superseded by gl_BACKUPFILE.
21923
21924         More patches to assume C89 or better.
21925
21926         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
21927
21928         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
21929         unconditionally.
21930         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
21931         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
21932         Include <string.h>, <stdlib.h> unconditionally.
21933         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
21934         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
21935         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
21936         headers or for string.h.
21937         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
21938         or strtoul.
21939
21940         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
21941         headers.
21942         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
21943         * m4/userspec.m4 (gl_USERSPEC): Likewise.
21944         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
21945         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
21946         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
21947         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
21948         memcpy, memset.
21949         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
21950         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
21951         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
21952         strtol.
21953         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
21954         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
21955         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
21956         strtoul.
21957
21958 2003-09-12  Paul Eggert  <eggert@twinsun.com>
21959
21960         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
21961         * lib/obstack.c [!defined _LIBC]: Likewise.
21962         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
21963         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
21964         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
21965
21966         More changes to assume C89 or better.
21967
21968         * lib/error.c (error_tail): Assume vprintf.
21969
21970         * lib/argmatch.c (getenv): Remove decl.
21971         * lib/progreloc.c (get_full_program_name): Define via prototype.
21972         * lib/setenv.c (clearenv): Likewise.
21973         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
21974         needed.
21975         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
21976         (malloc, memcpy): Remove decls.
21977         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
21978         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
21979         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
21980         (memcpy): Remove macro.
21981         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
21982         (__P): Remove.  All uses removed.
21983         (PTR): Remove.  All uses changed to void *.
21984         (CHAR_BIT, NULL): Remove.
21985         (spaces, zeros, memset_space, memset_zero)
21986         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
21987         Remove.
21988         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
21989         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
21990         Define with prototype.
21991         Remove now-unnecessary prototype decl.
21992         (extra_args_spec): Assume ANSI C.  All uses changed.
21993         (extra_args_spec_iso): Remove.
21994         (my_strftime, emacs_strftimeu): Define via prototype.
21995         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
21996         unconditionally.
21997         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
21998         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
21999         (strtoul, strtol): Remove decls.
22000         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
22001         LONG_MAX): Remove.
22002         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
22003         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
22004         (LOCALE_PARAM_PROTO): New macro.
22005         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
22006         (INTERNAL (strtol), strtol): Define with a prototype.
22007         (PARAMS): Remove.  All uses removed.
22008         * lib/tempname.c: Include <string.h> unconditionally.
22009         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
22010         * lib/xgethostname.c (main): Define with a prototype.
22011         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
22012         Include <stdlib.h> unconditionally.
22013         (calloc, malloc, realloc, free): Remove decls.
22014         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
22015         Include <stdlib.h> unconditionally.  Sort include file names.
22016         (strtod): Remove.
22017         (xstrtod): Define with a prototype.
22018         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
22019         (strtol, strtoul): Remove decls.
22020
22021 2003-09-11  Paul Eggert  <eggert@twinsun.com>
22022
22023         More patches to assume C89 or better.
22024         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
22025         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
22026         string.h, memchr, STDC_HEADERS.
22027
22028 2003-09-11  Paul Eggert  <eggert@twinsun.com>
22029
22030         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
22031         Include <stdlib.h>, <string.h> unconditionally.
22032         Remove now-unnecessary cast to char *.
22033         * lib/strnlen.c: Include <string.h> unconditionally.
22034         * lib/yesno.c (yesno): Define with a prototype.
22035
22036 2003-09-11  Bruno Haible  <bruno@clisp.org>
22037
22038         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
22039
22040 2003-09-10  Jim Meyering  <jim@meyering.net>
22041
22042         * lib/error.c: Correct indentation of cpp directives.
22043
22044 2003-09-10  Bruno Haible  <bruno@clisp.org>
22045
22046         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
22047         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
22048         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
22049         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
22050         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
22051         <stdlib.h> and <string.h> checks.
22052         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
22053         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
22054
22055 2003-09-10  Bruno Haible  <bruno@clisp.org>
22056
22057         * lib/strcspn.c: Include <string.h> unconditionally.
22058         * lib/strpbrk.c: Include <string.h> unconditionally.
22059         * lib/strstr.c: Include <string.h> unconditionally.
22060         * lib/unicodeio.c: Include <string.h> unconditionally.
22061         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
22062         * lib/unsetenv.c: Likewise.
22063         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
22064         * lib/yesno.c: Include <stdlib.h> unconditionally.
22065         (rpmatch): Add prototype.
22066
22067 2003-09-09  Paul Eggert  <eggert@twinsun.com>
22068
22069         More patches to assume C89 or better.
22070         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
22071         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
22072         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
22073         or for string.h.
22074         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
22075         stdlib.h.
22076         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
22077         C headers.
22078         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
22079         string.h.
22080         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
22081         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
22082         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
22083         or for string.h.
22084         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
22085         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
22086         C headers.
22087         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
22088         memcpy.
22089         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
22090         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
22091         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
22092         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
22093         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
22094         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
22095         string.h, free.
22096         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
22097         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
22098         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
22099         C headers, or for string.h.
22100         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
22101         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
22102         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
22103         headers, memory.h, stdlib.h, string.h, strings.h.
22104         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
22105         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
22106         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
22107         strchr.
22108         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
22109         headers, memory.h, string.h.
22110         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
22111         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
22112         free.
22113         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
22114         headers.
22115         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
22116         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
22117         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
22118         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
22119         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
22120
22121 2003-09-09  Paul Eggert  <eggert@twinsun.com>
22122
22123         More K&R removal.
22124
22125         * lib/acosl.c (main): Use a prototype.
22126         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
22127         tanl.c: Likewise.
22128
22129         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
22130
22131         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
22132         (getopt, etopt_long, getopt_long_only, _getopt_internal)
22133         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
22134         with a prototype.
22135         * lib/getopt.c (const): Remove macro.
22136         Include <string.h> unconditionally.
22137         (my_index): Remove; all uses changed to strchr.
22138         (strlen): Remove decl.
22139         (exchange): Remove forward decl; no longer needed.
22140         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
22141         Define with prototype.
22142         * lib/getopt1.c (const): Remove macro.
22143         (getopt_long, getopt_long_only, main): Define with prototype.
22144
22145         * lib/getugroups.c: Include <string.h> unconditionally.
22146
22147         * lib/getusershell.c: Include <stdlib.h> unconditionally.
22148         (getusershell, setusershell, endusershell, readname, main):
22149         Define with prototypes.
22150
22151         * lib/group-member.c: Include group-member.h first.
22152         Include <stdlib.h> unconditionally.
22153
22154         * lib/hard-locale.c: Include hard-locale.h first.
22155         Include <stdlib.h>, <string.h> unconditionally.
22156
22157         * lib/hash.c (free, malloc): Remove decls.
22158         Include <stdlib.h> unconditionally.
22159
22160         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
22161         (getenv): Do not declare.
22162
22163         * lib/idcache.c: Include <string.h> unconditionally.
22164
22165         * lib/long-options.c: Include long-options.h first, to test interface.
22166         Include <stdlib.h> unconditionally.
22167
22168         * lib/makepath.c: Include makepath.h first, to test interface.
22169         Include <stdlib.h> and <string.h> unconditionally.
22170
22171         * lib/linebuffer.c: Include <stdlib.h>.
22172         (free): Remove decl.
22173
22174         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
22175         stddef.h. rpl_malloc returns void *, not char *.
22176         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
22177         prototype.
22178
22179         * lib/md5.h: Include <limits.h> unconditionally.
22180         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
22181         (__P): Remove; all uses removed.
22182         * lib/md5.c: Include "md5.h" first.
22183         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
22184         md5_buffer, md5_process_bytes, md5_process_block):
22185         Define with prototypes.
22186         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
22187         * lib/sha.c: Include "sha.h" first.
22188         Include <stdlib.h>, <string.h> unconditionally.
22189
22190         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
22191         * lib/memcmp.c (__ptr_t): Likewise.
22192         * lib/memrchr.c (__ptr_t): Likewise.
22193         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
22194         Include <string.h> unconditionally.
22195         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
22196         * lib/memchr.c: Include <stdlib.h> unconditionally.
22197         * lib/memchr.c (LONG_MAX): Remove.
22198         * lib/memrchr.c (LONG_MAX): Likewise.
22199         * lib/memchr.c (__memchr): Define via a prototype.
22200         * lib/memrchr.c (__memrchr): Likewise.
22201         * lib/memcmp.c (__P): Remove, and remove all uses.
22202         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
22203         Remove forward decls; no longer needed.
22204         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
22205         Use types required by C89 in prototype.
22206
22207         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
22208         * lib/savedir.c: Likewise.
22209         * lib/mkdir.c (free): Remove decl.
22210         * lib/rmdir.c (rmdir): Define with a prototype.
22211         * lib/savedir.c: Include savedir.h first, to test interface.
22212
22213         * lib/mktime.c (STDC_HEADERS): Remove.
22214         Include <stdlib.h>, <string.h> unconditionally.
22215
22216         * lib/modechange.c: Include <stdlib.h> unconditionally.
22217         (malloc): Remove decl.
22218
22219         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
22220         (free): Remove decl.
22221
22222         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
22223         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
22224         (This type really should be intptr_t, but that's a C99ism.)
22225         (_obstack_memcpy): Remove: all uses changed to memcpy.
22226         Include <string.h> unconditionally.
22227         (struct obstack): Assume __STDC__ for types of members
22228         chunkfun, freefun, extra_arg.
22229         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
22230         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
22231         obstack_begin, obstack_specify_allocation,
22232         obstack_specify_allocation_with_arg, obstack_chunkfun,
22233         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
22234         Remove unprototyped decls and the macros that use them.
22235         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
22236         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
22237         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
22238         (defined __STDC__ && __STDC__)]:
22239         Remove nonprototyped code.
22240         Include <stdlib.h> unconditionally.
22241         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
22242         _obstack_allocated_p, _obstack_free, obstack_free,
22243         _obstack_memory_used, print_and_abort):
22244         Define using prototypes.
22245         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
22246         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
22247         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
22248         obstack_next_free, obstack_object_size, obstack_room) [0]:
22249         Remove unused, unprototyped code.
22250
22251         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
22252
22253         * lib/physmem.c (physmem_total, physmem_available, main): Define
22254         with prototypes.
22255
22256         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
22257         (main): Define with a prototype.
22258
22259         * lib/posixver.c (getenv): Remove decl.
22260
22261         * lib/putenv.c (malloc): Returns void *, not char *.
22262         Include <string.h> unconditionally.
22263         (strchr, memcpy, NULL): Do not define.
22264
22265         * lib/readtokens.c: Include readtokens.h first, to test interface.
22266         Include <stdlib.h>, <string.h> unconditionally.
22267         (init_tokenbuffer): Define with a prototype.
22268
22269         * lib/regex.c (PARAMS): Remove.  All uses removed.
22270         All uses of _RE_ARGS removed, too.
22271         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
22272         unconditionally.
22273         (bzero): Assume memset exists.
22274         (memcmp, memcpy, NULL): Remove.
22275         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
22276         char, or assignments to local vars of type signed char.
22277         (init_syntax_once, PREFIX(extract_number_and_incr),
22278         PREFIX(print_partial_compiled_pattern),
22279         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
22280         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
22281         PREFIX(regex_grow_registers), PREFIX(regex_compile),
22282         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
22283         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
22284         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
22285         wcs_compile_range, byte_compile_range, truncate_wchar,
22286         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
22287         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
22288         count_mbs_length, wcs_re_match_2_internal,
22289         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
22290         PREFIX(alt_match_null_string_p),
22291         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
22292         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
22293         regfree, PREFIX(extract_number)): Define with prototype.  Remove
22294         now-unnecessary declaration, if any.
22295         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
22296         regcomp, regexec):
22297         Remove now-unnecessary casts among pointer types.
22298         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
22299
22300         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
22301         (free): Remove decl.
22302
22303         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
22304
22305         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
22306         (free): Remove decl.
22307
22308         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
22309         * lib/xgetcwd.c: Likewise.
22310
22311         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
22312         (free): Remove decl.
22313
22314         * lib/strchrnul.c (strchrnul): Define with a prototype.
22315         Fix bug: c_in was not converted to char before searching.
22316
22317         The following changes are not K&R related:
22318
22319         * lib/group-member.h: Include <sys/types.h>, so that this file is
22320         self-contained.
22321         * lib/makepath.h: Likewise.
22322
22323         * lib/getusershell.c (readname, default_index, line_size, readname):
22324         Use size_t, not int, for sizes.
22325         (readname): If the size overflows, report an error instead of
22326         looping forever.
22327
22328 2003-09-09  Paul Eggert  <eggert@twinsun.com>
22329
22330         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
22331         libc.
22332
22333 2003-09-09  Paul Eggert  <eggert@twinsun.com>
22334
22335         * README: New section: portability guidelines.
22336
22337 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
22338
22339         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
22340         C89 spec.
22341
22342 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
22343
22344         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
22345
22346 2003-09-08  Paul Eggert  <eggert@twinsun.com>
22347
22348         Assume C89 or better; remove K&R cruft.
22349         A few of these changes were first proposed by Derek Robert Price
22350         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
22351
22352         * lib/addext.c: Include <string.h> unconditionally.
22353         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
22354         Don't declare getenv or malloc.
22355
22356         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
22357         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
22358         (NULL): Remove.
22359         (find_stack_direction, alloca): Use prototypes.
22360
22361         * lib/atexit.c (atexit): Define using a prototype.
22362
22363         * lib/basename.c, dirname.c, stripslash.c:
22364         Include <string.h> unconditionally.
22365
22366         * lib/bcopy.c: Include <stddef.h>.
22367         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
22368
22369         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
22370
22371         * lib/error.h (error, error_at_line, error_print_progname)
22372         [! (defined (__STDC__) && __STDC__)]: Remove decls.
22373         * lib/error.c: Include error.h first, to check interface.
22374         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
22375         (VA_START): Remove; all uses changeed to va_start.
22376         (exit, strerror): Remove decls.
22377         (error_print_progname): Prototype uncondionally.
22378         Don't include <errno.h>; no longer needed.
22379         (private_strerror): Remove.
22380         (error_tail): Always define.
22381         (error, error_at_line): Assume C89 or better; always use prototypes.
22382         * lib/fatal.c: Include "fatal.h" first, to test interface.
22383         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
22384         (VA_START): Remove; all uses changed to va_start.
22385         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
22386         this case.
22387         (exit): Remove decl.
22388         (fatal): Prototype unconditionally.  Assume va_start works.
22389         Abort at end, to pacify gcc.
22390
22391         * lib/euidaccess.c (main): Define with a prototype.
22392
22393         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
22394
22395         * lib/exitfail.c: Include <stdlib.h> unconditionally.
22396
22397         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
22398         prototypes.
22399         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
22400         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
22401         (getenv): Remove decl.
22402         (fnmatch): Define using a prototype.
22403         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
22404         (FCT): Define using a prototype.
22405
22406         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
22407
22408         * lib/gethostname.c: Include <stddef.h>.
22409         (gethostname): Define with prototype.  Length is size_t, not int.
22410
22411 2003-09-08  Paul Eggert  <eggert@twinsun.com>
22412
22413         Assume C89 or better; remove K&R cruft.
22414         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
22415         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
22416         string.h, getenv, malloc.
22417         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
22418         headers.
22419         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
22420         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
22421         do not check for strerror.
22422         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
22423         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
22424         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
22425         do not check for doprnt or vprintf.
22426         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
22427         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
22428
22429 2003-09-08  Paul Eggert  <eggert@twinsun.com>
22430
22431         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
22432         getversion.c should have been removed then, but was accidentally
22433         preserved.
22434
22435         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
22436         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
22437
22438 2003-09-08  Karl Berry  <karl@gnu.org>
22439
22440         * config/config.sub, config.guess, srclistvars.sh: update from savannah
22441                 config, forget about prep.
22442
22443         * config/depcomp, missing: update from automake.
22444
22445 2003-09-07  Paul Eggert  <eggert@twinsun.com>
22446
22447         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
22448         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
22449
22450 2003-09-07  Paul Eggert  <eggert@twinsun.com>
22451
22452         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
22453         copy_tm_result.  Bug reported by Simon Josefsson in
22454         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
22455
22456 2003-09-06  Paul Eggert  <eggert@twinsun.com>
22457
22458         * m4/time_r.m4: New file.
22459         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
22460         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
22461         is. Check for timegm declaration.
22462         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
22463         Do not check for gmtime_r.
22464         Replace mktime if __mktime_internal does not exist and if mktime
22465         hasn't been replaced already.
22466
22467 2003-09-06  Paul Eggert  <eggert@twinsun.com>
22468
22469         * lib/time_r.c, lib/time_r.h: New files.
22470
22471         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
22472         __localtime_r.
22473         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
22474         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
22475
22476         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
22477         __gmtime_r.
22478         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
22479         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
22480         Include <time_r.h>.
22481
22482         * lib/timegm.c: Switch to glibc implementation, with the following
22483         changes:
22484         [defined HAVE_CONFIG_H]: Include <config.h>.
22485         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
22486         (__mktime_internal) [!defined _LIBC]: New decl.
22487         (__gmtime_r) [!defined _LIBC]: New macro and function.
22488         (timegm): Use a prototype, since gnulib assumes C89.
22489         Do not bother declaring tmp to be const, as it's not really usefu.
22490         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
22491         (timegm): Declare only if HAVE_DECL_TIMEGM.
22492
22493 2003-09-06  Paul Eggert  <eggert@twinsun.com>
22494
22495         * MODULES.html.sh (func_all_modules): Add time_r.
22496         * modules/time_r: New file.
22497         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
22498         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
22499
22500 2003-09-03  Paul Eggert  <eggert@twinsun.com>
22501
22502         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
22503         Bug reported by Lute Kamstra in
22504         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
22505
22506         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
22507         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
22508         course with correspondingly smaller numbers for tomorrow and
22509         yesterday.  From Tadayoshi Funaba.  Originally installed into
22510         sh-utils on 1999-08-07, but the patch got lost (I guess during the
22511         coreutils merge?).
22512
22513 2003-08-31  Simon Josefsson  <jas@extundo.com>
22514
22515         * modules/timegm: New file.
22516         * MODULES.html.sh (func_all_modules): Add timegm.
22517
22518 2003-08-31  Simon Josefsson  <jas@extundo.com>
22519
22520         * m4/timegm.m4: New file.
22521
22522 2003-08-31  Simon Josefsson  <jas@extundo.com>
22523
22524         * lib/timegm.h: New file.
22525         * lib/timegm.c: New file.  Based on
22526         wget-1.8.2/src/http.c:mktime_from_utc.
22527
22528 2003-08-31  Karl Berry  <karl@gnu.org>
22529
22530         * lib/argp.h: update from libc.
22531
22532 2003-08-28  Bruno Haible  <bruno@clisp.org>
22533
22534         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
22535         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
22536         followed by '#define fnmatch fnmatch_posix' gives an error.
22537
22538 2003-08-28  Bruno Haible  <bruno@clisp.org>
22539
22540         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
22541         warning on QNX, which defines O_BINARY to 000000.
22542
22543 2003-08-27  Jim Meyering  <jim@meyering.net>
22544
22545         * m4/mkstemp.m4: Require that the system mkstemp be able to create
22546         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
22547         would fail after 32.  Reported by Danny Levinson.  Details here:
22548         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
22549
22550 2003-08-24  Bruno Haible  <bruno@clisp.org>
22551
22552         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
22553         MSVC7 <stdio.h> is included later.
22554
22555 2003-08-22  Simon Josefsson  <jas@extundo.com>
22556
22557         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
22558
22559 2003-08-20  Karl Berry  <karl@gnu.org>
22560
22561         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
22562
22563 2003-08-20  Bruno Haible  <bruno@clisp.org>
22564
22565         * modules/progname: New file.
22566         * MODULES.html.sh (func_all_modules): Add progname.
22567
22568 2003-08-20  Bruno Haible  <bruno@clisp.org>
22569
22570         * lib/progname.h: New file, from GNU gettext.
22571         * lib/progname.c: New file, from GNU gettext.
22572         * lib/progreloc.c: New file, from GNU gettext.
22573
22574 2003-08-19  Jim Meyering  <jim@meyering.net>
22575
22576         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
22577         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
22578
22579 2003-08-19  Bruno Haible  <bruno@clisp.org>
22580
22581         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
22582         more.
22583
22584 2003-08-19  Bruno Haible  <bruno@clisp.org>
22585
22586         * lib/xstrdup.c: Assume <string.h> exists.
22587
22588 2003-08-18  Paul Eggert  <eggert@twinsun.com>
22589
22590         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
22591         in makefile rules.
22592
22593 2003-08-18  Jim Meyering  <jim@meyering.net>
22594
22595         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
22596         * m4/lib-ld.m4: Likewise.
22597
22598 2003-08-18  Jim Meyering  <jim@meyering.net>
22599
22600         * lib/setenv.h: Indent nested cpp directive.
22601         * lib/vasnprintf.c: Remove trailing blanks.
22602
22603 2003-08-17  Simon Josefsson  <jas@extundo.com>
22604
22605         * modules/xstrndup: New file.
22606         * MODULES.html.sh (func_all_modules): Add xstrndup.
22607
22608 2003-08-17  Simon Josefsson  <jas@extundo.com>
22609
22610         * modules/argp: Fix autoconf macro name. Add more dependencies.
22611
22612 2003-08-17  Simon Josefsson  <jas@extundo.com>
22613
22614         * m4/xstrndup.m4: New file.
22615
22616 2003-08-17  Simon Josefsson  <jas@extundo.com>
22617
22618         * m4/argp.m4: New file.
22619
22620 2003-08-17  Simon Josefsson  <jas@extundo.com>
22621             Bruno Haible  <bruno@clisp.org>
22622
22623         * lib/xstrndup.h: New file.
22624         * lib/xstrndup.c: New file.
22625
22626 2003-08-17  Bruno Haible  <bruno@clisp.org>
22627
22628         * modules/strndup (Files, Include): Add lib/strndup.h.
22629
22630 2003-08-17  Bruno Haible  <bruno@clisp.org>
22631
22632         * modules/euidaccess (Files): Add lib/euidaccess.h.
22633
22634 2003-08-17  Bruno Haible  <bruno@clisp.org>
22635
22636         * lib/strndup.h: New file.
22637
22638 2003-08-17  Bruno Haible  <bruno@clisp.org>
22639
22640         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
22641         like AC_GNU_SOURCE.
22642         * modules/extensions (configure.ac): Comment out the invocation of
22643         gl_USE_SYSTEM_EXTENSIONS.
22644
22645 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22646
22647         Merges from coreutils, etc.
22648         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
22649         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
22650         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
22651         fixing a typo.
22652         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
22653         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
22654
22655 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22656
22657         Document merge from coreutils.
22658         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
22659         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
22660         * modules/utime: Add m4/utimes-null.m4.
22661
22662 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22663
22664         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
22665         space, undoing this 2003-08-12 change:
22666         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
22667
22668 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22669
22670         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
22671         strtoul.c from libc, undoing this 2003-08-12 change:
22672         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
22673
22674 2003-08-16  Jim Meyering  <jim@meyering.net>
22675
22676         Merges from coreutils.
22677         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
22678         prefix.  Adjust cache variables similarly.  Create 500 rather than
22679         just 300 files, to exercise bug on Darwin6.5, too.
22680         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
22681         $missing_dir.
22682         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
22683         AM_SYS_POSIX_TERMIOS.
22684         Reported by mkc@mathdogs.com.
22685         Also change use of $am_cv_sys_posix_termios
22686         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
22687         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
22688         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
22689         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
22690         in /proc/mounts until it finds one with matching device number.  This
22691         is unnecessary when the FILE argument *is* a mount point.  No stat call
22692         is necessary in that case.  So, disable the statvfs-testing code on
22693         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
22694         as RedHat bug# 84846.
22695         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
22696         to 1MB, so as not to render systems with no stack size limit (e.g.,
22697         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
22698         Include <unistd.h>.  On some systems,
22699         it is required for the definition of _SC_PAGESIZE.
22700
22701 2003-08-16  Jim Meyering  <jim@meyering.net>
22702
22703         Merge from coreutils.
22704         * lib/xstrtoimax.c: #else #if -> #elif.
22705         * lib/xstrtoumax.c: Likewise.
22706
22707 2003-08-16  Jim Meyering  <jim@meyering.net>
22708
22709         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
22710         * m4/utimes.m4: Removed.
22711         * m4/utimes-null.m4: Renamed from utimes.m4.
22712
22713         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
22714         to 1MB, so as not to render systems with no stack size limit (e.g.,
22715         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
22716         Include <unistd.h>.  On some systems,
22717         it is required for the definition of _SC_PAGESIZE.
22718
22719 2003-08-16  Jim Meyering  <jim@meyering.net>
22720         and Paul Eggert  <eggert@cs.ucla.edu>
22721
22722         Merges from coreutils, etc.
22723
22724         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
22725         using the latest version from cvs.  This avoids problems with #line
22726         directives using a vendor (Sun) compiler.
22727         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
22728         Don't set GETGROUPS_LIB here; now it's
22729         done via getgroups.m4's wrapper function.
22730         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
22731         rather than just in sh-util/configure.in, so that the
22732         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
22733         same.
22734         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
22735         AC_FUNC_GETLOADAVG where to find getloadavg.c.
22736         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
22737         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
22738         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
22739         Remove code that is now done by the newly-required macros.
22740         Append $(EXEEXT) to DF_PROG.
22741         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
22742         Do not invoke or require the following here,
22743         since prereq.m4 or some gnulib .m4 now does this for us:
22744         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
22745         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
22746         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
22747         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
22748         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
22749         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
22750         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
22751         AC_FUNC_OBSTACK.
22752         Do not replace the following functions, as this is now the job
22753         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
22754         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
22755         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
22756         atexit getpass, strdup, getpagesize.
22757         Replace 'raise'.
22758         Do not check for the following functions, as this is now the job
22759         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
22760         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
22761         setregid.
22762         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
22763         Check for sys/sysctl.h.
22764         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
22765         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
22766         of checking for ssize_t ourselves.
22767
22768         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
22769         Require every macro that gnulib/modules/* suggests for us.
22770         (jm_PREREQ_ADDEXT): New macro.
22771         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
22772         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
22773
22774         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
22775         (gl_PHYSMEM): Use it.
22776         Also check for `table' function.
22777         Check for new headers and functions.
22778         Add check for sys/sysmp.h.
22779         With suggestions from Kaveh Ghazi.
22780         Ignore headers that are present but cannot be compiled.  This
22781         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
22782         C 5.4.
22783
22784 2003-08-15  Paul Eggert  <eggert@twinsun.com>
22785
22786         Document merge from coreutils.
22787         * modules/userspec: Depend on posixver.
22788         * modules/strftime: Depend on tzset.
22789
22790 2003-08-15  Paul Eggert  <eggert@twinsun.com>
22791
22792         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
22793         rather than tab, after '#' in shell-script copyright notices.
22794         Suggested by Bruno Haible.
22795
22796 2003-08-15  Paul Eggert  <eggert@twinsun.com>
22797
22798         * config/srclist-update: Use three spaces, rather than tab, after '#'
22799         in shell-script copyright notices.  Suggested by Bruno Haible.
22800         Remove unnecessary parenthesization in regular expression.
22801
22802 2003-08-15  Jim Meyering  <jim@meyering.net>
22803
22804         Merge from coreutils.
22805         * lib/xgethostname.c: Include <stdlib.h>.
22806         (xghostname): Don't exit for anything other than memory-related
22807         failure; just return NULL.
22808         * lib/userspec.c: Include "posixver.h".
22809         (parse_user_spec): Accept `.' as a separator only
22810         in pre-POSIX-200112 mode.
22811         * lib/strtoimax.c: Use #elif rather than #else #if.
22812         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
22813         Remove function, now that we can rely on a working tzset function.
22814         [!_LIBC]: Ensure that the required autoconf test has been run.
22815         [!defined _NL_CURRENT && HAVE_STRFTIME]:
22816         Use underlying_strftime for %r.
22817         * lib/sha.c: Merge in some clean-up and optimization changes from
22818         glibc.
22819         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
22820         Ensure that it is a multiple of 64.
22821         Rearrange loop exit tests so as to avoid performing an
22822         additional fread after encountering an error or EOF.
22823         * lib/realloc.c: Update copyright date.
22824
22825 2003-08-15  Jim Meyering  <jim@meyering.net>
22826         and Paul Eggert  <eggert@twinsun.com>
22827
22828         Merge from coreutils.
22829         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
22830         member but strut utmpx does not.  Needed for AIX 4.3.3.
22831         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
22832
22833 2003-08-15  Jim Meyering  <jim@meyering.net>
22834         and Paul Eggert  <eggert@cs.ucla.edu>
22835
22836         Merges from coreutils, etc.
22837         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
22838         Require gl_FUNC_TZSET_CLOBBER.
22839         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
22840         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
22841         members.
22842
22843 2003-08-14  Paul Eggert  <eggert@twinsun.com>
22844
22845         Help the merge from coreutils.
22846         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
22847         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
22848         * m4/tzset.m4: Use it too.
22849
22850 2003-08-14  Paul Eggert  <eggert@twinsun.com>
22851
22852         * modules/tzset: New file.
22853
22854 2003-08-14  Jim Meyering  <jim@meyering.net>
22855
22856         Merges from coreutils.
22857         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
22858         variable names, rather than @FNMATCH_H@.
22859         * modules/alloca: Likewise for $(ALLOCA_H).
22860
22861         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
22862         the three copies of the literal target, `fnmatch.h'.
22863         * modules/alloca (alloca.h): Likewise.
22864
22865 2003-08-14  Jim Meyering  <jim@meyering.net>
22866
22867         Merge from coreutils.
22868         * m4/tzset.m4: New file.
22869         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
22870         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
22871         otherwise, AIX 5.1 systems would end up using the latter.
22872         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
22873         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
22874         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
22875         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
22876
22877 2003-08-14  Jim Meyering  <jim@meyering.net>
22878
22879         Merge from coreutils.
22880         * lib/obstack.h: Whitespace changes.
22881         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
22882         and xcalloc return values.
22883         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
22884         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
22885         hang on OSF/1 5.1 for DIR on both local and remote file systems.
22886         Reported by (and fix confirmed by) Nelson H. F. Beebe.
22887         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
22888         error from mntctl.
22889         Use mntctl's return value to drive the entry-processing loop, since
22890         we can't rely on the value of the vmt_length member in the last
22891         entry.  On some systems doing so could result in exhausting
22892         virtual memory.  Based in part on a patch from Mike Jetzer.
22893
22894 2003-08-14  Jim Meyering  <jim@meyering.net>
22895         and Paul Eggert  <eggert@twinsun.com>
22896
22897         Merges from coreutils, plus other fixes.
22898         * lib/physmem.c: Merge in portability changes from gcc/libiberty
22899         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
22900         for credits and details.  Thanks to Kaveh Ghazi for helping
22901         to keep these files in sync.
22902         (ARRAY_SIZE): Define it.
22903         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
22904         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
22905         (memcasecmp): Don't assume size_t fits in unsigned int.
22906         Remove casts and duplicate code.
22907         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
22908         (memcpy): Remove definition.
22909         Merge in some clean-up and optimization changes from glibc.
22910         [BLOCKSIZE]: Move definition to top of file.
22911         Ensure that it is a multiple of 64.
22912         Rearrange loop exit tests so as to avoid performing an
22913         additional fread after encountering an error or EOF.
22914         * lib/md5.h (md5_uintptr): Define.
22915         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
22916         return to the initial working directory.  Preserve errno
22917         for caller.
22918         * lib/idcache.c: Include "xalloc.h".
22919         (xmalloc, xrealloc): Remove decls.
22920         (getuser): Remove casts no longer required in C89.
22921         * lib/human.c: Include stdio.h, for sprintf.
22922         * lib/group-member.c: Include "xalloc.h".
22923         (xmalloc, xrealloc): Remove decls.
22924         (get_group_info): Remove casts no longer required in C89.
22925         * lib/getusershell.c (readname): Remove casts no longer required in
22926         C89.
22927         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
22928         * lib/getline.c: Whitespace fix, from coreutils.
22929
22930 2003-08-13  Paul Eggert  <eggert@twinsun.com>
22931
22932         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
22933         Check for isascii.
22934
22935         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
22936         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
22937         Undo previous (whitespace-only) change.
22938
22939 2003-08-13  Paul Eggert  <eggert@twinsun.com>
22940
22941         * lib/exclude.c: Include <ctype.h>
22942         (IN_CTYPE_DOMAIN): New macro.
22943         (is_space): New fn.
22944         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
22945         and empty lines.
22946
22947         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
22948         Undo previous (whitespace-only) change.
22949
22950 2003-08-13  Paul Eggert  <eggert@twinsun.com>
22951
22952         * config/srclist-update: Change update back to the old behavior,
22953         leaving whitespace alone.  Use one 'sed' command rather than a
22954         pipeline.
22955         (fixlicense): Now a variable, not a function.
22956         (remove_trailing_blanks): Remove.
22957         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
22958         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
22959         Undo previous (whitespace-only) change.
22960
22961 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22962
22963         Merge from coreutils.
22964         * modules/euidaccess: Add lib_SOURCES, include for new
22965         file euidaccess.h
22966
22967 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22968
22969         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
22970         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
22971         Normalize leading white space and remove trailing white space.
22972
22973         Merge from coreutils
22974         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
22975
22976         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
22977         0.12.1.  These files are now being upgraded automatically by
22978         ../config/srclist-update.
22979
22980 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22981
22982         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
22983         Normalize leading white space and remove trailing white space.
22984         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
22985         notice, as per ../config/srclist-update.
22986
22987         Merge from coreutils.
22988         * lib/euidaccess.h: New file.
22989         * lib/euidaccess.c: Include it.
22990         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
22991         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
22992         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
22993
22994 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22995
22996         * config/srclist-update: Add copyright notice.
22997         (remove_id_lines, remove_trailing_blanks): New constants.
22998         (fixfile): Use them to normalize spacing a bit in copied files.
22999         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
23000         Normalize leading white space and remove trailing white space.
23001
23002         * config/texinfo.tex: Sync with texinfo.
23003
23004         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
23005         strtoul.c from libc, to merge coreutils whitespace changes.
23006
23007         * config/srclist.txt: Get the following m4 files from gettext:
23008         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
23009         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
23010         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
23011         wint_t.m4.
23012
23013 2003-08-12  Karl Berry  <karl@gnu.org>
23014
23015         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
23016         been made.
23017
23018 2003-08-11  Paul Eggert  <eggert@twinsun.com>
23019
23020         * modules/gnu-source, m4/gnu-source.m4:
23021         Remove; we're assuming Autoconf 2.54 or later now.
23022         Suggested by Bruno Haible.
23023         * MODULES.html.sh (func_all_modules): Remove gnu-source.
23024
23025 2003-08-11  Bruno Haible  <bruno@clisp.org>
23026
23027         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
23028
23029 2003-08-11  Bruno Haible  <bruno@clisp.org>
23030
23031         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
23032         (vasnprintf): Use it instead of wcslen.
23033
23034 2003-08-11  Bruno Haible  <bruno@clisp.org>
23035
23036         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
23037         value to ensure that _Bool promotes to int. Use #define for _Bool when
23038         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
23039
23040 2003-08-10  Karl Berry  <karl@gnu.org>
23041
23042         * lib/regex.h: update from libc (whitespace fix).
23043
23044 2003-08-09  Paul Eggert  <eggert@twinsun.com>
23045
23046         Merge some files from coreutils.  These changes were
23047         originally made by Jim Meyering.
23048         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
23049         many older Unixes require this.
23050         * lib/alloca.c (alloca): Remove cast to argument of free;
23051         no longer needed in C89.
23052         * lib/alloca_.h, regex.h: Fix white space to match
23053         what GNU indent does.
23054
23055 2003-08-09  Paul Eggert  <eggert@twinsun.com>
23056
23057         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
23058         apparently Emacs's Unicode mode got confused before my 2003-08-05
23059         checkin.
23060
23061 2003-08-08  Paul Eggert  <eggert@twinsun.com>
23062
23063         * m4/extensions.m4: New file.
23064         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
23065         Require gl_USE_SYSTEM_EXTENSIONS.
23066         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
23067         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
23068
23069 2003-08-08  Paul Eggert  <eggert@twinsun.com>
23070
23071         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
23072         * modules/extensions, modules/gnu-source: New files.
23073         * modules/timespec, modules/unlocked-io: Depend on extensions.
23074
23075 2003-08-07  Paul Eggert  <eggert@twinsun.com>
23076
23077         * modules/restrict: New file.
23078         * MODULES.html.sh (func_all_modules): Add restrict.
23079         * modules/regex: Depend on restrict.
23080
23081 2003-08-07  Paul Eggert  <eggert@twinsun.com>
23082
23083         * m4/restrict.m4: New file.
23084         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
23085
23086 2003-08-07  Bruno Haible  <bruno@clisp.org>
23087
23088         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
23089         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
23090
23091 2003-08-07  Bruno Haible  <bruno@clisp.org>
23092
23093         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
23094         makes the module 'getndelim2' compatible with the module 'getline'.
23095
23096 2003-08-05  Paul Eggert  <eggert@twinsun.com>
23097
23098         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
23099         byte with "\201" to avoid glitches when editing that source file
23100         with multi-gnome-terminal.
23101
23102 2003-08-05  Paul Eggert  <eggert@twinsun.com>
23103
23104         * lib/bumpalloc.h: Remove.
23105
23106 2003-08-05  Paul Eggert  <eggert@twinsun.com>
23107
23108         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
23109         * modules/bumpalloc: Remove.
23110
23111 2003-08-04  Paul Eggert  <eggert@twinsun.com>
23112
23113         * lib/getloadavg.c: Change copyright notice and spacing to conform to
23114         GNU coding style.
23115
23116         Merge from coreutils.
23117         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
23118         1. From glibc.
23119         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
23120         from Karl Berry, implemented by Jim Meyering.
23121         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
23122         from Dmitry V. Levin.
23123         Remove anachronistic cast of xrealloc.
23124         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
23125         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
23126         type. Otherwise, it wouldn't compile with at least /bin/cc on
23127         ymp-cray-unicos9.0.2.X.
23128         Combine two mostly-identical uses of alloca into one.
23129         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
23130
23131 2003-08-04  Dave Love  <d.love@dl.ac.uk>
23132
23133         [From Emacs.]
23134
23135         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
23136         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
23137         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
23138         obsolete NLIST_NAME_UNION.
23139         [__GNU__]: Undef BSD and FSCALE.
23140         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
23141
23142 2003-08-03  Paul Eggert  <eggert@twinsun.com>
23143
23144         * lib/stdbool_.h (_Bool): Make it signed char, instead of
23145         an enum type, so that it's guaranteed to promote to int.  See:
23146         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
23147
23148 2003-08-03  Karl Berry  <karl@gnu.org>
23149
23150         * config/depcomp: update from automake.
23151
23152 2003-07-31  Paul Eggert  <eggert@twinsun.com>
23153
23154         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
23155         (strerror): Don't assume that a printable int fits in 14 bytes.
23156
23157 2003-07-31  Bruno Haible  <bruno@clisp.org>
23158
23159         * modules/getpass-gnu: New file.
23160         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
23161
23162 2003-07-31  Bruno Haible  <bruno@clisp.org>
23163
23164         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
23165
23166 2003-07-24  Karl Berry  <karl@gnu.org>
23167
23168         * config/missing: update from automake.
23169
23170 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
23171             Bruno Haible  <bruno@clisp.org>
23172
23173         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
23174         * lib/getline.c (getline, getdelim): Likewise.
23175         Remove _GNU_SOURCE define; now it's defined in config.h through
23176         m4/getline.m4.
23177
23178 2003-07-23  Karl Berry  <karl@gnu.org>
23179
23180         * config/config.sub: update from prep.
23181
23182 2003-07-22  Paul Eggert  <eggert@twinsun.com>
23183
23184         * modules/xalloc (Depends-on): Add exitfail.
23185         * modules/xmemcoll: Likewise.
23186
23187 2003-07-22  Paul Eggert  <eggert@twinsun.com>
23188
23189         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
23190         over-parenthesization in macros.
23191
23192         Sync with coreutils.
23193
23194         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
23195         required by C99.
23196
23197         Use `exit_failure' for xalloc and xmemcoll instead of their own
23198         private exit-failure variables.
23199         * lib/xalloc.h (xalloc_exit_failure): Remove.
23200         * lib/xmalloc.c: Likewise.  Include exitfail.h.
23201         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
23202         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
23203         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
23204         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
23205
23206 2003-07-20  Jim Meyering  <jim@meyering.net>
23207
23208         * modules/closeout (Depends-on): Add exitfail.
23209         Suggestion from Bruno Haible.
23210
23211 2003-07-19  Karl Berry  <karl@gnu.org>
23212
23213         * config/config.sub: update from prep.
23214
23215 2003-07-18  Paul Eggert  <eggert@twinsun.com>
23216
23217         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
23218         Remove.
23219         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
23220         to test that it can stand by itself.  Include "exitfail.h".
23221         Clients should set exit_failure instead.
23222         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
23223
23224 2003-07-18  Bruno Haible  <bruno@clisp.org>
23225
23226         * modules/getndelim2: New file.
23227         * modules/getline: Share files with module getndelim2.
23228         * modules/getnline: Depend on getndelim2 instead of sharing files with
23229         it. Add getnline.c to lib_SOURCES.
23230         * MODULES.html.sh (func_all_modules): Add getndelim2.
23231
23232 2003-07-18  Bruno Haible  <bruno@clisp.org>
23233
23234         * m4/getndelim2.m4: New file.
23235         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
23236         invoke gl_PREREQ_GETNDELIM2.
23237         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
23238         gl_PREREQ_GETNDELIM2.
23239         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
23240         gl_GETNDELIM2.
23241
23242 2003-07-18  Bruno Haible  <bruno@clisp.org>
23243
23244         * lib/getndelim2.h: New file.
23245         * lib/getndelim2.c: Make into a module of its own. Include config.h,
23246         getndelim2.h.
23247         (getndelim2): Make non-static. Change return type to ssize_t.
23248         * lib/getline.h: Change argument names.
23249         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
23250         * lib/getnline.c: Include getndelim2.h.
23251
23252 2003-07-18  Andreas Schwab  <schwab@suse.de>
23253
23254         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
23255
23256 2003-07-17  Karl Berry  <karl@gnu.org>
23257
23258         * config/config.sub: update from prep.
23259
23260 2003-07-17  Bruno Haible  <bruno@clisp.org>
23261
23262         * modules/getnline: New file.
23263         * modules/getline: Add lib/getndelim2.c to source file list.
23264         * MODULES.html.sh (func_all_modules): Add getnline.
23265
23266 2003-07-17  Bruno Haible  <bruno@clisp.org>
23267
23268         * m4/getnline.m4: New file.
23269
23270 2003-07-17  Bruno Haible  <bruno@clisp.org>
23271
23272         * m4/Makefile.am.in: Remove file.
23273         * m4/Makefile.am: Remove file.
23274         * m4/Makefile.in: Remove file.
23275
23276 2003-07-17  Bruno Haible  <bruno@clisp.org>
23277
23278         * lib/getnline.h: New file.
23279         * lib/getnline.c: New file.
23280         * lib/getndelim2.c: New file, extracted from getline.c.
23281         (getndelim2): Renamed from getdelim2, with added nmax argument.
23282         * lib/getline.c: Include getndelim2.c.
23283         (getdelim2): Moved out to getndelim2.c.
23284         (getline, getdelim): Update.
23285
23286 2003-07-17  Bruno Haible  <bruno@clisp.org>
23287
23288         * lib/Makefile.am: Remove file.
23289         * lib/Makefile.in: Remove file.
23290
23291 2003-07-17  Bruno Haible  <bruno@clisp.org>
23292
23293         * configure.in: Remove file.
23294         * Makefile.in: Remove file.
23295
23296 2003-07-17  Bruno Haible  <bruno@clisp.org>
23297
23298         * MODULES.html.sh: Put the </BODY> right before </HTML>.
23299
23300 2003-07-16  Karl Berry  <karl@gnu.org>
23301
23302         * config/srclist-update: was running fixlicense twice, which caused
23303                 texinfo.tex to be nullified for some reason.  Simplify,
23304                 $gplsrc is no longer needed as far as I can see?
23305
23306 2003-07-16  Jim Meyering  <jim@meyering.net>
23307
23308         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
23309
23310 2003-07-15  Paul Eggert  <eggert@twinsun.com>
23311
23312         * config/srclist.txt: Get the following files from gettext-runtime/intl
23313         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
23314         ref-del.sin.  From Bruno Haible.
23315         * config/srclist-update (fixfile): Change grep pattern again, since the
23316         previous fix didn't work (there was another trailing $).  Use
23317         '[$]' to escape the $s.
23318
23319 2003-07-15  Karl Berry  <karl@gnu.org>
23320
23321         * lib/vasnprintf.c: update from gettext.
23322
23323 2003-07-15  Karl Berry  <karl@gnu.org>
23324
23325         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
23326         gets expanded when surrounded by '$'.
23327
23328 2003-07-15  Jim Meyering  <jim@meyering.net>
23329
23330         * modules/save-cwd: Don't depend on error.  From Derek Price.
23331
23332 2003-07-15  Jim Meyering  <jim@meyering.net>
23333
23334         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
23335
23336 2003-07-14  Simon Josefsson  <jas@extundo.com>
23337
23338         * modules/mempcpy: New file.
23339         * MODULES.html.sh (func_all_modules): Add mempcpy.
23340
23341 2003-07-14  Simon Josefsson  <jas@extundo.com>
23342
23343         * m4/mempcpy.m4: New file.
23344
23345 2003-07-14  Simon Josefsson  <jas@extundo.com>
23346
23347         * lib/mempcpy.h: New file.
23348         * lib/mempcpy.c: New file.
23349
23350 2003-07-14  Paul Eggert  <eggert@twinsun.com>
23351
23352         * modules/getdate, modules/posixtm: Depend on mktime.
23353
23354 2003-07-14  Paul Eggert  <eggert@twinsun.com>
23355
23356         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
23357         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
23358         unicodeio.c, unicodeio.h, unlocked-io.h:
23359         Switch from LGPL to GPL.
23360
23361 2003-07-14  Paul Eggert  <eggert@twinsun.com>
23362
23363         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
23364         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
23365         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
23366         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
23367         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
23368         updated automatically by ../config/srclist-update.  This changes
23369         their license from LPGL to GPL.
23370
23371 2003-07-14  Paul Eggert  <eggert@twinsun.com>
23372
23373         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
23374         assumed to refer to the root of the most recent stable gettext version.
23375         * config/srclistvars.sh: Add defaults for eggert.
23376         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
23377         Match "This program" as well as "The program".  This is needed
23378         for gettext.
23379
23380 2003-07-14  Jim Meyering  <jim@meyering.net>
23381
23382         Don't emit diagnostics.  Let callers do that.
23383         * lib/save-cwd.c: Don't include "error.h".
23384         (save_cwd): Don't call error.  Ensure that errno is valid
23385         when returning nonzero.
23386
23387         * lib/save-cwd.h (restore_cwd): Update prototype.
23388         * lib/save-cwd.c (restore_cwd): Remove two parameters.
23389         Simplify.  Don't call error upon failure.  Let callers do that.
23390         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
23391         when auditing is enabled.  But don't bother updating the #if.
23392
23393 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
23394
23395         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
23396         it breaks C++ compilation.
23397         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
23398
23399 2003-07-10  Simon Josefsson  <jas@extundo.com>
23400
23401         * modules/strchrnul (Makefile.am): Add strchrnul.h.
23402
23403 2003-07-10  Jim Meyering  <jim@meyering.net>
23404
23405         * m4/clock_time.m4: Remove trailing blank.
23406         * m4/intmax_t.m4: Likewise.
23407
23408 2003-07-10  Jim Meyering  <jim@meyering.net>
23409
23410         * lib/vasnprintf.c: Remove trailing blanks.
23411         Make cpp indentation consistent.
23412
23413 2003-07-09  Paul Eggert  <eggert@twinsun.com>
23414
23415         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
23416         posixver.c, strftime.c, strnlen.c, strverscmp.c:
23417         Switch from LGPL to GPL.
23418
23419 2003-07-09  Paul Eggert  <eggert@twinsun.com>
23420
23421         * config/srclist.txt: Sort sublists.  Add
23422         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
23423         that differ from gnulib for one reason or another; we'd like this list
23424         to be smaller but for now let's document what we have.
23425
23426 2003-07-08  Paul Eggert  <eggert@twinsun.com>
23427
23428         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
23429         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
23430         and sweeter "eval x=$x".
23431         * config/srclist.txt: Get lib/argp* from glibc.
23432
23433 2003-07-07  Paul Eggert  <eggert@twinsun.com>
23434
23435         * lib/mktime.c: Fix some boundary cases and remove need for floating
23436         point.
23437
23438         Issue a compile-time diagnostic if time_t is floating point, or if
23439         two's complement arithmetic is not in effect, or if arithmetic
23440         right shift does not propagate the sign.  These assumptions were
23441         all in the original code but they weren't checked.
23442
23443         (TIME_T_MIDPOINT, verify): New macros.
23444         (__isleap): Remove; it has integer overflow problems.
23445         (leapyear): New function, without those problems.
23446         (ydhms_tm_diff): Remove; splitting into two parts.
23447         (ydhms_diff): New function, containing the arithmetic part of
23448         the old ydhms_tm_diff function.  Issue a compile-time
23449         diagnostic if we are not using C99 integer division.
23450         Avoid casts when possible.
23451         (guess_time_tm): New function, containing the checking part of
23452         the old ydhms_tm_diff function.  Return the new value, rather than
23453         the difference between it and the old.  Accept a new argument T
23454         so that *T specifies the old value.  Check for overflow in the result.
23455
23456         (__mktime_internal): Use a time_t offset, not a long int offset.
23457         This undoes the 2003-06-04 change, which is no longer needed now
23458         that we have better overflow checking.
23459         (localtime_offset): Likewise.
23460
23461         (__mktime_internal): Avoid harmful overflow on hosts where time_t
23462         and long are 64-bit but int is only 32-bit.
23463         (ydhms_diff): Use long int to store year1 and yday1.
23464         Issue a compile-time diagnostic if long int is not wide enough.
23465
23466         (__mktime_internal): Use long int to store adjusted year and yday.
23467         Use plain C rather than preprocessor commands, if that doesn't
23468         affect efficiency.
23469         Check for overflow (and try to repair) after each probe
23470         rather than checking only at the very end.  This avoids some bugs
23471         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
23472         does not equal GMT offset at maximum time).
23473         Use integer to check for overflow rather than floating point; this
23474         is more portable to non-IEEE hosts, and is a tad faster.
23475         When we detect that we are oscillating between two values,
23476         don't check whether tm_isdst has the requested value, since
23477         we already know the answer.  When tm_isdst has the wrong value,
23478         use a different heuristic to find the right one, based on the
23479         extreme values actually observed in practice in tz2003a,
23480         rather than the (overly optimistic) "previous 3 calendar quarters".
23481
23482         (not_equal_tm, print_tm, check_result): Use "const T" rather than
23483         "T const" to accommodate glibc style.
23484         (check_result): Use less-confusing report format.  "long" -> "long int.
23485         (main): Likewise.
23486         Don't loop if the iteration overflows time_t.
23487         Allow a negative step in the iteration.
23488
23489 2003-07-06  Karl Berry  <karl@gnu.org>
23490
23491         * config/depcomp: update from automake.
23492         * config/config.sub: update from prep.
23493
23494 2003-07-03  Karl Berry  <karl@gnu.org>
23495
23496         * config/config.guess: update from prep.
23497
23498 2003-07-01  Paul Eggert  <eggert@twinsun.com>
23499
23500         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
23501         xreadlink.c now includes it unconditionally.
23502
23503 2003-07-01  Paul Eggert  <eggert@twinsun.com>
23504
23505         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
23506         having it depend on HAVE_SYS_TYPES_H.
23507
23508 2003-07-01  Bruno Haible  <bruno@clisp.org>
23509
23510         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
23511         <sys/types.h> should be sufficient.
23512         Reported by Paul Eggert.
23513
23514 2003-06-26  Karl Berry  <karl@gnu.org>
23515
23516         * config/depcomp: update from automake.
23517
23518 2003-06-26  Bruno Haible  <bruno@clisp.org>
23519
23520         * modules/human: Depend on module stdbool.
23521
23522 2003-06-25  Bruno Haible  <bruno@clisp.org>
23523
23524         * modules/readlink: New file.
23525         * modules/xreadlink: Depend on it.
23526         * MODULES.html.sh (func_all_modules): Add readlink.
23527
23528 2003-06-25  Bruno Haible  <bruno@clisp.org>
23529
23530         * m4/readlink.m4: New file.
23531
23532 2003-06-25  Bruno Haible  <bruno@clisp.org>
23533
23534         * lib/readlink.c: New file.
23535
23536 2003-06-22  Karl Berry  <karl@gnu.org>
23537
23538         * config/srclist.txt: update mkinstalldirs from automake.
23539         * config/mkinstalldirs: update.
23540
23541 2003-06-22  Bruno Haible  <bruno@clisp.org>
23542
23543         Portability to mingw32.
23544         * m4/ssize_t.m4: New file, from GNU gettext.
23545         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
23546         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
23547
23548 2003-06-22  Bruno Haible  <bruno@clisp.org>
23549
23550         * modules/safe-read: Add m4/ssize_t.m4.
23551         * modules/xreadlink: Add m4/ssize_t.m4.
23552
23553 2003-06-20  Bruno Haible  <bruno@clisp.org>
23554
23555         Assume C89, so PARAMS isn't needed.
23556         * lib/unicodeio.h (PARAMS): Remove.
23557         * lib/unicodeio.c: Don't use PARAMS.
23558
23559 2003-06-18  Karl Berry  <karl@gnu.org>
23560
23561         * config/config.{guess,sub}: update from prep.
23562
23563 2003-06-18  Jim Meyering  <jim@meyering.net>
23564
23565         Merge changes from coreutils.
23566         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
23567         Remove explicit declarations of xmalloc and realloc.
23568         Include xalloc.h.
23569         (read_utmp): Remove anachronistic cast of xmalloc.
23570
23571 2003-06-17  Paul Eggert  <eggert@twinsun.com>
23572
23573         Assume C89, so PARAMS isn't needed.
23574         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
23575         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
23576         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
23577         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
23578         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
23579         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
23580         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
23581         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
23582         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
23583         lib/xstrtod.h, lib/xstrtol.h: Likewise.
23584         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
23585         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
23586         no longer needed. Anyway, config.h should always be included before any
23587         other file.
23588
23589 2003-06-11  Simon Josefsson  <jas@extundo.com>
23590
23591         * modules/sysexits: New file.
23592         * MODULES.html.sh (func_all_modules): Add sysexits.
23593
23594 2003-06-11  Simon Josefsson  <jas@extundo.com>
23595
23596         * lib/sysexit_.h: New file.
23597
23598 2003-06-11  Derek Price  <derek@ximbiot.com>
23599
23600         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
23601         necessary.
23602
23603 2003-06-11  Bruno Haible  <bruno@clisp.org>
23604
23605         * m4/sysexits.m4: New file.
23606
23607 2003-06-10  Simon Josefsson  <jas@extundo.com>
23608
23609         * lib/argp.h: New file, from glibc.
23610         * lib/argp-ba.c: New file, from glibc.
23611         * lib/argp-eexst.c: New file, from glibc.
23612         * lib/argp-fmtstream.c: New file, from glibc.
23613         * lib/argp-fmtstream.h: New file, from glibc.
23614         * lib/argp-fs-xinl.c: New file, from glibc.
23615         * lib/argp-help.c: New file, from glibc.
23616         * lib/argp-namefrob.h: New file, from glibc.
23617         * lib/argp-parse.c: New file, from glibc.
23618         * lib/argp-pv.c: New file, from glibc.
23619         * lib/argp-pvh.c: New file, from glibc.
23620         * lib/argp-xinl.c: New file, from glibc.
23621
23622 2003-06-10  Simon Josefsson  <jas@extundo.com>
23623
23624         * modules/strchrnul: New file.
23625
23626 2003-06-10  Simon Josefsson  <jas@extundo.com>
23627
23628         * modules/argp: New file.
23629
23630 2003-06-10  Simon Josefsson  <jas@extundo.com>
23631
23632         * m4/strchrnul.m4: New file.
23633
23634 2003-06-10  Simon Josefsson  <jas@extundo.com>
23635
23636         * lib/strchrnul.h: New file.
23637         * lib/strchrnul.c: New file.
23638
23639 2003-06-10  Bruno Haible  <bruno@clisp.org>
23640
23641         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
23642
23643 2003-06-07  Karl Berry  <karl@gnu.org>
23644
23645         * config/config.{guess,sub}: update from prep.
23646
23647 2003-06-07  Jim Meyering  <jim@meyering.net>
23648
23649         * modules/strtod: Use $(...) notation, not @...@ for
23650         AC_REPLACE'd variables.
23651         * modules/localcharset: Likewise.
23652
23653 2003-06-07  Jim Meyering  <jim@meyering.net>
23654
23655         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
23656         in place of my name in the copyright comment.
23657         Remove definition and uses of __P.
23658
23659         From coreutils.
23660         * lib/stat.c: Don't declare xmalloc explicitly.
23661         Instead, include "xalloc.h".
23662         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
23663         xrealloc, and xcalloc return values.
23664         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
23665         Improve comment.
23666         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
23667
23668 2003-06-07  Bruno Haible  <bruno@clisp.org>
23669
23670         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
23671         avoid AC_CONFIG_LINKS.
23672         * modules/fnmatch (Makefile.am): Use explicit creation rule for
23673         fnmatch.h, to avoid AC_CONFIG_LINKS.
23674         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
23675
23676 2003-06-07  Bruno Haible  <bruno@clisp.org>
23677
23678         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
23679         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
23680         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
23681         directory.
23682         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
23683         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
23684         directory.
23685
23686 2003-06-06  Jim Meyering  <jim@meyering.net>
23687
23688         Merge from coreutils.
23689         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
23690         Consolidate declarations and initializations of *_base* locals.
23691
23692         Merge from coreutils.
23693         This avoids a core dump on systems without GNU putenv,
23694         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
23695         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
23696         (unsetenv): New static function, from GNU libc.
23697         (rpl_putenv): Use it.
23698
23699         * lib/modechange.c: Remove trailing blanks.
23700
23701         Merge from coreutils.
23702         * lib/fsusage.c: Remove declaration of statfs.
23703         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
23704
23705         * lib/posixtm.c: Include <stdbool.h> unconditionally.
23706
23707 2003-06-06  Jim Meyering  <jim@meyering.net>
23708
23709         * lib/stdbool_.h: Renamed from stdbool.h.in.
23710
23711 2003-06-06  Jim Meyering  <jim@meyering.net>
23712             Bruno Haible  <bruno@clisp.org>
23713
23714         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
23715         Adjust Makefile.am snippet not to redirect directly to target.
23716         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
23717
23718 2003-06-05  Paul Eggert  <eggert@twinsun.com>
23719
23720         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
23721         mismatch, look in future quarters as well as past.  This fixes a
23722         bug when processing fall-backwards gaps immediately after a long
23723         period of daylight-saving time.
23724
23725         * lib/mktime.c: Assume freestanding C89 or better.
23726         (HAVE_LIMITS_H): Remove.  Assume it's 1.
23727         (__P): Remove; not used.
23728         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
23729         (mktime, not_equal_tm, print_tm, check_result,
23730         main): Use prototypes.  Use const * where appropriate.
23731         (main): Fix typo in testing code that uncovered by above changes.
23732         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
23733
23734 2003-06-04  Paul Eggert  <eggert@twinsun.com>
23735
23736         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
23737         locale.h, localeconv.  This merges changes from coreutils.
23738
23739         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
23740         It can be removed after the next Autoconf is released.
23741         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
23742         needed.
23743
23744 2003-06-04  Paul Eggert  <eggert@twinsun.com>
23745
23746         * lib/mktime.c: Fix Debian bug 177940
23747         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
23748         (localtime_offset): Now long int, not time_t, because we want it
23749         to be guaranteed to be signed.  All uses changed.
23750         (__mktime_internal): If overflow would occur when adding offset,
23751         don't add it.
23752
23753         Merge 'human' changes from coreutils.  Rewrite to support
23754         locale-specific notations like thousands separators.
23755         * lib/human.c: Simplify authorship notice.
23756         Include human.h immediately after config.h.
23757         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
23758         <limits.h>: Do not include, since human.h does.
23759         (SIZE_MAX, UINTMAX_MAX): New macros.
23760         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
23761         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
23762         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
23763         (power_letter): Renamed from suffixes.
23764         (generate_suffix_backwards): Remove.
23765         (adjust_value): Now takes int style (because of human.h changes)
23766         and long double value (for greater precision on some platforms).
23767         (group_number): New function.
23768         (human_readable): Use it.  Use integer options, not enum.
23769         Put the options before the sizes in the arg list.
23770         Support all the new options.
23771         The old human_readable function has been removed;
23772         use inttostr.h instead.
23773         (human_readable, default_block_size, humblock):
23774         Use uintmax_t, not int, for block sizes.
23775         (human_readable_inexact, block_size_types): Remove.
23776         (block_size_opts): New constant.
23777         (human_options): Renamed from human_block_size, with new signature
23778         that allows block sizes up to UINTMAX_MAX.  All callers changed.
23779         * lib/human.h: Add copyright and authorship notice.
23780         Include <limits.h> and <stdbool.h> unconditionally.
23781         (PARAMS): Remove.  All uses removed.
23782         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
23783         (enum human_inexact_style): Remove tag; now a nameless enum.
23784         (human_floor, human_ceiling, human_round_to_even): Now have
23785         values 2, 0, 1 rather than -1, 1, 0.
23786         (human_group_digits, human_suppress_point_zero, human_autoscale,
23787         human_base_1024, human_SI, human_B): New constants.
23788         (human_readable_inexact, human_block_size): Remove.
23789         (human_readable): Size args are now uintmax_t, not int.
23790         (human_options): New decl.
23791
23792         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
23793         unnecessary now that we assume C89 or better.  This change
23794         imported from coreutils.
23795
23796         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
23797         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
23798         in the 2003-05-30 sync from glibc.
23799
23800         .h files should stand alone, but we shouldn't include <sys/types.h>
23801         if we can get away with just <stddef.h>.
23802
23803         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
23804         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
23805         rather than <sys/types.h>, as we merely need size_t.
23806         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
23807         to get size_t.
23808         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
23809         Include <stdio.h>, to get FILE.
23810         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
23811         memcasecmp.h has included <stddef.h> and all we need is size_t.
23812         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
23813         our interface, instead of including <sys/types.h>
23814
23815 2003-06-04  Paul Eggert  <eggert@twinsun.com>
23816
23817         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
23818         now, as glibc mktime is buggy on non-glibc systems.
23819
23820 2003-06-03  Karl Berry  <karl@gnu.org>
23821
23822         * config/config.sub: update from prep.
23823
23824 2003-06-02  Paul Eggert  <eggert@twinsun.com>
23825
23826         [from coreutils]
23827         Fix some minor time-related bugs with POSIX time arguments.
23828         Some valid time stamps were being rejected (notably -1, and
23829         time stamps before 1900 on 64-bit hosts).  And some invalid
23830         time stamps were being accepted, e.g. September 31.
23831
23832         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
23833         that we can return (time_t) -1 successfully.
23834         * lib/posixtm.c: Likewise.
23835         [HAVE_STDBOOL_H]: Include <stdbool.h>.
23836         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
23837         (t): Remove static var.
23838         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
23839         of static var.  All uses changed.
23840         (year): Do not reject years before 1900; they can occur with
23841         64-bit time_t.
23842         (posix_time_parse): Do not check for out-of-range components;
23843         that is now the caller's responsibility, since our checks were
23844         only approximations.
23845         (posixtime): Use mktime to check for out-of-range components,
23846         since it knows them exactly.
23847         If mktime returns (time_t) -1, check whether an error actually occurred
23848         by invoking localtime on -1.
23849         (main) [TEST_POSIXTIME]: Check for input data errors, and report
23850         posixtime failures better.
23851         Improve the test data (in comments only).
23852
23853 2003-06-02  Karl Berry  <karl@gnu.org>
23854
23855         * config/mkinstalldirs (version): new variable.
23856         (--version): new option.
23857         (usage): improve message.
23858
23859 2003-05-30  Karl Berry  <karl@gnu.org>
23860
23861         * lib/mktime.c: update from libc.
23862
23863 2003-05-30  Bruno Haible  <bruno@clisp.org>
23864
23865         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
23866         * config/config.rpath: Upgrade to gettext-0.12.1.
23867
23868 2003-05-30  Bruno Haible  <bruno@clisp.org>
23869
23870         * m4/gettext.m4: Upgrade to gettext-0.12.1.
23871         * m4/nls.m4: New file, from gettext-0.12.1.
23872         * m4/po.m4: New file, from gettext-0.12.1.
23873         * m4/progtest.m4: Upgrade to gettext-0.12.1.
23874
23875 2003-05-30  Bruno Haible  <bruno@clisp.org>
23876
23877         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
23878         * lib/localcharset.h: Likewise.
23879         * lib/localcharset.c: Likewise.
23880
23881 2003-05-29  Karl Berry  <karl@gnu.org>
23882
23883         * config/config.rpath: update from gettext.
23884
23885 2003-05-28  Paul Eggert  <eggert@twinsun.com>
23886
23887         Assume the headers required for C89 freestanding compilers.
23888         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
23889         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
23890         * m4/human.m4 (gl_HUMAN): Likewise.
23891         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
23892         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
23893         * m4/userspec.m4 (gl_USERSPEC): Likewise.
23894         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
23895         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
23896         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
23897
23898 2003-05-28  Paul Eggert  <eggert@twinsun.com>
23899
23900         Assume the headers required for C89 freestanding compilers.
23901         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
23902         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
23903         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
23904         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
23905         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
23906         define, since <limits.h> is guaranteed to do that.
23907         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
23908         * lib/exclude.c: Include <stdbool.h> unconditionally.
23909         * lib/tempname.c: Include <stddef.h> unconditionally.
23910         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
23911         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
23912         <stddef.h> does that.
23913         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
23914         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
23915         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
23916         needed.
23917         * lib/xstrtol.c: Likewise.
23918         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
23919         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
23920
23921         * lib/addext.c (addext): Use assignment rather than cast, to avoid
23922         warnings on some platforms.
23923
23924         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
23925         arbitrarily.
23926
23927 2003-05-26  Jim Meyering  <jim@meyering.net>
23928
23929         Merge in a change from coreutils:
23930         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
23931         that is guaranteed to be `no'.  Use `no_such_member' to indicate
23932         that condition, rather than `-1' which is slightly misleading.
23933         Change the name of the cache variable to have the gl_ prefix.
23934         Prompted by a patch from Richard Dawe for DJGPP.
23935
23936 2003-05-24  Karl Berry  <karl@gnu.org>
23937
23938         * config/config.guess: update from prep.
23939
23940 2003-05-22  Karl Berry  <karl@gnu.org>
23941
23942         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
23943
23944 2003-05-20  Karl Berry  <karl@gnu.org>
23945
23946         * config/config.guess: update from prep.
23947
23948 2003-05-18  Karl Berry  <karl@gnu.org>
23949
23950         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
23951         might actually be set by the user.
23952
23953         * config/depcomp, install-sh, mdate-sh: update from automake.
23954
23955 2003-05-17  Bruno Haible  <bruno@clisp.org>
23956
23957         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
23958         invalid expansion for AC_EGREP_CPP.
23959         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
23960         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
23961         Suggested by Akim Demaille <akim@epita.fr> in
23962         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
23963
23964 2003-05-12  Jim Meyering  <jim@meyering.net>
23965
23966         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
23967         the space-padded-by-default conversion specifiers, %e, %k, %l.
23968
23969 2003-05-12  Bruno Haible  <bruno@clisp.org>
23970
23971         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
23972         the string is longer than 4 KB.
23973
23974 2003-05-11  Karl Berry  <karl@gnu.org>
23975
23976         * config/config.{guess,sub}: update from prep.
23977
23978 2003-05-09  Bruno Haible  <bruno@clisp.org>
23979
23980         * modules/error: Add m4/strerror_r.m4 to file list.
23981
23982 2003-05-03  Bruno Haible  <bruno@clisp.org>
23983
23984         Upgrade to Unicode-4.0.
23985         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
23986         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
23987         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
23988         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
23989         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
23990         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
23991         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
23992         Change width of U+E0100..U+E01EF from 1 to 0.
23993
23994 2003-04-25  Jim Meyering  <jim@meyering.net>
23995
23996         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
23997         of type size_t, not int.
23998
23999 2003-04-25  Bruno Haible  <bruno@clisp.org>
24000
24001         * lib/copy-file.c: Include <stddef.h>, for size_t.
24002
24003 2003-04-21  Paul Eggert  <eggert@twinsun.com>
24004
24005         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
24006         code which expansion is under static control.  Patch imported from
24007         Akim Demaille's patch to Bison; see
24008         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
24009
24010 2003-04-14  Bruno Haible  <bruno@clisp.org>
24011
24012         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
24013
24014 2003-04-11  Jim Meyering  <jim@meyering.net>
24015
24016         Merge changes from Coreutils.
24017
24018         2003-03-22  Jim Meyering  <jim@meyering.net>
24019
24020         * lib/strftime.c (widen): Cast alloca return value to proper type.
24021
24022         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
24023
24024         From GNU libc.
24025         * lib/strftime.c (my_strftime): Handle very large width
24026         specifications for numeric values correctly.  Improve checks for
24027         overflow.
24028
24029         2003-01-19  Jim Meyering  <jim@meyering.net>
24030
24031         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
24032         definitions.
24033         (nl_get_alt_digit) [! defined my_strftime]: Define.
24034         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
24035         _nl_get_alt_digit and _nl_get_walt_digit.
24036
24037         * lib/strftime.c (my_strftime): Merge in locale-related changes from
24038         libc. These changes have no effect outside of _LIBC.
24039
24040 2003-04-10  Bruno Haible  <bruno@clisp.org>
24041
24042         * modules/findprog: New file.
24043         * MODULES.html.sh (func_all_modules): Add it.
24044
24045 2003-04-10  Bruno Haible  <bruno@clisp.org>
24046
24047         * m4/findprog.m4: New file.
24048         * m4/eaccess.m4: New file.
24049
24050 2003-04-10  Bruno Haible  <bruno@clisp.org>
24051
24052         * lib/findprog.h: New file, from GNU gettext.
24053         * lib/findprog.c: New file, from GNU gettext.
24054
24055 2003-04-05  Jim Meyering  <jim@meyering.net>
24056
24057         Merge changes from Coreutils.
24058
24059         * lib/exclude.h (PARAMS): Remove definition and uses.
24060         * lib/exclude.c: Remove uses of `PARAMS'.
24061
24062         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
24063         Add test-cases for DOS filenames. Declare program_name.
24064         (main): Set up program_name.  Patch by Rich Dawe.
24065
24066         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
24067         error from mntctl.
24068         Use mntctl's return value to drive the entry-processing loop, since
24069         we can't rely on the value of the vmt_length member in the last
24070         entry.  On some systems doing so could result in exhausting
24071         virtual memory.  Based in part on a patch from Mike Jetzer.
24072
24073 2003-04-04  Bruno Haible  <bruno@clisp.org>
24074
24075         * modules/linebreak: New file.
24076         * MODULES.html.sh (func_all_modules): Add it.
24077
24078 2003-04-04  Bruno Haible  <bruno@clisp.org>
24079
24080         * m4/linebreak.m4: New file.
24081
24082 2003-04-04  Bruno Haible  <bruno@clisp.org>
24083
24084         * lib/linebreak.h: New file, from GNU gettext.
24085         * lib/linebreak.c: New file, from GNU gettext with slight
24086         modifications.
24087         * lib/lbrkprop.h: New file, from GNU gettext.
24088
24089 2003-04-03  Bruno Haible  <bruno@clisp.org>
24090
24091         * modules/utf8-ucs4: New file.
24092         * modules/utf16-ucs4: New file.
24093         * modules/ucs4-utf8: New file.
24094         * modules/ucs4-utf16: New file.
24095         * MODULES.html.sh (func_all_modules): Add them.
24096
24097 2003-04-03  Bruno Haible  <bruno@clisp.org>
24098
24099         * m4/utf-ucs4.m4: New file.
24100         * m4/ucs4-utf.m4: New file.
24101
24102 2003-04-03  Bruno Haible  <bruno@clisp.org>
24103
24104         * lib/utf8-ucs4.h: New file, from GNU gettext.
24105         * lib/utf16-ucs4.h: New file, from GNU gettext.
24106         * lib/ucs4-utf8.h: New file, from GNU gettext.
24107         * lib/ucs4-utf16.h: New file, from GNU gettext.
24108
24109 2003-04-02  Bruno Haible  <bruno@clisp.org>
24110
24111         * modules/binary-io: New file.
24112         * MODULES.html.sh (func_all_modules): Add it.
24113
24114 2003-04-02  Bruno Haible  <bruno@clisp.org>
24115
24116         * lib/binary-io.h: New file, from GNU gettext.
24117
24118 2003-04-01  Bruno Haible  <bruno@clisp.org>
24119
24120         * modules/pathname: New file.
24121         * MODULES.html.sh (func_all_modules): Add it.
24122
24123 2003-04-01  Bruno Haible  <bruno@clisp.org>
24124
24125         * lib/pathname.h: New file, from GNU gettext.
24126         * lib/concatpath.c: New file, from GNU gettext.
24127
24128 2003-03-30  Bruno Haible  <bruno@clisp.org>
24129
24130         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
24131
24132 2003-03-30  Bruno Haible  <bruno@clisp.org>
24133
24134         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
24135         function chown() doesn't exist.
24136
24137 2003-03-28  Bruno Haible  <bruno@clisp.org>
24138
24139         * modules/copy-file: New file.
24140         * MODULES.html.sh (func_all_modules): Add it.
24141
24142 2003-03-28  Bruno Haible  <bruno@clisp.org>
24143
24144         * m4/copy-file.m4: New file.
24145
24146 2003-03-28  Bruno Haible  <bruno@clisp.org>
24147
24148         * lib/copy-file.h: New file, from GNU gettext.
24149         * lib/copy-file.c: New file, from GNU gettext.
24150
24151 2003-03-18  Jim Meyering  <jim@meyering.net>
24152
24153         * lib/quote.c (quote_n): Fix typo in comment.
24154
24155 2003-03-18  Bruno Haible  <bruno@clisp.org>
24156
24157         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
24158         checking.
24159         * m4/onceonly_2_57.m4: Likewise.
24160
24161 2003-03-17  Bruno Haible  <bruno@clisp.org>
24162
24163         * m4/onceonly.m4: Require autoconf 2.54 or newer.
24164         (m4_quote): Remove macro.
24165         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
24166
24167 2003-03-14  Jim Meyering  <jim@meyering.net>
24168
24169         Merge changes from Coreutils.
24170         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
24171         to be const, in order to avoid warnings.
24172         (obstack_room): Likewise.
24173         (obstack_empty_p): Likewise.
24174
24175 2003-03-14  Bruno Haible  <bruno@clisp.org>
24176
24177         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
24178         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
24179
24180 2003-03-13  Paul Eggert  <eggert@twinsun.com>
24181
24182         Merge changes from Bison.
24183         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
24184         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
24185         when compiling Bison 1.875's `bitset bset = obstack_alloc
24186         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
24187         * lib/hash.c: Include <stdbool.h> unconditionally.
24188
24189 2003-03-13  Paul Eggert  <eggert@twinsun.com>
24190
24191         * m4/onceonly.m4 (m4_quote): New macro.
24192         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
24193         Quote AC_FOREACH variable-expansions properly.
24194
24195 2003-03-13  Paul Eggert  <eggert@twinsun.com>
24196
24197         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
24198
24199 2003-03-09  Paul Eggert  <eggert@twinsun.com>
24200
24201         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
24202         Reported by Bruce Becker; see:
24203         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
24204
24205 2003-03-03  Paul Eggert  <eggert@twinsun.com>
24206             Bruno Haible  <bruno@clisp.org>
24207
24208         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
24209         Reported by John Hughes, see
24210         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
24211
24212 2003-02-20  Bruno Haible  <bruno@clisp.org>
24213
24214         * MODULES.html.sh (func_all_modules): Add poll.
24215
24216 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
24217
24218         * modules/poll: New file.
24219
24220 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
24221
24222         * lib/poll_.h: New file.
24223         * lib/poll.c: New file.
24224
24225 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
24226
24227         * m4/poll.m4: New file.
24228
24229 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
24230
24231         * modules/mathl: New file.
24232
24233 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
24234
24235         * lib/mathl.h: New file.
24236         * lib/acosl.c: New file.
24237         * lib/asinl.c: New file.
24238         * lib/atanl.c: New file.
24239         * lib/ceill.c: New file.
24240         * lib/cosl.c: New file.
24241         * lib/expl.c: New file.
24242         * lib/floorl.c: New file.
24243         * lib/frexpl.c: New file.
24244         * lib/ldexpl.c: New file.
24245         * lib/logl.c: New file.
24246         * lib/sincosl.c: New file.
24247         * lib/sinl.c: New file.
24248         * lib/sqrtl.c: New file.
24249         * lib/tanl.c: New file.
24250         * lib/trigl.c: New file.
24251         * lib/trigl.h: New file.
24252
24253 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
24254
24255         * m4/mathl.m4: New file.
24256
24257 2003-02-18  Bruno Haible  <bruno@clisp.org>
24258
24259         * MODULES.html.sh (func_all_modules): Add mathl.
24260
24261 2003-02-17  Bruno Haible  <bruno@clisp.org>
24262
24263         * modules/mkdtemp: New module.
24264         * MODULES.html.sh (func_all_modules): Add it.
24265
24266 2003-02-17  Bruno Haible  <bruno@clisp.org>
24267
24268         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
24269
24270 2003-02-17  Bruno Haible  <bruno@clisp.org>
24271
24272         * lib/mkdtemp.h: New file, from GNU gettext.
24273         * lib/mkdtemp.c: New file, from GNU gettext.
24274
24275 2003-02-02  Jim Meyering  <jim@meyering.net>
24276
24277         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
24278         e.g. glibc-2.2.93.
24279
24280 2003-01-31  Bruno Haible  <bruno@clisp.org>
24281
24282         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
24283         'rpl_rename'.
24284         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
24285         'rpl_strnlen'.
24286         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
24287         'rpl_strtod'.
24288         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
24289         'rpl_utime'.
24290
24291 2003-01-31  Bruno Haible  <bruno@clisp.org>
24292
24293         * lib/rename.c: #undef rename before defining rpl_rename.
24294         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
24295
24296 2003-01-30  Bruno Haible  <bruno@clisp.org>
24297
24298         * modules/vasnprintf, modules/vasprintf: New modules.
24299         * MODULES.html.sh (func_all_modules): Add them.
24300
24301 2003-01-30  Bruno Haible  <bruno@clisp.org>
24302
24303         * m4/signed.m4: New file, from GNU gettext.
24304         * m4/longdouble.m4: New file, from GNU gettext.
24305         * m4/wchar_t.m4: New file, from GNU gettext.
24306         * m4/wint_t.m4: New file, from GNU gettext.
24307         * m4/vasnprintf.m4: New file.
24308         * m4/vasprintf.m4: New file.
24309
24310 2003-01-30  Bruno Haible  <bruno@clisp.org>
24311
24312         * lib/printf-args.h: New file, from GNU gettext.
24313         * lib/printf-args.c: New file, from GNU gettext.
24314         * lib/printf-parse.h: New file, from GNU gettext.
24315         * lib/printf-parse.c: New file, from GNU gettext.
24316         * lib/vasnprintf.h: New file, from GNU gettext.
24317         * lib/vasnprintf.c: New file, from GNU gettext.
24318         * lib/asnprintf.c: New file, from GNU gettext.
24319         * lib/vasprintf.h: New file, from GNU gettext with modifications.
24320         * lib/vasprintf.c: New file, from GNU gettext.
24321         * lib/asprintf.c: New file, from GNU gettext.
24322
24323 2003-01-29  Bruno Haible  <bruno@clisp.org>
24324
24325         * modules/stpncpy: New module.
24326         * MODULES.html.sh (func_all_modules): Add it.
24327
24328 2003-01-29  Bruno Haible  <bruno@clisp.org>
24329
24330         * m4/stpncpy.m4: New file.
24331
24332 2003-01-29  Bruno Haible  <bruno@clisp.org>
24333
24334         * lib/stpncpy.h: New file, from GNU gettext with modifications.
24335         * lib/stpncpy.c: New file, from GNU gettext with modifications.
24336
24337 2003-01-28  Bruno Haible  <bruno@clisp.org>
24338
24339         * modules/c-ctype: New module.
24340         * MODULES.html.sh (func_all_modules): Add it.
24341
24342 2003-01-28  Bruno Haible  <bruno@clisp.org>
24343
24344         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
24345         Paul Eggert.
24346         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
24347         Paul Eggert.
24348
24349 2003-01-27  Bruno Haible  <bruno@clisp.org>
24350
24351         * modules/xsetenv: New module.
24352         * MODULES.html.sh (func_all_modules): Add it.
24353
24354 2003-01-27  Bruno Haible  <bruno@clisp.org>
24355
24356         * lib/xsetenv.h: New file, from GNU gettext.
24357         * lib/xsetenv.c: New file, from GNU gettext.
24358
24359 2003-01-23  Jim Meyering  <jim@meyering.net>
24360
24361         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
24362         from working on systems without dirfd (at least Irix and OSF1/Tru64).
24363
24364 2003-01-23  Bruno Haible  <bruno@clisp.org>
24365
24366         * modules/minmax: New module.
24367         * MODULES.html.sh (func_all_modules): Add it.
24368
24369 2003-01-23  Bruno Haible  <bruno@clisp.org>
24370
24371         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
24372         Eggert.
24373
24374 2003-01-22  Bruno Haible  <bruno@clisp.org>
24375
24376         * modules/exit: New module.
24377         * MODULES.html.sh (func_all_modules): Add it.
24378
24379 2003-01-22  Bruno Haible  <bruno@clisp.org>
24380
24381         * lib/exit.h: New file, from GNU gettext.
24382
24383 2003-01-19  Bruno Haible  <bruno@clisp.org>
24384
24385         * gnulib-tool: Recognize option --extract-maintainer.
24386         (func_get_maintainer): New function.
24387         * modules/*: Add Maintainer entry.
24388
24389 2003-01-16  Jim Meyering  <jim@meyering.net>
24390
24391         * m4/regex.m4: The `regex' struct is both input and output.
24392         Initialize it before each use.  Patch by Tim Waugh.
24393
24394 2003-01-16  Bruno Haible  <bruno@clisp.org>
24395
24396         * MODULES.html.sh: Add a table of contents. Add the module name as
24397         leftmost column. Add hyperlinks.
24398
24399 2003-01-15  Bruno Haible  <bruno@clisp.org>
24400
24401         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
24402
24403 2003-01-15  Bruno Haible  <bruno@clisp.org>
24404
24405         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
24406         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
24407         suffix.
24408
24409 2003-01-15  Bruno Haible  <bruno@clisp.org>
24410
24411         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
24412
24413 2003-01-15  Bruno Haible  <bruno@clisp.org>
24414
24415         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
24416         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
24417
24418 2003-01-14  Jim Meyering  <jim@meyering.net>
24419
24420         * lib/same.c (same_name): Tweak a comment.
24421
24422 2003-01-14  Bruno Haible  <bruno@clisp.org>
24423
24424         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
24425         when a string comparison is sufficient.
24426
24427 2003-01-14  Bruno Haible  <bruno@clisp.org>
24428
24429         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
24430         'unsigned int'.
24431
24432 2003-01-14  Bruno Haible  <bruno@clisp.org>
24433
24434         * lib/hash-pjw.c: Add comment about low quality of this function.
24435
24436 2003-01-13  Bruno Haible  <bruno@clisp.org>
24437
24438         * modules/stpcpy: Distribute lib/stpcpy.h.
24439         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
24440
24441 2003-01-13  Bruno Haible  <bruno@clisp.org>
24442
24443         * modules/*: Add a description.
24444         * modules/strpbrk: Fix Makefile.am snippet.
24445         * modules/strtoimax: Fix dependencies.
24446         * modules/strtoumax: Likewise.
24447
24448 2003-01-13  Bruno Haible  <bruno@clisp.org>
24449
24450         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
24451         * modules/alloca (Makefile.am): All object files depend on alloca.h.
24452         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
24453
24454 2003-01-13  Bruno Haible  <bruno@clisp.org>
24455
24456         * gnulib-tool (func_create_testdir): Store config/* files in the main
24457         directory.
24458         * config.rpath: Move to ...
24459         * config/config.rpath: ... here.
24460         * modules/gettext: Contains config/config.rpath, not config.rpath.
24461         * modules/iconv: Likewise.
24462
24463 2003-01-12  Paul Eggert  <eggert@twinsun.com>
24464
24465         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
24466         to avoid collisions with libcurses and libreadline.
24467
24468         * m4/getstr.m4: Remove.
24469         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
24470
24471 2003-01-12  Paul Eggert  <eggert@twinsun.com>
24472
24473         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
24474         to avoid collisions with libcurses and libreadline.
24475
24476         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
24477         * lib/getstr.h, getstr.c: Remove.
24478         * lib/getline.c: Include "getline.h", to check interface.
24479         Move body of old getstr.c here: this defines MIN_CHUNK and
24480         declares getdelim2, which is renamed from getstr.
24481         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
24482
24483         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
24484         All uses changed.
24485         * lib/linebuffer.h: Likewise.
24486         (readline): Remove backward-compatibility macro.
24487
24488 2003-01-12  Paul Eggert  <eggert@twinsun.com>
24489
24490         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
24491         to avoid collisions with libcurses and libreadline.
24492         * getstr: Remove.
24493         * MODULES.html.sh: Remove getstr.
24494         * modules/getline: Depend on unlocked-io, not getstr.
24495
24496 2003-01-12  Jim Meyering  <jim@meyering.net>
24497
24498         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
24499
24500 2003-01-10  Bruno Haible  <bruno@clisp.org>
24501
24502         * modules/alloca: Change Makefile.am requirements. Simplify Include
24503         requirements. Add lib/alloca_.h to file list.
24504
24505 2003-01-10  Bruno Haible  <bruno@clisp.org>
24506
24507         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
24508
24509 2003-01-10  Bruno Haible  <bruno@clisp.org>
24510
24511         * lib/alloca_.h: New file.
24512         * lib/getdate.y: Unconditionally include alloca.h.
24513         * lib/makepath.c: Likewise.
24514         * lib/setenv.c: Likewise.
24515         * lib/userspec.c: Likewise.
24516
24517 2003-01-09  Karl Berry  <karl@gnu.org>
24518
24519         * MODULES.html.sh: include `dirname $0` in PATH, to find
24520         gnulib-tool.
24521
24522 2003-01-09  Bruno Haible  <bruno@clisp.org>
24523
24524         * modules/stdbool: Change configure.ac, Makefile.am requirements.
24525         Simplify Include requirements. Add lib/stdbool.h.in to file list.
24526
24527 2003-01-09  Bruno Haible  <bruno@clisp.org>
24528
24529         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
24530
24531 2003-01-09  Bruno Haible  <bruno@clisp.org>
24532
24533         * lib/stdbool.h.in: New file.
24534
24535 2003-01-09  Bruno Haible  <bruno@clisp.org>
24536
24537         * gnulib-tool (func_all_modules): Ignore files ending in ~.
24538         * MODULES.html.sh: Likewise.
24539
24540 2003-01-08  Jim Meyering  <jim@meyering.net>
24541
24542         * lib/full-write.c: Undefine and define-away `const' after inclusion
24543         of errno.h, not before.  Suggestion from Bruno Haible.
24544
24545 2003-01-08  Bruno Haible  <bruno@clisp.org>
24546
24547         * modules/full-read: Depend on full-write.
24548
24549 2003-01-08  Bruno Haible  <bruno@clisp.org>
24550
24551         * lib/safe-read.c: Include specification header first, to ensure its
24552         selfcontainedness.
24553         * lib/full-write.c: Likewise.
24554
24555 2003-01-07  Jim Meyering  <jim@meyering.net>
24556
24557         * lib/full-write.c: Rework so that it may serve to define full_read,
24558         too.
24559         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
24560
24561 2003-01-07  Bruno Haible  <bruno@clisp.org>
24562
24563         * lib/strtoimax.c: Include <stdint.h> as an alternative to
24564         <inttypes.h>.
24565         * lib/xstrtol.h: Likewise.
24566         * lib/xstrtoimax.c: Likewise.
24567         * lib/xstrtoumax.c: Likewise.
24568         * lib/human.h: Likewise.
24569
24570         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
24571         on systems that have <inttypes.h> but not <stdint.h>.
24572
24573 2003-01-07  Bruno Haible  <bruno@clisp.org>
24574
24575         * MODULES.html.sh: Add copyright notice.
24576         (missed_files): Omit CVS directory entries.
24577         (func_module): Make it work with sed-3.02.
24578         * MODULES.txt: Remove file.
24579
24580 2003-01-06  Jim Meyering  <jim@meyering.net>
24581
24582         * lib/version-etc.c: Update year in translatable copyright string.
24583
24584 2003-01-03  Karl Berry  <karl@gnu.org>
24585
24586         * config/config.{guess,sub}: update from prep.
24587
24588 2003-01-02  Karl Berry  <karl@gnu.org>
24589
24590         * doc/COPYING.DOC: belatedly updated to 1.2.
24591
24592 2003-01-01  Karl Berry  <karl@gnu.org>
24593
24594         * gnulib-tool (func_verify_module): report module name $module in
24595         error message, not $1.
24596         * gnulib-tool (create-testdir): don't complain if destdir couldn't
24597         be created, only if it doesn't exist.
24598         * gnulib-tool (last_checkin_date): don't expand the $Date here.
24599
24600 2002-12-31  Paul Eggert  <eggert@twinsun.com>
24601
24602         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
24603
24604 2002-12-31  Paul Eggert  <eggert@twinsun.com>
24605
24606         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
24607         memcmp if strcoll doesn't work.
24608
24609 2002-12-31  Bruno Haible  <bruno@clisp.org>
24610
24611         * lib/utime.c (utime_null): No need to call ftruncate if the file was
24612         nonempty.
24613
24614 2002-12-31  Bruno Haible  <bruno@clisp.org>
24615
24616         * lib/memcoll.c (STRCOLL): New macro.
24617         (memcoll): Use it.
24618
24619 2002-12-31  Bruno Haible  <bruno@clisp.org>
24620
24621         * lib/localcharset.h: New file.
24622         * lib/localcharset.c: Include it.
24623         * lib/unicodeio.c: Likewise.
24624
24625 2002-12-31  Bruno Haible  <bruno@clisp.org>
24626
24627         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
24628         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
24629
24630 2002-12-31  Bruno Haible  <bruno@clisp.org>
24631
24632         * lib/getline.h: Include <stddef.h>, for size_t.
24633
24634         * lib/unicodeio.h: Include <stddef.h>, for size_t.
24635         * lib/unicodeio.c: Don't include <stddef.h>.
24636
24637 2002-12-31  Bruno Haible  <bruno@clisp.org>
24638
24639         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
24640         HAVE_TM_ZONE.
24641
24642 2002-12-24  Karl Berry  <karl@gnu.org>
24643
24644         * config/config.guess: update from prep.
24645
24646 2002-12-24  Bruno Haible  <bruno@clisp.org>
24647
24648         General infrasructure.
24649         * m4/README: Rewritten.
24650         * m4/onceonly.m4: New file.
24651         * m4/onceonly_2_57.m4: New file.
24652
24653         Module atexit.
24654         * m4/atexit.m4: New file.
24655
24656         Module strtod.
24657         * m4/strtod.m4: New file.
24658
24659         Module strtol.
24660         * m4/strtol.m4: New file.
24661
24662         Module strtoul.
24663         * m4/strtoul.m4: New file.
24664
24665         Module memchr.
24666         * m4/memchr.m4: New file.
24667
24668         Module memcmp.
24669         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
24670         (jm_FUNC_MEMCMP): Invoke it.
24671
24672         Module memcpy.
24673         * m4/memcpy.m4: New file.
24674
24675         Module memmove.
24676         * m4/memmove.m4: New file.
24677
24678         Module memset.
24679         * m4/memset.m4: New file.
24680
24681         Module strcspn.
24682         * m4/strcspn.m4: New file.
24683
24684         Module strpbrk.
24685         * m4/strpbrk.m4: New file.
24686
24687         Module strstr.
24688         * m4/strstr.m4: New file.
24689
24690         Module strerror.
24691         * m4/strerror.m4: New file.
24692
24693         Module mktime.
24694         * m4/mktime.m4: Renamed from jm-mktime.m4.
24695         (gl_PREREQ_MKTIME): New macro.
24696         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
24697
24698         Module malloc.
24699         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
24700         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
24701         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
24702
24703         Module realloc.
24704         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
24705         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
24706         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
24707
24708         Module strftime.
24709         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
24710         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
24711         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
24712         gl_TM_GMTOFF.
24713         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
24714
24715         Module xalloc.
24716         * m4/xalloc.m4: New file.
24717
24718         Module alloca.
24719         * m4/alloca.m4: New file.
24720
24721         Module putenv.
24722         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
24723         (jm_FUNC_PUTENV): Invoke it.
24724
24725         Module setenv.
24726         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
24727         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
24728         when invoked twice.
24729         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
24730         gt_FUNC_SETENV.
24731
24732         Module memrchr.
24733         * m4/memrchr.m4: New file.
24734
24735         Module stpcpy.
24736         * m4/stpcpy.m4: New file.
24737
24738         Module strcase.
24739         * m4/strcase.m4: New file.
24740
24741         Module strdup.
24742         * m4/strdup.m4: New file.
24743
24744         Module strnlen.
24745         * m4/strnlen.m4: New file.
24746
24747         Module strndup.
24748         * m4/strndup.m4: New file.
24749
24750         Module xstrtod.
24751         * m4/xstrtod.m4: New file.
24752
24753         Module xstrtol.
24754         * m4/xstrtol.m4: New file.
24755
24756         Module getdate.
24757         * m4/getdate.m4: New file.
24758
24759         Module unlocked-io.
24760         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
24761         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
24762         * m4/jm-glibc-io.m4n: Remove file.
24763
24764         Module long-options.
24765         * m4/long-options.m4: New file.
24766
24767         Module md5.
24768         * m4/md5.m4: New file.
24769
24770         Module sha.
24771         * m4/sha.m4: New file.
24772
24773         Module getstr.
24774         * m4/getstr.m4: New file.
24775
24776         Module getline.
24777         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
24778         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
24779         <sys/types.h>, for size_t. Use the function name gnu_getline, not
24780         simply getline. Infoke gl_PREREQ_GETLINE.
24781
24782         Module obstack.
24783         * m4/obstack.m4: New file.
24784
24785         Module hash.
24786         * m4/hash.m4: New file.
24787
24788         Module readtokens.
24789         * m4/readtokens.m4: New file.
24790
24791         Module strverscmp.
24792         * m4/strverscmp.m4: New file.
24793
24794         Module stdbool.
24795         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
24796         OSF/1.
24797
24798         Module strtoll.
24799         * m4/strtoll.m4: New file.
24800
24801         Module strtoull.
24802         * m4/strtoull.m4: New file.
24803
24804         Module strtoimax.
24805         * m4/strtoimax.m4: New file.
24806
24807         Module strtoumax.
24808         * m4/strtoumax.m4: New file.
24809
24810         Module xstrtoimax.
24811         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
24812         jm_AC_PREREQ_XSTRTOIMAX.
24813         Moved the strtol prerequisites to strtol.m4.
24814         Moved the strtoll prerequisites to strtoll.m4.
24815         Moved the strtoimax prerequisites to strtoimax.m4.
24816
24817         Module xstrtoumax.
24818         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
24819         jm_AC_PREREQ_XSTRTOUMAX.
24820         Moved the strtoul prerequisites to strtoul.m4.
24821         Moved the strtoull prerequisites to strtoull.m4.
24822         Moved the strtoumax prerequisites to strtoumax.m4.
24823
24824         Module chown.
24825         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
24826         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
24827
24828         Module dup2.
24829         * m4/dup2.m4: New file.
24830
24831         Module ftruncate.
24832         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
24833         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
24834
24835         Module getgroups.
24836         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
24837         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
24838
24839         Module gettimeofday.
24840         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
24841         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
24842         gl_PREREQ_GETTIMEOFDAY.
24843
24844         Module mkdir.
24845         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
24846         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
24847
24848         Module mkstemp.
24849         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
24850         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
24851         jm_AC_TYPE_UINTMAX_T.
24852         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
24853
24854         Module stat.
24855         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
24856         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
24857
24858         Module lstat.
24859         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
24860         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
24861
24862         Module timespec.
24863         * m4/timespec.m4 (gl_TIMESPEC): New macro.
24864         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
24865         * m4/st_mtim.m4: Indentation.
24866
24867         Module nanosleep.
24868         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
24869         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
24870         gl_PREREQ_NANOSLEEP.
24871
24872         Module regex.
24873         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
24874         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
24875         (gl_REGEX): New macro.
24876
24877         Module rename.
24878         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
24879         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
24880
24881         Module rmdir.
24882         * m4/rmdir.m4: New file.
24883
24884         Module utime.
24885         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
24886         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
24887         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
24888
24889         Module dirname.
24890         * m4/dirname.m4: New file.
24891
24892         Module getopt.
24893         * m4/getopt.m4: New file.
24894
24895         Module unistd-safer.
24896         * m4/unistd-safer.m4: New file.
24897
24898         Module fnmatch.
24899         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
24900         declaration.
24901         (gl_PREREQ_FNMATCH_EXTRA): New macro.
24902         (gl_FUNC_FNMATCH_POSIX): New macro.
24903         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
24904         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
24905         simply fnmatch.
24906
24907         Module exclude.
24908         * m4/exclude.m4: New file.
24909
24910         Module human.
24911         * m4/human.m4: New file.
24912
24913         Module acl.
24914         * m4/acl.m4: Nop.
24915
24916         Module backupfile.
24917         * m4/backupfile.m4: New file.
24918         * m4/d-ino.m4: Indentation.
24919
24920         Module fsusage.
24921         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
24922         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
24923         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
24924
24925         Module dirfd.
24926         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
24927         requirements.
24928
24929         Module euidaccess.
24930         * m4/euidaccess.m4: New file.
24931
24932         Module file-type.
24933         * m4/file-type.m4: New file.
24934
24935         Module fileblocks.
24936         * m4/fileblocks.m4: New file.
24937
24938         Module filemode.
24939         * m4/filemode.m4: New file.
24940
24941         Module isdir.
24942         * m4/isdir.m4: New file.
24943
24944         Module lchown.
24945         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
24946         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
24947
24948         Module makepath.
24949         * m4/makepath.m4: New file.
24950
24951         Module modechange.
24952         * m4/modechange.m4: New file.
24953
24954         Module mountlist.
24955         * m4/mountlist.m4: New file.
24956         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
24957         Indentation.
24958
24959         Module path-concat.
24960         * m4/path-concat.m4: New file.
24961
24962         Module pathmax.
24963         * m4/pathmax.m4: New file.
24964
24965         Module same.
24966         * m4/same.m4: New file.
24967
24968         Module save-cwd.
24969         * m4/save-cwd.m4: New file.
24970
24971         Module savedir.
24972         * m4/savedir.m4: New file.
24973
24974         Module xgetcwd.
24975         * m4/xgetcwd.m4: New file.
24976         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
24977
24978         Module xreadlink.
24979         * m4/xreadlink.m4: New file.
24980
24981         Module safe-read.
24982         * m4/safe-read.m4: New file.
24983
24984         Module safe-write.
24985         * m4/safe-write.m4: New file.
24986
24987         Module closeout.
24988         * m4/closeout.m4: New file.
24989
24990         Module stdio-safer.
24991         * m4/stdio-safer.m4: New file.
24992
24993         Module getpass.
24994         * m4/getpass.m4: New file.
24995
24996         Module getugroups.
24997         * m4/getugroups.m4: New file.
24998
24999         Module group-member.
25000         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
25001         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
25002
25003         Module idcache.
25004         * m4/idcache.m4: New file.
25005
25006         Module userspec.
25007         * m4/userspec.m4: New file.
25008
25009         Module gettime.
25010         * m4/clock_time.m4: New file.
25011         * m4/gettime.m4: New file.
25012
25013         Module settime.
25014         * m4/settime.m4: New file.
25015
25016         Module posixtm.
25017         * m4/posixtm.m4: New file.
25018
25019         Module gethostname.
25020         * m4/gethostname.m4: New file.
25021
25022         Module canon-host.
25023         * m4/canon-host.m4: New file.
25024
25025         Module gettext.
25026         * m4/codeset.m4: New file, from gettext-0.11.5.
25027         * m4/gettext.m4: New file, from gettext-0.11.5.
25028         * m4/glibc21.m4: New file, from gettext-0.11.5.
25029         * m4/iconv.m4: New file, from gettext-0.11.5.
25030         * m4/intdiv0.m4: New file, from gettext-0.11.5.
25031         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
25032         * m4/inttypes.m4: New file, from gettext-0.11.5.
25033         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
25034         * m4/isc-posix.m4: New file, from gettext-0.11.5.
25035         * m4/lcmessage.m4: New file, from gettext-0.11.5.
25036         * m4/lib-ld.m4: New file, from gettext-0.11.5.
25037         * m4/lib-link.m4: New file, from gettext-0.11.5.
25038         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
25039         * m4/progtest.m4: New file, from gettext-0.11.5.
25040         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
25041         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
25042         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
25043
25044         Module localcharset.
25045         * m4/localcharset.m4: New file.
25046
25047         Module hard-locale.
25048         * m4/hard-locale.m4: New file.
25049
25050         Module mbswidth.
25051         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
25052         onceonly macros.
25053         * m4/mbrtowc.m4: Add comment.
25054
25055         Module memcasecmp.
25056         * m4/memcasecmp.m4: New file.
25057
25058         Module memcoll.
25059         * m4/memcoll.m4: New file.
25060
25061         Module unicodeio.
25062         * m4/unicodeio.m4: New file.
25063
25064         Module rpmatch.
25065         * m4/rpmatch.m4: New file.
25066
25067         Module yesno.
25068         * m4/yesno.m4: New file.
25069
25070         Module exitfail.
25071         * m4/exitfail.m4: New file.
25072
25073         Module c-stack.
25074         * m4/c-stack.m4 (gl_C_STACK): New macro.
25075         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
25076
25077         Module error.
25078         * m4/error.m4 (gl_ERROR): New macro.
25079         (jm_PREREQ_ERROR): Use onceonly macros.
25080
25081         Module fatal.
25082         * m4/fatal.m4: New file.
25083
25084         Module getloadavg.
25085         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
25086         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
25087
25088         Module getpagesize.
25089         * m4/getpagesize.m4: New file.
25090
25091         Module getusershell.
25092         * m4/getusershell.m4: New file.
25093
25094         Module physmem.
25095         * m4/physmem.m4: New file.
25096
25097         Module posixver.
25098         * m4/posixver.m4: New file.
25099
25100         Module quotearg.
25101         * m4/quotearg.m4: New file.
25102
25103         Module quote.
25104         * m4/quote.m4: New file.
25105
25106         Module readutmp.
25107         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
25108
25109         Module sig2str.
25110         * m4/sig2str.m4: New file.
25111
25112         Other.
25113         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
25114         ulonglong.m4.
25115         * m4/intmax_t.m4: New file.
25116         * m4/d-type.m4: Indentation.
25117         * m4/jm-macros.m4: Update.
25118         * m4/prereq.m4 (jm_PREREQ): Update.
25119         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
25120         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
25121         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
25122         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
25123         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
25124         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
25125         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
25126         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
25127         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
25128         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
25129         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
25130         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
25131         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
25132         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
25133         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
25134         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
25135         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
25136         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
25137         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
25138
25139 2002-12-24  Bruno Haible  <bruno@clisp.org>
25140
25141         * MODULES.txt: Update according to m4/ changes.
25142
25143         Module gettext.
25144         * config.rpath: New file, from gettext-0.11.5.
25145
25146         * modules/*: New module descriptions.
25147         * gnulib-tool: New file.
25148         * MODULES.html.sh: New file.
25149
25150 2002-12-21  Karl Berry  <karl@gnu.org>
25151
25152         * doc/fdl.texi: update to version 1.2.
25153
25154 2002-12-19  Karl Berry  <karl@gnu.org>
25155
25156         * config/config.guess: update from prep.
25157
25158 2002-12-18  Bruno Haible  <bruno@clisp.org>
25159
25160         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
25161         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
25162
25163 2002-12-17  Bruno Haible  <bruno@clisp.org>
25164
25165         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
25166         stdlib.h, string.h.
25167
25168 2002-12-17  Bruno Haible  <bruno@clisp.org>
25169
25170         * lib/canon-host.c (strdup): Remove unused declaration.
25171
25172         * lib/fsusage.c: Include full_read.h.
25173         (get_fs_usage): Use full_read instead of safe_read.
25174
25175         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
25176
25177 2002-12-12  Karl Berry  <karl@gnu.org>
25178
25179         * config/config.guess: update from prep.
25180
25181 2002-12-11  Bruno Haible  <bruno@clisp.org>
25182
25183         * m4/setenv.m4: New file, from gettext-0.11.5.
25184
25185 2002-12-11  Bruno Haible  <bruno@clisp.org>
25186
25187         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
25188         not unsetenv().
25189         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
25190         modifications:
25191
25192         2002-12-11  Bruno Haible  <bruno@clisp.org>
25193
25194                 * setenv.c (alloca): Fall back to malloc.
25195                 (freea): New macro.
25196                 (setenv): Use freea() to free memory allocated with alloca().
25197
25198         2002-11-13  Bruno Haible  <bruno@clisp.org>
25199
25200                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
25201                 function declarations.
25202                 * unsetenv.c (unsetenv): Likewise.
25203
25204         2002-03-04  Bruno Haible  <bruno@clisp.org>
25205
25206                 Portability to AIX 4.3.3.
25207                 * unsetenv.c: New file, extracted from setenv.c.
25208                 * setenv.c: Move the unsetenv() function to unsetenv.c.
25209
25210         2001-12-20  Bruno Haible  <bruno@clisp.org>
25211
25212                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
25213                 use malloc instead. For SunOS 4.
25214
25215         2001-12-11  Bruno Haible  <bruno@clisp.org>
25216
25217                 * setenv.c: Declare alloca.
25218                 (compar_fn_t): New typedef.
25219                 (KNOWN_VALUE, STORE_VALUE): Use it.
25220
25221         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
25222         setenv.h.
25223
25224 2002-12-10  Paul Eggert  <eggert@twinsun.com>
25225
25226         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
25227         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
25228         Choose values that are less likely to collide with system fnmatch
25229         options.
25230         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
25231         defined (e.g., a pure POSIX system).
25232         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
25233         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
25234
25235 2002-12-06  Paul Eggert  <eggert@twinsun.com>
25236
25237         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
25238         a pain in practice to deal with generated m4 files.  This change
25239         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
25240
25241         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
25242         and jm-glibc-io.m4, as they are no longer a special case.
25243         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
25244         kludge and the auto-generation stuff.  Check only whether the
25245         functions are declared, not whether they exist, since older hosts
25246         that don't declare the functions can't use the optimization anyway.
25247
25248 2002-12-06  Jim Meyering  <jim@meyering.net>
25249
25250         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
25251
25252         Merge in changes from libc's misc/error.c, in preparation
25253         for the merge of gnulib's changes back into libc.
25254
25255         * lib/error.c (_): Define only if not already defined.
25256         Move definition to follow all #include directives.
25257         Include unlocked-io.h only if !_LIBC.
25258         [_LIBC]: Include <libio/libioP.h>.
25259         [USE_IN_LIBIO]: Include <libio/iolibio.h>
25260         (fflush): Tweak definition to use INTUSE.
25261         (putc): Define.
25262
25263 2002-12-05  Paul Eggert  <eggert@twinsun.com>
25264
25265         * lib/alloca.c [defined emacs]: Include "lisp.h".
25266         (xalloc_die) [defined emacs]: New macro.
25267         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
25268         [! defined emacs]: Include <xalloc.h>.
25269         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
25270         (pointer): Typedef to POINTER_TYPE *.
25271         (malloc): Remove decl; we now always use xmalloc.
25272         (alloca): Use old-style definition, since Emacs needs this.
25273         Check for arithmetic overflow when computing combined size.
25274
25275 2002-12-04  Paul Eggert  <eggert@twinsun.com>
25276
25277         Do not generate unlocked-io.h automatically, since it's easier to
25278         maintain it by hand.
25279
25280         * lib/unlocked-io.h: New file, from GNU diffutils,
25281         but with proper copyright notice and attribution.
25282         * lib/gen-uio: Remove.
25283         * lib/Makefile.am: Add copyright notice.
25284         (libfetish_a_SOURCES): Add unlocked-io.h.
25285         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
25286         (DISTCLEANFILES, io_functions): Remove macros.
25287         (EXTRA_DIST): Remove gen_uio.
25288         (unlocked-io.h): Remove rule.
25289
25290 2002-12-04  Jim Meyering  <jim@meyering.net>
25291
25292         Reflect the fact that stat.c and lstat.c are no longer generated.
25293         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
25294         (DISTCLEANFILES): Likewise.
25295         (EXTRA_DIST): Likewise.
25296         (all_local): Don't depend on stat.c or lstat.c.
25297         (stat.c, lstat.c): Remove rules.
25298         (EXTRA_DIST): Remove xstat.in.
25299
25300         * lib/xstat.in: Remove file.  Contents moved into stat.c.
25301         * lib/stat.c: New file.  Contents mostly from xstat.in.
25302         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
25303         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
25304
25305         * lib/safe-read.c: Rework so that it may serve to define safe_write,
25306         too.
25307         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
25308
25309 2002-12-03  Jim Meyering  <jim@meyering.net>
25310
25311         * lib/safe-read.c, safe-write.c: Change variable names and comments,
25312         but not semantics, to minimize the differences between these two files.
25313         (safe_read): Change comment to mention SAFE_READ_ERROR.
25314
25315         * lib/safe-read.c (IS_EINTR): Define.
25316         (safe_read): Use IS_EINTR in place of in-function cpp directives.
25317
25318 2002-12-02  Jim Meyering  <jim@meyering.net>
25319
25320         * lib/safe-read.c (EINTR): Define.
25321         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
25322         (INT_MAX): Provide fallback.
25323         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
25324
25325         * lib/safe-read.h (SAFE_READ_ERROR): Define.
25326
25327 2002-12-02  Bruno Haible  <bruno@clisp.org>
25328
25329         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
25330         Define, taken from safe-read.c.
25331         (INT_MAX): Provide fallback.
25332         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
25333         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
25334
25335         * lib/safe-read.c (EINTR): Remove definition.
25336         (safe_read): Don't use EINTR if it is absent.
25337
25338 2002-12-01  Jim Meyering  <jim@meyering.net>
25339
25340         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
25341         zero.
25342         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
25343
25344 2002-11-27  Paul Eggert  <eggert@twinsun.com>
25345
25346         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
25347         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
25348         with `if (! (value < limit)) abort ();', for readability.
25349
25350 2002-11-26  Karl Berry  <karl@gnu.org>
25351
25352         * lib/strdup.c: copy from libc again, with jim's ok.
25353         * lib/.cppi-disable: re-add strdup.c
25354
25355 2002-11-25  Karl Berry  <karl@gnu.org>
25356
25357         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
25358         instead of "strtol.c".
25359
25360 2002-11-25  Karl Berry  <karl@gnu.org>
25361
25362         * config/install-sh: update from automake for variable quoting, $0 in
25363         error msgs, etc.
25364
25365         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
25366         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
25367         entry.
25368
25369 2002-11-25  Jim Meyering  <jim@meyering.net>
25370
25371         * lib/mktime.c: Sync from libc, now that it has the latest fix.
25372
25373 2002-11-24  Karl Berry  <karl@gnu.org>
25374
25375         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
25376         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
25377
25378 2002-11-24  Jim Meyering  <jim@meyering.net>
25379
25380         Update from coreutils:
25381
25382         * lib/mktime.c: Merge in changes from libc.
25383
25384         Avoid a link-time failure on some Linux systems.
25385         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
25386         (otherwise).
25387         (__mon_yday): Declare with the STATIC attribute.
25388         (__mktime_internal): Likewise.
25389         Based on a report from Greg Schafer.
25390
25391 2002-11-23  Jim Meyering  <jim@meyering.net>
25392
25393         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
25394         Use `unsigned', not `int', as type of index.
25395
25396         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
25397
25398         * lib/fsusage.c: Remove unneeded parentheses around operands of
25399         `defined'.
25400
25401 2002-11-22  Paul Eggert  <eggert@twinsun.com>
25402
25403         * lib/quotearg.h: Allow multiple inclusion by surrounding with
25404         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
25405         so that we can be included first.
25406         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
25407         * lib/quotearg.c: Include quotearg.h immediately after config.h.
25408         No need to include stddef.h or sys/types.h any more.
25409         Surround local include files with "", not "<>".
25410         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
25411         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
25412         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
25413         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
25414         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
25415         (ISPRINT): Remove; no longer needed now that we assume C89.
25416
25417         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
25418         Preserve errno.
25419
25420         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
25421         quotearg_char): Use SIZE_MAX rather than
25422         (size_t) -1 when we are talking about "infinity".
25423
25424         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
25425
25426 2002-11-22  Paul Eggert  <eggert@twinsun.com>
25427
25428         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
25429         hint that one should use `if (! x) abort ();' rather than `assert
25430         (x);', and anyway it's one less thing to worry about configuring.
25431         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
25432         hash_rehash, hash_insert): Use abort rather than assert.
25433
25434 2002-11-22  Bruno Haible  <bruno@clisp.org>
25435
25436         * lib/safe-read.h: Assume C89. Add comments.
25437         (safe_read): Change return type to size_t.
25438         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
25439         byte counts > SSIZE_MAX correctly.
25440         * lib/safe-write.h: New file.
25441         * lib/safe-write.c: New file.
25442         * lib/full-read.h: New file.
25443         * lib/full-read.c: New file.
25444         * lib/full-write.h: Assume C89. Add comments.
25445         * lib/full-write.c: Include safe-write.h.
25446         (full_write): Rewritten to use safe_write.
25447         Suggested by Jim Meyering and Paul Eggert.
25448
25449 2002-11-21  Jim Meyering  <jim@meyering.net>
25450
25451         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
25452
25453         Merge in changes from the coreutils.
25454
25455         2002-09-25  Paul Eggert  <eggert@twinsun.com>
25456         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
25457         <stdint.h>.
25458         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
25459         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
25460         int.  Work more efficiently if X is the same width as uintmax_t.
25461         Do not compare X to -1, to avoid bogus compiler warning.
25462         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
25463         Don't assume that f_frsize and f_bsize are the same type.
25464
25465         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
25466         warning on FreeBSD.
25467
25468         * lib/makepath.c (make_path): Restore umask *before* creating the final
25469         component.
25470         (make_path): Minor reformatting.
25471
25472         * lib/xmalloc.c: Adjust to work with new autoconf macros,
25473         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
25474         HAVE_MALLOC/HAVE_REALLOC.
25475
25476         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
25477         dummy ones.  At least on GNU/Linux systems, `auto' means something
25478         else.
25479         From Michael Stone.
25480
25481 2002-11-21  Bruno Haible  <bruno@clisp.org>
25482
25483         Remove case insensitive option matching.
25484         * lib/argmatch.h (argcasematch): Remove declaration.
25485         (ARGCASEMATCH): Remove macro.
25486         (__xargmatch_internal): Remove case_sensitive argument.
25487         (XARGMATCH): Update.
25488         (XARGCASEMATCH): Remove macro.
25489         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
25490         case_sensitive argument.
25491         (argcasematch): Remove function.
25492         (__xargmatch_internal): Remove case_sensitive argument.
25493         (main): Use XARGMATCH instead of XARGCASEMATCH.
25494
25495         * lib/xmalloc.c: Change compile-time error message. Add comment about
25496         required autoconf version.
25497
25498 2002-11-20  Paul Eggert  <eggert@twinsun.com>
25499
25500         Merge argmatch cleanups from Bison.  Assume C89.
25501
25502         * lib/argmatch.c: Include config.h here, not in argmatch.h.
25503         Include stdlib.h, for EXIT_FAILURE.
25504         Always include <string.h>, since we assume C89.
25505         (EXIT_FAILURE): Remove pre-C89 bug workaround.
25506         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
25507         Include <stddef.h> instead, since it's all we need for size_t.
25508         (PARAMS): Remove.  All uses removed.
25509         (ARRAY_CARDINALITY): Do not bother to #undef.
25510         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
25511         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
25512         Remove unnecessary parentheses.
25513         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
25514         Insert necessary parentheses.
25515         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
25516         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
25517
25518 2002-11-19  Bruno Haible  <bruno@clisp.org>
25519
25520         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
25521         * lib/mbswidth.h: Include <stddef.h>, for size_t.
25522
25523         * lib/mbswidth.h (PARAMS): Remove macro.
25524         (mbswidth, mbsnwidth): Use ANSI C function declarations.
25525         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
25526
25527         * lib/gcd.h (PARAMS): Remove macro.
25528         (gcd): Use ANSI C function declarations.
25529         * lib/gcd.c (gcd): Likewise.
25530
25531 2002-11-15  Bruno Haible  <bruno@clisp.org>
25532
25533         * lib/strcspn.c: Include <stddef.h>.
25534         (strcspn): Use ANSI C function declaration. Change return type to
25535         size_t. Use NULL.
25536         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
25537         (strpbrk): Use NULL.
25538         * lib/strpbrk.h (PARAMS): Remove macro.
25539         (strpbrk): Use ANSI C function declaration.
25540         * lib/strstr.c: Don't include <sys/types.h>.
25541         * lib/strstr.h (PARAMS): Remove macro.
25542         (strstr): Use ANSI C function declarations.
25543
25544 2002-11-14  Karl Berry  <karl@gnu.org>
25545
25546         * config/mkinstalldirs: `do' on separate line, instead of
25547         `for var; do'.
25548
25549 2002-11-06  Bruno Haible  <bruno@clisp.org>
25550
25551         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
25552         * lib/gcd.c (gcd): Likewise.
25553
25554 2002-11-05  Bruno Haible  <bruno@clisp.org>
25555
25556         * lib/gcd.h: New file, from gettext-0.11.5.
25557         * lib/gcd.c: New file, from gettext-0.11.5.
25558
25559 2002-11-05  Bruno Haible  <bruno@clisp.org>
25560
25561         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25562         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25563         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25564         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25565
25566         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
25567         <libintl.h>.
25568         * lib/makepath.c: Include gettext.h instead of <locale.h> and
25569         <libintl.h>.
25570
25571         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
25572         * lib/human.c: Include gettext.h instead of <libintl.h>.
25573         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
25574         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
25575         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
25576         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
25577         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
25578         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
25579         (textdomain): Remove definition.
25580         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
25581
25582         * lib/long-options.c: Remove include of <libintl.h> and definition of
25583         _.
25584         * lib/same.c: Remove include of <libintl.h> and definition of _.
25585
25586 2002-11-04  Owen Taylor  <otaylor@redhat.com>
25587
25588         * lib/config.charset: A few additions for Solaris.
25589
25590 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
25591
25592         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
25593         * lib/localcharset.c (locale_charset): Declare as extern "C".
25594
25595 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
25596
25597         * lib/config.charset: msdos in uk_UA uses CP1125.
25598
25599 2002-11-04  Bruno Haible  <bruno@clisp.org>
25600
25601         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
25602         * lib/strcase.h: New file, from GNU gettext-0.11.5.
25603         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
25604         * lib/strstr.h: New file, from GNU gettext-0.11.5.
25605         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
25606
25607 2002-11-04  Bruno Haible  <bruno@clisp.org>
25608
25609         * lib/localcharset.c (locale_charset): Don't return an empty string.
25610
25611 2002-11-04  Bruno Haible  <bruno@clisp.org>
25612
25613         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
25614         aliases.
25615
25616 2002-11-04  Bruno Haible  <bruno@clisp.org>
25617
25618         * lib/config.charset: Update for newest glibc. Add canonical names
25619         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
25620
25621 2002-11-04  Bruno Haible  <bruno@clisp.org>
25622
25623         * lib/config.charset: Add support for NetBSD.
25624
25625 2002-11-04  Bruno Haible  <bruno@clisp.org>
25626
25627         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
25628
25629 2002-11-01  Bruno Haible  <bruno@clisp.org>
25630
25631         * configure.in: Add AC_CONFIG_AUX_DIR call.
25632         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
25633         test/Makefile.
25634         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
25635
25636 2002-09-28  Karl Berry  <karl@gnu.org>
25637
25638         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
25639         installed automake until the next release, since changes have been
25640         made.
25641
25642 2002-09-25  Karl Berry  <karl@gnu.org>
25643
25644         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
25645         * lib/getopt*: copy from libc/posix.
25646         * lib/gettext.h: copy from gettext.
25647         * lib/.cppi-disable: add strdup.c, gettext.h.
25648
25649 2002-09-25  Karl Berry  <karl@gnu.org>
25650
25651         * config/srclist.txt: enable gettext.h check.
25652         * config/config.{guess,sub}: update from prep.
25653         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
25654                 from automake 1.6.3.
25655         See srclist*.
25656
25657 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
25658
25659         * regex.c (PATFETCH): Remove the translating fetch.
25660         (PATFETCH_RAW): Rename to PATFETCH.
25661         (set_image_of_range): New fun.
25662         (SET_RANGE_TABLE_WORK_AREA): Use it.
25663         (regex_compile): Don't translate the pattern chars so eagerly.
25664         Only do it when inserting an `exactn' bytecode or when handling
25665         a char-range.
25666         (mutually_exclusive_p): Avoid empty statement.
25667
25668 2002-07-06  Jim Meyering  <meyering@lucent.com>
25669
25670         * m4/README: Don't mention Makefile.am.in.
25671         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
25672
25673 2002-07-01  Jim Meyering  <meyering@lucent.com>
25674
25675         * lib/c-stack.c: Include sys/time.h.
25676         From Volker Borchert.
25677
25678 2002-06-26  Paul Eggert  <eggert@twinsun.com>
25679
25680         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
25681
25682 2002-06-26  Paul Eggert  <eggert@twinsun.com>
25683
25684         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
25685         New macro.  Use it uniformly instead of
25686         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
25687         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
25688         reported by Vin Shelton.
25689
25690 2002-06-22  Paul Eggert  <eggert@twinsun.com>
25691
25692         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
25693         Do not assume SA_SIGINFO behavior.
25694         Bug reported by Jim Meyering on NetBSD 1.5.2.
25695
25696 2002-06-22  Jim Meyering  <meyering@lucent.com>
25697
25698         * m4/c-stack.m4: New file, from diffutils-2.8.2.
25699         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
25700
25701         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
25702         now that configure.ac uses AC_GNU_SOURCE.
25703         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
25704         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
25705
25706         Update to latest tools.  Suggestions from Paul Eggert.
25707         * m4/stdbool.m4: New file, from diffutils-2.8.2.
25708         * m4/gnu-source.m4: Update from diffutils-2.8.2.
25709         * m4/fnmatch.m4: Likewise.
25710         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
25711         to AC_HEADER_STDBOOL
25712
25713 2002-06-22  Jim Meyering  <meyering@lucent.com>
25714
25715         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
25716         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
25717
25718 2002-06-22  Jim Meyering  <meyering@lucent.com>
25719
25720         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
25721
25722         * lib/exitfail.c, exitfail.h: Likewise.
25723         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
25724
25725         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
25726         of fnmatch.h.
25727         (EXTRA_DIST): Add fnmatch_loop.c.
25728         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
25729
25730         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
25731         * lib/fnmatch.c: Update from diffutils-2.8.2.
25732         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
25733         * lib/fnmatch.h: Remove file.
25734
25735 2002-06-21  Jim Meyering  <meyering@lucent.com>
25736
25737         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
25738         * m4/mbrtowc.m4: Likewise.
25739
25740         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
25741         * m4/mbswidth.m4: Reflect name change:
25742         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
25743         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
25744
25745         * m4/lib-link.m4: Update from gettext-0.11.2.
25746         * m4/gettext.m4: Likewise.
25747
25748         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
25749         From Alfred M. Szmidt.
25750
25751 2002-06-18  Paul Eggert  <eggert@twinsun.com>
25752
25753         * lib/file-type.h: Report an error if neither S_ISREG nor
25754         S_IFREG is defined, instead of using a test specific to glibc
25755         2.2.  This should be safe, since POSIX requires S_ISREG and
25756         Unix Version 7 had S_IFREG.  We don't need to check for
25757         <sys/types.h> since we don't use any symbols that it defines.
25758
25759 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
25760
25761         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
25762         $@-t, so that each temporary file name is unique and valid in the first
25763         8 characters, for operation under DOS.
25764
25765 2002-06-15  Paul Eggert  <eggert@twinsun.com>
25766
25767         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
25768
25769 2002-06-15  Jim Meyering  <meyering@lucent.com>
25770
25771         Work even with DJGPP 2.03, which lacks support for symlinks.
25772         From Richard Dawe.
25773         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
25774         is defined.
25775         * lib/lchown.c (S_ISLNK): Likewise.
25776
25777 2002-06-15  Jim Meyering  <meyering@lucent.com>
25778
25779         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
25780         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
25781         have been included before this file.
25782
25783 2002-06-14  Jim Meyering  <meyering@lucent.com>
25784
25785         * lib/file-type.h: Use the version from diffutils-2.8.2.
25786         * lib/file-type.c: Likewise.
25787
25788 2002-06-07  Jim Meyering  <meyering@lucent.com>
25789
25790         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
25791         They're needed at least for NetBSD 1.5.2.
25792         ($statxfs_includes): Include those same headers.
25793         ($statxfs_includes): Include sys/vfs.h if available.
25794         ($statxfs_includes): Likewise for sys/statvfs.h.
25795         Check for the following members in both structs statfs and statvfs:
25796         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
25797
25798 2002-06-01  Jim Meyering  <meyering@lucent.com>
25799
25800         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
25801         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
25802
25803 2002-05-28  Jim Meyering  <meyering@lucent.com>
25804
25805         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
25806         Reported by Volker Borchert.
25807
25808 2002-05-27  Jim Meyering  <meyering@lucent.com>
25809
25810         Fix a problem seen only on nonconforming systems whereby ls.c's
25811         use of localtime, and then of gettimeofday would cause trouble:
25812         the localtime call used to initialize rpl_gettimeofday's save
25813         mechanism would clobber ls's current local time information so
25814         that in any long listing the first file would always be listed
25815         with date 1970-01-01.  Analysis by Volker Borchert.
25816
25817         * lib/gettimeofday.c (localtime): Undefine.
25818         (rpl_localtime): New function.
25819
25820 2002-05-27  Jim Meyering  <meyering@lucent.com>
25821
25822         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
25823         localtime.
25824
25825         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
25826         use the replacement function; it wouldn't resolve at link time.
25827         Reported by Volker Borchert.
25828
25829 2002-05-22  Jim Meyering  <meyering@lucent.com>
25830
25831         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
25832         file-type.h.
25833         * lib/file-type.h: New file.
25834         * lib/file-type.c (file_type): New file/function.  Extracted from
25835         diffutils.
25836
25837 2002-04-30  Jim Meyering  <meyering@lucent.com>
25838
25839         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
25840
25841 2002-04-29  Paul Eggert  <eggert@twinsun.com>
25842
25843         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
25844
25845 2002-04-29  Paul Eggert  <eggert@twinsun.com>
25846
25847         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
25848         Do not check for alloca.h (no longer used) or stdbool.h (was never
25849         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
25850
25851 2002-04-29  Paul Eggert  <eggert@twinsun.com>
25852
25853         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
25854
25855 2002-04-29  Jim Meyering  <meyering@lucent.com>
25856
25857         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
25858         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
25859         Use AC_FUNC_STRNLEN here instead.
25860
25861         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
25862         With autoconf-2.53a, it's part of AC_PROG_CC.
25863
25864 2002-04-28  Paul Eggert  <eggert@twinsun.com>
25865
25866         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
25867         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
25868
25869 2002-04-28  Paul Eggert  <eggert@twinsun.com>
25870
25871         * lib/sig2str.h, lib/sig2str.c: New files.
25872         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
25873
25874 2002-04-28  Paul Eggert  <eggert@twinsun.com>
25875
25876         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
25877         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
25878         of 127, since 64 is the largest conceivable number for ancient
25879         nonstandard hosts.
25880         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
25881
25882 2002-04-28  Jim Meyering  <meyering@lucent.com>
25883
25884         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
25885
25886 2002-04-24  Jim Meyering  <meyering@lucent.com>
25887
25888         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
25889         (jm_PREREQ): Use it.
25890
25891         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
25892         mach/mach.h fcntl.h.
25893         Check for this function: setlocale.
25894
25895 2002-04-24  Jim Meyering  <meyering@lucent.com>
25896
25897         * lib/gettext.h: New file, from Gettext.
25898         * lib/Makefile.am (INCLUDES): Remove -I../intl.
25899         (libfetish_a_SOURCES): Add gettext.h.
25900
25901 2002-04-16  Jim Meyering  <meyering@lucent.com>
25902
25903         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
25904         ut_pid, ut_id, ut_exit.
25905
25906 2002-04-16  Jim Meyering  <meyering@lucent.com>
25907
25908         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
25909         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
25910         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
25911
25912 2002-04-12  Jim Meyering  <meyering@lucent.com>
25913
25914         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
25915         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
25916         existence of the getmntinfo function.  Needed for Darwin 5.3.
25917
25918         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
25919         This is necessary at least on Darwin 5.3.
25920
25921         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
25922         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
25923         strnlen.o in the library, and that makes some versions of ranlib
25924         object.
25925
25926 2002-04-12  Jim Meyering  <meyering@lucent.com>
25927
25928         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
25929
25930 2002-04-09  Jim Meyering  <meyering@lucent.com>
25931
25932         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
25933         to be more precise.  Rather than saying we're checking whether the
25934         function `works', say what we're testing.
25935         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
25936         Reported by Bruno Haible.
25937
25938 2002-03-10  Jim Meyering  <meyering@lucent.com>
25939
25940         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
25941         Suggestion from Santiago Vila.
25942
25943 2002-03-08  Jim Meyering  <meyering@lucent.com>
25944
25945         * lib/rename.c: Mention that this wrapper is needed also on
25946         mips-dec-ultrix4.4 systems.
25947
25948 2002-03-02  Jim Meyering  <meyering@lucent.com>
25949
25950         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
25951         not HAVE_CLOCK_SETTIME.
25952
25953 2002-02-27  Paul Eggert  <eggert@twinsun.com>
25954
25955         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
25956         Check for clock_settime.
25957
25958 2002-02-27  Paul Eggert  <eggert@twinsun.com>
25959
25960         * lib/nanosleep.h: Rename to....
25961         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
25962
25963         * lib/gettime.c: New file.
25964         * lib/settime.c: New file.
25965         * lib/stime.c: Remove.
25966
25967         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
25968         timespec.h.  Remove nanosleep.h.
25969
25970 2002-02-25  Paul Eggert  <eggert@twinsun.com>
25971
25972         * m4/acl.m4: New file.
25973         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
25974         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
25975
25976 2002-02-25  Paul Eggert  <eggert@twinsun.com>
25977
25978         * lib/acl.c, lib/acl.h: New files.
25979         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
25980
25981 2002-02-24  Jim Meyering  <meyering@lucent.com>
25982
25983         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
25984         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
25985         cause trouble.  Reported by Nelson Beebe.
25986
25987 2002-02-23  Paul Eggert  <eggert@twinsun.com>
25988
25989         * lib/path-concat.c (xpath_concat): Reorder code to pacify
25990         compilers that don't know that xalloc_die never returns.
25991
25992 2002-02-20  Jim Meyering  <meyering@lucent.com>
25993
25994         * lib/getdate.c: Regenerate using bison-1.33.
25995
25996 2002-02-17  Jim Meyering  <meyering@lucent.com>
25997
25998         * config/config.guess (main): Don't use `head -1'; it's no longer
25999         portable. Use `sed 1q' instead.
26000
26001 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
26002
26003         * m4/codeset.m4: Upgrade to gettext-0.11.
26004         * m4/gettext.m4: Upgrade to gettext-0.11.
26005         * m4/glibc21.m4: Upgrade to gettext-0.11.
26006         * m4/iconv.m4: Upgrade to gettext-0.11.
26007         * m4/isc-posix.m4: Upgrade to gettext-0.11.
26008         * m4/lcmessage.m4: Upgrade to gettext-0.11.
26009         * m4/lib-ld.m4: New file, from gettext-0.11.
26010         * m4/lib-link.m4: New file, from gettext-0.11.
26011         * m4/lib-prefix.m4: New file, from gettext-0.11.
26012         * m4/progtest.m4: Upgrade to gettext-0.11.
26013
26014 2002-02-15  Paul Eggert  <eggert@twinsun.com>
26015
26016         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
26017         (jm_PREREQ): Use it.
26018
26019 2002-02-15  Paul Eggert  <eggert@twinsun.com>
26020
26021         * lib/posixver.c, lib/posixver.h: New files.
26022         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
26023
26024 2002-02-02  Paul Eggert  <eggert@twinsun.com>
26025             Bruno Haible  <bruno@clisp.org>
26026
26027         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
26028         (fwrite_success_callback): New declaration.
26029         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
26030         print_unicode_char. Call failure callback instead of error.
26031         (fwrite_success_callback): New function.
26032         (exit_failure_callback): New function.
26033         (fallback_failure_callback): New function.
26034         (print_unicode_char): Call unicode_to_mb.
26035
26036 2002-01-26  Jim Meyering  <meyering@lucent.com>
26037
26038         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
26039         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
26040
26041 2002-01-26  Jim Meyering  <meyering@lucent.com>
26042
26043         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
26044
26045 2002-01-22  Paul Eggert  <eggert@twinsun.com>
26046
26047         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
26048
26049 2002-01-22  Jim Meyering  <meyering@lucent.com>
26050
26051         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
26052         Otherwise, some versions of automake would omit the rule that makes
26053         Makefile from Makefile.in.
26054
26055 2002-01-21  Paul Eggert  <eggert@twinsun.com>
26056
26057         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
26058         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
26059         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
26060         (memcoll): Set errno to zero if there is no error.
26061
26062         * lib/quotearg.c (quotearg_buffer_restyled):
26063         Fix bug with quoting buffers containing NUL when backslashing escapes.
26064         This bug was exposed by the other changes in this patch.
26065         (quotearg_n_options): New arg ARGSIZE.
26066         All callers changed.
26067         (quoting_options_from_style): New function.
26068         (quotearg_n_style): Use it.
26069         (quotearg_n_style_mem): New function.
26070
26071         * lib/quotearg.h (quotearg_n_style_mem): New function.
26072
26073 2002-01-19  Jim Meyering  <meyering@lucent.com>
26074
26075         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
26076         Remove useless quotes: DF_PROG="df".
26077         * m4/strnlen.m4: New file.
26078
26079 2002-01-16  Paul Eggert  <eggert@twinsun.com>
26080
26081         * lib/backupfile.c (ISDIGIT): Comment fix.
26082         * lib/getdate.y (ISDIGIT): Likewise.
26083         * lib/posixtm.c (ISDIGIT, year): Likewise.
26084         * lib/strverscmp.c (ISDIGIT): Likewise.
26085         * lib/userspec.c (ISDIGIT): Likewise.
26086
26087 2002-01-16  Jim Meyering  <meyering@lucent.com>
26088
26089         * lib/getdate.y: Add three semicolons, each just before a closing
26090         brace. Bison (as of version 1.31) no longer papers over that mistake.
26091
26092 2002-01-05  Jim Meyering  <meyering@lucent.com>
26093
26094         * lib/version-etc.c (version_etc_copyright): Update copyright year.
26095
26096 2001-12-19  Paul Eggert  <eggert@twinsun.com>
26097
26098         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
26099         not silently exit merely because the output buffer happens to
26100         have nothing pending.
26101
26102 2001-12-18  Paul Eggert  <eggert@twinsun.com>
26103
26104         See the big note in ../ChangeLog.
26105         * lib/human.c (suffixes): Prefer K to k for 1024.
26106         (generate_suffix_backwards): New function.
26107         (human_readable_inexact): Use it.
26108         * lib/xstrtol.c (__xstrtol): If there is no number but there
26109         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
26110         Accept 'K' as well as 'k'.
26111
26112 2001-12-15  Jim Meyering  <meyering@lucent.com>
26113
26114         * lib/regex.h (__restrict_arr): Update from libc.
26115
26116         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
26117         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
26118         (STREQ): Define.
26119
26120 2001-12-14  Jim Meyering  <meyering@lucent.com>
26121
26122         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
26123         Suggestion from Bruno Haible.
26124
26125 2001-12-10  Jim Meyering  <meyering@lucent.com>
26126
26127         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
26128         xrealloc, Instead, include "xalloc.h".
26129         (initbuffer): Don't cast xmalloc return value to char*.
26130         (readline): Reword comment.
26131         Don't cast xrealloc return value to char*
26132         Return NULL, not 0.
26133
26134 2001-12-09  Jim Meyering  <meyering@lucent.com>
26135
26136         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
26137         about `signed and unsigned type in conditional expression'.
26138         * lib/posixtm.c (posix_time_parse): Likewise.
26139
26140         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
26141
26142         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
26143         to avoid a pedantic warning.
26144
26145         * lib/getstr.c: Don't include assert.h.
26146         (getstr): Remove warning-evoking assertions.
26147         Return -1 if offset parameter is out of bounds.
26148         Change the type of a local from int to size_t.
26149
26150         * lib/strftime.c (my_strftime_localtime_r): Include this function
26151         definition in the `#if ! HAVE_TM_GMTOFF' block.
26152
26153         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
26154         Include xalloc.h instead.
26155
26156 2001-12-02  Jim Meyering  <meyering@lucent.com>
26157
26158         * lib/tempname.c: Don't declare getenv, thus reverting the change of
26159         2001-11-18.  It's no longer necessary, now that stdlib.h is always
26160         included.
26161
26162         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
26163         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
26164
26165 2001-11-30  Akim Demaille  <akim@epita.fr>
26166
26167         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
26168         before being defined.
26169
26170 2001-11-27  Paul Eggert  <eggert@twinsun.com>
26171
26172         * lib/quotearg.h (quotearg_n, quotearg_n_style):
26173         First arg is int, not unsigned.
26174         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
26175         (SIZE_MAX, UINT_MAX): New macros.
26176         (quotearg_n_options): Abort if N is negative.
26177         Avoid overflow check on hosts where size_t is 64 bits and int
26178         is 32 bits, as overflow is impossible there.
26179         Fix off-by-one typo that caused unnecessary reallocation.
26180
26181 2001-11-27  Jim Meyering  <meyering@lucent.com>
26182
26183         * lib/tempname.c: Merge with version from libc.
26184         * lib/regex.c: Likewise.
26185
26186         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
26187         systems for which STDC_HEADERS is 0, it was not included, resulting in
26188         a warning about an integer-to-pointer conversion problem with getenv.
26189         Reported by Volker Borchert.
26190
26191 2001-11-26  Jim Meyering  <meyering@lucent.com>
26192
26193         * lib/gtod.h: Remove file.
26194         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
26195         * lib/gettimeofday.c: Don't include gtod.h.
26196         (GTOD_init): Remove function.
26197         (rpl_gettimeofday): Do its job here instead, rather than aborting.
26198         Suggestion from Volker Borchert.
26199
26200 2001-11-23  Jim Meyering  <meyering@lucent.com>
26201
26202         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
26203         it.
26204         * lib/hash.c (struct hash_table): Define it here instead.
26205
26206 2001-11-22  Jim Meyering  <meyering@lucent.com>
26207
26208         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
26209
26210 2001-11-20  Jim Meyering  <meyering@lucent.com>
26211
26212         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
26213         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
26214
26215 2001-11-19  Jim Meyering  <meyering@lucent.com>
26216
26217         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
26218         directory.  Use "conftestXXXXXX" as the template.
26219         Suggestion from Paul Eggert.
26220
26221         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
26222         immediately, so the test doesn't mistakenly hit the max-open-files
26223         limit.
26224
26225 2001-11-18  Paul Eggert  <eggert@twinsun.com>
26226
26227         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
26228         (TEMPORARIES): New macro.
26229         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
26230         removes an artificial limitation (e.g. HP-UX 10.20, where
26231         TMP_MAX is 17576).
26232
26233 2001-11-18  Jim Meyering  <meyering@lucent.com>
26234
26235         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
26236
26237 2001-11-18  Jim Meyering  <meyering@lucent.com>
26238
26239         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
26240         on SunOS 4.
26241
26242         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
26243         files will be created before anything else.
26244
26245 2001-11-17  Paul Eggert  <eggert@twinsun.com>
26246
26247         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
26248         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
26249
26250 2001-11-17  Jim Meyering  <meyering@lucent.com>
26251
26252         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
26253         Prompted by a report from Bob Proulx.
26254
26255         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
26256         Instead, require UTILS_FUNC_MKSTEMP.
26257
26258 2001-11-17  Jim Meyering  <meyering@lucent.com>
26259
26260         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
26261         Now, that's done as part of AC_FUNC_STRTOD.
26262
26263 2001-11-17  Jim Meyering  <meyering@lucent.com>
26264
26265         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
26266         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
26267         rather than group writable.  Patch by Juan F. Codagnone.
26268
26269         * lib/readtokens.c: Remove explicit declarations of xmalloc and
26270         xrealloc, Instead, include "xalloc.h".
26271
26272         * lib/mountlist.c: Include unlocked-io.h after all system headers.
26273         Remove explicit declarations of xmalloc, xrealloc,
26274         and xstrdup.  Instead, include "xalloc.h".
26275
26276         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
26277         unlocked-io.h.
26278         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
26279         Likewise.
26280         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
26281
26282         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
26283         Reported by Padraig Brady.
26284
26285         * lib/mkstemp.c: #undef mkstemp.
26286         Include config.h.
26287         (rpl_mkstemp): Rename from mkstemp.
26288         Protoize.
26289
26290 2001-11-16  Jim Meyering  <meyering@lucent.com>
26291
26292         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
26293         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
26294         determine the amount of total physical memory, use pstat_getstatic.
26295         HPUX-11 doesn't define _SC_PHYS_PAGES.
26296         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
26297         If sysconf couldn't be used to determine the amount of available
26298         physical memory, use both pstat_getstatic and pstat_getdynamic.
26299         Based on a patch from Bob Proulx.
26300
26301 2001-11-10  Jim Meyering  <meyering@lucent.com>
26302
26303         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
26304         (jm_PREREQ): Use it.
26305
26306 2001-11-09  Jim Meyering  <meyering@lucent.com>
26307
26308         * m4/jm-macros.m4: Require autoconf-2.52f.
26309         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
26310         Use these AC_-prefixed names, not the AM_-prefixed ones.
26311
26312         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
26313
26314 2001-11-05  Jim Meyering  <meyering@lucent.com>
26315
26316         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
26317
26318 2001-11-04  Jim Meyering  <meyering@lucent.com>
26319
26320         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
26321         $DEFS.
26322
26323 2001-11-03  Jim Meyering  <meyering@lucent.com>
26324
26325         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
26326         of AC_DEFUN.
26327
26328         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
26329         know the name of the variable in the macro definition.
26330
26331 2001-11-03  Jim Meyering  <meyering@lucent.com>
26332
26333         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
26334         in argmatch_to_argument call.
26335
26336         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
26337         argument.
26338
26339         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
26340         e.g., a fault due to an attempt to free a NULL pointer.
26341
26342 2001-11-01  Jim Meyering  <meyering@lucent.com>
26343
26344         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
26345         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
26346
26347 2001-11-01  Jim Meyering  <meyering@lucent.com>
26348
26349         * lib/dirfd.c, lib/dirfd.h: New files.
26350         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
26351
26352         * lib/hash.c (hash_print) [TESTING]: Clean up.
26353
26354 2001-10-22  Paul Eggert  <eggert@twinsun.com>
26355
26356         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
26357         to avoid a warning if -Wall.
26358
26359 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
26360
26361         * README: New file
26362         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
26363         (per RMS's instructions, this is now the canonical source)
26364         * lgpl/, gpl/: New directories.
26365
26366 2001-10-21  Paul Eggert  <eggert@twinsun.com>
26367
26368         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
26369
26370 2001-10-21  Jim Meyering  <meyering@lucent.com>
26371
26372         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
26373         this code would end up calling gettext even in packages built
26374         with --disable-nls.
26375         * lib/getopt.c (_): Likewise.
26376         * lib/regex.c (_): Likewise.
26377
26378 2001-10-20  Paul Eggert  <eggert@twinsun.com>
26379
26380         * m4/error.m4 (jm_PREREQ_ERROR):
26381         Do not invoke AC_CHECK_FUNCS with strerror_r, as
26382         AC_FUNC_STRERROR_R does that.
26383         Check for strerror declaration.
26384
26385         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
26386         are supposed to have them these days.
26387         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
26388         Merge changes from latest Autoconf CVS.
26389         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
26390         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
26391         POSIX decided to standardize on the int flavor of strerror_r.
26392
26393 2001-10-20  Paul Eggert  <eggert@twinsun.com>
26394
26395         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
26396         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
26397         Use strerror_r that is only a macro, even if it is not a function.
26398         (strerror): Check for HAVE_DECL_STRERROR before declaring.
26399         (private_strerror): Use prototypes, not old-style function definition.
26400         (print_errno_message): New function.
26401         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
26402         char*-flavored one.
26403         (error_tail, error, error_at_line): Use it.
26404
26405 2001-10-11  Jim Meyering  <meyering@lucent.com>
26406
26407         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
26408         and quote_n (1, ... to avoid clobbering a buffer.
26409
26410 2001-10-05  Jim Meyering  <meyering@lucent.com>
26411
26412         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
26413         hash-pjw.h.
26414         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
26415         * lib/hash-pjw.h: New file.
26416
26417 2001-09-30  Jim Meyering  <meyering@lucent.com>
26418
26419         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
26420         `struct fsstat' has the `f_fstypename' member.
26421         Use that to define FS_TYPE, which is now used to make
26422         the getfsstat link test tighter.
26423
26424 2001-09-30  Jim Meyering  <meyering@lucent.com>
26425
26426         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
26427         Include <sys/ucred.h>, for Apple Darwin.
26428         Include sys/mount.h and sys/fs_types.h only if available.
26429         (FS_TYPE): Define.
26430         (read_filesystem_list): Use FS_TYPE.
26431
26432 2001-09-29  Paul Eggert  <eggert@twinsun.com>
26433
26434         * lib/exclude.c (excluded_filename): 0 -> false, since it's
26435         a boolean context.
26436
26437 2001-09-29  Jim Meyering  <meyering@lucent.com>
26438
26439         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
26440         [one-argument getmntent function]): Include stdio.h before mntent.h.
26441         SunOS 4.1.x needs it for the declaration of `FILE'.
26442         Patch by Volker Borchert.
26443
26444         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
26445         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
26446         sys/fs_types.h, and make the link-test for getfsstat guard #include
26447         directives with appropriate #if HAVE_*_H tests so that we can
26448         detect getfsstat on Apple Darwin1.3.7 systems.
26449         Reported by Nelson Beebe.
26450         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
26451
26452 2001-09-28  Paul Eggert  <eggert@twinsun.com>
26453
26454         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
26455         #defines strtoimax.  Also treat the other strto* functions
26456         like strtoimax.
26457
26458         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
26459         Check for strtoul and strtoumax,
26460         as those declarations are made even in the signed case.
26461         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
26462         Likewise, for strtol and strtoimax.
26463
26464 2001-09-28  Paul Eggert  <eggert@twinsun.com>
26465
26466         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
26467         #defines strtoimax.  Also treat the other strto* functions
26468         like strtoimax.
26469
26470         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
26471         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
26472         (strtoimax, strtoumax): Do not declare if already defined as a macro.
26473
26474 2001-09-26  Jim Meyering  <meyering@lucent.com>
26475
26476         Most macros in unlocked-io.h had the wrong number of arguments.
26477         * lib/gen-uio: New script.
26478         (USE_UNLOCKED_IO): Define to 1 if not already defined.
26479         * lib/unlocked-io.hin: Remove file.
26480         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
26481         rather than trying to embed it here.
26482         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
26483         Reported by Padraig Brady.
26484
26485 2001-09-25  Volker Borchert  <bt@teknon.de>
26486
26487         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
26488         `result'.
26489
26490 2001-09-24  Jim Meyering  <meyering@lucent.com>
26491
26492         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
26493
26494 2001-09-23  Jim Meyering  <meyering@lucent.com>
26495
26496         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
26497         instead of the mere test for existence of mntent.h.  The latter
26498         would get a false-positive on AIX 3.4 systems.
26499         In the outer getmntent if-block, don't die if neither of the getmntent
26500         tests succeeds.  Instead, just fall through and continue with the
26501         remaining tests.
26502
26503 2001-09-23  Jim Meyering  <meyering@lucent.com>
26504
26505         * lib/mountlist.c: Remove useless parentheses in #if directives.
26506         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
26507         the deprecated MOUNTED symbol is no longer defined in mntent.h.
26508
26509 2001-09-22  Jim Meyering  <meyering@lucent.com>
26510
26511         * m4/gettext.m4: New file.  From gettext.
26512         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
26513         * m4/progtest.m4: Likewise
26514         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
26515         * m4/glibc21.m4: Likewise.
26516
26517         * m4/libintl.m4: Remove.  No longer used.
26518
26519 2001-09-22  Jim Meyering  <meyering@lucent.com>
26520
26521         * lib/localcharset.c: Update from latest gettext.
26522         * lib/config.charset: Likewise.
26523
26524 2001-09-20  Jim Meyering  <meyering@lucent.com>
26525
26526         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
26527         strtoimax.
26528         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
26529         strtoumax.
26530
26531 2001-09-20  Jim Meyering  <meyering@lucent.com>
26532
26533         * lib/xstrtol.c (strtoimax): Guard declaration with
26534         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
26535         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
26536         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
26537         (strtoumax): Likewise, for completeness (it wasn't necessary).
26538
26539 2001-09-17  Paul Eggert  <eggert@twinsun.com>
26540
26541         * lib/strtoimax.c (HAVE_LONG_LONG):
26542         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
26543         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
26544         to work around bug in IBM C compiler.
26545
26546 2001-09-17  Jim Meyering  <meyering@lucent.com>
26547
26548         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
26549         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
26550         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
26551         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
26552         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
26553         whenever the right hand side need not be expanded by the shell.
26554
26555 2001-09-16  Paul Eggert  <eggert@twinsun.com>
26556
26557         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
26558         library.  It's not correct, as some older glibcs are buggy.
26559         fnmatch wasn't fixed until glibc 2.2.
26560
26561         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
26562         special shell magic here.
26563
26564 2001-09-16  Jim Meyering  <meyering@lucent.com>
26565
26566         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
26567         * m4/jm-macros.m4: Require it.
26568
26569 2001-09-16  Jim Meyering  <meyering@lucent.com>
26570
26571         * lib/mkdir.c: New file.
26572
26573 2001-09-15  Jim Meyering  <meyering@lucent.com>
26574
26575         * m4/jm-macros.m4: Check for help2man.
26576
26577 2001-09-11  Jim Meyering  <meyering@lucent.com>
26578
26579         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
26580         The body, by Paul Eggert, was moved here from configure.in.
26581         * m4/jm-macros.m4: Require UTILS_HOST_OS.
26582
26583 2001-09-04  Paul Eggert  <eggert@twinsun.com>
26584
26585         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
26586         (jm_PREREQ): Use it.
26587
26588 2001-09-04  Paul Eggert  <eggert@twinsun.com>
26589
26590         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
26591         Use ssize_t, not int, to store result of readlink.
26592         Check for ssize_t overflow as well as size_t overflow,
26593         as POSIX says the result of readlink is implementation-defined
26594         when ssize_t overflows.
26595         Remove unnecessary cast to char*.
26596         Use free+malloc instead of realloc, as the storage doesn't need
26597         to be preserved and it's clearer and can be more efficient that way.
26598         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
26599         * lib/xreadlink.h (xreadlink): Update prototype.
26600
26601 2001-09-04  Paul Eggert  <eggert@twinsun.com>
26602
26603         * lib/xgetcwd.c: Revert some of the previous change; intead,
26604         fix the HAVE_GETCWD_NULL code to behave more like the
26605         !HAVE_GETCWD_NULL code used to.
26606
26607         Include "xalloc.h".
26608         (xgetcwd): Do not return NULL when memory is exhausted; instead,
26609         invoke xalloc_die.
26610
26611 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26612
26613         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
26614         sys/param.h, as pathmax.h includes them.
26615
26616 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26617
26618         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
26619         (jm_PREREQ_XGETCWD): New macro.
26620
26621         * m4/getcwd.m4: New file.
26622
26623 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26624
26625         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
26626         like the HAVE_GETCWD_NULL code.
26627         Include pathmax.h if not HAVE_GETCWD.
26628         Do not include xalloc.h.
26629         (INITIAL_BUFFER_SIZE): New symbol.
26630         Do not use xmalloc / xrealloc, since the caller is responsible for
26631         handling errors.  Preserve errno around `free' during failure.
26632         Do not overrun buffer when using getwd.
26633
26634 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26635
26636         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
26637         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
26638         getcwd (NULL, 0).
26639
26640 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26641
26642         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
26643         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
26644         spotted by Jim Meyering.
26645
26646 2001-09-03  Jim Meyering  <meyering@lucent.com>
26647
26648         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
26649         failure.
26650
26651 2001-09-02  Jim Meyering  <meyering@lucent.com>
26652
26653         * lib/error.c: Update from GNU libc.
26654
26655 2001-09-01  Jim Meyering  <meyering@lucent.com>
26656
26657         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
26658         Used by df.
26659
26660 2001-09-01  Jim Meyering  <meyering@lucent.com>
26661
26662         * lib/xreadlink.c: New file.
26663         * lib/xreadlink.h: New file.
26664         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
26665         xreadlink.h.
26666
26667         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
26668         doesn't conflict with sparc Solaris 7's definition in
26669         /usr/include/sys/int_types.h.
26670
26671         * lib/exclude.c: Use `""', not `<>' to #include non-system header
26672         files.
26673         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
26674         and strncasecmp as r-values.  Unixware didn't have declarations.
26675
26676 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26677
26678         * lib/xstrtol.h: Add copyright notice.
26679         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
26680         LONGINT_INVALID_SUFFIX_CHAR.
26681
26682 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26683
26684         * lib/xstrtol.c (strtoimax): New decl.
26685
26686 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26687
26688         * lib/xgetcwd.c: Don't include pathmax.h.
26689         Include stdlib.h and unistd.h if available.
26690         Include xalloc.h.
26691         (xmalloc, xstrdup, free): Remove decls.
26692         (xgetcwd): Don't assume sizes fit in unsigned.
26693         Check for overflow when computing sizes.
26694         Simplify reallocation code.
26695
26696 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26697
26698         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
26699         a directory's st_size can have an arbitrary value, so the old
26700         usage could waste an arbitrary amount of memory.  All uses
26701         changed.
26702         * lib/savedir.h: Update prototype.
26703
26704 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26705
26706         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
26707
26708         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
26709         old strtoimax.c.
26710
26711         Also, make the following further changes to make this file's
26712         configuration more similar to that of strtol.c:
26713         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
26714         (strtoumax, uintmax_t, strtoull, strtol): Remove.
26715         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
26716         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
26717         changed to signed values.
26718
26719         And make the following changes as well:
26720         Fix copyright notice, as 1999 was missing.
26721         (verify): New macro.
26722         (strtoimax): Check sizes at compile-time, not run-time.
26723         Prefer strtol to strtoll if both work.
26724         (main): Remove; it was not that useful and was a pain to maintain.
26725
26726         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
26727
26728 2001-08-31  Jim Meyering  <meyering@lucent.com>
26729
26730         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
26731         Use an initial, malloc'd, buffer of length 128 rather than
26732         a statically allocated one of length 1024.
26733
26734 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26735
26736         Simplify code, partly by assuming autoconf 2.52 semantics.
26737
26738         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
26739
26740         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
26741         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
26742         All uses removed.
26743         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
26744         Move AC_REQUIRE to next-to-top level, to avoid confusion.
26745         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
26746         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
26747         jm_AC_HEADER_INTTYPES_H.
26748         * m4/jm-macros.m4 (jm_MACROS): Likewise.
26749
26750         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
26751
26752         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
26753         Quote first arg of AC_DEFUN.
26754         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
26755         since they are needed to parse the include file even if we need
26756         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
26757         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
26758         but with opposite signedness.
26759
26760 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26761
26762         Merge 'exclude' changes from tar 1.13.22.
26763         This fixes one or two unlikely storage allocation overflow bugs,
26764         but doesn't change user-visible behavior otherwise.
26765
26766 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26767
26768         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
26769         (jm_PREREQ_EXCLUDE): New macro.
26770
26771 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26772
26773         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
26774         tm to be declared.
26775
26776 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26777
26778         * lib/hash.c: Remove '2001' from copyright notice.
26779
26780 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26781
26782         * lib/full-write.h: New file.
26783         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
26784         * lib/full-write.c: Correct credits, as cccp.c no longer
26785         exists and anyway it was so heavily changed from the old cccp
26786         code as to be unrecognizable.  Include full-write.h.
26787         (full_write) Return size_t, with short writes meaning failure.
26788         All callers changed.  This fixes a bug with large buffers
26789         on 64-bit hosts.
26790         * lib/utime.c: Include full-write.h.
26791
26792 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26793
26794         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
26795         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
26796         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
26797         Include if available.
26798         (<xalloc.h>): Include
26799         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
26800         (verify): New macro.  Use it to verify that EXCLUDE macros do not
26801         collide with FNM macros.
26802         (struct patopts): New struct.
26803         (struct exclude): Use it, as exclude patterns now come with options.
26804         (new_exclude): Support above changes.
26805         (new_exclude, add_exclude_file):
26806         Initial size must now be a power of two to simplify overflow checking.
26807         (free_exclude, fnmatch_no_wildcards): New function.
26808         (excluded_filename): No longer requires options arg, as the options
26809         are determined by add_exclude.  Now returns bool, not int.
26810         (excluded_filename, add_exclude):
26811         Add support for the fancy new exclusion options.
26812         (add_exclude, add_exclude_file): Now takes int options arg.
26813         Check for arithmetic overflow when computing sizes.
26814         (add_exclude_file): xrealloc might modify errno, so don't
26815         realloc until after errno might be used.
26816
26817         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
26818         New macros.
26819         (free_exclude): New decl.
26820         (add_exclude, add_exclude_file): Now takes int options arg.
26821         (excluded_filename): No longer requires options arg, as the options
26822         are determined by add_exclude.  Now returns bool, not int.
26823
26824 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26825
26826         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
26827
26828 2001-08-27  Jim Meyering  <meyering@lucent.com>
26829
26830         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
26831
26832         * lib/version-etc.c (N_): Remove definition.
26833         Revert most of last change.
26834         Instead, simply don't mark the `Copyright...' string for translation.
26835         Based on advice from Paul Eggert.
26836
26837         * lib/strtoxmax.c: Tweak comment.
26838
26839 2001-08-26  Jim Meyering  <meyering@lucent.com>
26840
26841         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
26842
26843         * m4/xstrtoimax.m4: New file.
26844         * m4/xstrtoumax.m4: Add comments explaining why we
26845         AC_REPLACE_FUNCS(strtol).
26846
26847 2001-08-26  Jim Meyering  <meyering@lucent.com>
26848
26849         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
26850         of copyright with `%s' so translators don't get an untranslated
26851         message in 2002.
26852         (COPYRIGHT_YEAR): Define.
26853         (version_etc): Use fprintf rather than fputs.
26854         Suggestion from Ulrich Drepper.
26855
26856         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
26857
26858         * lib/strtoll.c: New file, from GNU libc.
26859         * lib/xstrtoimax.c: New file.
26860
26861         * lib/xstrtol.h: Add xstrtoimax.
26862         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
26863         * lib/strtoimax.c: New file.  Likewise, but first define
26864         STRTOUXMAX_SIGNED.
26865
26866         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
26867         ...
26868         * lib/strtoxmax.c: ... then renamed to this.
26869
26870 2001-08-18  Paul Eggert  <eggert@twinsun.com>
26871
26872         * m4/inttypes.m4: Add AC_PREREQ(2.13).
26873         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
26874         (jm_AC_TYPE_INTMAX_T): New macro.
26875         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
26876
26877         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
26878
26879         * m4/longlong.m4: Renamed from ulonglong.m4.
26880         * m4/inttypes.m4: Renamed from inttypes_h.m4.
26881         * m4/uintmax_t.m4: Removed.
26882
26883 2001-08-13  Paul Eggert  <eggert@twinsun.com>
26884
26885         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
26886         Port to Solaris 8, where 'sed' requires a space after the 'r'
26887         command, and where sh dislikes "$/".  Clean up the spacing a bit.
26888         Redirect output to $tmp just once.
26889
26890 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
26891
26892         * lib/addext.c (<errno.h>): Include.
26893         (errno): Declare if not defined.
26894         (addext): Work correctly when pathconf returns -1 and leaves
26895         errno alone because there is no limit.  Also, work even if
26896         pathconf returns a value greater than SIZE_MAX.
26897
26898 2001-08-12  Jim Meyering  <meyering@lucent.com>
26899
26900         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
26901         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
26902         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
26903         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
26904         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
26905         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
26906         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
26907         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
26908         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
26909         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
26910         utime.m4, utimes.m4, xstrtoumax.m4:
26911         Quote the first argument in each use of AC_DEFUN.
26912
26913 2001-08-12  Jim Meyering  <meyering@lucent.com>
26914
26915         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
26916         Simply `return getcwd (NULL, 0);'.
26917         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
26918         Use 1300 as initial value for length, not PATH_MAX.
26919
26920         * lib/pathmax.h: Clean up cpp syntax.
26921
26922 2001-08-12  Jim Meyering  <meyering@lucent.com>
26923
26924         * lib/gettimeofday.c: New file.
26925         * lib/gtod.h: New file.
26926         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
26927
26928 2001-08-05  Jim Meyering  <meyering@lucent.com>
26929
26930         * m4/jm-macros.m4: Require autoconf-2.52.
26931
26932 2001-08-04  Jim Meyering  <meyering@lucent.com>
26933
26934         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
26935         stmt, to get in sync with glibc.
26936
26937 2001-08-03  Paul Eggert  <eggert@twinsun.com>
26938
26939         The following changes are from gettext 0.10.39 as maintained by
26940         Bruno Haible.
26941
26942         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
26943         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
26944         with inverted sense.  All uses changed.
26945
26946         * lib/mbswidth.c: Don't include <limits.h>.
26947         Include <stdlib.h> and <string.h> unconditionally.
26948         (iswcntrl, mbsinit, ISCNTRL): New macros.
26949         (mbsnwidth): Use K&R style function declarations.
26950         Don't bother checking for MB_LEN_MAX == 1, since the compiler
26951         can optimize it when MB_CUR_MAX == 1.
26952         The width of control characters is zero, not 1.
26953
26954 2001-08-03  Paul Eggert  <eggert@twinsun.com>
26955
26956         The following changes are from gettext 0.10.39 as maintained by
26957         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
26958
26959         * m4/codeset.m4: Upgrade to serial AM1.
26960         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
26961         all uses changed.  Quote first arg of AC_DEFUN.
26962         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
26963
26964         * m4/iconv.m4: Upgrade to serial AM2.
26965         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
26966         Add --with-libconv-prefix.
26967         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
26968         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
26969         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
26970         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
26971         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
26972
26973         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
26974         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
26975         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
26976         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
26977         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
26978         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
26979         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
26980         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
26981         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
26982
26983         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
26984         string.h any more.
26985
26986         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
26987         not the default value.
26988
26989         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
26990         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
26991         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
26992         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
26993         Also check for iswcntrl, used for wcwidth fallback.
26994         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
26995         to Autoconf 2.13.
26996
26997 2001-08-03  Jim Meyering  <meyering@lucent.com>
26998
26999         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
27000         as it was in the original.  Reported by Paul Eggert.
27001
27002 2001-07-16  Jim Meyering  <meyering@lucent.com>
27003
27004         * m4/gettimeofday.m4: New file.
27005         Prompted by a report from Bernhard Baehr.
27006
27007 2001-07-15  Jim Meyering  <meyering@lucent.com>
27008
27009         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
27010         stuff. Now it's in ../Makefile.cfg.
27011
27012 2001-07-15  Jim Meyering  <meyering@lucent.com>
27013
27014         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
27015         (BUILT_SOURCES): Add unlocked-io.h.
27016         (io_functions): Define.
27017         (unlocked-io.h): New rule.
27018         (DISTCLEANFILES): Add unlocked-io.h.
27019         (all-local): Depend on unlocked-io.h, to ensure it is created.
27020
27021         * lib/unlocked-io.hin: New file
27022
27023         * lib/regex.c: Update from glibc.
27024
27025 2001-07-05  Jim Meyering  <meyering@lucent.com>
27026
27027         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
27028         recommendation.
27029         (libfetish_a_SOURCES): Put all .h files here instead.
27030         Remove a thus-exposed (better checks in automake) duplicate and
27031         two unnecessary .h files.
27032
27033 2001-07-04  Jim Meyering  <meyering@lucent.com>
27034
27035         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
27036         that generates jm-glibc-io.m4 so that it doesn't trigger any make
27037         distcheck failure.
27038
27039 2001-07-02  Jim Meyering  <meyering@lucent.com>
27040
27041         The following changes were prompted by suggestions from Bruno Haible.
27042
27043         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
27044         is now generated.
27045         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
27046         definition of EXTRA_DIST.
27047         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
27048         ensure that the generated file is created/updated whenever the list
27049         of $(unlocked_functions) is changed.
27050         (jm-glibc-io.m4): New rule.
27051         (unlocked-io.h): New rule -- currently unused.
27052
27053 2001-06-24  Jim Meyering  <meyering@lucent.com>
27054
27055         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
27056         unmatched right bracket, rather than kludging it with an extra,
27057         falsely-matching quote in a comment.  Patch by Akim Demaille.
27058
27059 2001-06-11  Jim Meyering  <meyering@lucent.com>
27060
27061         * lib/regex.c: Update from GNU libc.
27062
27063 2001-05-27  Jim Meyering  <meyering@lucent.com>
27064
27065         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
27066         Check for ut_type in struct utmp.
27067
27068 2001-05-27  Jim Meyering  <meyering@lucent.com>
27069
27070         * lib/readutmp.h (UT_TYPE): Define.
27071
27072 2001-05-24  Jim Meyering  <meyering@lucent.com>
27073
27074         * lib/argmatch.c: Include "quote.h".
27075         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
27076         quote function.  Reported by Göran Uddeborg.
27077
27078 2001-05-22  Jim Meyering  <meyering@lucent.com>
27079
27080         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
27081         now that we use the package-supplied version unconditionally.
27082         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
27083
27084 2001-05-21  Jim Meyering  <meyering@lucent.com>
27085
27086         * m4/regex.m4: Change a couple backticks to single quotes to avoid
27087         shell syntax errors.
27088
27089 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
27090
27091         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
27092
27093 2001-05-20  Paul Eggert  <eggert@twinsun.com>
27094
27095         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
27096         Don't bother to check library strftime, since
27097         we'll be using our own my_strftime function anyway.
27098         Define my_strftime instead of strftime.
27099
27100 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
27101
27102         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
27103         which is not yet declared.
27104
27105 2001-05-15  Jim Meyering  <meyering@lucent.com>
27106
27107         * m4/regex.m4: Use proper quoting so brackets appear in the test
27108         program.
27109         Reported by, and with help from, Bruno Haible.
27110
27111 2001-05-13  Jim Meyering  <meyering@lucent.com>
27112
27113         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
27114         undefined.
27115
27116 2001-05-11  Paul Eggert  <eggert@twinsun.com>
27117
27118         dirname code cleanup.  base_name now behaves more compatibly
27119         with POSIX basename when given file names that have trailing
27120         slashes, and similarly for dir_name.  Add new primitives
27121         base_len and dir_len.  Put the directory-name-related decls
27122         into dirname.h.
27123
27124         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
27125         * lib/backupfile.c (base_name): Likewise.
27126         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
27127         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
27128         * lib/makepath.c (strip_trailing_slashes): Likewise.
27129         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
27130         ISSLASH): Likewise.
27131         * lib/rename.c (strip_trailing_slashes): Likewise.
27132         * lib/same.c (base_name): Likewise.
27133         * lib/stripslash.c (ISSLASH): Likewise.
27134
27135         * lib/addext.c: Include <dirname.h> after size_t is defined.
27136         * lib/backupfile.c: Likewise.
27137
27138         * lib/addext.c (addext): Use base_len to trim redundant
27139         trailing slashes instead of doing it ourselves.
27140         But do not trim the last slash if it is not redundant.
27141
27142         * lib/backupfile.c (find_backup_file_name,
27143         max_backup_version): Use base_len instead of rolling it ourselves.
27144         Handle the case of "" and (on DOS) "C:" correctly.
27145
27146         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
27147         needed. Include <string.h>, <dirname.h>.
27148         (base_name): Allow file names ending in slashes, other than names
27149         that are all slashes.  In this case, return the basename followed
27150         by the slashes.  This is more general, and can be used in places
27151         where the original base_name purposely had an assertion failure.
27152         (base_len): New function.
27153
27154         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
27155         Do not include <assert.h>; no longer needed.
27156         Include xalloc.h.
27157         (memrchr): Remove decl.
27158         (dir_name_r): Remove.
27159         (dir_len): Renamed from dirlen.  All callers changed.
27160         Rewrite in terms of base_name, for simplicity and consistency.
27161         (dir_name): Never return NULL.  All callers changed.
27162         Do not include <stdlib.h> in test program; no longer needed.
27163         return 0; is fine for test program.
27164
27165         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
27166         New macros.
27167         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
27168
27169         * lib/path-concat.c (path_concat): Use base_len to compute
27170         base length, not strlen; this means we cannot rely on memcpy
27171         to null-terminate.
27172
27173         * lib/same.c (STREQ): Remove.
27174         (same_name): Handle the case where the basename ends in trailing '/'.
27175
27176         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
27177         a slash was stripped.  Do not strip the last slash after a
27178         file system prefix.
27179
27180 2001-05-11  Paul Eggert  <eggert@twinsun.com>
27181
27182         * lib/Makefile.am (libfetish_a_SOURCES):
27183         Add strftime.c, since we now compile it on all hosts.
27184
27185         * lib/strftime.c (my_strftime):
27186         Define to nstrftime if emacs, but only if my_strftime is not defined.
27187         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
27188         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
27189         Add one more extra argument: a nanoseconds value.
27190         All uses changed.
27191         (ns): New macro.
27192         (my_strftime function): Add %N format.
27193         (emacs_strftimeu): Renamed from emacs_strftime,
27194         with extra ut argument.
27195
27196 2001-05-09  Paul Eggert  <eggert@twinsun.com>
27197
27198         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
27199
27200 2001-04-21  Jim Meyering  <meyering@lucent.com>
27201
27202         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
27203         doesn't interfere.
27204
27205 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
27206
27207         * m4/ftruncate.m4: Check for chsize.
27208         Link with ftruncate.o unconditionally if ftruncate is missing.
27209         This was required when cross-compiling to i586-mingw32msvc.
27210
27211 2001-04-08  Jim Meyering  <meyering@lucent.com>
27212
27213         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
27214         recomputed; that's necessary when the offset spans a DST transition.
27215         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
27216
27217 2001-04-02  Jim Meyering  <meyering@lucent.com>
27218
27219         * lib/regex.h, regex.c: Update from GNU libc.
27220
27221 2001-03-24  Jim Meyering  <meyering@lucent.com>
27222
27223         * m4/jm-macros.m4: Require autoconf-2.49d.
27224
27225 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
27226
27227         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
27228
27229 2001-03-19  Paul Eggert  <eggert@twinsun.com>
27230
27231         * lib/version-etc.c (version_etc_copyright): Update to 2001.
27232
27233 2001-03-17  Jim Meyering  <meyering@lucent.com>
27234
27235         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
27236         now that the version in autoconf is equivalent.
27237         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
27238
27239         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
27240         Suggestion from Akim Demaille.
27241
27242         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
27243         (jm_PREREQ_TEMPNAME): New function.
27244
27245 2001-03-16  Paul Eggert  <eggert@twinsun.com>
27246
27247         * lib/tempname.c (uint64_t): Define to uintmax_t if
27248         not defined, and if UINT64_MAX is not defined.
27249         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
27250         Reported by John David Anglin.
27251
27252 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
27253
27254         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
27255         resolve alias if codeset is empty.
27256         * lib/config.charset (BeOS): Use wildcard syntax.
27257
27258 2001-03-13  Jim Meyering  <meyering@lucent.com>
27259
27260         * lib/path-concat.c (path_concat)
27261         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
27262         concatenating e.g., `C:' and `foo'.
27263         From Bruno Haible.
27264
27265 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
27266
27267         * lib/localcharset.c (locale_charset): Don't use
27268         setlocale(LC_CTYPE,NULL). Don't return NULL.
27269         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
27270
27271 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
27272
27273         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
27274         support for DOS/DJGPP.
27275
27276 2001-03-01  Paul Eggert  <eggert@twinsun.com>
27277
27278         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
27279         lacks mkstemp.  Compile our own tempname.c if we compile our own
27280         mkstemp.c, as mkstemp relies on tempname.
27281
27282 2001-03-01  Jim Meyering  <meyering@lucent.com>
27283
27284         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
27285         AH_VERBATIM really does output its argument verbatim.
27286
27287 2001-02-28  Paul Eggert  <eggert@twinsun.com>
27288
27289         * lib/Makefile.am (libfetish_a_SOURCES):
27290         Add dup-safer.c, fopen-safer.c.
27291         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
27292
27293         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
27294         * lib/unistd-safer.h: New files.
27295
27296 2001-02-25  Paul Eggert  <eggert@twinsun.com>
27297
27298         The mkstemp replacement is taken from glibc 2.2.2, with some
27299         portability fixes for use outside glibc, as follows:
27300
27301         * lib/tempname.c (struct_stat64): New macro.
27302         (direxists, __gen_tempname): Use it.
27303         This avoids a portability problem with Solaris 8.
27304
27305         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
27306         (<stddef.h>, <stdint.h>, <string.h>):
27307         Include only if STDC_HEADERS || _LIBC.
27308         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
27309         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
27310         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
27311         (__set_errno): Define this macro if <errno.h> doesn't.
27312         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
27313         Define these macros if <stdio.h> doesn't.
27314         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
27315         Define these macros if <sys/stat.h>
27316         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
27317         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
27318         __xstat64): Define if not _LIBC.
27319         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
27320         (__gen_tempname): Invoke gettimeofday only if
27321         HAVE_GETTIMEOFDAY || _LIBC;
27322         otherwise, fall back on plain "time".
27323         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
27324
27325         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
27326
27327         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
27328
27329 2001-02-18  Paul Eggert  <eggert@twinsun.com>
27330
27331         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
27332
27333 2001-02-17  Paul Eggert  <eggert@twinsun.com>
27334
27335         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
27336         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
27337         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
27338         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
27339
27340 2001-02-17  Paul Eggert  <eggert@twinsun.com>
27341
27342         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
27343         Remove workaround macros for hosts that have mbrtowc but not
27344         mbstate_t, as we now insist on proper declarations for both
27345         before using mbrtowc.
27346
27347 2001-02-17  Jim Meyering  <meyering@lucent.com>
27348
27349         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
27350         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
27351         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
27352         UnixWare 7.1.1.
27353
27354         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
27355         rather than AC_CACHE_VAL.
27356
27357 2001-02-17  Jim Meyering  <meyering@lucent.com>
27358
27359         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
27360         around included file name.
27361
27362         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
27363
27364         * lib/strftime.c: Update from GNU libc (the only changes were to
27365         comments).
27366
27367 2001-02-17  Jim Meyering  <meyering@lucent.com>
27368
27369         * lib/regex.c: Update from libc.
27370
27371 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
27372
27373         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
27374         clash.
27375
27376 2001-02-16  Paul Eggert  <eggert@twinsun.com>
27377
27378         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
27379         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
27380         Reported by Mark Hounschell via Paul Eggert.
27381
27382 2001-02-07  Jim Meyering  <meyering@lucent.com>
27383
27384         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
27385
27386 2001-02-05  Jim Meyering  <meyering@lucent.com>
27387
27388         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
27389         it includes the patch required for `large file' support with at least
27390         HP-UX's 10.20 /bin/cc.
27391
27392 2001-02-03  Jim Meyering  <meyering@lucent.com>
27393
27394         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
27395         AS_IF, now that it works once again (mysteriously).
27396         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
27397
27398 2001-01-30  Jim Meyering  <meyering@lucent.com>
27399
27400         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
27401         * m4/chown.m4: Rename conftestchown to conftest.chown.
27402         * m4/rename.m4: s/conftestdir/conftest.d1/ and
27403         s/conftestdir2/conftest.d2/.
27404         * m4/utimes.m4: s/conftestdata/conftest.data/
27405         Inspired by Pavel Roskin's change in autoconf.
27406
27407 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
27408
27409         * lib/config.charset: Update for FreeBSD 4.2.
27410
27411 2001-01-27  Jim Meyering  <meyering@lucent.com>
27412
27413         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
27414         a use of AS_IF.
27415         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
27416
27417 2001-01-26  Jim Meyering  <meyering@lucent.com>
27418
27419         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
27420         quotearg.c includes it.
27421
27422 2001-01-26  Jim Meyering  <meyering@lucent.com>
27423
27424         * lib/quotearg.c: Include stddef.h.
27425         * lib/quote.c: Include stddef.h.
27426         Reported by Axel Kittenberger.
27427
27428         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
27429         line in double quotes so that it evokes a better diagnostic.
27430         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
27431         Reported by Axel Kittenberger.
27432
27433 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
27434
27435         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
27436         as if it was a `charset'.
27437
27438 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
27439
27440         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
27441         has const.
27442
27443 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
27444
27445         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
27446         to avoid a warning.  Add back 'const' to inptr.
27447
27448 2001-01-20  Jim Meyering  <meyering@lucent.com>
27449
27450         Be sure that headers are checked before used in code compiled
27451         for the type checks.
27452         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
27453         In place of that, invoke jm_CHECK_ALL_TYPES.
27454         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
27455         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
27456         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
27457         The check for ssize_t was mistakenly run before the test for unistd.h.
27458
27459         The configure-time check for stdbool.h was missing.
27460         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
27461         (jm_PREREQ_HASH): New function.
27462
27463 2001-01-17  Jim Meyering  <meyering@lucent.com>
27464
27465         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
27466         for autoconf-2.49c.
27467         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
27468
27469 2001-01-16  Jim Meyering  <meyering@lucent.com>
27470
27471         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
27472         From Bruno Haible.
27473
27474 2001-01-14  Jim Meyering  <meyering@lucent.com>
27475
27476         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
27477         foo and bar.  Create conftestdir/ in the script, not in the C code.
27478         Remove directories in the script, not in the C code.
27479         Remove conftestdir{,2} before trying to create the directory.
27480         Make the entire configure script fail if the mkdir fails.
27481
27482 2001-01-14  Jim Meyering  <meyering@lucent.com>
27483
27484         * lib/rename.c: New file.  From Volker Borchert.
27485         Include stdlib.h, string.h or strings.h, and xalloc.h.
27486         Use strip_trailing_slashes rather than open-coding it.
27487
27488 2001-01-03  Paul Eggert  <eggert@twinsun.com>
27489
27490         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
27491
27492 2001-01-03  Jim Meyering  <meyering@lucent.com>
27493
27494         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
27495         of local `inptr' to avoid warning with some system declarations of
27496         iconv.
27497
27498 2001-01-02  Volker Borchert  <bt@teknon.de>
27499
27500         * m4/rename.m4: New file.
27501         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
27502
27503 2001-01-01  Jim Meyering  <meyering@lucent.com>
27504
27505         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
27506         even on systems with utmpx.h.  It's necessary for the declaration of
27507         utmp's ut_user member.  Reported by Andreas Jaeger.
27508
27509         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
27510         available. They are required for the declarations of getgrgid and
27511         getpwuid resp.
27512         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
27513         Reported by Andreas Jaeger.
27514
27515 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
27516
27517         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
27518         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
27519         so `make install' also works in VPATH builds.
27520
27521 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
27522
27523         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
27524         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
27525         can be used in subdirectories.
27526
27527 2000-12-29  Paul Eggert  <eggert@twinsun.com>
27528
27529         * lib/modechange.c: Do not assume that mode_t uses the
27530         traditional octal encoding.  E.g. "chmod 1 FOO" should set
27531         the other-execute bit of FOO even if S_IXOTH != 1.
27532
27533         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
27534         WOTH, XOTH, ALLM): New macros.
27535         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
27536          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
27537         Use them.
27538         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
27539         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
27540         (mode_compile):
27541         No need to use uintmax_t; unsigned long is long enough.
27542         Don't bother to get suffix since we don't use it.
27543
27544 2000-12-26  Jim Meyering  <meyering@lucent.com>
27545
27546         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
27547         better with autoheader.
27548
27549 2000-12-24  Jim Meyering  <meyering@lucent.com>
27550
27551         * lib/hash.c (is_prime): Return explicit boolean values.
27552         (hash_get_first): Return NULL to appease Irix5.6's 89.
27553         Reported by Nelson Beebe.
27554
27555 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
27556
27557         * lib/localcharset.c (locale_charset): Add support for Win32.
27558
27559 2000-12-18  Paul Eggert  <eggert@twinsun.com>
27560
27561         * lib/physmem.h, lib/physmem.c: New files.
27562
27563         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
27564         (noinst_HEADERS): Add physmem.h.
27565
27566         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
27567         't' for compatibility with Solaris 8 sort.
27568
27569 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
27570
27571         * lib/config.charset: Add support for BeOS.
27572
27573 2000-12-17  Jim Meyering  <meyering@lucent.com>
27574
27575         * m4/dos.m4 (jm_AC_DOS): New file and macro.
27576         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
27577
27578 2000-12-16  Jim Meyering  <meyering@lucent.com>
27579
27580         This bug had a serious impact on chown: `chown N:M FILE' (for integer
27581         N and M) would have treated it like `chown N:N FILE'.
27582
27583         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
27584
27585 2000-12-16  Jim Meyering  <meyering@lucent.com>
27586
27587         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
27588         SHELLS_FILE to a file name that's useful on djgpp systems.
27589         Include stdlib.h.
27590         (ADDITIONAL_DEFAULT_SHELLS): Define.
27591         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
27592         Based mostly on a patch from Prashant TR.
27593
27594 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
27595
27596         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
27597         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
27598         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
27599
27600 2000-12-08  Andreas Schwab  <schwab@suse.de>
27601
27602         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
27603         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
27604
27605 2000-12-07  Jim Meyering  <meyering@lucent.com>
27606
27607         * lib/stripslash.c (ISSLASH): Define.
27608         (strip_trailing_slashes): Use ISSLASH rather than comparing against
27609         `/'.
27610         From Prashant TR.
27611
27612         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
27613         (dir_name_r): Declare this function as static.
27614         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
27615         manifest itself on a name containing a mix of slashes and
27616         backslashes.
27617         Make this function work with names starting with a DOS-style
27618         drive letter and colon prefix.
27619         (dir_name): Append `.' if necessary.
27620         Based mostly on patches from Prashant TR and Eli Zaretskii.
27621
27622         * lib/dirname.h (dir_name_r): Remove prototype.
27623
27624 2000-12-06  Paul Eggert  <eggert@twinsun.com>
27625
27626         * m4/off_t-format.m4: Remove this file.
27627         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
27628
27629 2000-12-06  Jim Meyering  <meyering@lucent.com>
27630
27631         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
27632         replacement strtoull, we may well need the replacement strtoul, too.
27633         Check for declarations of strtoul and strtoull.
27634         Check for strtol.  Mainly as a cue to cause automake to include
27635         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
27636         Check for limits.h -- strtol.c needs it.
27637
27638 2000-12-05  Jim Meyering  <meyering@lucent.com>
27639
27640         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
27641
27642 2000-12-04  Jim Meyering  <meyering@lucent.com>
27643
27644         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
27645         Also include memory.h, stdlib.h, unistd.h if appropriate.
27646         Reported by Andreas Jaeger (conflicting declaration of malloc).
27647
27648 2000-12-02  Jim Meyering  <meyering@lucent.com>
27649
27650         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
27651         * m4/jm-macros.m4 (jm_MACROS): require it.
27652
27653 2000-12-02  Jim Meyering  <meyering@lucent.com>
27654
27655         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
27656
27657 2000-12-01  Paul Eggert  <eggert@twinsun.com>
27658
27659         * lib/memrchr.c: Include <config.h> before any system include file.
27660
27661 2000-11-30  Jim Meyering  <meyering@lucent.com>
27662
27663         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
27664
27665 2000-11-30  Jim Meyering  <meyering@lucent.com>
27666
27667         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
27668
27669 2000-11-29  Paul Eggert  <eggert@twinsun.com>
27670
27671         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
27672
27673 2000-11-26  Jim Meyering  <meyering@lucent.com>
27674
27675         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
27676
27677 2000-11-22  Paul Eggert  <eggert@twinsun.com>
27678
27679         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
27680         size of (size_t) -1; it's not portable.
27681
27682 2000-11-17  Jim Meyering  <meyering@lucent.com>
27683
27684         * lib/strstr.c: Update from GNU libc.
27685
27686 2000-11-17  Akim Demaille  <akim@epita.fr>
27687
27688         * lib/obstack.h: Formatting changes.
27689         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
27690         prevent type checking.
27691         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
27692         cast the value to (void *): assigning a `foo *' to a `void *'
27693         variable is valid.
27694         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
27695
27696 2000-11-16  Jim Meyering  <meyering@lucent.com>
27697
27698         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
27699
27700 2000-11-11  Jim Meyering  <meyering@lucent.com>
27701
27702         * lib/error.c: Add a couple #includes, merging from GNU libc version.
27703
27704 2000-11-10  Jim Meyering  <meyering@lucent.com>
27705
27706         * lib/obstack.h: Update from GNU libc.
27707         * lib/obstack.c: Likewise.
27708
27709 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
27710
27711         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
27712
27713 2000-11-06  Paul Eggert  <eggert@twinsun.com>
27714
27715         * lib/getusershell.c (setusershell): Use rewind rather than
27716         fseek/fseeko, to avoid configuration hassles with fseeko.
27717         Don't bother opening SHELLS_FILE if shellstream is NULL;
27718         it's not necessary.
27719
27720 2000-11-05  Jim Meyering  <meyering@lucent.com>
27721
27722         * lib/makepath.h (make_dir): Declare.
27723         * lib/makepath.c (make_dir): Remove `static' attribute.
27724         Tweak a comment.
27725
27726 2000-11-04  Jim Meyering  <meyering@lucent.com>
27727
27728         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
27729
27730 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
27731
27732         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
27733         last one in a bucket, advance to the next bucket.
27734
27735 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
27736
27737         * lib/fnmatch.c: Do not comment out all the code if we are using
27738         the GNU C library, because in some cases we are replacing buggy
27739         code in the GNU C library itself.
27740
27741 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
27742
27743         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
27744         (regex_compile): Catch bogus \(\1\).
27745
27746 2000-10-30  Paul Eggert  <eggert@twinsun.com>
27747
27748         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
27749         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
27750         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
27751
27752 2000-10-30  Paul Eggert  <eggert@twinsun.com>
27753
27754         * lib/error.h, getline.h, modechange.h:
27755         Remove "2000" from Copyright line, as the file hasn't been
27756         changed this year other than in the copyright notice.
27757
27758         * lib/xalloc.h: Add "2000" to Copyright line, as this file
27759         was changed this year.
27760
27761 2000-10-29  Jim Meyering  <meyering@lucent.com>
27762
27763         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
27764         renaming.
27765         * m4/ls-mntd-fs.m4: Likewise
27766
27767 2000-10-29  Jim Meyering  <meyering@lucent.com>
27768
27769         * lib/xstat.in: Fix grammar in comment.
27770
27771 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
27772
27773         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
27774         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
27775         doesn't define __restrict_arr.
27776
27777 2000-10-28  Jim Meyering  <meyering@lucent.com>
27778
27779         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
27780         (jm_PREREQ_MEMCHR): New function.
27781
27782 2000-10-28  Jim Meyering  <meyering@lucent.com>
27783
27784         * lib/memchr.c: Update from libc.
27785         Adjust for portability:
27786         [HAVE_STDLIB_H]: Include stdlib.h.
27787         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
27788         Undef __memchr, too.
27789         [!weak_alias]: Define __memchr to memchr.
27790
27791         * lib/regex.c: Update from libc.
27792         * lib/regex.h: Likewise.
27793         * lib/getopt1.c: Likewise.
27794         * lib/memcmp.c: Likewise.
27795
27796         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
27797         Avoid using fseek, when possible -- it's broken by design.
27798         Patch by Ulrich Drepper.
27799
27800 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
27801
27802         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
27803         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
27804         Giving in to popular pressure to shut up the compiler with casts.
27805
27806 2000-10-26  Jim Meyering  <meyering@lucent.com>
27807
27808         * lib/strftime.c: Update from libc.
27809
27810 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
27811
27812         * regex.c: More `unsigned char' -> `re_char' changes.
27813         Also change several `int' into `re_wchar_t'.
27814         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
27815         (PUSH_FAILURE_POINTER): Don't cast any more.
27816         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
27817         We want GCC to complain, since this piece of code makes
27818         re_match non-reentrant, which *should* be fixed.
27819         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
27820         (EXTEND_BUFFER): Use RETALLOC.
27821         (SET_LIST_BIT): Don't cast.
27822         (re_wchar_t): New type.
27823         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
27824         that those two functions will always properly return.
27825         (IMMEDIATE_QUIT_CHECK): Cast to void.
27826         (analyse_first): Use recursion rather than an explicit stack.
27827         (re_compile_fastmap): Can't fail anymore.
27828         (re_search_2): Don't check re_compile_fastmap for failure.
27829         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
27830         Now also sets the new value (passed in a new argument).
27831         (re_match_2_internal): Use it.
27832         Also, use a new var `reg' of type size_t when looping through regs
27833         rather than reuse the inappropriate `mcnt'.
27834
27835 2000-10-25  Jim Meyering  <meyering@lucent.com>
27836
27837         * lib/obstack.c: Update from libc.
27838
27839 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
27840
27841         * regex.c (regex_compile): Change the way of handling a range from
27842         a char less than 256 to a char not less than 256.
27843
27844 2000-10-24  Andrew Innes  <andrewi@gnu.org>
27845
27846         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
27847         NT-Emacs only.
27848         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
27849         so that re_search functions only quit when callers expect them to.
27850
27851 2000-10-23  Jim Meyering  <meyering@lucent.com>
27852
27853         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
27854         wrong.  That set_locale call must not have any side effects.
27855         From Paul Eggert.
27856
27857 2000-10-22  Jim Meyering  <meyering@lucent.com>
27858
27859         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
27860         [CYCLIC]: Remove now-unused definition.
27861
27862         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
27863         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
27864         Suggestion from Ulrich Drepper.
27865
27866 2000-10-21  Jim Meyering  <meyering@lucent.com>
27867
27868         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
27869         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
27870         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
27871
27872 2000-10-21  Jim Meyering  <meyering@lucent.com>
27873
27874         * lib/dirname.c (memrchr): Declare if necessary.
27875         (dir_name): Remove the restriction that there be no
27876         trailing slashes.  Now, this code skips past them, effectively
27877         ignoring them.
27878         [TEST_DIRNAME] (main): New unit tests.
27879
27880         * lib/memrchr.c: New file from GNU libc.
27881         Undef __memrchr, too.
27882         [!weak_alias]: Define __memrchr to memrchr.
27883         Guard weak_alias use with `#ifdef weak_alias'.
27884
27885 2000-10-21  Jim Meyering  <meyering@lucent.com>
27886
27887         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
27888         (dir_name): Use dir_name_r.
27889         * lib/dirname.h (dir_name_r): Declare it.
27890
27891 2000-10-17  Jim Meyering  <meyering@lucent.com>
27892
27893         * lib/quote.h (PARAMS): Define and use.
27894         Reported by Akim Demaille.
27895
27896         * lib/getopt.c: Update from libc.
27897
27898 2000-10-16  Jim Meyering  <meyering@lucent.com>
27899
27900         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
27901         setlocale.
27902         From Jan Fedak.
27903
27904 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
27905
27906         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
27907
27908 2000-09-25  Jim Meyering  <meyering@lucent.com>
27909
27910         * lib/md5.h (rol): Define (from GnuPG).
27911
27912         * lib/sha.c: Give credit (GnuPG) where due.
27913         (M): Use rol rather than open-coding it.
27914         Add a FIXME comment.
27915
27916 2000-09-21  Jim Meyering  <meyering@lucent.com>
27917
27918         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
27919         Reported by Michael Stone.
27920
27921 2000-09-20  Jim Meyering  <meyering@lucent.com>
27922
27923         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
27924         (noinst_HEADERS): Add sha.h.
27925         Based on code from Scott G. Miller and from GnuPG.
27926
27927 2000-09-18  Jim Meyering  <meyering@lucent.com>
27928
27929         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
27930         LIBS. Otherwise, everyone ends up linking with -lelf for some
27931         configurations.
27932         Reported by Mike Stone.
27933
27934 2000-09-15  Jim Meyering  <meyering@lucent.com>
27935
27936         * lib/regex.c: Update from libc.
27937
27938 2000-09-10  Jim Meyering  <meyering@lucent.com>
27939
27940         * lib/getopt.c (_getopt_internal): Update from glibc.
27941
27942 2000-09-09  Jim Meyering  <meyering@lucent.com>
27943
27944         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
27945         think it should be used as a general replacement for isascii.
27946         * lib/fnmatch.c: Likewise.
27947         * lib/mbswidth.c: Likewise
27948         * lib/regex.c: Likewise.
27949
27950         Don't use atoi.
27951         * lib/userspec.c: Include sys/param.h and limits.h.
27952         Include xstrtol.h.
27953         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
27954         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
27955         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
27956         UID, GID.  Check range.
27957
27958 2000-09-06  Jim Meyering  <meyering@lucent.com>
27959
27960         * lib/getopt.c (_getopt_internal): Update from glibc.
27961
27962 2000-08-30  Jim Meyering  <meyering@lucent.com>
27963
27964         * lib/strftime.c: Merge in changes from GNU libc.
27965
27966 2000-08-26  Jim Meyering  <meyering@lucent.com>
27967
27968         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
27969         * m4/fpending.m4: New file.
27970
27971 2000-08-26  Jim Meyering  <meyering@lucent.com>
27972
27973         * lib/closeout.c: Include "__fpending.h".
27974         (close_stdout_status): Return right away if there's nothing to flush.
27975
27976         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
27977         * lib/__fpending.c: New file.
27978         * lib/__fpending.h: New file.
27979
27980 2000-08-20  Jim Meyering  <meyering@lucent.com>
27981
27982         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
27983         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
27984         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
27985
27986 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
27987
27988         Improve fileutils installation on systems where running
27989         programs (like install) can't be unlinked.
27990         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
27991         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
27992
27993 2000-08-07  Paul Eggert  <eggert@twinsun.com>
27994
27995         Standardize on "memory exhausted" instead of "Memory exhausted"
27996         or "virtual memory exhausted".
27997         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
27998         "virtual memory exhausted".
27999         * lib/same.c (same_name): Invoke xalloc_die instead of printing
28000         our own message.
28001         * lib/userspec.c (parse_user_spec): Likewise.
28002         * lib/bumpalloc.h: comment fix
28003         * lib/same.c, userspec.c: Include xalloc.h.
28004
28005         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
28006         not char *const and pointing to a constant array.
28007         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
28008         (xrealloc): Comment fix.
28009
28010         * lib/userspec.c (parse_user_spec):
28011         Don't translate a message until just before returning,
28012         to avoid unnecessary translation.
28013
28014 2000-08-07  Jim Meyering  <meyering@lucent.com>
28015
28016         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
28017         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
28018         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
28019         getgroups.c, gethostname.c, getopt.h, group-member.c,
28020         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
28021         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
28022         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
28023         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
28024         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
28025         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
28026         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
28027         yesno.c: Back out Copyright date changes for each file with no change
28028         this year.  This eases coordination with other programs using the same
28029         source code modules.  From Paul Eggert.
28030
28031 2000-08-06  Paul Eggert  <eggert@twinsun.com>
28032
28033         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
28034         not char, for compatibility with glibc 2.1.3 strftime.c.
28035
28036 2000-08-03  Greg McGary  <greg@mcgary.org>
28037
28038         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
28039         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
28040         (EXTEND_BUFFER): Use them.
28041
28042 2000-08-01  Jim Meyering  <meyering@lucent.com>
28043
28044         * lib/dirname.c (ISSLASH): Define.
28045         (BACKSLASH_IS_PATH_SEPARATOR): Define.
28046         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
28047         both `\' and `/' may be use as path separators.
28048         Based on a patch from Prashant TR.
28049
28050 2000-07-31  Paul Eggert  <eggert@twinsun.com>
28051
28052         * lib/quotearg.c (quotearg_n_options): Don't make the initial
28053         slot vector a constant, since it might get modified.
28054
28055 2000-07-31  Jim Meyering  <meyering@lucent.com>
28056
28057         * lib/xmalloc.c: Use `virtual memory exhausted', not
28058         `Memory exhausted'.
28059         * lib/obstack.c (print_and_abort): Likewise.
28060
28061 2000-07-30  Paul Eggert  <eggert@twinsun.com>
28062
28063         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
28064         buffer, so that the caller can always quote one small
28065         component of a "memory exhausted" message in slot 0.
28066         From a suggestion by Jim Meyering.
28067
28068 2000-07-30  Jim Meyering  <meyering@lucent.com>
28069
28070         * lib/makepath.c (make_path): Quote the other instance, too.
28071
28072         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
28073         (STATIC_BUF_SIZE): Define.
28074         (quotearg_n_options): Use only statically allocated storage when
28075         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
28076         than STATIC_BUF_SIZE.
28077
28078 2000-07-29  Jim Meyering  <meyering@lucent.com>
28079
28080         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
28081         * lib/dirname.c (dir_name): Likewise.
28082
28083         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
28084         `/'.
28085
28086         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
28087         (dir_name): Assert that there are no trailing slashes.
28088
28089 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
28090
28091         * lib/mbswidth.h (mbswidth): Add a flags argument.
28092         (mbswidth): New declaration.
28093         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
28094         * lib/mbswidth.c (mbswidth): Add a flags argument.
28095         (mbsnwidth): New function.
28096
28097 2000-07-24  Jim Meyering  <meyering@lucent.com>
28098
28099         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
28100
28101 2000-07-23  Paul Eggert  <eggert@twinsun.com>
28102
28103         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
28104
28105 2000-07-23  Paul Eggert  <eggert@twinsun.com>
28106
28107         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
28108         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
28109         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
28110         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
28111         invoke multibyte primitives.
28112
28113 2000-07-23  Paul Eggert  <eggert@twinsun.com>
28114
28115         * lib/quotearg.c:
28116         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
28117         so that mbstate_t is always defined.
28118
28119         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
28120         be 1 in at least one GCC installation, and this configuration
28121         error is likely to be common.  Ignoring MB_LEN_MAX hurts
28122         performance on hosts that have mbrtowc but have only unibyte
28123         locales, but I assume these hosts are rare.
28124
28125 2000-07-23  Paul Eggert  <eggert@twinsun.com>
28126
28127         * lib/mbswidth.c (_XOPEN_SOURCE):
28128         Don't define; this causes problems on Solaris 7.
28129         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
28130
28131 2000-07-23  Jim Meyering  <meyering@lucent.com>
28132
28133         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
28134         too: getgrgid, getpwuid, getuid.
28135
28136 2000-07-23  Jim Meyering  <meyering@lucent.com>
28137
28138         * lib/basename.c (base_name): Add an assertion.
28139
28140 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
28141
28142         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
28143         shadow its mbsinit function.
28144
28145 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
28146
28147         * lib/mbswidth.h: New file.
28148         * lib/mbswidth.c: New file.
28149         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
28150         (noinst_HEADERS): Add mbswidth.h.
28151
28152 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
28153
28154         * lib/config.charset: Add support for FreeBSD. Improve support for
28155         HP-UX and IRIX 6.
28156
28157 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
28158
28159         * m4/mbswidth.m4: New file.
28160         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
28161
28162 2000-07-15  Jim Meyering  <meyering@lucent.com>
28163
28164         * lib/makepath.c: Include quote.h.
28165         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
28166         corresponding argument in a `quote (...)' call.
28167         Give better diagnostics.
28168
28169         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
28170         (noinst_HEADERS): Add quote.h.
28171
28172         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
28173         from tar's src/misc.c.
28174         * lib/quote.h: New file.  Prototypes for same.
28175
28176 2000-07-14  Paul Eggert  <eggert@twinsun.com>
28177
28178         From a suggestion by Bruno Haible.
28179         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
28180         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
28181         to decide whether to define the BeOS workaround macro;
28182         this adjusts to the change to AC_MBSTATE_T.
28183
28184 2000-07-14  Jim Meyering  <meyering@lucent.com>
28185
28186         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
28187         jm_AC_TYPE_UINTMAX_T.
28188
28189 2000-07-13  Paul Eggert  <eggert@twinsun.com>
28190
28191         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
28192
28193         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
28194         quotearg_buffer_restyled): Add support for
28195         clocale_quoting_style.  Undo previous change to
28196         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
28197         and "{RIGHT QUOTATION MARK}" msgids.
28198
28199 2000-07-10  Paul Eggert  <eggert@twinsun.com>
28200
28201         From a suggestion by Bruno Haible.
28202         * m4/mbstate_t.m4 (AC_MBSTATE_T):
28203         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
28204         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
28205         and mbstate_t, to a single-part test that simply defines mbstate_t.
28206         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
28207         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
28208
28209 2000-07-10  Jim Meyering  <meyering@lucent.com>
28210
28211         * m4/strerror_r.m4: Mirror the correction made in autoconf.
28212
28213         * m4/gnu-source.m4: Output to confdefs.h directly.
28214         Suggestion from Akim Demaille.
28215
28216 2000-07-09  Paul Eggert  <eggert@twinsun.com>
28217
28218         The old behavior of quoting `like this' doesn't look good with
28219         newer, ISO-style fonts.  See:
28220         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
28221
28222         Instead, quote "like this" by default.  Let the translator
28223         tailor the locale-specific quoting behavior by providing
28224         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
28225
28226         * lib/quotearg.c (N_): New macro.
28227         (gettext_default): New function.
28228         (quotearg_buffer_restyled): Use
28229         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
28230         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
28231
28232 2000-07-09  Jim Meyering  <meyering@lucent.com>
28233
28234         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
28235         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
28236
28237         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
28238         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
28239
28240 2000-07-09  Jim Meyering  <meyering@lucent.com>
28241
28242         * lib/Most files: Update copyright dates to include 2000.
28243
28244 2000-07-08  Jim Meyering  <meyering@lucent.com>
28245
28246         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
28247         if not defined.
28248         (xgethostname): Remove now-unnecessary #ifdef.
28249         Move declaration of `err' into loop where it's used.
28250
28251 2000-07-05  Paul Eggert  <eggert@twinsun.com>
28252         and Bruno Haible  <haible@clisp.cons.org>
28253
28254         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
28255         only if the test for an object-type mbstate_t fails.  This
28256         prevents us from mistakenly reporting that mbstate_t is a
28257         system object type after we "#define mbstate_t int" to work
28258         around its lack.
28259
28260 2000-07-05  Paul Eggert  <eggert@twinsun.com>
28261         and Bruno Haible  <haible@clisp.cons.org>
28262
28263         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
28264
28265 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
28266
28267         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
28268         to strerror_r.
28269         Include <ctype.h> for use of isalpha.
28270
28271 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
28272
28273         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
28274         by allocating a larger buffer. Test the gethostname return value for
28275         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
28276         returns an error and ENAMETOOLONG isn't defined.
28277
28278 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
28279
28280         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
28281         dimension.
28282
28283 2000-07-04  Jim Meyering  <meyering@lucent.com>
28284
28285         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
28286         of the deprecated AC_CHECKING.
28287
28288 2000-07-04  Jim Meyering  <meyering@lucent.com>
28289
28290         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
28291         Reported by Bruno Haible.
28292
28293 2000-07-04  Jim Meyering  <meyering@lucent.com>
28294
28295         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
28296         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
28297         lacks mbrtowc.
28298
28299 2000-07-03  Paul Eggert  <eggert@twinsun.com>
28300
28301         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
28302         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
28303
28304 2000-07-03  Paul Eggert  <eggert@twinsun.com>
28305         and Bruno Haible  <haible@clisp.cons.org>
28306
28307         * lib/quotearg.c (mbrtowc):
28308         Assign to *pwc, and return 1 only if result is nonzero.
28309         (iswprint): Use ISPRINT when substituting our own mbrtowc.
28310
28311 2000-07-03  Jim Meyering  <meyering@lucent.com>
28312
28313         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
28314
28315 2000-07-03  Jim Meyering  <meyering@lucent.com>
28316
28317         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
28318         This is necessary to get a definition of e.g., UTMP_FILE on
28319         HP-UX 10.20.
28320         From Bob Proulx.
28321
28322 2000-07-02  Jim Meyering  <meyering@lucent.com>
28323
28324         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
28325
28326         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
28327         AC_LIBOBJ(function_name).
28328         * m4/chown.m4: Likewise.
28329         * m4/fnmatch.m4: Likewise.
28330         * m4/ftruncate.m4: Likewise.
28331         * m4/getgroups.m4: Likewise.
28332         * m4/getline.m4: Likewise.
28333         * m4/group-member.m4: Likewise.
28334         * m4/jm-macros.m4: Likewise.
28335         * m4/lstat.m4: Likewise.
28336         * m4/malloc.m4: Likewise.
28337         * m4/memcmp.m4: Likewise.
28338         * m4/nanosleep.m4: Likewise.
28339         * m4/putenv.m4: Likewise.
28340         * m4/realloc.m4: Likewise.
28341         * m4/regex.m4: Likewise.
28342         * m4/stat.m4: Likewise.
28343         * m4/strftime.m4: Likewise.
28344
28345 2000-07-02  Jim Meyering  <meyering@lucent.com>
28346
28347         * lib/quotearg.c (mbstate_t): Don't define here.
28348
28349 2000-07-02  Jim Meyering  <meyering@lucent.com>
28350
28351         * lib/nanosleep.c (SIGCONT): Define if not already defined.
28352
28353 2000-07-01  Jim Meyering  <meyering@lucent.com>
28354
28355         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
28356
28357 2000-07-01  Jim Meyering  <meyering@lucent.com>
28358
28359         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
28360         problem.
28361
28362 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
28363
28364         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
28365         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
28366
28367 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
28368
28369         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
28370         per change in ../m4/ls-mntd-fs.m4.
28371         (read_filesystem_list): Ignore symbolic links.
28372
28373 2000-06-29  Jim Meyering  <meyering@lucent.com>
28374
28375         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
28376         for declaration of strcmp.
28377
28378         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
28379
28380         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
28381         Avoid warning by casting result to `char *' to remove `const'.
28382
28383 2000-06-28  Jim Meyering  <meyering@lucent.com>
28384
28385         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
28386         included by quotearg.c, for which we perform this test.  From
28387         Bruno Haible.
28388
28389 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
28390
28391         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
28392         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
28393         <utmpx.h> exists, put readutmp.o into LIBOBJS.
28394
28395 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
28396
28397         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
28398
28399 2000-06-26  Paul Eggert  <eggert@twinsun.com>
28400
28401         savedir now sets errno on failure and invokes xmalloc to get memory.
28402         Fix a couple of other minor bugs while we're at it.
28403
28404         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
28405         (NAMLEN): Remove macro.
28406         (malloc, realloc): Remove decls.
28407         (stpcpy): Likewise.
28408         ("xalloc.h"): Include.
28409         (NAME_SIZE_DEFAULT): New macro.
28410         (savedir): Use xmalloc / xrealloc to allocate memory.
28411         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
28412         Skip "" directory entries.
28413         Use strlen to calculate directory entry length, since the old method
28414         is rarely used these days and isn't worth supporting.
28415         Don't use a pointer after freeing it.
28416         Check for integer overflow when calculating allocation size.
28417         Use memcpy to copy entries, instead of stpcpy.
28418         Set errno properly when returning NULL.
28419         Check for readdir error.
28420
28421 2000-06-26  Jim Meyering  <meyering@lucent.com>
28422
28423         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
28424
28425 2000-06-25  Jim Meyering  <meyering@lucent.com>
28426
28427         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
28428         Linux header bug when _XOPEN_SOURCE is defined to 500.
28429
28430 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
28431
28432         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
28433         deficiency.
28434
28435 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
28436
28437         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
28438         Include xalloc.h.
28439         Don't include <stdlib.h>.  Don't declare malloc, realloc.
28440
28441 2000-06-24  Jim Meyering  <meyering@lucent.com>
28442
28443         * m4/strerror_r.m4: Revive this file -- to try out an experimental
28444         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
28445         for which strerror does return char*, but which lacks a conveniently
28446         accessible declaration of the function.  If the compile-test says
28447         strerror_r doesn't work, then resort to a `run'-test that works on
28448         BeOS and segfaults on DEC Unix.
28449
28450 2000-06-24  Jim Meyering  <meyering@lucent.com>
28451
28452         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
28453
28454 2000-06-23  Paul Eggert  <eggert@twinsun.com>
28455
28456         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
28457         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
28458
28459 2000-06-23  Paul Eggert  <eggert@twinsun.com>
28460
28461         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
28462         (mbrtowc, mbstate_t): Define substitutes if
28463         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
28464         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
28465         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
28466
28467 2000-06-23  Jim Meyering  <meyering@lucent.com>
28468
28469         * m4/afs.m4: Add missing AC_MSG_RESULT.
28470         Reported by Bruno Haible.
28471
28472         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
28473         Suggestion from Bruno Haible.
28474
28475 2000-06-23  Jim Meyering  <meyering@lucent.com>
28476
28477         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
28478
28479 2000-06-21  Jim Meyering  <meyering@lucent.com>
28480
28481         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
28482
28483 2000-06-21  Jim Meyering  <meyering@lucent.com>
28484
28485         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
28486         (noinst_HEADERS): Add getstr.h.
28487
28488         * lib/getline.c (getstr): Move into a separate file.
28489         * lib/getstr.c (getstr): New file, extracted from getline.c, with
28490         the following changes: new parameter, delim2; both delim[12]
28491         parameters have type `int', not `char'.  The latter would lose
28492         with 8-bit delimiters.
28493         * lib/getstr.h: New file.
28494
28495 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
28496
28497         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
28498         than 1024, return a memory chunk of least possible size, instead
28499         of size PATH_MAX + 2. In the loop, increment the size proportionally.
28500         Use free/xmalloc instead of xrealloc to avoid copying for very long
28501         paths.
28502
28503 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
28504
28505         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
28506         the empty string.
28507
28508 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
28509
28510         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
28511         address, not strdup.  Include <stdlib.h> and don't declare free().
28512
28513 2000-06-19  Jim Meyering  <meyering@lucent.com>
28514
28515         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
28516
28517 2000-06-18  Jim Meyering  <meyering@lucent.com>
28518
28519         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
28520
28521         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
28522         `checking whether...' message to be consistent with that of the
28523         lstat test.
28524
28525 2000-06-18  Jim Meyering  <meyering@lucent.com>
28526
28527         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
28528         Besides, these days every porting target provides a mkdir function.
28529
28530         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
28531         needed. (this snippet comes from src/system.h).
28532
28533 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
28534
28535         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
28536
28537 2000-06-15  Paul Eggert  <eggert@twinsun.com>
28538
28539         * lib/human.c (adjust_value): New function.
28540         (human_readable_inexact): Apply rounding style even when
28541         printing approximate values.
28542
28543 2000-06-14  Paul Eggert  <eggert@twinsun.com>
28544
28545         * lib/human.c (human_readable_inexact): Allow an input block
28546         size that is not a multiple of the output block size, and vice versa.
28547         Reported by Piergiorgio Sartor.
28548
28549 2000-06-14  Paul Eggert  <eggert@twinsun.com>
28550
28551         * lib/getdate.y (get_date): Apply relative times after time
28552         zone indicator, not before.  Reported by Todd A. Jacobs.
28553
28554 2000-06-13  Jim Meyering  <meyering@lucent.com>
28555
28556         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
28557
28558         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
28559
28560 2000-06-12  Paul Eggert  <eggert@twinsun.com>
28561
28562         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
28563
28564 2000-06-12  Jim Meyering  <meyering@lucent.com>
28565
28566         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
28567         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
28568         optional argument.
28569         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
28570         the optional argument, `lib'.
28571
28572 2000-06-08  Jim Meyering  <meyering@lucent.com>
28573
28574         * m4/largefile.m4: Remove file (now that it's part of autoconf).
28575
28576 2000-06-04  Paul Eggert  <eggert@twinsun.com>
28577
28578         Rewrite largefile configuration so that we don't need to run
28579         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
28580         AC_CANONICAL_HOST in configure.in -- jmm]
28581
28582         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
28583         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
28584         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
28585         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
28586         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
28587         All uses changed.
28588         Instead of inspecting the output of getconf, try to compile the
28589         test program without and with the macro definition.
28590         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
28591         for getconf.  Instead, check for the needed flags by compiling
28592         test programs.
28593
28594 2000-06-04  Paul Eggert  <eggert@twinsun.com>
28595
28596         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
28597
28598 2000-06-04  Jim Meyering  <meyering@lucent.com>
28599
28600         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
28601         SunOS 4.1.4 for which gid_t is an unsigned type.
28602
28603 2000-06-03  Jim Meyering  <meyering@lucent.com>
28604
28605         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
28606         now that autoconf requires that.
28607
28608         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
28609         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
28610         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
28611
28612 2000-06-03  Jim Meyering  <meyering@lucent.com>
28613
28614         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
28615
28616 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
28617
28618         * m4/glibc21.m4: New file.
28619         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
28620
28621 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
28622
28623         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
28624         newer, don't install charset.alias.
28625         * lib/config.charset: Change the Linux/glibc rules so they become empty
28626         on glibc-2.1 or newer.
28627
28628 2000-06-02  Jim Meyering  <meyering@lucent.com>
28629
28630         * lib/mountlist.c: Back out last change.  Instead, do this...
28631         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
28632         me_dummy member using the same `ignore'-testing code.
28633         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
28634         fs_type strings.
28635         From Mark D. Roth.
28636
28637 2000-05-29  Jim Meyering  <meyering@lucent.com>
28638
28639         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
28640         mounts with the `ignore' attribute.  Based on a patch from
28641         Mark D. Roth.
28642
28643 2000-05-28  Jim Meyering  <meyering@lucent.com>
28644
28645         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
28646         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
28647         * m4/stat.m4: Likewise.
28648         * m4/lstat.m4: Likewise.
28649         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
28650
28651         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
28652         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
28653
28654 2000-05-26  Jim Meyering  <meyering@lucent.com>
28655
28656         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
28657
28658 2000-05-24  Jim Meyering  <meyering@lucent.com>
28659
28660         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
28661         autoconf requires that.
28662         * m4/lib-check.m4: Likewise.
28663         * m4/jm-macros.m4: Likewise.
28664         * m4/strftime.m4: Likewise.
28665
28666         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
28667         AC_CHECK_DECLS, now that autoconf requires that.
28668
28669 2000-05-22  Jim Meyering  <meyering@lucent.com>
28670
28671         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
28672         * m4/lstat.m4: Likewise.
28673
28674 2000-05-22  Jim Meyering  <meyering@lucent.com>
28675
28676         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
28677
28678 2000-05-20  Jim Meyering  <meyering@lucent.com>
28679
28680         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
28681         (jm_PREREQ): Use it.
28682
28683 2000-05-18  Jim Meyering  <meyering@lucent.com>
28684
28685         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
28686         back, too, since it may have been modified by allocate_entry.
28687         (hash_delete): Rewrite to use neither the assignment operator
28688         nor the comma operator in an if-expression.
28689
28690 2000-05-15  Paul Eggert  <eggert@twinsun.com>
28691
28692         * lib/closeout.c:
28693         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
28694         Remove; no longer needed.
28695         "quotearg.h": Add include.
28696         (file_name): Do not bother to explicitly initialize to NULL; it's less
28697         efficient on some hosts.
28698         (close_stdout_status): Remove test as to whether stdout was already
28699         closed; it breaks for the case "echo x | sort >&-".
28700         Quote file name colons.
28701         Do not assume that _("write error") lacks format strings.
28702
28703 2000-05-15  Jim Meyering  <meyering@lucent.com>
28704
28705         * lib/version-etc.c (version_etc_copyright): Update the copyright
28706         string used in all --version output.
28707
28708 2000-05-14  Jim Meyering  <meyering@lucent.com>
28709
28710         * lib/closeout.c (close_stdout_set_file_name): New function.
28711         (close_stdout_status): Use new file-scoped global.
28712         Return right away if fstat says the stdout file descriptor is invalid.
28713         * lib/closeout.h (close_stdout_set_file_name): Declare.
28714
28715 2000-05-10  Jim Meyering  <meyering@lucent.com>
28716
28717         * lib/closeout.c [default_exit_status]: New file-scoped variable.
28718         (close_stdout_set_status): New function.
28719         * lib/closeout.h (close_stdout_set_status): Declare.
28720
28721 2000-05-09  Jim Meyering  <meyering@lucent.com>
28722
28723         * m4/gettext.m4: Rename this...
28724         * m4/libintl.m4: ...to this.
28725
28726 2000-05-08  Jim Meyering  <meyering@lucent.com>
28727
28728         * lib/long-options.c: Don't include closeout.h.
28729         (parse_long_options): Don't call close_stdout for --version.
28730
28731 2000-05-06  Paul Eggert  <eggert@twinsun.com>
28732
28733         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
28734         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
28735         2.1.3 bug.  This avoids a clash when files like regex.c define
28736         _GNU_SOURCE.
28737
28738 2000-05-06  Jim Meyering  <meyering@lucent.com>
28739
28740         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
28741         (AC_REPLACE_FUNCS): Add strnlen.
28742
28743         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
28744         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
28745
28746         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
28747         AC_SEARCH_LIBS call for nanosleep.
28748         (LIB_NANOSLEEP): Set and AC_SUBST.
28749
28750 2000-05-06  Jim Meyering  <meyering@lucent.com>
28751
28752         * lib/strnlen.c: Undefine __strnlen and strnlen.
28753         [!weak_alias]: Define __strnlen to strnlen.
28754
28755         * lib/atexit.c: New file, from libiberty.
28756
28757 2000-05-06  Jim Meyering  <meyering@lucent.com>
28758
28759         * lib/closeout.c (close_stdout_status): Also check for errors on the
28760         stderr stream.
28761
28762 2000-05-05  Jim Meyering  <meyering@lucent.com>
28763
28764         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
28765         AC_SEARCH_LIBS call for clock_gettime.
28766         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
28767
28768         * m4/search-libs.m4: Update from autoconf.
28769
28770         su doesn't work on Solaris 2.6.
28771         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
28772         <shadow.h>.  Reported by Dragos Harabor.
28773
28774 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
28775
28776         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
28777         memcpy instead of xmalloc, xrealloc, path_concat.
28778         (locale_charset): Treat empty environment variables as absent.
28779         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
28780
28781 2000-05-04  Jim Meyering  <meyering@lucent.com>
28782
28783         * lib/getopt.c: Update from glibc.
28784         * lib/obstack.c: Likewise.
28785         * lib/obstack.h: Likewise.
28786         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
28787         file
28788
28789         * lib/regex.h: Likewise.
28790         * lib/strndup.c: Likewise.
28791         * lib/strnlen.c: New file, from glibc.
28792
28793 2000-05-03  Jim Meyering  <meyering@lucent.com>
28794
28795         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
28796
28797 2000-05-02  Paul Eggert  <eggert@twinsun.com>
28798
28799         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
28800         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
28801         compile-time test, rather than inspecting host and OS, to
28802         decide whether to define _LARGEFILE_SOURCE.
28803
28804 2000-05-01  Jim Meyering  <meyering@lucent.com>
28805
28806         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
28807
28808         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
28809         Based on a patch from Bruno Haible.
28810
28811 2000-05-01  Jim Meyering  <meyering@lucent.com>
28812
28813         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
28814
28815 2000-04-29  Jim Meyering  <meyering@lucent.com>
28816
28817         * lib/path-concat.c: Declare strdup only if it's not defined.
28818         * lib/canon-host.c: Likewise.
28819
28820 2000-04-28  Jim Meyering  <meyering@lucent.com>
28821
28822         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
28823         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
28824         is included first, then limits.h is included by locale.h by libintl.h.
28825         From John David Anglin.
28826
28827 2000-04-25  Jim Meyering  <meyering@lucent.com>
28828
28829         * lib/makepath.c (S_IRWXUGO): Define.
28830         (make_path): Always perform explicit chmod if MODE specifies any
28831         of the `special' permission bits.  Prompted by a bug report against
28832         install from Mate Wierdl and Joost van Baal.
28833
28834 2000-04-18  Jim Meyering  <meyering@lucent.com>
28835
28836         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
28837         (jm_PREREQ): Use it.
28838
28839 2000-04-18  Jim Meyering  <meyering@lucent.com>
28840
28841         * lib/README: New file.
28842
28843         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
28844         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
28845
28846 2000-04-17  Jim Meyering  <meyering@lucent.com>
28847
28848         Get it right :-)
28849         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
28850         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
28851         Suggestion from Akim Demaille.
28852
28853 2000-04-17  Jim Meyering  <meyering@lucent.com>
28854
28855         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
28856         the definition of it to rpl_strftime also defined-away the system's
28857         declaration.
28858
28859 2000-04-15  Jim Meyering  <meyering@lucent.com>
28860
28861         Use `C' to denote so-called `contiguous' files, the same way
28862         that tar does.
28863         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
28864         (ftypelet): Use S_ISCTG.
28865         From Michael Deutschmann.
28866
28867 2000-04-14  Jim Meyering  <meyering@lucent.com>
28868
28869         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
28870         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
28871         clobbered.
28872
28873 2000-04-14  Jim Meyering  <meyering@lucent.com>
28874
28875         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
28876
28877 2000-04-13  Jim Meyering  <meyering@lucent.com>
28878
28879         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
28880         AH_VERBATIM to insert required #ifndef into config.h.in.
28881         Suggestion from Akim Demaille.
28882
28883 2000-04-12  Jim Meyering  <meyering@lucent.com>
28884
28885         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
28886         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
28887         Christian Krackowizer.
28888
28889         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
28890         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
28891         (AC_SYS_LARGEFILE): Require.
28892         (AM_C_PROTOTYPES): Require.
28893
28894 2000-04-08  Jim Meyering  <meyering@lucent.com>
28895
28896         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
28897         names don't conflict.  Reported by Eli Zaretskii.
28898
28899 2000-04-07  Jim Meyering  <meyering@lucent.com>
28900
28901         * lib/putenv.c: Move inclusion of errno.h so it follows that of
28902         sys/types.h, to work around system header problems on AIX 3.2.5.
28903         From Bruno Haible.
28904
28905 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
28906
28907         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
28908         bug.  Deal with the different error behavior of Irix iconv.
28909
28910 2000-04-05  Paul Eggert  <eggert@twinsun.com>
28911
28912         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
28913         IRIX if the installer said otherwise.
28914
28915 2000-04-05  Jim Meyering  <meyering@lucent.com>
28916
28917         Portability tweaks required for ultrix4.3.
28918         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
28919         (jm_CHECK_DECLS): Add getutent to the list of functions.
28920         (_jm_DECL_HEADERS): Add utmpx.h.
28921         From John David Anglin.
28922
28923         * m4/strftime.m4: Back out the 2000-04-02 change.
28924         Instead of that change, simply undefine putenv in the test program.
28925
28926 2000-04-05  Jim Meyering  <meyering@lucent.com>
28927
28928         Portability tweaks required for ultrix4.3.
28929         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
28930         getutent.
28931         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
28932         * lib/canon-host.c: Declare strdup.
28933         * lib/path-concat.c: Likewise.
28934         From John David Anglin.
28935
28936 2000-04-04  Jim Meyering  <meyering@lucent.com>
28937
28938         Be more DOS 8.3-friendly.
28939         * lib/ref-add.sin: Renamed from ref-add.sed.in.
28940         * lib/ref-del.sin: Renamed from ref-del.sed.in.
28941         * lib/Makefile.am: Reflect renaming.
28942         Reported by Eli Zaretskii.
28943
28944         Use a temporary file name that won't clash with `charset.alias'
28945         in the DOS 8.3 name space.
28946         * lib/Makefile.am (charset_tmp): Define.
28947         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
28948         (uninstall-local): Likewise.
28949         Reported by Eli Zaretskii.
28950
28951 2000-04-03  Jim Meyering  <meyering@lucent.com>
28952
28953         * m4/gettext.m4: Fix typo in comment.
28954
28955         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
28956         textutils/configure.in).  Suggestion from Paul Eggert.
28957         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
28958
28959 2000-04-02  Paul Eggert  <eggert@twinsun.com>
28960
28961         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
28962         variable in the shell rather than using putenv, which isn't
28963         portable.  This avoids the configure-time inter-test dependency
28964         on the potentially-renamed putenv function.
28965
28966 2000-03-30  Paul Eggert  <eggert@twinsun.com>
28967
28968         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
28969         before checking struct stat.st_blksize, so that
28970         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
28971
28972 2000-03-29  Paul Eggert  <eggert@twinsun.com>
28973
28974         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
28975         since strftime.c uses HAVE_STRFTIME to decide whether to use
28976         the underlying strftime.
28977
28978 2000-03-29  Paul Eggert  <eggert@twinsun.com>
28979
28980         * lib/time/strftime.c (my_strftime): Make sure we call the system
28981         strftime, not ourselves, when invoking the underlying strftime.
28982
28983 2000-03-24  Jim Meyering  <meyering@lucent.com>
28984
28985         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
28986         (charset_alias): Define.
28987         (install-exec-local): Factor out common code.
28988         (uninstall-local): Split lines longer than 80.
28989         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
28990         (SUFFIXES): Define.
28991         (.sed.in.sed): New rule.  Don't redirect directly to $@.
28992         (CLEANFILES): Add ref-add.sed and ref-del.sed.
28993
28994 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
28995
28996         * lib/config.charset: Output a line containing "Packages using this
28997         file".
28998         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
28999         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
29000         ref-del.sed): New rules.
29001
29002 2000-03-17  Jim Meyering  <meyering@lucent.com>
29003
29004         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
29005         Otherwise, include <strings.h>
29006
29007 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
29008
29009         * lib/unicodeio.c (utf8_wctomb): New function.
29010         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
29011         format instead of in UCS-4 with platform dependent endianness.
29012
29013 2000-03-10  Jim Meyering  <meyering@lucent.com>
29014
29015         * m4/lib-check.m4: Look for getspnam in -lgen, too.
29016         From Marco Franzen.
29017
29018 2000-03-07  Paul Eggert  <eggert@twinsun.com>
29019
29020         * lib/savedir.c (savedir): Work even if directory size is
29021         negative; this can happen with some screwy NFS configurations.
29022
29023 2000-03-06  Jim Meyering  <meyering@lucent.com>
29024
29025         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
29026         if it's NULL (because we ran out of memory).  From Bruno Haible.
29027
29028 2000-03-05  Jim Meyering  <meyering@lucent.com>
29029
29030         * lib/localcharset.c ("path-concat.h"): Include.
29031         (get_charset_aliases): Use path_concat instead of ANSI string
29032         concatenation.
29033
29034         * lib/unicodeio.h (PARAMS): Define.
29035         Use it to guard prototype.
29036
29037 2000-03-04  Jim Meyering  <meyering@lucent.com>
29038
29039         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
29040         for lib/localcharset.c.
29041
29042 2000-03-04  Jim Meyering  <meyering@lucent.com>
29043
29044         * lib/Makefile.am (install-exec-local): Create $(libdir) before
29045         installing into it.
29046         (uninstall-local): Uncomment this rule so `make distcheck' works
29047         once again.
29048
29049         * lib/unicodeio.c (<errno.h>): Include it.
29050         (errno): Declare if not defined.
29051
29052         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
29053
29054         * lib/config.charset: New version, incorporating remarks from a linux
29055         i18n mailing list.  From Bruno Haible.
29056
29057 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
29058
29059         * m4/codeset.m4: New file.
29060         * m4/iconv.m4: New file.
29061         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
29062
29063 2000-03-03  Jim Meyering  <meyering@lucent.com>
29064
29065         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
29066
29067 2000-03-02  Jim Meyering  <meyering@lucent.com>
29068
29069         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
29070         the messages come out on separate lines.
29071
29072         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
29073         rather than jm_CHECK_DECLARATIONS.
29074         * m4/decl.m4: Remove now-unused file.
29075
29076         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
29077         geteuid.
29078
29079 2000-03-02  Jim Meyering  <meyering@lucent.com>
29080
29081         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
29082
29083 2000-03-01  Jim Meyering  <meyering@lucent.com>
29084
29085         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
29086         * lib/unicodeio.c: Likewise.
29087
29088 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
29089
29090         * lib/config.charset: New file.
29091         * lib/localcharset.c: New file.
29092         * lib/unicodeio.h, lib/unicodeio.c: New files.
29093         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
29094         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
29095         (noinst_HEADERS): Add unicodeio.h.
29096         (all-local, install-exec-local, charset.alias): New targets.
29097
29098 2000-02-28  Paul Eggert  <eggert@twinsun.com>
29099
29100         * lib/quotearg.c (ALERT_CHAR): New macro.
29101         (quotearg_buffer_restyled): Use it.
29102
29103 2000-02-27  Jim Meyering  <meyering@lucent.com>
29104
29105         * m4/check-decl.m4: Add getenv to the list.
29106
29107 2000-02-27  Jim Meyering  <meyering@lucent.com>
29108
29109         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
29110         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
29111
29112         * lib/backupfile.c: Guard inclusion of stdlib.h with
29113         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
29114         Declare malloc if needed.
29115
29116         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
29117         `#ifndef HAVE_DECL..'
29118         now that autoconf always defines the HAVE_DECL_ symbols.
29119         * lib/human.c: Likewise.
29120         * lib/same.c: Likewise.
29121         * lib/strtoumax.c: Likewise.
29122
29123         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
29124         declaration check was not run.
29125         * lib/hash.c: Likewise.
29126         * lib/human.c: Likewise.
29127         * lib/same.c: Likewise.
29128         * lib/strtoumax.c: Likewise.
29129
29130         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
29131         `.', then first look up the entire `.'-containing string as a login
29132         name.
29133
29134 2000-02-23  Jim Meyering  <meyering@lucent.com>
29135
29136         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
29137         in place of my hack.
29138
29139 2000-02-18  Paul Eggert  <eggert@twinsun.com>
29140
29141         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
29142         (textint): New typedef.
29143         (parser_control): Member year changed from int to textint.
29144         All uses changed.
29145         (YYSTYPE): Removed; replaced by %union with int and textint members.
29146         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
29147         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
29148         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
29149         (tSNUMBER, tUNUMBER): Now of type <textintval>.
29150         (date, number, to_year): Use width of number in digits, not its value,
29151         to determine whether it's a 2-digit year, or a 2-digit time.
29152         (yylex): Store number of digits of numeric tokens.
29153         Reported by John Kendall.
29154
29155         (parser_control): Changed from struct parser_control to typedef (for
29156         consistency).  All uses changed.
29157
29158         (tID): Removed; not used.
29159         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
29160
29161 2000-02-14  Paul Eggert  <eggert@twinsun.com>
29162
29163         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
29164         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
29165
29166 2000-02-12  Jim Meyering  <meyering@lucent.com>
29167
29168         * lib/userspec.c (ISDIGIT): Define it.
29169         (isdigit): Remove definition.
29170         (is_number): Use ISDIGIT, not isdigit.
29171         <libintl.h>: Include.
29172         (_ and N_): Define.
29173         (parse_user_spec): Mark translatable strings.
29174
29175 2000-02-10  Jim Meyering  <meyering@lucent.com>
29176
29177         With these changes, nanosleep.[ch] are finally enough like the other
29178         lib/* replacement files to compile on a few more losing systems.
29179
29180         * lib/nanosleep.h: Don't include config.h.
29181         Remove prototype from declaration of nanosleep.
29182         (PARAMS): Remove now-unneeded definition.
29183         * lib/nanosleep.c: #undef nanosleep.
29184         (rpl_nanosleep): Rename from nanosleep.
29185
29186 2000-02-10  Jim Meyering  <meyering@lucent.com>
29187
29188         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
29189         gnu_nanosleep to rpl_nanosleep.
29190
29191 2000-02-09  Jim Meyering  <meyering@lucent.com>
29192
29193         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
29194         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
29195
29196 2000-02-08  Akim Demaille  <akim@epita.fr>
29197
29198         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
29199         `[' and `]' and remove uses of `changequote'.
29200         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
29201         (AC_SYS_LARGEFILE): Likewise.
29202         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
29203         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
29204         of changequote.
29205         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
29206         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
29207         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
29208         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
29209
29210 2000-02-05  Jim Meyering  <meyering@lucent.com>
29211
29212         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
29213         Remove explicit use of AC_HEADER_TIME.  It is required by
29214         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
29215         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
29216         in autoconf whereby the expansion of the latter ended up preceding
29217         the expansion of its prerequisite, AC_HEADER_TIME.
29218         Reported by Volker Borchert.
29219
29220 2000-02-03  Jim Meyering  <meyering@lucent.com>
29221
29222         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
29223
29224 2000-02-03  Jim Meyering  <meyering@lucent.com>
29225
29226         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
29227         rather than with `#if HAVE_UTMPNAME'.
29228
29229 2000-02-02  Jim Meyering  <meyering@lucent.com>
29230
29231         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
29232         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
29233         Reported by Eli Zaretskii.
29234
29235 2000-02-01  Jim Meyering  <meyering@lucent.com>
29236
29237         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
29238
29239 2000-01-31  Jim Meyering  <meyering@lucent.com>
29240
29241         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
29242         functions.  Add the time.h and sys/time.h headers along with the
29243         AC_REQUIRE'ment of AC_HEADER_TIME.
29244
29245 2000-01-31  Jim Meyering  <meyering@lucent.com>
29246
29247         * lib/nanosleep.h (nanosleep): Guard declaration with
29248         `#if ! HAVE_DECL_NANOSLEEP'.
29249         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
29250         the declaration in that vendor's sys/timers.h.
29251         Reported by Christian Krackowizer.
29252
29253         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
29254         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
29255         (ISPRINT): Likewise.
29256         Reported by Tom Tromey.
29257
29258 2000-01-30  Jim Meyering  <meyering@lucent.com>
29259
29260         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
29261
29262         * m4/prereq.m4 (utmp_includes): Define.
29263         Check for ut_user and ut_name members in both struct utmpx
29264         and struct utmp.
29265
29266 2000-01-30  Jim Meyering  <meyering@lucent.com>
29267
29268         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
29269         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
29270         header files where only utmpx.ut_user is declared.
29271
29272         * lib/readutmp.h (UT_USER): Define.
29273
29274 2000-01-29  Jim Meyering  <meyering@lucent.com>
29275
29276         * m4/lib-check.m4: New file containing library-related checks from
29277         fileutils and sh-utils (textutils had none).
29278
29279 2000-01-28  Jim Meyering  <meyering@lucent.com>
29280
29281         * m4/perl.m4: Change format of warning message to look more like that
29282         from the missing script.  Suggestion from François Pinard.
29283
29284 2000-01-25  Jim Meyering  <meyering@lucent.com>
29285
29286         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
29287         well as time.h in the compile check.
29288         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
29289         Fix typo in cross-compiling case: s/yes/no/.
29290
29291 2000-01-23  Jim Meyering  <meyering@lucent.com>
29292
29293         * m4/jm-macros.m4: Move df-related tests here from
29294         fileutils/configure.in
29295
29296         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
29297         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
29298
29299         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
29300         s/space/ac_fsusage_space/.
29301         (jm_FILE_SYSTEM_USAGE): Take two parameters.
29302
29303         * m4/ftruncate.m4: New file (derived from part of
29304         fileutils/configure.in).
29305         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
29306         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
29307
29308         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
29309         AC_SUBST these here, rather than just in sh-util/configure.in, so
29310         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
29311         all the same.
29312         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
29313         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
29314         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
29315         (AC_SUBST(POW_LIBM)): Likewise.
29316         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
29317
29318 2000-01-23  Jim Meyering  <meyering@lucent.com>
29319
29320         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
29321         obstack.c.
29322
29323 2000-01-22  Jim Meyering  <meyering@lucent.com>
29324
29325         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
29326
29327         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
29328
29329         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
29330         configure.in
29331         (AC_CHECK_HEADERS): Likewise for sh-utils.
29332         (AC_CHECK_HEADERS): Likewise for textutils.
29333         Merge the three lists of headers.
29334
29335         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
29336         from fileutils' configure.in.
29337
29338         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
29339         code. Moved tests into their own function (_jm_DECL_HEADERS) in
29340         check-decl.m4.
29341
29342         * m4/check-decl.m4: Use #if rather than #ifdef.
29343         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
29344         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
29345         (_jm_DECL_HEADERS): Define new function.
29346         (jm_CHECK_DECLARATIONS): Require it.
29347
29348 2000-01-22  Jim Meyering  <meyering@lucent.com>
29349
29350         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
29351         [! HAVE_DECL_STRTOULL]: Declare strtoull.
29352         Required for some AIX systems.  Reported by Christian Krackowizer.
29353         [TESTING] (main): New function.
29354
29355         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
29356         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
29357         letters.
29358
29359         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
29360         iswprint.
29361
29362         * lib/strverscmp.c (ISDIGIT): Define.
29363         (strverscmp): Use ISDIGIT, not isdigit.
29364
29365 2000-01-19  Jim Meyering  <meyering@lucent.com>
29366
29367         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
29368         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
29369         defines `struct timespec' in <sys/time.h>
29370
29371         * m4/c-bs-a.m4: Remove uses of changequote altogether.
29372         Thanks to Akim for explaining.
29373
29374 2000-01-17  Paul Eggert  <eggert@twinsun.com>
29375
29376         * lib/nanosleep.c (nanosleep):
29377         Don't use SA_INTERRUPT to decide whether to call sigaction, as
29378         POSIX.1 doesn't require SA_INTERRUPT and some systems
29379         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
29380         it's been part of POSIX.1 since day 1 (in 1988).
29381
29382 2000-01-17  Jim Meyering  <meyering@lucent.com>
29383
29384         * lib/interlock: Remove unused file.  Reported by François Pinard.
29385
29386 2000-01-16  Paul Eggert  <eggert@twinsun.com>
29387
29388         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
29389         alert, backslash, formfeed, and vertical tab unnecessarily in
29390         shell quoting style.
29391
29392 2000-01-16  Jim Meyering  <meyering@lucent.com>
29393
29394         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
29395         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
29396         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
29397         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
29398
29399 2000-01-16  Jim Meyering  <meyering@lucent.com>
29400
29401         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
29402         because the latter didn't work.
29403
29404 2000-01-15  Jim Meyering  <meyering@lucent.com>
29405
29406         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
29407         (AC_REPLACE_FUNCS): Add memcpy and memset.
29408         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
29409         Add strpbrk.
29410         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
29411
29412 2000-01-12  Jim Meyering  <meyering@lucent.com>
29413
29414         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
29415         (jm_PREREQ): Use it.
29416         (jm_PREREQ_READUTMP): New macro.
29417         (jm_PREREQ): Use it.
29418
29419 2000-01-11  Paul Eggert  <eggert@twinsun.com>
29420
29421         Quote multibyte characters correctly.
29422         * m4/c-bs-a.m4: New file.
29423         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
29424         (jm_PREREQ): Use it.
29425
29426 2000-01-11  Paul Eggert  <eggert@twinsun.com>
29427
29428         * m4/uintmax_t.m4: Port to autoconf 2.13.
29429
29430 2000-01-08  Jim Meyering  <meyering@ascend.com>
29431
29432         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
29433         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
29434
29435 2000-01-04  Jim Meyering  <meyering@ascend.com>
29436
29437         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
29438         jm_STRUCT_DIRENT_D_TYPE.
29439         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
29440         jm_STRUCT_DIRENT_D_INO.
29441         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
29442         jm_STRUCT_UTIMBUF.
29443         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
29444         renamings.
29445         * m4/utime.m4: Likewise.
29446
29447         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
29448         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
29449
29450 2000-01-03  Paul Eggert  <eggert@twinsun.com>
29451
29452         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
29453         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
29454
29455 2000-01-02  Jim Meyering  <meyering@ascend.com>
29456
29457         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
29458         remember if this is necessary.
29459
29460 1999-12-26  Jim Meyering  <meyering@ascend.com>
29461
29462         * m4/jm-macros.m4: Use it here.
29463         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
29464
29465 1999-12-23  Jim Meyering  <meyering@ascend.com>
29466
29467         * m4/jm-macros.m4: Check for clock_gettime (moved from
29468         fileutils/configure.in)
29469         Check for gettimeofday.
29470
29471 1999-12-20  Jim Meyering  <meyering@ascend.com>
29472
29473         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
29474         autoconf-2.14a-1999-12-20.
29475
29476 1999-12-19  Jim Meyering  <meyering@ascend.com>
29477
29478         * m4/lstat-slash.m4: New file.
29479         * m4/jm-macros.m4: Use the new macro:
29480         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
29481
29482 1999-12-07  Jim Meyering  <meyering@ascend.com>
29483
29484         * m4/perl.m4: Require that File::Compare be available, too.
29485         Too many systems seem to lack it.
29486
29487         * m4/strftime.m4: Add checks for most of the cpp macros tested in
29488         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
29489
29490 1999-11-18  Paul Eggert  <eggert@twinsun.com>
29491
29492         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
29493         problem with the QNX 4.25 shell, which doesn't propagate exit
29494         status of failed commands inside shell assignments.
29495
29496 1999-11-17  Jim Meyering  <meyering@ascend.com>
29497
29498         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
29499
29500 1999-11-07  Jim Meyering  <meyering@ascend.com>
29501
29502         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
29503
29504 1999-11-06  Jim Meyering  <meyering@ascend.com>
29505
29506         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
29507         * m4/jm-macros.m4 (jm_MACROS): Use it here.
29508
29509 1999-11-05  Jim Meyering  <meyering@ascend.com>
29510
29511         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
29512         configure.in of textutils, fileutils, and sh-utils into this one
29513         (shared between those packages) file.
29514         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
29515         AC_STRUCT_ST_BLKSIZE.
29516
29517 1999-11-03  Jim Meyering  <meyering@ascend.com>
29518
29519         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
29520         of AC_CHECK_TYPE checks includes unistd.h.
29521         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
29522         Suggestion from Akim Demaille.
29523
29524 1999-10-30  Jim Meyering  <meyering@ascend.com>
29525
29526         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
29527         m4-quoted string.
29528         * m4/ls-mntd-fs.m4: Likewise.
29529         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
29530         * m4/jm-winsz1.m4: Likewise.
29531
29532         * m4/const.m4: Remove file, since the fix made it into the experimental
29533         version of autoconf.
29534         * m4/mktime.m4: Likewise.
29535
29536         * m4/check-type.m4: Remove file, now that the latest version of
29537         AC_CHECK_TYPE takes a third arg to specify additional #includes.
29538
29539         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
29540         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
29541         AC_CHECK_TYPE.
29542
29543 1999-10-04  Jim Meyering  <meyering@ascend.com>
29544
29545         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
29546
29547 1999-09-22  Paul Eggert  <eggert@twinsun.com>
29548
29549         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
29550         2.95.1 bug with HP-UX 10.20.
29551
29552 1999-09-17  Jim Meyering  <meyering@ascend.com>
29553
29554         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
29555         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
29556         due to missing strdup (against sh-utils-2.0).
29557
29558 1999-08-29  Jim Meyering  <meyering@ascend.com>
29559
29560         * m4/jm-macros.m4: Require jm_BISON.
29561         * m4/bison.m4: New file.
29562
29563 1999-08-17  Paul Eggert  <eggert@twinsun.com>
29564
29565         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
29566         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
29567
29568 1999-08-05  Jim Meyering  <meyering@ascend.com>
29569
29570         * m4/getline.m4: Rename test file from conftestdata to conftest.data
29571         to avoid conflicts with `conftest' on 8+3 filesystems.
29572         Suggestion from Eli Zaretskii.
29573
29574 1999-08-04  Jim Meyering  <meyering@ascend.com>
29575
29576         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
29577         fileutils and sh-utils (textutils's getline test was inadequate).
29578         (AM_FUNC_GETLINE): Run this test.
29579         (AC_CHECK_FUNCS): Check for getdelim.
29580         Reported by Bob Proulx.
29581
29582 1999-08-02  Jim Meyering  <meyering@ascend.com>
29583
29584         * m4/jm-macros.m4: Add a comment.
29585
29586 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29587
29588         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
29589         <inttypes.h> defines strtoumax as a macro (and not as a
29590         function).
29591
29592 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29593
29594         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
29595         that we can shift, multiply and divide unsigned long long
29596         values; Ultrix cc can't do it.
29597
29598 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29599
29600         * m4/mktime.m4: New file, which is a preview of what should appear
29601         in the next public autoconf release.
29602
29603 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29604
29605         * m4/lfs.m4: Remove this file.
29606         * m4/largefile.m4: New file.  It contains the old contents of
29607         lfs.m4, except that all names with prefix AC_LFS have been
29608         changed to use the prefix AC_SYS_LARGEFILE instead, to be
29609         compatible with future autoconf versions.  Also, some minor m4
29610         quoting problems have been fixed.
29611
29612 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29613
29614         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
29615         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
29616         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
29617         and simplify the shell code.
29618
29619 1999-08-01  Jim Meyering  <meyering@ascend.com>
29620
29621         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
29622         m4.
29623
29624 1999-07-20  Jim Meyering  <meyering@ascend.com>
29625
29626         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
29627
29628 1999-07-15  Jim Meyering  <meyering@ascend.com>
29629
29630         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
29631
29632 1999-05-22  Jim Meyering  <meyering@ascend.com>
29633
29634         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
29635
29636 1999-05-20  Jim Meyering  <meyering@ascend.com>
29637
29638         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
29639         Add a colon after each `then' in case $4 is empty.
29640
29641 1999-05-16  Jim Meyering  <meyering@ascend.com>
29642
29643         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
29644
29645 1999-05-10  Jim Meyering  <meyering@ascend.com>
29646
29647         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
29648
29649         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
29650         AC_FUNC_MKTIME.
29651
29652 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
29653
29654         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
29655
29656 1999-05-04  Paul Eggert  <eggert@twinsun.com>
29657
29658         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
29659         not CPPFLAGS, so that linking works correctly in IRIX.
29660
29661 1999-04-30  Paul Eggert  <eggert@twinsun.com>
29662
29663         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
29664
29665 1999-04-20  Paul Eggert  <eggert@twinsun.com>
29666
29667         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
29668         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
29669         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
29670         jm_AC_TYPE_UNSIGNED_LONG_LONG.
29671         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
29672
29673         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
29674
29675 1999-04-20  Jim Meyering  <meyering@ascend.com>
29676
29677         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
29678         AC_REPLACE xstroull if necessary.  From Paul Eggert.
29679         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
29680
29681 1999-04-18  Jim Meyering  <meyering@ascend.com>
29682
29683         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
29684         * m4/jm-macros.m4: Use it.
29685
29686 1999-04-06  Jim Meyering  <meyering@ascend.com>
29687
29688         * m4/strftime.m4: Remove test for %f.
29689
29690 1999-03-29  Jim Meyering  <meyering@ascend.com>
29691
29692         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
29693         superset of the AC_TYPE_* checks in the textutils, fileutils,
29694         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
29695         AC_TYPE_PID_T.
29696
29697 1999-03-28  Jim Meyering  <meyering@ascend.com>
29698
29699         * m4/jm-macros.m4: Define GNU_PACKAGE here.
29700         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
29701         replaced e.g., in the *.sh files of the sh-utils.
29702
29703 1999-03-20  Jim Meyering  <meyering@ascend.com>
29704
29705         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
29706         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
29707         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
29708
29709 1999-03-19  Jim Meyering  <meyering@ascend.com>
29710
29711         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
29712
29713 1999-03-12  Jim Meyering  <meyering@ascend.com>
29714
29715         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
29716
29717 1999-03-07  Jim Meyering  <meyering@ascend.com>
29718
29719         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
29720         declared.
29721
29722 1999-02-17  Jim Meyering  <meyering@ascend.com>
29723
29724         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
29725         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
29726
29727 1999-02-07  Jim Meyering  <meyering@ascend.com>
29728
29729         * m4/group-member.m4: New file -- extracted from sh-utils'
29730         configure.in.
29731
29732         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
29733         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
29734
29735 1999-02-06  Jim Meyering  <meyering@ascend.com>
29736
29737         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
29738         * m4/fnmatch.m4: Likewise.
29739         * m4/getgroups.m4: Likewise.
29740         * m4/lstat.m4: Likewise.
29741         * m4/malloc.m4: Likewise.
29742         * m4/putenv.m4: Likewise.
29743         * m4/realloc.m4: Likewise.
29744         * m4/regex.m4: Likewise.
29745         * m4/stat.m4: Likewise.
29746         * m4/strftime.m4: Likewise.
29747         Suggestion from Alain Magloire.
29748
29749         * m4/chown.m4: Use `.$ac_objext', not `.o'.
29750         * m4/fnmatch.m4: Likewise.
29751         * m4/getgroups.m4: Likewise.
29752         * m4/getline.m4: Likewise.
29753         * m4/lstat.m4: Likewise.
29754         * m4/malloc.m4: Likewise.
29755         * m4/memcmp.m4: Likewise.
29756         * m4/putenv.m4: Likewise.
29757         * m4/realloc.m4: Likewise.
29758         * m4/regex.m4: Likewise.
29759         * m4/stat.m4: Likewise.
29760         * m4/strftime.m4: Likewise.
29761         Suggestion from Alain Magloire.
29762
29763         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
29764         an argument.
29765
29766         * m4/regex.m4: Add a run-time Test for proper operation of
29767         re_compile_pattern.
29768
29769 1999-01-31  Jim Meyering  <meyering@ascend.com>
29770
29771         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
29772
29773 1999-01-30  Jim Meyering  <meyering@ascend.com>
29774
29775         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
29776
29777         * m4/jm-mktime.m4: Make this a wrapper around the official
29778         AM_FUNC_MKTIME rather than my private copy, now that the official one
29779         is up to date.
29780         * m4/mktime.m4: Remove file.
29781
29782         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
29783         * m4/uptime.m4: Likewise.
29784         * m4/uintmax_t.m4: Likewise.
29785
29786 1999-01-28  Jim Meyering  <meyering@ascend.com>
29787
29788         * m4/jm-macros.m4: Use jm_AFS.
29789         * m4/afs.m4: New file (from fileutils' configure.in).
29790
29791         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
29792         * m4/chown.m4: Likewise.
29793         * m4/d-ino.m4: Likewise.
29794         * m4/d-type.m4: Likewise.
29795         * m4/fnmatch.m4: Likewise.
29796         * m4/getgroups.m4: Likewise.
29797         * m4/gettext.m4: Likewise.
29798         * m4/jm-mktime.m4: Likewise.
29799         * m4/jm-winsz2.m4: Likewise.
29800         * m4/lcmessage.m4: Likewise.
29801         * m4/ls-mntd-fs.m4: Likewise.
29802         * m4/malloc.m4: Likewise.
29803         * m4/memcmp.m4: Likewise.
29804         * m4/putenv.m4: Likewise.
29805         * m4/realloc.m4: Likewise.
29806         * m4/st_mtim.m4: Likewise.
29807         * m4/strftime.m4: Likewise.
29808
29809 1999-01-16  Jim Meyering  <meyering@ascend.com>
29810
29811         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
29812         (ARGMATCH_DIE_DECL): Define.
29813
29814 1999-01-12  Jim Meyering  <meyering@ascend.com>
29815
29816         * m4/Makefile.am.in: Rewrite to avoid using fmt.
29817         Reported by Lars Hecking.
29818
29819 1999-01-10  Jim Meyering  <meyering@ascend.com>
29820
29821         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
29822         gross kludge.
29823         * m4/inttypes_h.m4: Likewise.
29824         * m4/lstat.m4: Likewise.
29825         * m4/malloc.m4: Likewise.
29826         * m4/readdir.m4: Likewise.
29827         * m4/realloc.m4: Likewise.
29828         * m4/st_dm_mode.m4: Likewise.
29829         * m4/stat.m4: Likewise.
29830         * m4/utimbuf.m4: Likewise.
29831         * m4/utimes.m4: Likewise.
29832
29833         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
29834         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
29835         comments in config.h.in are meaningful.
29836
29837         * m4/jm-macros.m4: Require autoconf-2.13 here.
29838
29839         * m4/regex.m4: By default, don't use the included regex.c on systems
29840         with glibc 2.  Suggestion from Uli Drepper.
29841
29842 1999-01-02  Jim Meyering  <meyering@ascend.com>
29843
29844         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
29845
29846 1998-12-18  Jim Meyering  <meyering@ascend.com>
29847
29848         * m4/Makefile.am.in (Makefile.am): Simplify rule.
29849         Based on a suggestion from Lars Hecking.
29850
29851 1998-11-16  Paul Eggert  <eggert@twinsun.com>
29852
29853         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
29854
29855 1998-11-16  Jim Meyering  <meyering@ascend.com>
29856
29857         * m4/lfs.m4: Double-quote the `uname...` expression.
29858
29859 1998-11-14  Jim Meyering  <meyering@ascend.com>
29860
29861         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
29862         * m4/stat.m4: Likewise.
29863
29864 1998-11-03  Jim Meyering  <meyering@ascend.com>
29865
29866         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
29867         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
29868
29869 1998-10-18  Jim Meyering  <meyering@ascend.com>
29870
29871         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
29872
29873 1998-10-17  Jim Meyering  <meyering@ascend.com>
29874
29875         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
29876         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
29877         calls for those previously hard-coded headers.  Instead, take a new
29878         parameter.
29879         (jm_CHECK_DECLARATIONS): Reflect interface change.
29880         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
29881         (jm_CHECK_DECL_LOCALTIME_R): New macro.
29882
29883         * m4/mktime.m4: Test for spring-forward gap before long-running test.
29884
29885 1998-10-14  Jim Meyering  <meyering@ascend.com>
29886
29887         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
29888         instead of "TZ=America/Vancouver".  From Paul Eggert.
29889
29890 1998-10-11  Jim Meyering  <meyering@ascend.com>
29891
29892         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
29893         This adds a test for a recently added compatibility fix for mktime.c.
29894         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
29895
29896 1998-09-27  Jim Meyering  <meyering@ascend.com>
29897
29898         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
29899
29900         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
29901         ../configure.in, including a change from Gordon Matzigkeit to allow
29902         cross-compiling for the Hurd.
29903
29904         * m4/glibc.m4: New file/macro to test for the GNU C Library
29905         versions 1 and 2.  From Gordon Matzigkeit.
29906         Indent.
29907
29908 1998-09-21  Jim Meyering  <meyering@ascend.com>
29909
29910         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
29911
29912 1998-08-18  Paul Eggert  <eggert@twinsun.com>
29913
29914         Port nanosecond-resolution times to UnixWare 2.1.2 and
29915         pedantic Solaris 2.6.
29916
29917         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
29918         AC_STRUCT_ST_MTIM.
29919         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
29920         Generate name of ns member, instead of just 1 or undef.
29921         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
29922
29923 1998-08-15  Jim Meyering  <meyering@ascend.com>
29924
29925         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
29926         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
29927         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
29928         instead of jm_TYPE_SSIZE_T.
29929
29930 1998-08-12  Jim Meyering  <meyering@ascend.com>
29931
29932         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
29933
29934 1998-08-02  Jim Meyering  <meyering@ascend.com>
29935
29936         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
29937         in acconfig.h manually.
29938
29939 1998-07-31  Paul Eggert  <eggert@twinsun.com>
29940
29941         * m4/st_mtim.m4: New file.
29942
29943 1998-07-28  Jim Meyering  <meyering@ascend.com>
29944
29945         * m4/utimes.m4: Undef stat.
29946
29947 1998-07-25  Jim Meyering  <meyering@ascend.com>
29948
29949         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
29950         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
29951
29952 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
29953
29954         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
29955         uid and gid actually remain unchanged.
29956
29957 1998-07-07  Jim Meyering  <meyering@ascend.com>
29958
29959         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
29960
29961 1998-07-04  Jim Meyering  <meyering@ascend.com>
29962
29963         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
29964         to prove that this macro can be used in packages without regex.c.
29965
29966 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
29967
29968         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
29969         is to be used.
29970
29971 1998-07-03  Jim Meyering  <meyering@ascend.com>
29972
29973         * m4/gettext.m4: Add -lintl if it's found to be necessary.
29974
29975         * m4/gettext.m4: New file -- from gettext-0.10.35.
29976         * m4/lcmessage.m4: Likewise.
29977         * m4/progtest.m4: Likewise.
29978
29979         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
29980         * m4/jm-macros.m4: Require the new macro.
29981
29982 1998-06-29  Jim Meyering  <meyering@ascend.com>
29983
29984         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
29985         for the definition of NGROUPS (used in a system header included
29986         by sys/mount.h).
29987
29988 1998-06-28  Jim Meyering  <meyering@ascend.com>
29989
29990         * m4/ls-mntd-fs.m4: New file.
29991         * m4/fstypename.m4: New file.
29992
29993         * m4/jm-macros.m4: Require the new macro.
29994         * m4/jm-glibc-io.m4: New file.
29995
29996 1998-05-19  Jim Meyering  <meyering@ascend.com>
29997
29998         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
29999         * m4/lchown.m4: New file.
30000
30001         * m4/Makefile.am.in: New file.
30002         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
30003
30004 1998-05-14  Jim Meyering  <meyering@ascend.com>
30005
30006         * m4/Makefile.am (EXTRA_DIST): Add them.
30007         * m4/jm-macros.m4: New file.
30008         * m4/utimbuf.m4: New file.
30009
30010 1998-05-12  Jim Meyering  <meyering@ascend.com>
30011
30012         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
30013
30014 1998-05-11  Jim Meyering  <meyering@ascend.com>
30015
30016         * m4/isc-posix.m4: New file.
30017
30018 1998-05-10  Jim Meyering  <meyering@ascend.com>