ede4cb3e4ca97de7165156c3e464c074888d9f7f
[pspp] / ChangeLog
1 2007-06-05  Bruno Haible  <bruno@clisp.org>
2
3         * lib/vasnprintf.c (VASNPRINTF): Do the extra handling of NaN and Inf
4         also the %a / %A. Handle the %a / %A code before this extra handling.
5
6 2007-06-05  Bruno Haible  <bruno@clisp.org>
7
8         * lib/vasnprintf.c [NEED_PRINTF_LONG_DOUBLE ||
9         NEED_PRINTF_INFINITE_LONG_DOUBLE]: Include fpucw.h.
10
11 2007-06-05  Bruno Haible  <bruno@clisp.org>
12
13         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): Fix
14         typo in variable name.
15
16 2007-06-05  Eric Blake  <ebb9@byu.net>
17
18         * m4/lseek.m4 (gl_FUNC_LSEEK): Work when cross-compiling.
19         Reported by Simon Josefsson.
20
21 2007-06-04  Bruno Haible  <bruno@clisp.org>
22
23         Avoid test failures on some PowerPC platforms.
24         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
25         Define differently for PowerPC.
26         * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
27         Reported by Gary V. Vaughan <gary@gnu.org>.
28
29 2007-06-02  Bruno Haible  <bruno@clisp.org>
30
31         Fix test-stdint failure on FreeBSD/ia64.
32         * m4/stdint.m4 (gl_STDINT_H): Check the values of PTRDIFF_MIN,
33         PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN,
34         WCHAR_MAX, WINT_MIN, WINT_MAX entirely, not only for plausibility.
35         * doc/headers/stdint.texi: Update.
36
37 2007-06-01  Bruno Haible  <bruno@clisp.org>
38
39         * tests/test-binary-io.c (main): Pass a third argument to open().
40         Reported by Gary V. Vaughan <gary@gnu.org>.
41
42 2007-06-01  Bruno Haible  <bruno@clisp.org>
43
44         * doc/functions/frexpl.texi: Update for mingw.
45
46 2007-06-01  Bruno Haible  <bruno@clisp.org>
47
48         * tests/test-lseek.c (main): Disable test of errno for invalid third
49         argument.
50         * doc/functions/lseek.texi: Update.
51         Reported by Gary V. Vaughan <gary@gnu.org>.
52
53 2007-05-28  Bruno Haible  <bruno@clisp.org>
54
55         * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
56
57 2007-05-31  Eric Blake  <ebb9@byu.net>
58
59         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
60         cross compiling.
61
62 2007-05-30  Eric Blake  <ebb9@byu.net>
63         and Bruno Haible  <bruno@clisp.org>
64
65         Work around mingw test failures exposed by m4-1.4.9b.
66         * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug.
67         * tests/test-unistd.c: Disable uid_t and git_t tests for the
68         moment.
69
70 2007-05-30  Bruno Haible  <bruno@clisp.org>
71
72         * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before
73         assuming that they are closed. Needed on HP-UX 11.
74
75 2007-05-29  Bruno Haible  <bruno@clisp.org>
76
77         Fix a problem with #include_next.
78         * lib/dirent_.h: Split the double-inclusion guard.
79         * lib/fcntl_.h: Likewise.
80         * lib/float_.h: Likewise.
81         * lib/iconv_.h: Likewise.
82         * lib/inttypes_.h: Likewise.
83         * lib/locale_.h: Likewise.
84         * lib/math_.h: Likewise.
85         * lib/netinet_in_.h: Likewise.
86         * lib/search_.h: Likewise.
87         * lib/signal_.h: Likewise.
88         * lib/stdint_.h: Likewise.
89         * lib/stdio_.h: Likewise.
90         * lib/stdlib_.h: Likewise.
91         * lib/string_.h: Likewise.
92         * lib/sys_select_.h: Likewise.
93         * lib/sys_socket_.h: Likewise.
94         * lib/sys_stat_.h: Likewise.
95         * lib/sys_time_.h: Likewise.
96         * lib/sysexits_.h: Likewise.
97         * lib/time_.h: Likewise.
98         * lib/unistd_.h: Likewise.
99         * lib/wchar_.h: Likewise.
100         * lib/wctype_.h: Likewise.
101
102 2007-05-29  Bruno Haible  <bruno@clisp.org>
103
104         * tests/test-unistd.c: Disable the tests for useconds_t and intptr_t
105         for the moment.
106
107 2007-05-29  Bruno Haible  <bruno@clisp.org>
108
109         * m4/isnan.m4 (gl_DOUBLE_EXPONENT_LOCATION): Silence the AC_C_BIGENDIAN
110         invocation.
111         Reported by Eric Blake.
112
113 2007-05-29  Bruno Haible  <bruno@clisp.org>
114
115         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Fix typo in cross-
116         compiling case.
117
118 2007-05-29  Eric Blake  <ebb9@byu.net>
119             Bruno Haible  <bruno@clisp.org>
120
121         * m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on
122         cross compiles.
123
124 2007-05-28  Eric Blake  <ebb9@byu.net>
125
126         * modules/closein-tests (test_closein_LDADD): Support test on
127         cygwin with libtool.
128
129 2007-05-28  Bruno Haible  <bruno@clisp.org>
130
131         * tests/uniconv/test-u16-conv-from-enc.c: Remove #ifdef HAVE_CONFIG_H.
132         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
133         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
134         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
135         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
136         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
137         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
138         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
139         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
140
141 2007-05-28  Eric Blake  <ebb9@byu.net>
142
143         Unconditionally include <config.h> in unit tests.
144         * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
145         * tests/test-allocsa.c, tests/test-arcfour.c,
146         tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
147         tests/test-array_list.c, tests/test-array_oset.c,
148         tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
149         test-avltreehash_list.c, test-base64.c, test-binary-io.c,
150         test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
151         test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
152         test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
153         test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
154         test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
155         test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
156         test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
157         test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
158         test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
159         test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
160         test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
161         test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
162         test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
163         test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
164         test-md5.c, test-memmem.c, test-printf-posix.c,
165         test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
166         test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
167         test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
168         test-strcasestr.c, test-striconv.c, test-striconveh.c,
169         test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
170         test-vasnprintf-posix2.c, test-vasnprintf.c,
171         test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
172         test-vfprintf-posix.c, test-vprintf-posix.c,
173         test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
174         test-xvasprintf.c: Likewise.
175
176 2007-05-28  Bruno Haible  <bruno@clisp.org>
177
178         * gnulib-tool (func_import): Remember the --with-tests command-line
179         option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
180         Reported by Eric Blake.
181
182 2007-05-28  Bruno Haible  <bruno@clisp.org>
183
184         * modules/ftell-tests: New file.
185         * tests/test-ftell.c: New file, based on tests/test-ftello.c.
186         * tests/test-ftell.sh: New file, based on tests/test-ftello.sh.
187
188         * lib/ftell.c: New file.
189         * modules/ftell: New file.
190         * m4/ftell.m4: New file.
191         * doc/functions/ftell.texi: Update.
192         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELL,
193         REPLACE_FTELL.
194         * lib/stdio_.h (rpl_ftell): New declaration.
195         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELL,
196         REPLACE_FTELL.
197
198 2007-05-28  Eric Blake  <ebb9@byu.net>
199
200         * lib/allocsa.h (safe_alloca): Avoid compiler warning.
201
202 2007-05-28  Bruno Haible  <bruno@clisp.org>
203
204         * modules/fseek-tests: New file.
205         * tests/test-fseek.c: New file, based on tests/test-fseeko.c.
206         * tests/test-fseek.sh: New file, based on tests/test-fseeko.sh.
207
208         * lib/fseek.c: New file.
209         * modules/fseek: New file.
210         * m4/fseek.m4: New file.
211         * doc/functions/fseek.texi: Update.
212         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEK,
213         REPLACE_FSEEK.
214         * lib/stdio_.h (rpl_fseek): New declaration.
215         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEK,
216         REPLACE_FSEEK.
217
218 2007-05-28  Bruno Haible  <bruno@clisp.org>
219
220         * lib/stdio_.h (fflush): More comments.
221
222 2007-05-28  Bruno Haible  <bruno@clisp.org>
223
224         * m4/lseek.m4 (gl_FUNC_LSEEK): When not cross-compiling, perform a real
225         runtime test.
226
227 2007-05-28  Eric Blake  <ebb9@byu.net>
228
229         Improve lseek module.
230         * lib/lseek.c (rpl_lseek): Detect EBADF on mingw.
231         * lib/unistd_.h (lseek): Scale back link warning message.
232         * tests/test-lseek.c: Beef up test.
233         * tests/test-lseek.sh: Exercise more facets of lseek.
234         Reported by Bruno Haible.
235
236 2007-05-28  Bruno Haible  <bruno@clisp.org>
237
238         * tests/test-unistd.c: Test all the types that <unistd.h> is expected
239         to define.
240
241 2007-05-27  Bruno Haible  <bruno@clisp.org>
242
243         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-31 patch.
244
245 2007-05-27  Bruno Haible  <bruno@clisp.org>
246
247         * modules/openmp: New file.
248         * m4/openmp.m4: New file, taken from autoconf's CVS with changes by
249         Noah Misch.
250
251 2007-05-26  Bruno Haible  <bruno@clisp.org>
252
253         * modules/chdir-long (Depends-on): Add fchdir.
254         * modules/chdir-safer (Depends-on): Likewise.
255         * modules/fts (Depends-on): Likewise.
256         * modules/fts-lgpl (Depends-on): Likewise.
257         * modules/openat (Depends-on): Likewise.
258         * modules/savewd (Depends-on): Likewise.
259
260 2007-05-24  Eric Blake  <ebb9@byu.net>
261
262         Fix lseek on mingw.
263         * modules/lseek: New module.
264         * m4/lseek.m4: New file.
265         * lib/lseek.c: New file.
266         * modules/lseek-tests: New file.
267         * tests/test-lseek.c: New file.
268         * tests/test-lseek.sh: New file.
269         * MODULES.html.sh: Document lseek module.
270         * modules/fflush (Depends-on): Add lseek, fseeko.
271         * modules/fseeko (Depends-on): Likewise.
272         * modules/ftello (Depends-on): Likewise.
273         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
274         broken.
275         * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
276         broken.
277         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
278         * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
279         * lib/ftello.c (rpl_ftello): Likewise.
280         * tests/test-fseeko.c (main): Test this.
281         * tests/test-fseeko.sh: Likewise.
282         * tests/test-ftello.c (main): Likewise.
283         * tests/test-ftello.sh: Likewise.
284         * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
285         implies replacing fseek.
286         * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
287         HAVE_FTELLO.
288         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
289         * modules/unistd (Makefile.am): Likewise.
290         * lib/unistd_.h (lseek): Declare a replacement.
291         * doc/functions/lseek.texi (lseek): Document this fix.
292         * doc/functions/fseek.texi (fseek): Likewise.
293         * doc/functions/ftell.texi (ftell): Likewise.
294
295 2007-05-24  Bruno Haible  <bruno@clisp.org>
296
297         * tests/test-vasnprintf-posix.c (test_function): Allow up to 50 bytes
298         in the printed representation of a NaN.
299         * tests/test-vasprintf-posix.c (test_function): Likewise.
300         * tests/test-snprintf-posix.h (test_function): Likewise.
301         * tests/test-sprintf-posix.h (test_function): Likewise.
302         Reported by Eric Blake.
303
304 2007-05-23  Eric Blake  <ebb9@byu.net>
305
306         Fix fseeko/ftello on cygwin 1.5.24.
307         * doc/functions/fseeko.texi (fseeko): Document the fix.
308         * doc/functions/ftello.texi (ftello): Document the fix.
309         * doc/functions/stdin.texi (stdin): Document the cygwin bug.
310         * doc/functions/stdout.text (stdout): New file.
311         * doc/functions/stderr.text (stderr): New file.
312         * doc/gnulib.texi (Function Substitutes): Use new files.
313         * tests/test-fseeko.c (main): Check for broken fseeko on cygwin
314         prior to 1.7.0.
315         * tests/test-ftello.c (main): Likewise for ftello.
316         * tests/test-fseeko.sh: New file.
317         * tests/test-ftello.sh: New file.
318         * modules/fseeko-tests (Makefile.am): Ensure test-fseeko is run
319         with seekable stdin.
320         * modules/ftello-tests (Makefile.am): Likewise for test-ftello.
321         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Detect the cygwin bug.
322         (gl_REPLACE_FSEEKO): New macro.
323         * m4/ftello.m4 (gl_FUNC_FTELLO, gl_REPLACE_FTELLO): Likewise.
324         * modules/fseeko (Files): Distribute fseeko.c.
325         * modules/ftello (Files): Distribute ftello.c.
326         * lib/fseeko.c (rpl_fseeko) [__CYGWIN__]: Convert stdin to 64-bit
327         mode.
328         * lib/ftello.c (rpl_ftello): New file.
329         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Allow replacement of
330         fseeko, ftello.
331         (gl_STDIN_LARGE_OFFSET): New macro.
332         * modules/stdio (Makefile.am): Perform the replacement.
333         * lib/stdio_.h (rpl_fseeko, rpl_ftello): Define when needed.
334
335 2007-05-23  Bruno Haible  <bruno@clisp.org>
336
337         * lib/stdio_.h (fseeko, ftello): Provide a link warning only if
338         GNULIB_POSIXCHECK is defined.
339
340 2007-05-21  Bruno Haible  <bruno@clisp.org>
341
342         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE):
343         Check also the output for NaN arguments. When cross-compiling, guess
344         no on IRIX.
345         * lib/vasnprintf.c: Update comments.
346         * tests/test-vasnprintf-posix.c (strisnan): New function.
347         (test_function): Use it.
348         * tests/test-vasprintf-posix.c (strisnan): New function.
349         (test_function): Use it.
350         * tests/test-snprintf-posix.h (strisnan): New function.
351         (test_function): Use it.
352         * tests/test-sprintf-posix.h (strisnan): New function.
353         (test_function): Use it.
354         Reported by Eric Blake.
355
356 2007-05-20  Bruno Haible  <bruno@clisp.org>
357
358         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Add test for large finite
359         numbers that fails on BeOS.
360         * doc/functions/frexpl.texi: Update.
361
362 2007-05-20  Jim Meyering  <jim@meyering.net>
363
364         * NEWS: Mention the incompatible change (s/futimens/gl_futimens/)
365         forced upon us by glibc-2.6.
366
367 2007-05-20  Bruno Haible  <bruno@clisp.org>
368
369         Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
370         * m4/printf.m4 (gl_PRINTF_INFINITE): Update cross-compiling guesses.
371         (gl_PRINTF_INFINITE_LONG_DOUBLE): New macro.
372         * lib/vasnprintf.c: Use NEED_PRINTF_INFINITE_DOUBLE instead of
373         NEED_PRINTF_INFINITE.
374         (is_infinitel): New function.
375         (VASNPRINTF): Handle NEED_PRINTF_INFINITE_LONG_DOUBLE case.
376         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE): Renamed from
377         gl_PREREQ_VASNPRINTF_INFINITE.
378         (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): New macro.
379         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
380         gl_PRINTF_INFINITE_LONG_DOUBLE and test its result. Invoke
381         gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE and
382         gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE instead of
383         gl_PREREQ_VASNPRINTF_INFINITE.
384         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
385         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
386         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
387         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
388         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
389         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
390         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
391         * doc/functions/fprintf.texi: Update.
392         * doc/functions/printf.texi: Update.
393         * doc/functions/snprintf.texi: Update.
394         * doc/functions/sprintf.texi: Update.
395         * doc/functions/vfprintf.texi: Update.
396         * doc/functions/vprintf.texi: Update.
397         * doc/functions/vsnprintf.texi: Update.
398         * doc/functions/vsprintf.texi: Update.
399
400 2007-05-20  Bruno Haible  <bruno@clisp.org>
401
402         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): Set REPLACE_FREXPL if frexpl
403         was not found in libc.
404         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
405
406 2007-05-20  Bruno Haible  <bruno@clisp.org>
407
408         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
409         printed as "-nan" instead of "nan".
410         * tests/test-vasprintf-posix.c (test_function): Likewise.
411         * tests/test-snprintf-posix.h (test_function): Likewise.
412         * tests/test-sprintf-posix.h (test_function): Likewise.
413         Needed for HP-UX 11.
414
415 2007-05-20  Jim Meyering  <jim@meyering.net>
416
417         Fix buggy test for the fchownat-deref bug.
418         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
419         symlink required for the run-test.  Without it, this test would
420         always declare that fchownat doesn't work, and client code would
421         unnecessarily use the replacement function with fixed libc.
422         (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
423         Reported by Greg Schafer.
424
425 2007-05-19  Bruno Haible  <bruno@clisp.org>
426
427         * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro.
428         (gl_FUNC_ISNANF_NO_LIBM): Invoke it.
429         * lib/isnan.c (FUNC): Use run-time expressions for SGI compiler.
430         Needed for IRIX 6.5 and Solaris 2.5.1.
431
432 2007-05-19  Bruno Haible  <bruno@clisp.org>
433
434         * tests/test-vasnprintf-posix.c (have_minus_zero): New function.
435         (test_function): Skip tests involving -0.0 on platforms where
436         -0.0 = 0.0.
437         * tests/test-vasprintf-posix.c (have_minus_zero): New function.
438         (test_function): Skip tests involving -0.0 on platforms where
439         -0.0 = 0.0.
440         * tests/test-snprintf-posix.h (have_minus_zero): New function.
441         (test_function): Skip tests involving -0.0 on platforms where
442         -0.0 = 0.0.
443         * tests/test-sprintf-posix.h (have_minus_zero): New function.
444         (test_function): Skip tests involving -0.0 on platforms where
445         -0.0 = 0.0.
446         * tests/test-fprintf-posix.h (test_function): Remove all -0.0 related
447         tests.
448         * tests/test-printf-posix.h (test_function): Likewise.
449         * tests/test-printf-posix.output: Remove all -0.0 related results.
450         Needed for IRIX 6.5.
451
452 2007-05-19  Bruno Haible  <bruno@clisp.org>
453
454         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
455         printed as "nan0x7fffffff" instead of "nan".
456         * tests/test-vasprintf-posix.c (test_function): Likewise.
457         * tests/test-snprintf-posix.h (test_function): Likewise.
458         * tests/test-sprintf-posix.h (test_function): Likewise.
459         * tests/test-fprintf-posix.h (NaN): Remove macro.
460         (test_function): Remove all NaN related tests.
461         * tests/test-printf-posix.h (NaN): Remove macro.
462         (test_function): Remove all NaN related tests.
463         * tests/test-printf-posix.output: Remove all NaN related results.
464         Needed for IRIX 6.5.
465
466 2007-05-19  Bruno Haible  <bruno@clisp.org>
467
468         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Fix C89 syntax error in test code.
469         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
470
471 2007-05-19  Bruno Haible  <bruno@clisp.org>
472
473         * lib/float_.h: New file.
474         * m4/float_h.m4: New file.
475         * modules/float: New file.
476         * modules/isnanl (Dependencies): Add float.
477         * modules/isnanl-nolibm (Dependencies): Likewise.
478         * modules/mathl (Dependencies): Likewise.
479         * modules/printf-frexpl (Dependencies): Likewise.
480         * modules/signbit (Dependencies): Likewise.
481         * modules/vasnprintf (Dependencies): Likewise.
482         * doc/headers/float.texi: Update.
483
484 2007-05-19  Jim Meyering  <jim@meyering.net>
485
486         * lib/utimens.c (gl_futimens): Rename from futimens,
487         now that glibc-2.6 declares futimens.
488         * lib/utimens.h: Likewise.
489
490 2007-05-19  Bruno Haible  <bruno@clisp.org>
491
492         Avoid test failures on mingw.
493         * tests/test-fprintf-posix.sh: Convert CR/LF to LF in output.
494         * tests/test-printf-posix.sh: Likewise.
495         * tests/test-vfprintf-posix.sh: Likewise.
496         * tests/test-vprintf-posix.sh: Likewise.
497
498 2007-05-19  Bruno Haible  <bruno@clisp.org>
499
500         Fix *printf result for NaN, Inf, -0.0 on mingw.
501         * m4/printf.m4 (gl_PRINTF_INFINITE): New macro.
502         * lib/vasnprintf.c: Include math.h and isnan.h.
503         (is_infinite_or_zero): New function.
504         (VASNPRINTF): Fix also the handling of infinite or zero 'double'
505         values in the %f, %F, %e, %E, %g, %G directives.
506         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE): New macro.
507         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
508         gl_PRINTF_INFINITE and test its result. Invoke
509         gl_PREREQ_VASNPRINTF_INFINITE.
510         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
511         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
512         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
513         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
514         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
515         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
516         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
517         * doc/functions/fprintf.texi: Update.
518         * doc/functions/printf.texi: Update.
519         * doc/functions/snprintf.texi: Update.
520         * doc/functions/sprintf.texi: Update.
521         * doc/functions/vfprintf.texi: Update.
522         * doc/functions/vprintf.texi: Update.
523         * doc/functions/vsnprintf.texi: Update.
524         * doc/functions/vsprintf.texi: Update.
525
526 2007-05-19  Bruno Haible  <bruno@clisp.org>
527
528         * lib/vasnprintf.c (convert_to_decimal): Add an extra_zeroes argument.
529         (scale10_round_decimal_long_double): Inline scale10_round_long_double.
530         Instead of multiplying with 10^k, set extra_zeroes to k.
531         (scale10_round_long_double): Remove function.
532
533 2007-05-18  Bruno Haible  <bruno@clisp.org>
534
535         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Fix logic bug
536         introduced on 2007-05-06.
537
538 2007-05-18  Bruno Haible  <bruno@clisp.org>
539
540         * tests/test-vasnprintf-posix.c (test_function): Also test the %e and
541         %g directives.
542         * tests/test-vasprintf-posix.c (test_function): Likewise.
543         * tests/test-snprintf-posix.h (test_function): Likewise.
544         * tests/test-sprintf-posix.h (test_function): Likewise.
545
546 2007-05-18  Bruno Haible  <bruno@clisp.org>
547
548         * tests/test-vasnprintf-posix.c (SIZEOF): New macro.
549         (strmatch): New function.
550         (test_function): Test the %f directive on numbers of various exponents.
551         * tests/test-vasprintf-posix.c (SIZEOF): New macro.
552         (strmatch): New function.
553         (test_function): Test the %f directive on numbers of various exponents.
554         * tests/test-snprintf-posix.h (strmatch): New function.
555         (test_function): Test the %f directive on numbers of various exponents.
556         * tests/test-sprintf-posix.h (strmatch): New function.
557         (test_function): Test the %f directive on numbers of various exponents.
558         * tests/test-snprintf-posix.c (SIZEOF): New macro.
559         * tests/test-sprintf-posix.c (SIZEOF): New macro.
560         * tests/test-vsnprintf-posix.c (SIZEOF): New macro.
561         * tests/test-vsprintf-posix.c (SIZEOF): New macro.
562
563 2007-05-18  Bruno Haible  <bruno@clisp.org>
564
565         Add support for 'long double' number output.
566         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE): New macro.
567         * lib/vasnprintf.c: Include math.h and float+.h.
568         (mp_limb_t): New type.
569         (GMP_LIMB_BITS): New macro.
570         (mp_twolimb_t): New type.
571         (GMP_TWOLIMB_BITS): New macro.
572         (mpn_t): New type.
573         (multiply, divide, convert_to_decimal, decode_long_double,
574         scale10_round_long_double, scale10_round_decimal_long_double,
575         floorlog10l): New functions.
576         (VASNPRINTF) [NEED_PRINTF_LONG_DOUBLE]: Implement 'long double' support
577         for the %f, %F, %e, %E, %g, %G directives.
578         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_LONG_DOUBLE): New macro.
579         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
580         gl_PRINTF_LONG_DOUBLE and test its result. Invoke
581         gl_PREREQ_VASNPRINTF_LONG_DOUBLE.
582         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
583         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
584         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
585         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
586         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
587         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
588         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
589         * modules/fprintf-posix (Depends-on): Add frexpl-nolibm.
590         * modules/snprintf-posix (Depends-on): Likewise.
591         * modules/sprintf-posix (Depends-on): Likewise.
592         * modules/vasnprintf-posix (Depends-on): Likewise.
593         * modules/vasprintf-posix (Depends-on): Likewise.
594         * modules/vfprintf-posix (Depends-on): Likewise.
595         * modules/vsnprintf-posix (Depends-on): Likewise.
596         * modules/vsprintf-posix (Depends-on): Likewise.
597         * modules/vasnprintf (Files): Add lib/float+.h.
598         * doc/functions/fprintf.texi: Update.
599         * doc/functions/printf.texi: Update.
600         * doc/functions/snprintf.texi: Update.
601         * doc/functions/sprintf.texi: Update.
602         * doc/functions/vfprintf.texi: Update.
603         * doc/functions/vprintf.texi: Update.
604         * doc/functions/vsnprintf.texi: Update.
605         * doc/functions/vsprintf.texi: Update.
606
607 2007-05-18  Bruno Haible  <bruno@clisp.org>
608
609         * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS.
610
611 2007-05-18  Bruno Haible  <bruno@clisp.org>
612
613         * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
614         for printing 64-bit integers. Needed for mingw.
615
616 2007-05-18  Bruno Haible  <bruno@clisp.org>
617
618         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
619         gl_FUNC_FREXPL_WORKS.
620         * modules/printf-frexpl (Files): Add m4/frexpl.m4.
621
622 2007-05-18  Bruno Haible  <bruno@clisp.org>
623
624         * modules/frexpl-nolibm-tests: New file.
625
626         * modules/frexpl-nolibm: New file.
627         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): New macro.
628
629 2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
630
631         * lib/dirent_.h: Prefer #include_next <foo.h> to #include
632         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
633         GCC 4.2, which otherwise issues a lot of warnings.
634         * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
635         * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
636         Likewise.
637         * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
638         * modules/iconv_open (iconv.h): Likewise.
639         * modules/locale (locale.h): Likewise.
640         * modules/netinet_in (netinet/in.h): Likewise.
641         * modules/sys_select (sys_select.h): Likewise.
642         * modules/sys_socket (sys/socket.h): Likewise.
643         * modules/sys_stat (sys/stat.h): Likewise.
644         * modules/sysexits (sysexits.h): Likewise.
645         * modules/unistd (unistd.h): Likewise.
646
647 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
648
649         * modules/closein-tests (Makefile.am): Distribute
650         `test-closein.sh'.
651
652 2007-05-17  Bruno Haible  <bruno@clisp.org>
653
654         * tests/test-printf-posix.output: Renamed from
655         tests/test-fprintf-posix.out.
656         * modules/fprintf-posix-tests: Update.
657         * modules/printf-posix-tests: Update.
658         * modules/vfprintf-posix-tests: Update.
659         * modules/vprintf-posix-tests: Update.
660         * tests/test-fprintf-posix.sh: Update.
661         * tests/test-printf-posix.sh: Update.
662         * tests/test-vfprintf-posix.sh: Update.
663         * tests/test-vprintf-posix.sh: Update.
664         Reported by Ralf Wildenhues.
665
666 2007-05-16  Paul Eggert  <eggert@cs.ucla.edu>
667
668         * lib/fcntl_.h: Prefer #include_next <foo.h> to #include
669         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
670         GCC 4.2, which otherwise issues a lot of warnings.
671         * lib/inttypes_.h, lib/math_.h, lib/search_.h, lib/signal_.h:
672         * lib/stdint_.h, lib/stdio_.h, lib/stdlib_.h, lib/string_.h:
673         * lib/sys_time_.h, lib/time_.h, lib/wchar_.h, lib/wctype_.h: Likewise.
674         * lib/stdlib_.h: Don't bother with #pragma GCC system_header, as
675         it should no longer be needed.
676         * lib/string_.h: Likewise.
677         * modules/absolute-header (HAVE_INCLUDE_NEXT): New 'make' define.
678         * modules/fcntl (fcntl.h): Substitute @HAVE_INCLUDE_NEXT@.
679         * modules/inttypes (inttypes.h): Likewise.
680         * modules/math (math.h): Likewise.
681         * modules/search (search.h): Likewise.
682         * modules/signal (signal.h): Likewise.
683         * modules/stdint (stdint.h): Likewise.
684         * modules/stdio (stdio.h): Likewise.
685         * modules/stdlib (stdlib.h): Likewise.
686         * modules/string (string.h): Likewise.
687         * modules/sys_time (sys/time.h): Likewise.
688         * modules/time (time.h): Likewise.
689         * modules/wchar (wchar.h): Likewise.
690         * modules/wctype (wtype.h): Likewise.
691
692 2007-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
693
694         * doc/gnulib-tool.texi (CVS Issues): Fix typo.
695
696 2007-05-13  Bruno Haible  <bruno@clisp.org>
697
698         * stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
699         * stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
700         * strsep.m4 (gl_FUNC_STRSEP): Likewise.
701         * strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
702         (gl_PREREQ_STRTOK_R): Don't require it here.
703
704 2007-05-13  Bruno Haible  <bruno@clisp.org>
705
706         * lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
707         when used in C++ mode.
708
709 2007-05-12  Bruno Haible  <bruno@clisp.org>
710
711         * lib/linebuffer.h: Tweak doc.
712         * lib/linebuffer.c: Likewise.
713
714 2007-05-12  James Youngman  <jay@gnu.org>
715
716         * lib/linebuffer.c (readlinebuffer_delim): New function,
717         like readlinebuffer, but use a caller-specified delimiter.
718         (readlinebuffer): Just call readlinebuffer_delim with '\n'
719         as the delimiter.
720         * lib/linebuffer.h (readlinebuffer_delim): Declare it.
721
722 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
723
724         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require openat-die.
725         * modules/openat (Files): Remove openat-die.c.
726         (Depends-on): Add openat-die.
727         * modules/openat-die: New module.
728
729 2007-05-06  Bruno Haible  <bruno@clisp.org>
730
731         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
732         Update with info about Cygwin.
733         * doc/functions/fprintf.texi: Update.
734         * doc/functions/printf.texi: Update.
735         * doc/functions/snprintf.texi: Update.
736         * doc/functions/sprintf.texi: Update.
737         * doc/functions/vfprintf.texi: Update.
738         * doc/functions/vprintf.texi: Update.
739         * doc/functions/vsnprintf.texi: Update.
740         * doc/functions/vsprintf.texi: Update.
741         Reported by Eric Blake.
742
743 2007-05-06  Bruno Haible  <bruno@clisp.org>
744
745         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
746         padding ourselves for the floating-point directives.
747         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
748         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
749         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
750         gl_PRINTF_FLAG_ZERO and test its result. Invoke
751         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
752         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
753         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
754         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
755         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
756         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
757         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
758         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
759         * tests/test-snprintf-posix.h (test_function): Also check the width
760         and some flags in the %f directive.
761         * tests/test-sprintf-posix.h (test_function): Likewise.
762         * tests/test-vasnprintf-posix.c (test_function): Likewise.
763         * tests/test-vasprintf-posix.c (test_function): Likewise.
764         * doc/functions/fprintf.texi: Update.
765         * doc/functions/printf.texi: Update.
766         * doc/functions/snprintf.texi: Update.
767         * doc/functions/sprintf.texi: Update.
768         * doc/functions/vfprintf.texi: Update.
769         * doc/functions/vprintf.texi: Update.
770         * doc/functions/vsnprintf.texi: Update.
771         * doc/functions/vsprintf.texi: Update.
772
773 2007-05-06  Bruno Haible  <bruno@clisp.org>
774
775         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
776         pass the ' flag character to sprintf or snprintf.
777         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
778         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
779         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
780         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
781         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
782         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
783         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
784         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
785         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
786         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
787         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
788         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
789         * tests/test-snprintf-posix.h (test_function): Also check the grouping
790         flag.
791         * tests/test-sprintf-posix.h (test_function): Likewise.
792         * tests/test-vasnprintf-posix.c (test_function): Likewise.
793         * tests/test-vasprintf-posix.c (test_function): Likewise.
794         * doc/functions/fprintf.texi: Update.
795         * doc/functions/printf.texi: Update.
796         * doc/functions/snprintf.texi: Update.
797         * doc/functions/sprintf.texi: Update.
798         * doc/functions/vfprintf.texi: Update.
799         * doc/functions/vprintf.texi: Update.
800         * doc/functions/vsnprintf.texi: Update.
801         * doc/functions/vsprintf.texi: Update.
802
803 2007-05-01  Bruno Haible  <bruno@clisp.org>
804
805         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
806
807 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
808
809         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
810         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
811
812 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
813
814         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
815         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
816         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00021.html>.
817
818 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
819
820         * lib/argp-help.c (struct hol_entry): New member `ord'.
821         (HOL_ENTRY_PTRCMP): Use ord for comparison
822         (hol_sort): Initialize ord.
823
824 2007-05-01  Bruno Haible  <bruno@clisp.org>
825
826         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
827         Reported by Eric Blake.
828         * doc/gnulib.texi (Function Substitutes): Update.
829
830 2007-05-01  Bruno Haible  <bruno@clisp.org>
831
832         * doc/functions.texi: Remove file, now redundant through
833         doc/functions/*.texi.
834
835 2007-05-01  Bruno Haible  <bruno@clisp.org>
836
837         * modules/argp (Depends-on): Add sleep.
838
839 2007-05-01  Bruno Haible  <bruno@clisp.org>
840
841         * modules/sleep-tests: New file.
842         * tests/test-sleep.c: New file.
843
844         * modules/sleep: New file.
845         * lib/sleep.c: New file.
846         * m4/sleep.m4: New file.
847         * lib/unistd_.h (sleep): New declaration.
848         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
849         HAVE_SLEEP.
850         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
851         * doc/functions/sleep.texi: Document the sleep module.
852
853 2007-05-01  Bruno Haible  <bruno@clisp.org>
854
855         * lib/sigprocmask.h: Remove file.
856         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
857         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
858         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
859         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
860         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
861         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
862         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
863         HAVE_SIGSET_T as a shell variable.
864         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
865         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
866         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
867         (Depends-on): Add signal. Remove verify.
868         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
869         (Include): Mention <signal.h> instead of sigprocmask.h.
870         * NEWS: Mention the change.
871         * lib/fatal-signal.c: Don't include sigprocmask.h.
872
873 2007-05-01  Bruno Haible  <bruno@clisp.org>
874
875         * modules/signal: New file.
876         * lib/signal_.h: New file.
877         * m4/signal_h.m4: New file.
878
879 2007-05-01  Bruno Haible  <bruno@clisp.org>
880
881         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
882         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
883         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
884         HAVE_WCTYPE_CTMP_BUG into wctype.h.
885
886 2007-05-01  Bruno Haible  <bruno@clisp.org>
887
888         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
889         configure time.
890         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
891         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
892         * modules/sys_stat (Makefile.am): Substitute their values into
893         sys/stat.h.
894
895 2007-05-01  Bruno Haible  <bruno@clisp.org>
896
897         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
898         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
899         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
900
901 2007-05-01  Bruno Haible  <bruno@clisp.org>
902
903         * doc/header/assert.texi: Undo last change: don't mention the gnulib
904         'assert' module here.
905
906 2007-05-01  Bruno Haible  <bruno@clisp.org>
907
908         * doc/functions/*.texi: New files.
909         * doc/functions/google-ranking.txt: New file.
910         * doc/gnulib.texi (Function Substitutes): New chapter.
911         (ctime, inet_ntoa): Remove sections.
912         * doc/ctime.texi: Remove file.
913         * doc/inet_ntoa.texi: Remove file.
914         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
915         dependencies.
916         (%.info): New rule, specifying a --reference-limit.
917
918 2007-05-01  Bruno Haible  <bruno@clisp.org>
919
920         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
921
922 2007-05-01  Bruno Haible  <bruno@clisp.org>
923
924         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
925         the portability of 'mkdir' to mingw systems.
926
927 2007-05-01  Bruno Haible  <bruno@clisp.org>
928
929         * doc/headers/google-ranking.txt: New file.
930
931 2007-04-30  Eric Blake  <ebb9@byu.net>
932
933         Prefer fseeko to fseek.
934         * modules/getpass (Depends-on): Add fseeko.
935         * lib/getpass.c (getpass): Use fseeko, not fseek.
936
937 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
938
939         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
940         assumes the sorting is stable, while most qsort implementations
941         are not.  Use argument addresses to ensure they never compare as
942         equal.
943
944         * tests/test-argp-2.sh (usage-indent test): Fix output
945         (func_compare): Restore diff options
946         * tests/test-argp.c: Restore #include "progname.h"
947
948 2007-04-29  Bruno Haible  <bruno@clisp.org>
949
950         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
951         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
952         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
953         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
954         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
955         (configure.ac): Define CHECK_SNPRINTF_POSIX.
956         (TESTS, check_PROGRAMS): Add test-snprintf.
957         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
958         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
959         (TESTS, check_PROGRAMS): Add test-vsnprintf.
960         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
961         assertions that fail on HP-UX, OSF/1, or IRIX.
962         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
963
964 2007-04-29  Bruno Haible  <bruno@clisp.org>
965
966         * MODULES.html.sh (posix_functions): Remove 'contents'.
967
968 2007-04-29  Karl Berry  <karl@gnu.org>
969
970         * config/srclist.txt (gendocs_template_min): new entry.
971
972 2007-04-29  Bruno Haible  <bruno@clisp.org>
973
974         Work around fpurge bug on BSD systems.
975         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
976         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
977         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
978         fpurge to rpl_fpurge if the system already has this function.
979         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
980         the case where the system already has this function. Correct invariants
981         on BSD systems.
982         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
983         BSD systems.
984
985 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
986
987         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
988         proposed by Sven Verdoolaege.
989
990         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
991         options.
992         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
993         (usage and help tests): Update
994
995 2007-04-29  Bruno Haible  <bruno@clisp.org>
996
997         * tests/test-fflush.c (main): Use a file of size 17, not 10.
998         Print more information in case of failure. Disable a test on BeOS.
999
1000 2007-04-29  Bruno Haible  <bruno@clisp.org>
1001
1002         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
1003         This helps debugging on systems on which no gdb is available.
1004
1005 2007-04-29  Bruno Haible  <bruno@clisp.org>
1006
1007         * lib/freading.h: Improve comments.
1008         * lib/fwriting.h: Likewise.
1009         * tests/test-freading.c (main): Don't check freading immediately after
1010         repositioning. Needed for glibc.
1011
1012 2007-04-29  Bruno Haible  <bruno@clisp.org>
1013
1014         * lib/freading.c (freading): Trivial simplification.
1015
1016 2007-04-28  Bruno Haible  <bruno@clisp.org>
1017
1018         * tests/test-fwriting.c (main): Also test the interaction between
1019         fflush and fwriting.
1020         * modules/fwriting-tests (Depends-on): Add fflush.
1021
1022         * tests/test-freading.c (main): Also test the interaction between
1023         fflush and freading.
1024         * modules/freading-tests (Depends-on): Add fflush.
1025
1026 2007-04-28  Bruno Haible  <bruno@clisp.org>
1027
1028         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
1029         fseeko and ftello.
1030         Suggested by Eric Blake.
1031
1032 2007-04-28  Jim Meyering  <jim@meyering.net>
1033
1034         Avoid false-negative in gl_STDINT_H's C99 conformance test.
1035         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
1036         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
1037
1038 2007-04-27  Eric Blake  <ebb9@byu.net>
1039
1040         * doc/headers/assert.texi (assert.h): Document assert module use.
1041
1042 2007-04-27  Bruno Haible  <bruno@clisp.org>
1043
1044         * doc/headers/*.texi: New files.
1045         * doc/gnulib.texi (Header File Substitutes): New chapter.
1046         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
1047         dependencies.
1048         (standards.info ,standards.html, standards.dvi): Update dependencies.
1049         (mostlyclean, clean): New targets.
1050
1051 2007-04-27  Bruno Haible  <bruno@clisp.org>
1052
1053         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
1054         * modules/sysexits (Files, Makefile.am): Update.
1055
1056         * lib/sys_socket_.h: Renamed from lib/socket_.h.
1057         * modules/sys_socket (Files, Makefile.am): Update.
1058
1059         * lib/sys_stat_.h: Renamed from lib/stat_.h.
1060         * modules/sys_stat (Files, Makefile.am): Update.
1061
1062 2007-04-27  Eric Blake  <ebb9@byu.net>
1063
1064         * lib/freading.h: Improve comments.
1065         * lib/fwriting.h: Likewise.
1066         * lib/fflush.c: Likewise.
1067
1068         Fix closein for mingw.
1069         * modules/closein-tests: Add tests for closein.
1070         * tests/test-closein.c: New file.
1071         * tests/test-closein.sh: Likewise.
1072         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
1073         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
1074
1075 2007-04-27  Bruno Haible  <bruno@clisp.org>
1076
1077         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
1078         version is < 6.
1079         * lib/math_.h [__DECC]: Likewise.
1080         * lib/stdio_.h [__DECC]: Likewise.
1081         * lib/stdlib_.h [__DECC]: Likewise.
1082         * lib/string_.h [__DECC]: Likewise.
1083         * lib/time_.h [__DECC]: Likewise.
1084         * lib/wchar_.h [__DECC]: Likewise.
1085         * lib/wctype_.h [__DECC]: Likewise.
1086
1087 2007-04-27  Bruno Haible  <bruno@clisp.org>
1088
1089         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
1090
1091 2007-04-27  Bruno Haible  <bruno@clisp.org>
1092
1093         * lib/fflush.c: Add comments.
1094         * modules/fpurge-tests (Depends-on): Add fflush.
1095         * modules/freadable-tests (Depends-on): Likewise.
1096         * modules/fwritable-tests (Depends-on): Likewise.
1097
1098 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
1099
1100         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
1101         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
1102         Report by Bruno Haible <bruno@clisp.org>.
1103
1104 2007-04-26  Eric Blake  <ebb9@byu.net>
1105
1106         Fix fflush on mingw.
1107         * modules/fflush (Depends-on): Add freading.
1108         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
1109         but unread data.
1110
1111 2007-04-26  Eric Blake  <ebb9@byu.net>
1112         and Bruno Haible  <bruno@clisp.org>
1113
1114         Implement freading and fwriting.
1115         * lib/freading.c: New file.
1116         * lib/freading.h: Likewise.
1117         * m4/freading.m4: Likewise.
1118         * modules/freading: Likewise.
1119         * modules/freading-tests: Likewise.
1120         * tests/test-freading.c: Likewise.
1121         * lib/fwriting.c: New file.
1122         * lib/fwriting.h: Likewise.
1123         * m4/fwriting.m4: Likewise.
1124         * modules/fwriting: Likewise.
1125         * modules/fwriting-tests: Likewise.
1126         * tests/test-fwriting.c: Likewise.
1127         * MODULES.html.sh (File stream based Input/Output): Mention them.
1128
1129 2007-04-26  Bruno Haible  <bruno@clisp.org>
1130
1131         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
1132         'long' when we assume it.
1133         Suggested by Eric Blake.
1134
1135 2007-04-26  Bruno Haible  <bruno@clisp.org>
1136
1137         Ensure fseeko, ftello are declared on glibc systems.
1138         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
1139         * modules/fseeko (configure.ac-early): Likewise.
1140         * modules/ftello (configure.ac-early): Likewise.
1141         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
1142         AC_FUNC_FSEEKO for this.
1143         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
1144         (gl_CHECK_FSEEKO): Remove macro.
1145
1146 2007-04-26  Bruno Haible  <bruno@clisp.org>
1147
1148         * tests/test-fflush.c (main): Also check the ftell result after
1149         fflush and fseek/fseeko.
1150         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
1151         file descriptor position cache in the stream.
1152         * lib/fseeko.c (rpl_fseeko): Likewise.
1153
1154 2007-04-26  Bruno Haible  <bruno@clisp.org>
1155
1156         * modules/fflush-tests (Depends-on): Add fseeko.
1157
1158 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
1159             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1160
1161         * lib/argz_.h: ensure error_t definition is obtained in same
1162         mechanism system argz.h would have.
1163         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
1164         argz facilities are known bad.  Err on the side of caution if
1165         cross-compiling.
1166
1167 2007-04-25  Eric Blake  <ebb9@byu.net>
1168
1169         * lib/fpurge.c (includes): Use stdlib.h for free.
1170         * tests/test-fflush.c (main): Also test fflush-fseeko.
1171
1172 2007-04-25  Bruno Haible  <bruno@clisp.org>
1173
1174         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
1175         * lib/fseeko.c: New file.
1176         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
1177         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
1178         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
1179         gl_FUNC_FSEEKO.
1180         (gl_FUNC_FSEEKO): Invoke it.
1181         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
1182         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
1183         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
1184
1185 2007-04-25  Bruno Haible  <bruno@clisp.org>
1186
1187         * modules/fflush (Depends-on): Add ftello.
1188
1189 2007-04-25  Bruno Haible  <bruno@clisp.org>
1190
1191         * modules/ftello-tests: New file.
1192         * tests/test-ftello.c: New file.
1193
1194         * modules/ftello: New file.
1195         * m4/ftello.m4: New file.
1196         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
1197         HAVE_FTELLO.
1198         * lib/stdio_.h (ftello): New declaration.
1199         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
1200         HAVE_FTELLO.
1201
1202 2007-04-25  Bruno Haible  <bruno@clisp.org>
1203
1204         * modules/fseeko-tests: New file.
1205         * tests/test-fseeko.c: New file.
1206
1207         * modules/fseeko: New file.
1208         * m4/fseeko.m4: New file.
1209         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
1210         HAVE_FSEEKO.
1211         * lib/stdio_.h (fseeko): New declaration.
1212         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
1213         HAVE_FSEEKO.
1214
1215 2007-04-25  Bruno Haible  <bruno@clisp.org>
1216
1217         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
1218
1219 2007-04-25  Bruno Haible  <bruno@clisp.org>
1220
1221         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
1222         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
1223         * tests/test-unistd.c: Likewise.
1224         * tests/test-fcntl.c: Likewise.
1225
1226 2007-04-23  Eric Blake  <ebb9@byu.net>
1227
1228         * lib/fflush.c: Fix missing include.
1229         Reported by Bruno Haible.
1230
1231 2007-04-23  Bruno Haible  <bruno@clisp.org>
1232
1233         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
1234         Reported by Eric Blake.
1235
1236 2007-04-23  Bruno Haible  <bruno@clisp.org>
1237
1238         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
1239
1240 2007-04-23  Bruno Haible  <bruno@clisp.org>
1241
1242         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
1243
1244 2007-04-23  Bruno Haible  <bruno@clisp.org>
1245
1246         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
1247         Needed on HP-UX 11.
1248
1249 2007-04-16  Eric Blake  <ebb9@byu.net>
1250
1251         Make fflush rely on fpurge.
1252         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
1253         open coding all variants.
1254         * modules/fflush (Depends-on): Add fpurge and unistd.
1255         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
1256         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
1257
1258         Fix --with-tests compilation on cygwin.
1259         * modules/argmatch-tests (Makefile.am): List gnulib library first
1260         in LDADD.
1261         * modules/argp-tests (Makefile.am): Likewise.
1262         * modules/array-list-tests (Makefile.am): Likewise.
1263         * modules/array-oset-tests (Makefile.am): Likewise.
1264         * modules/avltree-list-tests (Makefile.am): Likewise.
1265         * modules/avltree-oset-tests (Makefile.am): Likewise.
1266         * modules/avltreehash-list-tests (Makefile.am): Likewise.
1267         * modules/carray-list-tests (Makefile.am): Likewise.
1268         * modules/dirname-tests (Makefile.am): Likewise.
1269         * modules/frexp-tests (Makefile.am): Likewise.
1270         * modules/isnanl-tests (Makefile.am): Likewise.
1271         * modules/linked-list-tests (Makefile.am): Likewise.
1272         * modules/linkedhash-list-tests (Makefile.am): Likewise.
1273         * modules/lock-tests (Makefile.am): Likewise.
1274         * modules/rbtree-list-tests (Makefile.am): Likewise.
1275         * modules/rbtree-oset-tests (Makefile.am): Likewise.
1276         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
1277         * modules/tls-tests (Makefile.am): Likewise.
1278         * modules/tsearch-tests (Makefile.am): Likewise.
1279         * modules/xvasprintf-tests (Makefile.am): Likewise.
1280
1281         Fix fpurge for cygwin.
1282         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
1283         value.
1284         * modules/fpurge-tests (Depends-on): Clean up trash.
1285
1286 2007-04-16  Simon Josefsson  <simon@josefsson.org>
1287
1288         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
1289
1290         * m4/autobuild.m4: Re-indent.
1291
1292 2007-04-13  Bruno Haible  <bruno@clisp.org>
1293
1294         * modules/fpurge-tests: New file.
1295         * tests/test-fpurge.c: New file.
1296
1297         * modules/fpurge: New file.
1298         * lib/fpurge.h: New file.
1299         * lib/fpurge.c: New file.
1300         * m4/fpurge.m4: New file.
1301
1302 2007-04-13  Bruno Haible  <bruno@clisp.org>
1303
1304         * modules/fbufmode-tests: New file.
1305         * tests/test-fbufmode.c: New file.
1306
1307         * modules/fbufmode: New file.
1308         * lib/fbufmode.h: New file.
1309         * lib/fbufmode.c: New file.
1310         * m4/fbufmode.m4: New file.
1311
1312 2007-04-13  Bruno Haible  <bruno@clisp.org>
1313
1314         * modules/fwritable-tests: New file.
1315         * tests/test-fwritable.c: New file.
1316
1317         * modules/fwritable: New file.
1318         * lib/fwritable.h: New file.
1319         * lib/fwritable.c: New file.
1320         * m4/fwritable.m4: New file.
1321
1322 2007-04-13  Bruno Haible  <bruno@clisp.org>
1323
1324         * modules/freadable-tests: New file.
1325         * tests/test-freadable.c: New file.
1326
1327         * modules/freadable: New file.
1328         * lib/freadable.h: New file.
1329         * lib/freadable.c: New file.
1330         * m4/freadable.m4: New file.
1331
1332 2007-04-13  Bruno Haible  <bruno@clisp.org>
1333
1334         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
1335         MOSTLYCLEANFILES.
1336
1337 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
1338
1339         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
1340         gzip bootstrap.conf to avoid dragging in i18n machinery.
1341         (gnulib_tool_option): Use it.
1342
1343 2007-04-13  Bruno Haible  <bruno@clisp.org>
1344
1345         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
1346         %F directives.
1347         * tests/test-vasprintf-posix.c (test_function): Likewise.
1348         * tests/test-snprintf-posix.h (test_function): Likewise.
1349         * tests/test-sprintf-posix.h (test_function): Likewise.
1350         * tests/test-fprintf-posix.h (test_function): Likewise.
1351         * tests/test-printf-posix.h (test_function): Likewise.
1352         * tests/test-fprintf-posix.out: Likewise.
1353
1354 2007-04-13  Bruno Haible  <bruno@clisp.org>
1355
1356         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
1357         * modules/tls-tests (configure.ac): Likewise.
1358         Reported by Arto C. Nirkko <anirkko@insel.ch>.
1359
1360 2007-04-13  Bruno Haible  <bruno@clisp.org>
1361
1362         * lib/tls.c (glthread_tls_get): Fix return type.
1363         Patch by Arto C. Nirkko <anirkko@insel.ch>.
1364
1365 2007-04-12  Eric Blake  <ebb9@byu.net>
1366
1367         * modules/gettime (Depends-on): Remove gettime.
1368         Reported by Dmitry V. Levin.
1369
1370 2007-04-12  Bruno Haible  <bruno@clisp.org>
1371
1372         * modules/fflush (Include): Mention <stdio.h>.
1373         * modules/strtoimax (Include): Mention <inttypes.h>.
1374         * modules/strtoumax (Include): Likewise.
1375
1376 2007-04-12  Eric Blake  <ebb9@byu.net>
1377
1378         * .cvsignore: New file.
1379         * .gitignore: Likewise.
1380
1381 2007-04-12  Bruno Haible  <bruno@clisp.org>
1382
1383         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
1384         not before, since $(LDADD) often contains libgnu.a.
1385         * modules/striconv-tests (test_striconv_LDADD): Likewise.
1386         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
1387         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
1388         Needed on Cygwin.
1389
1390 2007-04-12  Eric Blake  <ebb9@byu.net>
1391
1392         Work around glibc's failure to flush stdin on fclose.
1393         * lib/closein.c (close_stdin): Flush stdin before closing.
1394
1395         Work around glibc's failure to reset seekable stdin on exit.
1396         * modules/closein: New module.
1397         * lib/closein.c: New file.
1398         * lib/closein.h: Likewise.
1399         * m4/closein.m4: Likewise.
1400         * MODULES.html.sh (File stream based Input/Output): Document it.
1401
1402 2007-04-12  Simon Josefsson  <simon@josefsson.org>
1403
1404         * gnulib-tool: Rename generated 'autobuild' script to
1405         'do-autobuild' in --create-megatestdir output.
1406
1407         * doc/gnulib.texi (Build robot for gnulib): Fix.
1408
1409 2007-04-12  Simon Josefsson  <simon@josefsson.org>
1410
1411         * modules/sysexits (Depends-on): Add absolute-header.
1412
1413 2007-04-12  Eric Blake  <ebb9@byu.net>
1414
1415         No need to preserve errno on success.
1416         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
1417         Reported by Bruno Haible.
1418
1419 2007-04-12  Simon Josefsson  <simon@josefsson.org>
1420
1421         * MODULES.html.sh (Support for maintaining and releasing
1422         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
1423
1424 2007-04-12  Simon Josefsson  <simon@josefsson.org>
1425
1426         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
1427
1428 2007-04-12  Simon Josefsson  <simon@josefsson.org>
1429
1430         * modules/autobuild: New module.
1431
1432         * m4/autobuild.m4: New file.
1433
1434 2007-04-11  Bruno Haible  <bruno@clisp.org>
1435
1436         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
1437         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
1438         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
1439         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
1440         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
1441         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
1442         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
1443         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
1444         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
1445         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
1446         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
1447         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
1448         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
1449         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
1450         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
1451         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
1452         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
1453         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
1454         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
1455         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
1456         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
1457         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
1458         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
1459         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
1460         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
1461         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
1462         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
1463         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
1464         Reported by Eric Blake.
1465
1466 2007-04-11  Bruno Haible  <bruno@clisp.org>
1467
1468         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
1469
1470 2007-04-10  Bruno Haible  <bruno@clisp.org>
1471
1472         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
1473         for NaN and Infinity. Needed on FreeBSD 6.1.
1474         * tests/test-vasnprintf-posix.c (test_function): Undo last change
1475         regarding results for "%010a" of Infinity and NaN.
1476         * tests/test-vasprintf-posix.c (test_function): Likewise.
1477         * tests/test-snprintf-posix.h (test_function): Likewise.
1478         * tests/test-sprintf-posix.h (test_function): Likewise.
1479         * tests/test-fprintf-posix.h (test_function): Likewise.
1480         * tests/test-printf-posix.h (test_function): Likewise.
1481         * tests/test-fprintf-posix.out: Likewise.
1482
1483 2007-04-10  Bruno Haible  <bruno@clisp.org>
1484
1485         * modules/locale-tests: New file.
1486         * tests/test-locale.c: New file.
1487
1488         * modules/locale: New file.
1489         * lib/locale_.h: New file.
1490         * m4/locale_h.m4: New file.
1491
1492 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
1493             Bruno Haible  <bruno@clisp.org>
1494
1495         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
1496         be determined, test for availability of the copysignf, copysign,
1497         copysignl functions.
1498         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
1499         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
1500         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
1501
1502 2007-04-09  Eric Blake  <ebb9@byu.net>
1503
1504         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
1505         * modules/stdio (Makefile.am): Support fflush.
1506         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
1507         * modules/fflush: New file.
1508         * lib/fflush.c: Likewise.
1509         * m4/fflush.m4: Likewise.
1510         * modules/fflush-tests: New test.
1511         * tests/test-fflush.c: Likewise.
1512         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
1513
1514 2007-04-06  Bruno Haible  <bruno@clisp.org>
1515
1516         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
1517         (VASNPRINTF): Use signbit for faster determination whether to print a
1518         minus sign.
1519         * modules/vasnprintf (Files): Remove lib/float+.h.
1520         * modules/fprintf-posix (Depends-on): Add signbit.
1521         * modules/snprintf-posix (Depends-on): Likewise.
1522         * modules/sprintf-posix (Depends-on): Likewise.
1523         * modules/vasnprintf-posix (Depends-on): Likewise.
1524         * modules/vasprintf-posix (Depends-on): Likewise.
1525         * modules/vfprintf-posix (Depends-on): Likewise.
1526         * modules/vsnprintf-posix (Depends-on): Likewise.
1527         * modules/vsprintf-posix (Depends-on): Likewise.
1528
1529 2007-04-06  Bruno Haible  <bruno@clisp.org>
1530
1531         * tests/test-frexp.c (main): Test also the sign bit of zero results.
1532         * tests/test-frexpl.c (main): Likewise.
1533         * tests/test-ldexpl.c (main): Likewise.
1534         * modules/frexp-tests (Depends-on): Add signbit.
1535         * modules/frexpl-tests (Depdends-on): Likewise.
1536         * modules/ldexpl-tests (Depdends-on): Likewise.
1537
1538 2007-04-06  Bruno Haible  <bruno@clisp.org>
1539
1540         * modules/signbit-tests: New file.
1541         * tests/test-signbit.c: New file.
1542
1543         * modules/signbit: New file.
1544         * lib/signbitf.c: New file.
1545         * lib/signbitd.c: New file.
1546         * lib/signbitl.c: New file.
1547         * m4/signbit.m4: New file.
1548         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
1549         (signbit): New macro.
1550         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
1551         REPLACE_SIGNBIT.
1552         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
1553         REPLACE_FREXPL into math.h.
1554
1555 2007-04-06  Bruno Haible  <bruno@clisp.org>
1556
1557         * modules/isnanf-nolibm-tests: New file.
1558         * tests/test-isnanf.c: New file.
1559
1560         * modules/isnanf-nolibm: New file.
1561         * lib/isnanf.h: New file.
1562         * lib/isnanf.c: New file.
1563         * lib/isnan.c: Consider the USE_FLOAT macro.
1564         * m4/isnanf.m4: New file.
1565
1566 2007-04-06  Bruno Haible  <bruno@clisp.org>
1567
1568         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
1569         (Link): New section.
1570
1571         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
1572
1573 2007-04-06  Bruno Haible  <bruno@clisp.org>
1574
1575         Assume the 'long double' type.
1576         * m4/longdouble.m4: Remove file.
1577         * config/srclist.txt: Don't mention longdouble.m4.
1578         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
1579         * lib/float+.h: Likewise.
1580         * lib/frexp.c: Likewise.
1581         * lib/printf-args.h: Likewise.
1582         * lib/printf-args.c: Likewise.
1583         * lib/printf-frexp.c: Likewise.
1584         * lib/printf-parse.c: Likewise.
1585         * lib/vasnprintf.c: Likewise.
1586         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
1587         * m4/intl.m4: Likewise.
1588         * m4/isnanl.m4: Likewise.
1589         * m4/printf.m4: Likewise.
1590         * m4/printf-frexpl.m4: Likewise.
1591         * m4/vasnprintf.m4: Likewise.
1592         * modules/allocsa (Files): Remove m4/longdouble.m4.
1593         * modules/gettext (Files): Likewise.
1594         * modules/relocatable-prog-wrapper (Files): Likewise.
1595         * modules/vasnprintf (Files): Likewise.
1596         * modules/isnanl (Files): Likewise.
1597         (Include): Simplify.
1598         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
1599         (Include): Simplify.
1600         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
1601         (Include): Simplify.
1602         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
1603         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
1604         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
1605         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
1606         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
1607         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
1608         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
1609         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
1610         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
1611         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
1612         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
1613         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
1614         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
1615         * tests/test-isnanl.c: Likewise.
1616         * tests/test-snprintf-posix.h: Likewise.
1617         * tests/test-sprintf-posix.h: Likewise.
1618         * tests/test-vasnprintf-posix.c: Likewise.
1619         * tests/test-vasnprintf-posix2.c: Likewise.
1620         * tests/test-vasprintf-posix.c: Likewise.
1621
1622 2007-04-06  Bruno Haible  <bruno@clisp.org>
1623
1624         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
1625         * lib/math_.h [__DECC]: Include the overridden include file through
1626         #include_next, outside the double-inclusion guard.
1627         * lib/stdio_.h [__DECC]: Likewise.
1628         * lib/stdlib_.h [__DECC]: Likewise.
1629         * lib/string_.h [__DECC]: Likewise.
1630         * lib/time_.h [__DECC]: Likewise.
1631         * lib/wchar_.h [__DECC]: Likewise.
1632         * lib/wctype_.h [__DECC]: Likewise.
1633         * lib/inttypes_.h [__DECC]: Likewise.
1634         Reported by Albert Chin <china@thewrittenword.com> in
1635         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
1636
1637 2007-04-04  Eric Blake  <ebb9@byu.net>
1638
1639         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
1640         1.5.x.
1641
1642 2007-04-04  Bruno Haible  <bruno@clisp.org>
1643
1644         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
1645         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
1646
1647 2007-04-04  Bruno Haible  <bruno@clisp.org>
1648
1649         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
1650         results for "%010a" of Infinity and NaN.
1651         * tests/test-vasprintf-posix.c (test_function): Likewise.
1652         * tests/test-snprintf-posix.h (test_function): Likewise.
1653         * tests/test-sprintf-posix.h (test_function): Likewise.
1654         * tests/test-fprintf-posix.h (test_function): Remove these tests.
1655         * tests/test-printf-posix.h (test_function): Likewise.
1656         * tests/test-fprintf-posix.out: Update.
1657         Needed for FreeBSD 6.1.
1658
1659 2007-04-04  Bruno Haible  <bruno@clisp.org>
1660
1661         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
1662         directly used by the gnulib modules nor by gnulib-tool.
1663
1664 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
1665
1666         * DEPENDENCIES: Give overall description of version dependency
1667         desirability.  Use more-typical names for apps.
1668         Add shell, coreutils, diffutils, grep, tar, gzip.
1669
1670 2007-04-04  Simon Josefsson  <simon@josefsson.org>
1671
1672         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
1673
1674 2007-04-04  Karl Berry  <karl@gnu.org>
1675
1676         * MODULES.html.sh (func_module): missing '.
1677
1678 2007-04-03  Bruno Haible  <bruno@clisp.org>
1679
1680         * modules/argmatch-tests (Makefile.am): New variable
1681         test_argmatch_LDADD.
1682         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
1683         * modules/array-list-tests (Makefile.am): New variable
1684         test_array_list_LDADD.
1685         * modules/array-oset-tests (Makefile.am): New variable
1686         test_array_oset_LDADD.
1687         * modules/avltree-list-tests (Makefile.am): New variable
1688         test_avltree_list_LDADD.
1689         * modules/avltree-oset-tests (Makefile.am): New variable
1690         test_avltree_oset_LDADD.
1691         * modules/avltreehash-list-tests (Makefile.am): New variable
1692         test_avltreehash_list_LDADD.
1693         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
1694         test_canonicalize_lgpl_LDADD.
1695         * modules/carray-list-tests (Makefile.am): New variable
1696         test_carray_list_LDADD.
1697         * modules/dirname-tests (Makefile.am): New variable
1698         test_dirname_LDADD.
1699         * modules/linked-list-tests (Makefile.am): New variable
1700         test_linked_list_LDADD.
1701         * modules/linkedhash-list-tests (Makefile.am): New variable
1702         test_linkedhash_list_LDADD.
1703         * modules/rbtree-list-tests (Makefile.am): New variable
1704         test_rbtree_list_LDADD.
1705         * modules/rbtree-oset-tests (Makefile.am): New variable
1706         test_rbtree_oset_LDADD.
1707         * modules/rbtreehash-list-tests (Makefile.am): New variable
1708         test_rbtreehash_list_LDADD.
1709         * modules/xvasprintf-tests (Makefile.am): New variable
1710         test_xvasprintf_LDADD.
1711         Reported by Eric Blake.
1712
1713 2007-04-03  Eric Blake  <ebb9@byu.net>
1714
1715         * DEPENDENCIES: Weaken m4 requirements.
1716
1717 2007-04-03  Bruno Haible  <bruno@clisp.org>
1718
1719         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
1720         * modules/isnanl-tests (configure.ac): Likewise.
1721
1722 2007-04-03  Ben Pfaff  <blp@gnu.org>
1723
1724         * modules/iconv_open: Add $(srcdir)/ to source directory
1725         references in Makefile fragments that call gperf, to fix VPATH
1726         builds.
1727
1728 2007-04-03  Bruno Haible  <bruno@clisp.org>
1729
1730         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
1731         * lib/ldexpl.c: Undo last change.
1732
1733 2007-04-03  Bruno Haible  <bruno@clisp.org>
1734
1735         * modules/printf-frexpl (Depends-on): Undo last change.
1736         (Files): Add m4/ldexpl.m4.
1737
1738 2007-04-03  Bruno Haible  <bruno@clisp.org>
1739
1740         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
1741         * modules/isnanl (Link): New section.
1742
1743         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
1744         * modules/frexp (Link): New section.
1745
1746         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
1747         * modules/frexpl (Link): New section.
1748
1749         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
1750         * modules/ldexpl (Link): New section.
1751
1752 2007-04-03  Bruno Haible  <bruno@clisp.org>
1753
1754         * modules/TEMPLATE-EXTENDED: New file.
1755         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
1756
1757 2007-04-03  Bruno Haible  <bruno@clisp.org>
1758
1759         * DEPENDENCIES: New file.
1760         Suggested by Simon Josefsson.
1761
1762 2007-04-03  Bruno Haible  <bruno@clisp.org>
1763
1764         * doc/gnulib.texi: Escape @.
1765
1766 2007-04-03  James Youngman  <jay@gnu.org>
1767         and Paul Eggert  <eggert@cs.ucla.edu>
1768
1769         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
1770         birthtime on all systems that have birthtime, not just those which
1771         use st_birthtimensec rather than st_birthtim.  Putting zero in
1772         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
1773         that the birth time is not available for files on an NFS mount.
1774
1775 2007-04-03  Simon Josefsson  <simon@josefsson.org>
1776
1777         * modules/memxor: Move back from crypto/, suggested by Bruno.
1778         * modules/crypto/hmac-sha1: Fix memxor dependency.
1779
1780         * modules/crypto/gc: Moved from ../.
1781
1782 2007-04-02  Eric Blake  <ebb9@byu.net>
1783
1784         * lib/ldexpl.c (includes): Avoid libm.
1785
1786         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
1787
1788 2007-04-02  Bruno Haible  <bruno@clisp.org>
1789
1790         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
1791         on IRIX.
1792
1793 2007-04-02  Bruno Haible  <bruno@clisp.org>
1794
1795         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
1796         x86 or x86_64 platforms running MacOS X.
1797         Reported by Ryan Schmidt <@ryandesign.com>.
1798
1799 2007-04-02  Bruno Haible  <bruno@clisp.org>
1800
1801         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
1802         i386.
1803
1804 2007-04-01  Simon Josefsson  <simon@josefsson.org>
1805
1806         * modules/crypto/arcfour: Moved from ../.
1807         * modules/crypto/arcfour-tests: Moved from ../.
1808         * modules/crypto/arctwo: Moved from ../.
1809         * modules/crypto/arctwo-tests: Moved from ../.
1810         * modules/crypto/des: Moved from ../.
1811         * modules/crypto/des-tests: Moved from ../.
1812         * modules/crypto/gc-arcfour: Moved from ../.
1813         * modules/crypto/gc-arcfour-tests: Moved from ../.
1814         * modules/crypto/gc-arctwo: Moved from ../.
1815         * modules/crypto/gc-arctwo-tests: Moved from ../.
1816         * modules/crypto/gc-des: Moved from ../.
1817         * modules/crypto/gc-des-tests: Moved from ../.
1818         * modules/crypto/gc-hmac-md5: Moved from ../.
1819         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
1820         * modules/crypto/gc-hmac-sha1: Moved from ../.
1821         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
1822         * modules/crypto/gc-md2: Moved from ../.
1823         * modules/crypto/gc-md2-tests: Moved from ../.
1824         * modules/crypto/gc-md4: Moved from ../.
1825         * modules/crypto/gc-md4-tests: Moved from ../.
1826         * modules/crypto/gc-md5: Moved from ../.
1827         * modules/crypto/gc-md5-tests: Moved from ../.
1828         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
1829         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
1830         * modules/crypto/gc-random: Moved from ../.
1831         * modules/crypto/gc-rijndael: Moved from ../.
1832         * modules/crypto/gc-rijndael-tests: Moved from ../.
1833         * modules/crypto/gc-sha1: Moved from ../.
1834         * modules/crypto/gc-sha1-tests: Moved from ../.
1835         * modules/crypto/gc-tests: Moved from ../.
1836         * modules/crypto/hmac-md5: Moved from ../.
1837         * modules/crypto/hmac-md5-tests: Moved from ../.
1838         * modules/crypto/hmac-sha1: Moved from ../.
1839         * modules/crypto/hmac-sha1-tests: Moved from ../.
1840         * modules/crypto/md2: Moved from ../.
1841         * modules/crypto/md2-tests: Moved from ../.
1842         * modules/crypto/md4: Moved from ../.
1843         * modules/crypto/md4-tests: Moved from ../.
1844         * modules/crypto/md5: Moved from ../.
1845         * modules/crypto/md5-tests: Moved from ../.
1846         * modules/crypto/memxor: Moved from ../.
1847         * modules/crypto/rijndael: Moved from ../.
1848         * modules/crypto/rijndael-tests: Moved from ../.
1849         * modules/crypto/sha1: Moved from ../.
1850
1851 2007-03-30  James Youngman  <jay@gnu.org>
1852
1853         * tests/test-stat-time.c (prepare_test): use chmod() rather than
1854         rename() to change the ctime of a file (because ctime is unaffected
1855         by rename on jfs2 on AIX 5.1).
1856         (main): Start by doing cleanup, in case a previous run failed leaving
1857         test files behind.
1858
1859 2007-03-31  Bruno Haible  <bruno@clisp.org>
1860
1861         Support old proprietary implementations of iconv.
1862         * modules/iconv_open: New file.
1863         * lib/iconv_.h: New file.
1864         * m4/iconv_h.m4: New file.
1865         * lib/iconv_open.c: New file.
1866         * lib/iconv_open-aix.gperf: New file.
1867         * lib/iconv_open-hpux.gperf: New file.
1868         * lib/iconv_open-irix.gperf: New file.
1869         * lib/iconv_open-osf.gperf: New file.
1870         * m4/iconv_open.m4: New file.
1871         * modules/linebreak (Depends-on): Add iconv_open.
1872         * modules/striconv (Depends-on): Likewise.
1873         * modules/striconveh (Depends-on): Likewise.
1874         * modules/unicodeio (Depends-on): Likewise.
1875         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
1876         (iconv_t)(-1).
1877         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
1878         conversion if cd is (iconv_t)(-1).
1879         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
1880         is not possible.
1881
1882 2007-03-31  Bruno Haible  <bruno@clisp.org>
1883
1884         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
1885         work on Solaris either. Protect also second use of "autodetect_jp".
1886
1887 2007-03-31  Bruno Haible  <bruno@clisp.org>
1888
1889         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
1890         the function is not present.
1891
1892 2007-03-31  Bruno Haible  <bruno@clisp.org>
1893
1894         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
1895         the function is not present.
1896
1897 2007-03-31  Bruno Haible  <bruno@clisp.org>
1898
1899         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
1900         a bug in HP-UX iconv_open().
1901
1902 2007-03-31  Bruno Haible  <bruno@clisp.org>
1903
1904         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
1905         (Mathematics <math.h>): New section, add fpieee.
1906         (Input/output <stdio.h>): Add fseterr.
1907         (Mathematics <math.h>): New section, add printf-frexp.
1908         (Container data structures): Add sublist.
1909         (Core language properties): Add fpucw, inline.
1910         (Functions for greatest-width integer types <inttypes.h>): Add
1911         imaxabs, imaxdiv, inttypes.
1912         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
1913         isnanl-nolibm, ldexp.
1914         (Mathematics <math.h>): New section, add printf-frexpl.
1915         (Support for systems lacking POSIX:2001): Add fprintf-posix,
1916         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
1917         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
1918         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
1919         (Unicode string functions): Add unistr/u*-mbtoucr.
1920         (Java): Add javacomp-script, javaexec-script.
1921         (C#): Add csharpcomp-script, csharpexec-script.
1922         (Support for building libraries and executables): Add havelib,
1923         relocatable-*.
1924         (Support for maintaining and releasing projects): Renamed from
1925         'Support for maintaining and release projects'. Add announce-gen.
1926
1927 2007-03-31  Bruno Haible  <bruno@clisp.org>
1928
1929         * README: Talk primarily about git.
1930         (git and CVS): Renamed from CVS.
1931         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
1932         gnulib is available through git.
1933         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
1934
1935 2007-03-30  Bruno Haible  <bruno@clisp.org>
1936
1937         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
1938         * lib/poll_.h: Likewise.
1939         * lib/stat_.h: Likewise.
1940         * lib/sys_time_.h: Likewise.
1941         * lib/sysexit_.h: Likewise.
1942         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
1943         * lib/stdbool_.h: Likewise.
1944         * lib/byteswap_.h: Add double-inclusion guard.
1945
1946 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
1947
1948         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
1949
1950 2007-03-30  Karl Berry  <karl@gnu.org>
1951
1952         * config/srclist-update: double space after USA in the license
1953         substitution, since that's how it's usually (?) written.
1954
1955 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
1956
1957         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
1958         reported by Bruno Haible.
1959
1960 2007-03-29  Bruno Haible  <bruno@clisp.org>
1961
1962         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
1963         a bug in AIX iconv().
1964
1965 2007-03-29  Bruno Haible  <bruno@clisp.org>
1966
1967         * modules/ldexpl-tests: New file.
1968         * tests/test-ldexpl.c: New file.
1969
1970 2007-03-29  Bruno Haible  <bruno@clisp.org>
1971
1972         * lib/ldexpl.c: Include fpucw.h.
1973         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
1974         multiplication.
1975         * modules/ldexpl (Depends-on): Add fpucw.
1976
1977 2007-03-29  Bruno Haible  <bruno@clisp.org>
1978
1979         * modules/ldexpl: New file.
1980         * m4/ldexpl.m4: New file.
1981         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
1982         set.
1983         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
1984         REPLACE_LDEXPL.
1985         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
1986         REPLACE_LDEXPL.
1987         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
1988         gl_FUNC_LDEXPL_WORKS.
1989         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
1990         * modules/mathl (Files): Remove lib/ldexpl.c.
1991         (Depends-on): Add ldexpl.
1992
1993 2007-03-29  Bruno Haible  <bruno@clisp.org>
1994
1995         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
1996
1997 2007-03-29  Bruno Haible  <bruno@clisp.org>
1998
1999         * tests/test-striconveh.c (main): Don't assume that a direct conversion
2000         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
2001         and possibly also HP-UX.
2002         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
2003         work on AIX, IRIX, HP-UX, OSF/1.
2004         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
2005         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
2006         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
2007         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
2008         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
2009         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
2010
2011 2007-03-29  Bruno Haible  <bruno@clisp.org>
2012
2013         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
2014
2015 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
2016
2017         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
2018         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
2019
2020 2007-03-29  Eric Blake  <ebb9@byu.net>
2021
2022         * lib/acl-internal.h: Remove redundant include.
2023         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
2024         Cygwin when a file is locked.
2025
2026 2007-03-29  Bruno Haible  <bruno@clisp.org>
2027
2028         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
2029         file.
2030         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
2031
2032 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
2033
2034         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
2035         try to remove a parent directory if the child couldn't be removed
2036         (except for the first rmdir, which could fail because the child
2037         doesn't exist).  Problem reported by Jeff Blaine in
2038         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
2039
2040 2007-03-28  Bruno Haible  <bruno@clisp.org>
2041
2042         * lib/striconveh.c (utf8conv_carefully): New function.
2043         (mem_cd_iconveh_internal): Invoke it.
2044
2045 2007-03-28  Bruno Haible  <bruno@clisp.org>
2046
2047         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
2048         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
2049         input.
2050         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
2051         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
2052         unistr/u8-uctomb.
2053
2054 2007-03-28  Bruno Haible  <bruno@clisp.org>
2055
2056         * modules/unistr/u8-mbtoucr: New file.
2057         * lib/unistr/u8-mbtoucr.c: New file.
2058         * modules/unistr/u16-mbtoucr: New file.
2059         * lib/unistr/u16-mbtoucr.c: New file.
2060         * modules/unistr/u16-mbtoucr: New file.
2061         * lib/unistr/u16-mbtoucr.c: New file.
2062         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
2063
2064 2007-03-27  Simon Josefsson  <simon@josefsson.org>
2065             Bruno Haible  <bruno@clisp.org>
2066
2067         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
2068         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
2069         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
2070
2071         * m4/stdio_h.m4: Add stubs for vasprintf too.
2072
2073         * modules/stdio: Support vasprintf in sed command.
2074
2075         * modules/vasprintf: Depend on stdio for prototypes.  Remove
2076         vasprintf.h.  Add stdio module indicator.
2077
2078         * lib/stdio_.h: Declare asprintf and vasprintf, based on
2079         vasprintf.h.
2080
2081         * lib/vasprintf.h: File removed.
2082
2083         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
2084         * lib/vasprintf.c: Ditto.
2085         * lib/xvasprintf.c: Ditto.
2086         * tests/test-vasprintf-posix.c: Ditto.
2087         * tests/test-vasprintf.c: Ditto.
2088
2089 2007-03-27  Bruno Haible  <bruno@clisp.org>
2090
2091         Make vasnprintf multithread-safe.
2092         * lib/vasnprintf.c (decimal_point_char): New function.
2093         (VASNPRINTF): Use it.
2094         Suggested by Simon Josefsson.
2095
2096 2007-03-27  Eric Blake  <ebb9@byu.net>
2097
2098         Support sub-second birthtime on cygwin.
2099         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
2100         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
2101         (get_stat_birthtime): Also work with st_birthtim.
2102
2103 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
2104
2105         * lib/stat-time.h (USE_BIRTHTIME): Remove.
2106         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
2107         (get_stat_birthtime_ns): Do not try to use "spare" fields.
2108         (get_stat_birthtime_ns): Simplify compile-time tests.
2109         (get_stat_birthtime): Change the API to look like
2110         get_stat_mtime etc., except return a negative tv_nsec on error.
2111         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
2112         Don't check for "spare" fields.
2113         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
2114         or for struct stat.st_birthtime, as these tests aren't used.
2115         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
2116
2117 2007-03-27  Bruno Haible  <bruno@clisp.org>
2118
2119         * lib/stat-time.h: Include <sys/stat.h>.
2120
2121 2007-03-27  James Youngman  <jay@gnu.org>
2122
2123         * lib/stat-time.h (get_stat_birthtime): New function for
2124           retrieving st_birthtime as provided by UFS2 (hence *BSD).
2125         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
2126           and its variants.
2127         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
2128         * modules/stat-time-test: New file.
2129         * tests/test-stat-time.c: New test, devised by Bruno Haible.
2130
2131 2007-03-26  Bruno Haible  <bruno@clisp.org>
2132
2133         Better support of signalling NaNs.
2134         * lib/atanl.c: Include isnanl.h.
2135         (atanl): Perform test for NaN at the beginning of the function and
2136         through a call to isnanl.
2137         * lib/cosl.c: Include isnanl.h.
2138         (cosl): Perform test for NaN at the beginning of the function and
2139         through a call to isnanl.
2140         * lib/ldexpl.c: Include isnanl.h.
2141         (ldexpl): Perform test for NaN through a call to isnanl.
2142         * lib/logl.c: Include isnanl.h.
2143         (logl): Perform test for NaN at the beginning of the function and
2144         through a call to isnanl.
2145         * lib/sinl.c: Include isnanl.h.
2146         (sinl): Perform test for NaN at the beginning of the function and
2147         through a call to isnanl.
2148         * lib/sqrtl.c: Include isnanl.h.
2149         (sqrtl): Perform test for NaN at the beginning of the function and
2150         through a call to isnanl.
2151         * lib/tanl.c: Include isnanl.h.
2152         (tanl): Perform test for NaN at the beginning of the function and
2153         through a call to isnanl.
2154         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
2155         * modules/mathl (Depends-on): Add isnanl.
2156
2157 2007-03-26  Eric Blake  <ebb9@byu.net>
2158
2159         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
2160         regression in logic sense of previous patch.
2161
2162 2007-03-26  Bruno Haible  <bruno@clisp.org>
2163
2164         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
2165         unportable shell command "if ! ...".
2166         Reported by Ralf Wildenhues.
2167
2168 2007-03-25  Bruno Haible  <bruno@clisp.org>
2169
2170         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
2171         <sysexits.h> file, and only add EX_CONFIG.
2172         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
2173         absolute file name and whether it is sufficient. Substitute also
2174         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
2175         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
2176         ABSOLUTE_SYSEXITS_H into sysexits.h.
2177
2178 2007-03-25  Bruno Haible  <bruno@clisp.org>
2179
2180         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
2181         hints is NULL.
2182
2183 2007-03-25  Bruno Haible  <bruno@clisp.org>
2184
2185         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
2186         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
2187
2188 2007-03-25  Bruno Haible  <bruno@clisp.org>
2189
2190         * lib/vasnprintf.c: Include langinfo.h.
2191         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
2192         multithread-safe.
2193         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
2194         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
2195         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2196         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2197         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2198         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2199         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2200         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
2201         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2202         Reported by Simon Josefsson.
2203
2204 2007-03-25  Bruno Haible  <bruno@clisp.org>
2205
2206         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
2207         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
2208         * modules/vasnprintf (Depends-on): Add stdint.
2209
2210 2007-03-25  Bruno Haible  <bruno@clisp.org>
2211
2212         * modules/fpieee: New file.
2213         * m4/fpieee.m4: New file.
2214         * modules/isnan-nolibm (Depends-on): Add fpieee.
2215         * modules/isnanl-nolibm (Depends-on): Add fpieee.
2216         * modules/isnanl (Depends-on): Add fpieee.
2217
2218 2007-03-25  Bruno Haible  <bruno@clisp.org>
2219
2220         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
2221
2222 2007-03-25  Bruno Haible  <bruno@clisp.org>
2223
2224         Avoid test failures on IRIX 6.5.
2225         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
2226         (main): Use it.
2227         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
2228         macros.
2229         (main): Use them.
2230
2231 2007-03-25  Bruno Haible  <bruno@clisp.org>
2232
2233         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
2234         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
2235         exists but doesn't work.
2236         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
2237         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
2238         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
2239         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
2240
2241 2007-03-25  Bruno Haible  <bruno@clisp.org>
2242
2243         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
2244         returns inf. Needed on IRIX 6.5.
2245
2246 2007-03-25  Bruno Haible  <bruno@clisp.org>
2247
2248         * tests/test-frexpl.c: Include isnanl-nolibm.h.
2249         (main): Use isnanl instead of x != x idiom.
2250         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
2251
2252         * tests/test-frexp.c: Include isnan.h.
2253         (main): Use isnan instead of x != x idiom.
2254         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
2255
2256 2007-03-25  Bruno Haible  <bruno@clisp.org>
2257
2258         * tests/test-frexp.c (NaN): New function/macro.
2259         (main): Use it instead of 0.0 / 0.0.
2260         * tests/test-isnan.c (NaN): New function/macro.
2261         (main): Use it instead of 0.0 / 0.0.
2262         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
2263         (test_function): Use it instead of 0.0 / 0.0.
2264         * tests/test-vasprintf-posix.c (NaN): New function/macro.
2265         (test_function): Use it instead of 0.0 / 0.0.
2266         * tests/test-snprintf-posix.h (NaN): New function/macro.
2267         (test_function): Use it instead of 0.0 / 0.0.
2268         * tests/test-sprintf-posix.h (NaN): New function/macro.
2269         (test_function): Use it instead of 0.0 / 0.0.
2270         * tests/test-fprintf-posix.h (NaN): New function/macro.
2271         (test_function): Use it instead of 0.0 / 0.0.
2272         * tests/test-printf-posix.h (NaN): New function/macro.
2273         (test_function): Use it instead of 0.0 / 0.0.
2274
2275         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
2276
2277 2007-03-25  Bruno Haible  <bruno@clisp.org>
2278
2279         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
2280
2281 2007-03-25  Bruno Haible  <bruno@clisp.org>
2282
2283         * lib/regexec.c (merge_state_with_log): Make static.
2284
2285 2007-03-25  Bruno Haible  <bruno@clisp.org>
2286
2287         * lib/trigl.c (kernel_rem_pio2): Make static.
2288
2289 2007-03-25  Bruno Haible  <bruno@clisp.org>
2290
2291         * lib/sincosl.c (sincosl_table): Make static.
2292
2293 2007-03-25  Bruno Haible  <bruno@clisp.org>
2294
2295         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
2296         if the compiler does not support C99.
2297
2298 2007-03-25  Bruno Haible  <bruno@clisp.org>
2299
2300         * modules/time (Makefile.am): Ensure all rule action lines start with a
2301         tab.
2302
2303 2007-03-24  Bruno Haible  <bruno@clisp.org>
2304
2305         * modules/tsearch-tests: New file.
2306         * tests/test-tsearch.sh: New file.
2307         * tests/test-tsearch.c: New file, mostly copied from glibc.
2308
2309         * modules/search-tests: New file.
2310         * tests/test-search.c: New file.
2311
2312         * modules/search: New file.
2313         * lib/search_.h: New file, incorporating lib/tsearch.h.
2314         * m4/search_h.m4: New file.
2315         * lib/tsearch.h: Remove file.
2316         * lib/tsearch.c: Include search.h instead of tsearch.h.
2317         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
2318         HAVE_TSEARCH.
2319         * modules/tsearch (Files): Remove lib/tsearch.h.
2320         (Depends-on): Add search.
2321         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
2322         (Include): Change tsearch.h into search.h.
2323
2324 2007-03-24  Bruno Haible  <bruno@clisp.org>
2325
2326         * modules/fpucw: New file.
2327         * lib/fpucw.h: New file.
2328         * lib/frexp.c: Include fpucw.h.
2329         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
2330         (FUNC): Use them.
2331         * lib/printf-frexp.c: Include fpucw.h.
2332         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
2333         (FUNC): Use them.
2334         * lib/vasnprintf.c: Include fpucw.h.
2335         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
2336         'long double' calculations.
2337         * tests/test-frexpl.c: Include fpucw.h.
2338         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
2339         * tests/test-printf-frexpl.c: Include fpucw.h.
2340         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
2341         * modules/frexpl (Depends-on): Add fpucw.
2342         * modules/printf-frexpl (Depends-on): Likewise.
2343         * modules/fprintf-posix (Depends-on): Likewise.
2344         * modules/snprintf-posix (Depends-on): Likewise.
2345         * modules/sprintf-posix (Depends-on): Likewise.
2346         * modules/vasnprintf-posix (Depends-on): Likewise.
2347         * modules/vasprintf-posix (Depends-on): Likewise.
2348         * modules/vfprintf-posix (Depends-on): Likewise.
2349         * modules/vsnprintf-posix (Depends-on): Likewise.
2350         * modules/vsprintf-posix (Depends-on): Likewise.
2351         * modules/frexpl-tests (Depends-on): Likewise.
2352         * modules/printf-frexpl-tests (Depends-on): Likewise.
2353
2354 2007-03-24  Bruno Haible  <bruno@clisp.org>
2355
2356         * lib/float+.h: New file.
2357         * lib/isnan.c: Include float+.h.
2358         (SIZE): New macro.
2359         (FUNC): Compare only SIZE bytes of the value.
2360         * lib/vasnprintf.c: Include float+.h.
2361         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
2362         SIZEOF_LDBL or SIZEOF_DBL bytes.
2363         * modules/isnan-nolibm (Files): Add lib/float+.h.
2364         * modules/isnanl-nolibm (Files): Add lib/float+.h.
2365         * modules/isnanl (Files): Add lib/float+.h.
2366         * modules/vasnprintf (Files): Add lib/float+.h.
2367
2368 2007-03-24  Bruno Haible  <bruno@clisp.org>
2369
2370         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
2371         include isnanl-nolibm.h.
2372
2373 2007-03-24  Bruno Haible  <bruno@clisp.org>
2374
2375         * tests/test-read-file.c (main): Don't produce spurious output for
2376         expected situations. Make the test fail if it encountered unexpected
2377         results.
2378
2379 2007-03-24  Bruno Haible  <bruno@clisp.org>
2380
2381         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
2382         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
2383
2384 2007-03-24  Bruno Haible  <bruno@clisp.org>
2385
2386         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
2387
2388 2007-03-24  Bruno Haible  <bruno@clisp.org>
2389
2390         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
2391         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
2392
2393         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
2394         * modules/utf8-ucs4: Turn into a symbolic link to module
2395         unistr/u8-mbtouc.
2396
2397         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
2398         utf8-ucs4-unsafe.
2399         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
2400         unistr/u8-mbtouc-unsafe.
2401
2402         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
2403         * modules/utf16-ucs4: Turn into a symbolic link to module
2404         unistr/u16-mbtouc.
2405
2406         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
2407         utf16-ucs4-unsafe.
2408         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
2409         unistr/u16-mbtouc-unsafe.
2410
2411         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
2412         * modules/ucs4-utf8: Turn into a symbolic link to module
2413         unistr/u8-ubtomb.
2414
2415         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
2416         * modules/ucs4-utf16: Turn into a symbolic link to module
2417         unistr/u16-ubtomb.
2418
2419 2007-03-24  Bruno Haible  <bruno@clisp.org>
2420
2421         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
2422         Enable the function only if HAVE_INLINE.
2423         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
2424         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
2425         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
2426         Enable the function only if HAVE_INLINE.
2427         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
2428         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
2429         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
2430         Enable the function only if HAVE_INLINE.
2431         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
2432         Enable the function only if HAVE_INLINE.
2433         * modules/utf8-ucs4: Update.
2434         * modules/utf8-ucs4-unsafe: Update.
2435         * modules/utf16-ucs4: Update.
2436         * modules/utf16-ucs4-unsafe: Update.
2437         * modules/ucs4-utf8: Update.
2438         * modules/ucs4-utf16: Update.
2439
2440 2007-03-24  Bruno Haible  <bruno@clisp.org>
2441
2442         * lib/utf8-ucs4.h: Remove file.
2443         * lib/utf8-ucs4-unsafe.h: Remove file.
2444         * lib/utf16-ucs4.h: Remove file.
2445         * lib/utf16-ucs4-unsafe.h: Remove file.
2446         * lib/ucs4-utf8.h: Remove file.
2447         * lib/ucs4-utf16.h: Remove file.
2448         * lib/unistr.h: Include their previous contents.
2449         * m4/utf-ucs4.m4: Remove file.
2450         * m4/ucs4-utf.m4: Remove file.
2451         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
2452         (Depends-on): Add unistr/base.
2453         (configure.ac): Remove gl_UTF_UCS4.
2454         (Makefile.am): Update.
2455         (Include): Change to unistr.h.
2456         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
2457         (Depends-on): Add unistr/base.
2458         (configure.ac): Remove gl_UTF_UCS4.
2459         (Makefile.am): Update.
2460         (Include): Change to unistr.h.
2461         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
2462         (Depends-on): Add unistr/base.
2463         (configure.ac): Remove gl_UTF_UCS4.
2464         (Makefile.am): Update.
2465         (Include): Change to unistr.h.
2466         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
2467         (Depends-on): Add unistr/base.
2468         (configure.ac): Remove gl_UTF_UCS4.
2469         (Makefile.am): Update.
2470         (Include): Change to unistr.h.
2471         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
2472         (Depends-on): Add unistr/base.
2473         (configure.ac): Remove gl_UCS4_UTF.
2474         (Makefile.am): Update.
2475         (Include): Change to unistr.h.
2476         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
2477         (Depends-on): Add unistr/base.
2478         (configure.ac): Remove gl_UCS4_UTF.
2479         (Makefile.am): Update.
2480         (Include): Change to unistr.h.
2481         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
2482         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
2483         utf8-ucs4-unsafe.h.
2484         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
2485         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
2486         utf16-ucs4-unsafe.h.
2487         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
2488         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
2489         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
2490         * lib/unistr/u8-strchr.c: Likewise.
2491         * lib/unistr/u8-strrchr.c: Likewise.
2492         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
2493         * lib/unistr/u16-strchr.c: Likewise.
2494         * lib/unistr/u16-strrchr.c: Likewise.
2495         * lib/striconveh.c: Update.
2496         * lib/linebreak.c: Update.
2497
2498 2007-03-24  Bruno Haible  <bruno@clisp.org>
2499
2500         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
2501         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
2502
2503 2007-03-22  Bruno Haible  <bruno@clisp.org>
2504
2505         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
2506
2507 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
2508
2509         * MODULES.html.sh (File system functions): New module write-any-file.
2510         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
2511         * m4/write-any-file.m4: New files.
2512
2513 2007-03-23  Eric Blake  <ebb9@byu.net>
2514
2515         * gnulib-tool: Rearrange space-tab sequences, since some editors
2516         like to eat them.
2517
2518 2007-03-23  Eric Blake  <ebb9@byu.net>
2519
2520         * lib/version-etc.c (version_etc_va): Update license wording to
2521         be more concise.  Recommended by Richard Stallman.
2522
2523 2007-03-22  Bruno Haible  <bruno@clisp.org>
2524
2525         * lib/poll.c (MSG_PEEK): New fallback definition.
2526
2527 2007-03-22  Bruno Haible  <bruno@clisp.org>
2528
2529         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
2530         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
2531         (main): Update.
2532         Fixes a compilation error on BeOS.
2533
2534 2007-03-22  Bruno Haible  <bruno@clisp.org>
2535
2536         * modules/frexpl-tests: New file.
2537         * tests/test-frexpl.c: New file.
2538
2539         * modules/frexpl: New file.
2540         * m4/frexpl.m4: New file.
2541         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
2542         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
2543         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
2544         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
2545         (Depends-on): Add frexpl. Remove isnanl-nolibm.
2546         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
2547
2548 2007-03-22  Bruno Haible  <bruno@clisp.org>
2549
2550         * lib/frexpl.c: Share code with lib/frexp.c.
2551         * modules/mathl (Files): Add lib/frexp.c.
2552         (Depends-on): Add isnanl-nolibm.
2553
2554 2007-03-22  Bruno Haible  <bruno@clisp.org>
2555
2556         * modules/printf-frexp (Files): Add m4/frexp.m4.
2557         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
2558         only if the found frexp function actually works.
2559
2560 2007-03-22  Bruno Haible  <bruno@clisp.org>
2561
2562         * lib/frexp.c: Remove older implementation that uses divisions.
2563
2564 2007-03-21  Bruno Haible  <bruno@clisp.org>
2565
2566         * modules/frexp-tests: New file.
2567         * tests/test-frexp.c: New file.
2568
2569         * modules/frexp: New file.
2570         * lib/frexp.c: New file.
2571         * m4/frexp.m4: New file.
2572         * lib/math_.h (frexp): New declaration.
2573         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
2574         REPLACE_FREXP.
2575         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
2576
2577 2007-03-21  Bruno Haible  <bruno@clisp.org>
2578
2579         * modules/isnanl-tests: New file.
2580         * tests/test-isnanl.c: New file.
2581
2582         * modules/isnanl: New file.
2583         * lib/isnanl.h: New file.
2584         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
2585         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
2586         gl_FUNC_ISNANL_WORKS.
2587         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
2588         New macros.
2589
2590 2007-03-21  Bruno Haible  <bruno@clisp.org>
2591
2592         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
2593         lib/isnanl.h.
2594         (Include): Update.
2595         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
2596         * lib/vasnprintf.c: Update.
2597         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
2598         tests/test-isnanl.h, remove tests/test-isnanl.c.
2599         (Makefile.am): Update.
2600         * tests/test-isnanl-nolibm.c: New file.
2601         * tests/test-isnanl.h: New file.
2602         * tests/test-isnanl.c: Remove file.
2603
2604 2007-03-21  Jim Meyering  <jim@meyering.net>
2605
2606         When trying to open ".", treat ESTALE like EACCES.
2607         * lib/savewd.c (savewd_save): Resort to forking not just upon
2608         failure with EACCES, but also when errno is ESTALE.
2609
2610 2007-03-20  Bruno Haible  <bruno@clisp.org>
2611
2612         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
2613         Needed on AIX 5.1. Reported by Matthew Woehlke.
2614
2615 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
2616
2617         Suggestions by Bruno Haible:
2618         * lib/acl-internal.h: Include "gettext.h" rather than rolling
2619         our own.
2620         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
2621         * modules/acl (Depends-on): Add gettext.
2622
2623 2007-03-19  Bruno Haible  <bruno@clisp.org>
2624
2625         * modules/iconvme: Remove file.
2626         * lib/iconvme.h: Remove file.
2627         * lib/iconvme.c: Remove file.
2628         * m4/iconvme.m4: Remove file.
2629
2630 2007-03-19  Bruno Haible  <bruno@clisp.org>
2631
2632         * doc/relocatable-maint.texi: Break long shell script line.
2633         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
2634
2635 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
2636
2637         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
2638         handle file_has_acl.
2639         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
2640         * lib/acl.c: Move header inclusions and related macro defns into
2641         lib/acl-internal.h.
2642         (S_ISLNK): Remove defn, since that's now done for us.
2643         (file_has_acl): Move to lib/file-has-acl.c.
2644         Call acl_trivial if available.  This is the crucial part of the fix.
2645         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
2646         shared within the library.  Rewrite a bit, partly to make it compatible
2647         with the GNU coding style.
2648         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
2649         Remove unnecessary double-quotes.
2650         Don't test for acl_to_text; the build will catch that.
2651         Replace acl_entries if it doesn't exist and it is needed.
2652         Check for -lsec and acl_trivial (as used on Solaris 10).
2653         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
2654         lib/file-has-acl.c.
2655         (Depends-on): Add sys_stat, for S_ISLNK.
2656
2657 2007-03-19  Ben Pfaff  <blp@gnu.org>
2658
2659         * doc/gnulib.texi: Fix typos.
2660         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
2661
2662 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
2663
2664         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
2665         If size is zero here, buf must be zero.
2666
2667 2007-03-19  Simon Josefsson  <simon@josefsson.org>
2668
2669         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
2670         <bruno@clisp.org>.
2671
2672 2007-03-18  Bruno Haible  <bruno@clisp.org>
2673
2674         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
2675         Suggested by Eric Blake.
2676
2677 2007-03-18  Ben Pfaff  <blp@gnu.org>
2678
2679         * doc/relocatable.texi: Recommend using as prefix a directory
2680         that does not exist and will never be created.  Based on
2681         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
2682         and others.
2683
2684 2007-03-17  Bruno Haible  <bruno@clisp.org>
2685
2686         * lib/fchownat.c: Include lchown.h.
2687
2688 2007-03-17  Bruno Haible  <bruno@clisp.org>
2689
2690         Fix endless loop when the given allocated size was > INT_MAX.
2691         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
2692         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
2693         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
2694         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
2695         * lib/sprintf.c (sprintf): Likewise.
2696
2697 2007-03-17  Bruno Haible  <bruno@clisp.org>
2698
2699         * tests/test-argp-2.sh (func_compare): Output a context diff.
2700
2701 2007-03-17  Bruno Haible  <bruno@clisp.org>
2702
2703         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
2704         locale's decimal-point character.
2705
2706 2007-03-17  Bruno Haible  <bruno@clisp.org>
2707
2708         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
2709         before comparing it. Needed because on some platforms (e.g. x86) a
2710         'long double' occupies less bytes than sizeof (long double).
2711
2712 2007-03-17  Bruno Haible  <bruno@clisp.org>
2713
2714         * tests/test-crc.c (main): Make printf statements 64-bit clean.
2715         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
2716         * tests/test-getaddrinfo.c (simple): Likewise.
2717         * tests/test-read-file.c (main): Likewise.
2718
2719 2007-03-17  Bruno Haible  <bruno@clisp.org>
2720
2721         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
2722
2723 2007-03-17  Bruno Haible  <bruno@clisp.org>
2724
2725         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
2726         unused variable.
2727
2728 2007-03-17  Bruno Haible  <bruno@clisp.org>
2729
2730         * tests/test-c-strcasecmp.c: Include c-strcase.h.
2731         * tests/test-c-strncasecmp.c: Likewise.
2732
2733 2007-03-17  Bruno Haible  <bruno@clisp.org>
2734
2735         * modules/stdlib (Depends-on): Add unistd.
2736         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
2737         Needed for MacOS X 10.3.
2738
2739 2007-03-17  Bruno Haible  <bruno@clisp.org>
2740
2741         * lib/unistr/u-strdup.h: Include <stdlib.h>.
2742
2743 2007-03-17  Bruno Haible  <bruno@clisp.org>
2744
2745         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
2746
2747 2007-03-17  Bruno Haible  <bruno@clisp.org>
2748
2749         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
2750         to reflect files copied from gnulib (with or without modifications).
2751         Suggested by Jim Meyering.
2752
2753 2007-03-17  Eric Blake  <ebb9@byu.net>
2754
2755         * NEWS: Document stdlib change from 2007-02-18.
2756
2757 2007-03-17  Jim Meyering  <jim@meyering.net>
2758
2759         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
2760         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
2761         someone uses a name containing shell meta-characters.
2762         Reported by Alfred M. Szmidt.
2763
2764         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
2765
2766 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
2767
2768         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
2769         and copy gettext configuration files only if configure.ac contains
2770         a use of AM_GNU_GETTEXT_VERSION.
2771
2772 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
2773
2774         * build-aux/bootstrap (gnulib_name): New variable.
2775         (gnulib_tool_options): Use it.
2776
2777 2007-03-13  Simon Josefsson  <simon@josefsson.org>
2778
2779         * tests/test-des.c: Use new namespace.
2780
2781 2007-03-15  Bruno Haible  <bruno@clisp.org>
2782
2783         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
2784         Reported by James Youngman <jay@gnu.org>.
2785
2786 2007-03-15  Bruno Haible  <bruno@clisp.org>
2787
2788         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
2789         declared prototype. Needed with cc on OSF/1 5.1.
2790
2791 2007-03-15  Bruno Haible  <bruno@clisp.org>
2792
2793         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
2794         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
2795         (struct gl_list_implementation): Add dispose_fn argument to the
2796         'create_empty', 'create' methods.
2797         (struct gl_list_impl_base): Add field 'dispose_fn'.
2798         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
2799         argument.
2800         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
2801         dispose_fn argument.
2802         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
2803         dispose_fn on the dropped values.
2804         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
2805         dispose_fn argument.
2806         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
2807         dropped values.
2808         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
2809         (gl_tree_remove_node): Call dispose_fn on the dropped value.
2810         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
2811         (gl_tree_remove_node): Call dispose_fn on the dropped value.
2812         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
2813         argument.
2814         (gl_tree_list_free): Call dispose_fn on the dropped values.
2815         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
2816         the dropped values.
2817         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
2818         Add dispose_fn argument.
2819         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
2820         Call dispose_fn on the dropped values.
2821         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
2822         Add dispose_fn argument.
2823         (gl_sublist_create): Initialize the 'dispose_fn' field.
2824         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
2825         * tests/test-array_list.c (main): Update.
2826         * tests/test-carray_list.c (main): Update.
2827         * tests/test-avltree_list.c (main): Update.
2828         * tests/test-rbtree_list.c (main): Update.
2829         * tests/test-avltreehash_list.c (main): Update.
2830         * tests/test-rbtreehash_list.c (main): Update.
2831         * tests/test-linked_list.c (main): Update.
2832         * tests/test-linkedhash_list.c (main): Update.
2833         * tests/test-array_oset.c (main): Update.
2834
2835 2007-03-15  Bruno Haible  <bruno@clisp.org>
2836
2837         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
2838         (gl_oset_create_empty): Add dispose_fn argument.
2839         (struct gl_oset_implementation): Add dispose_fn argument to
2840         'create_empty' method.
2841         (struct gl_oset_impl_base): Add dispose_fn field.
2842         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
2843         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
2844         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
2845         values.
2846         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
2847         (gl_tree_oset_free): Call dispose_fn on the dropped values.
2848         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
2849         dropped value.
2850         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
2851         dropped value.
2852         * tests/test-array_oset.c (main): Update.
2853         * tests/test-avltree_oset.c (main): Update.
2854         * tests/test-rbtree_oset.c (main): Update.
2855         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
2856
2857 2007-03-13  Bruno Haible  <bruno@clisp.org>
2858
2859         * tests/test-stdbool.c (i): Update after last patch.
2860
2861 2007-03-12  Bruno Haible  <bruno@clisp.org>
2862
2863         * lib/quotearg.c: Include <wctype.h> early, before the definition of
2864         the iswprint macro. Needed on Solaris 2.5.1.
2865
2866 2007-03-12  Bruno Haible  <bruno@clisp.org>
2867
2868         * tests/test-printf-frexp.c (main): Declare x as volatile.
2869
2870 2007-03-12  Simon Josefsson  <simon@josefsson.org>
2871
2872         * doc/gnulib.texi (Build robot for gnulib): New section.
2873
2874 2007-03-12  Jim Meyering  <jim@meyering.net>
2875
2876         * build-aux/bootstrap: New file.
2877         * build-aux/bootstrap.conf: New file, from coreutils.
2878
2879 2007-03-11  Bruno Haible  <bruno@clisp.org>
2880
2881         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
2882
2883 2007-03-12  Simon Josefsson  <simon@josefsson.org>
2884
2885         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
2886         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
2887         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
2888
2889 2007-03-11  Bruno Haible  <bruno@clisp.org>
2890
2891         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
2892         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
2893
2894 2007-03-11  Bruno Haible  <bruno@clisp.org>
2895
2896         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
2897         formula. Needed for SunPRO C 5.0.
2898
2899 2007-03-11  Bruno Haible  <bruno@clisp.org>
2900
2901         * modules/long-options (Depends-on): Add getopt.
2902
2903 2007-03-11  Bruno Haible  <bruno@clisp.org>
2904
2905         * modules/modechange (Depends-on): Add stdbool.
2906
2907 2007-03-11  Bruno Haible  <bruno@clisp.org>
2908
2909         * modules/i-ring (Depends-on): Add stdbool.
2910
2911 2007-03-11  Bruno Haible  <bruno@clisp.org>
2912
2913         * modules/gc-des (Depends-on): Add stdbool.
2914
2915 2007-03-11  Bruno Haible  <bruno@clisp.org>
2916
2917         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
2918
2919 2007-03-11  Bruno Haible  <bruno@clisp.org>
2920
2921         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
2922
2923 2007-03-11  Bruno Haible  <bruno@clisp.org>
2924
2925         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
2926
2927 2007-03-11  Bruno Haible  <bruno@clisp.org>
2928
2929         * lib/vasnprintf.c (sprintf): Undefine.
2930
2931 2007-03-11  Bruno Haible  <bruno@clisp.org>
2932
2933         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
2934         initializers in SunPRO C and Compaq C compilers.
2935
2936 2007-03-11  Bruno Haible  <bruno@clisp.org>
2937
2938         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
2939         decrementing code ANSI C compliant.
2940
2941 2007-03-11  Bruno Haible  <bruno@clisp.org>
2942
2943         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
2944         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
2945
2946 2007-03-11  Bruno Haible  <bruno@clisp.org>
2947
2948         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
2949         <stdbool.h> substitute doesn't pass.
2950
2951 2007-03-11  Bruno Haible  <bruno@clisp.org>
2952
2953         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
2954
2955 2007-03-11  Bruno Haible  <bruno@clisp.org>
2956
2957         * gnulib-tool (func_create_megatestdir): Create also an autobuild
2958         script, for submission to autobuild.josefsson.org.
2959
2960 2007-03-10  Bruno Haible  <bruno@clisp.org>
2961
2962         * modules/canonicalize-lgpl-tests: New file.
2963         * tests/test-canonicalize-lgpl.sh: New file.
2964         * tests/test-canonicalize-lgpl.c: New file.
2965
2966         * modules/c-strcase-tests: New file.
2967         * tests/test-c-strcase.sh: New file.
2968         * tests/test-c-strcasecmp.c: New file.
2969         * tests/test-c-strncasecmp.c: New file.
2970
2971         * modules/atexit-tests: New file.
2972         * tests/test-atexit.sh: New file.
2973         * tests/test-atexit.c: New file.
2974
2975 2007-03-10  Bruno Haible  <bruno@clisp.org>
2976
2977         * tests/test-binary-io.sh: Use temporary filenames that are not so
2978         likely to clash with those of other tests (in a parallel make).
2979         * tests/test-binary-io.c: Likewise.
2980
2981 2007-03-10  Bruno Haible  <bruno@clisp.org>
2982
2983         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
2984         fallback; use #error instead.
2985         Suggested by Simon Josefsson.
2986
2987 2007-03-10  Bruno Haible  <bruno@clisp.org>
2988
2989         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
2990         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
2991         first and the last.
2992
2993 2007-03-10  Bruno Haible  <bruno@clisp.org>
2994
2995         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
2996
2997 2007-03-10  Bruno Haible  <bruno@clisp.org>
2998
2999         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
3000         "make distcheck".
3001         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
3002         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
3003         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
3004
3005 2007-03-10  Bruno Haible  <bruno@clisp.org>
3006
3007         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
3008         variable.
3009         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
3010         variable.
3011
3012 2007-03-09  Eric Blake  <ebb9@byu.net>
3013         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
3014
3015         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
3016         types are not being provided by gnulib.
3017         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
3018         types are supported.
3019
3020 2007-03-10  Bruno Haible  <bruno@clisp.org>
3021
3022         * lib/stdio_.h (__attribute__): New macro.
3023         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
3024         vsprintf): Specify __attribute__ __format__ for GCC.
3025         Suggested by Eric Blake.
3026
3027 2007-03-09  Bruno Haible  <bruno@clisp.org>
3028
3029         * modules/printf-posix-tests: New file.
3030         * tests/test-printf-posix.sh: New file.
3031         * tests/test-printf-posix.c: New file.
3032
3033         * modules/printf-posix: New file.
3034         * lib/printf.c: New file.
3035         * m4/printf-posix-rpl.m4: New file.
3036         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
3037         REPLACE_PRINTF.
3038         * lib/stdio_.h (printf): New declaration.
3039         (format, __format__, ____printf____, ____scanf____, ____strftime____,
3040         ____strfmon____): New macros.
3041         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
3042         REPLACE_PRINTF.
3043
3044 2007-03-09  Bruno Haible  <bruno@clisp.org>
3045
3046         * tests/test-vasnprintf-posix2.sh: New file.
3047         * tests/test-vasnprintf-posix2.c: New file.
3048         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
3049         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
3050         (Makefile.am): Activate test-vasnprintf-posix2.sh.
3051
3052         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
3053         a locale dependent decimal point, rather than always '.'.
3054
3055 2007-03-09  Eric Blake  <ebb9@byu.net>
3056
3057         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
3058         spite of platforms like Tandem/NSK that define it to -1.
3059
3060 2007-03-08  Bruno Haible  <bruno@clisp.org>
3061
3062         * modules/vprintf-posix-tests: New file.
3063         * tests/test-vprintf-posix.sh: New file.
3064         * tests/test-vprintf-posix.c: New file.
3065         * tests/test-printf-posix.h: New file.
3066
3067         * modules/vprintf-posix: New file.
3068         * lib/vprintf.c: New file.
3069         * m4/vprintf-posix.m4: New file.
3070         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
3071         REPLACE_VPRINTF.
3072         * lib/stdio_.h (vprintf): New declaration.
3073         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
3074         REPLACE_VPRINTF.
3075
3076 2007-03-08  Bruno Haible  <bruno@clisp.org>
3077
3078         * modules/fprintf-posix-tests: New file.
3079         * tests/test-fprintf-posix.sh: New file.
3080         * tests/test-fprintf-posix.c: New file.
3081
3082         * modules/fprintf-posix: New file.
3083         * lib/fprintf.c: New file.
3084         * m4/fprintf-posix.m4: New file.
3085         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
3086         REPLACE_FPRINTF.
3087         * lib/stdio_.h (fprintf): New declaration.
3088         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
3089         REPLACE_FPRINTF.
3090
3091 2007-03-08  Bruno Haible  <bruno@clisp.org>
3092
3093         * modules/vfprintf-posix-tests: New file.
3094         * tests/test-vfprintf-posix.sh: New file.
3095         * tests/test-vfprintf-posix.c: New file.
3096         * tests/test-fprintf-posix.h: New file.
3097         * tests/test-fprintf-posix.out: New file.
3098
3099         * modules/vfprintf-posix: New file.
3100         * lib/vfprintf.c: New file.
3101         * m4/vfprintf-posix.m4: New file.
3102         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
3103         REPLACE_VFPRINTF.
3104         * lib/stdio_.h (vfprintf): New declaration.
3105         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
3106         REPLACE_VFPRINTF.
3107
3108 2007-03-08  Bruno Haible  <bruno@clisp.org>
3109
3110         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
3111
3112 2007-03-08  Bruno Haible  <bruno@clisp.org>
3113
3114         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
3115         instead of 'expr' invocations.
3116         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
3117         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
3118         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
3119         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
3120         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
3121         Suggested by Paul Eggert.
3122
3123 2007-03-08  Bruno Haible  <bruno@clisp.org>
3124
3125         * modules/fseterr-tests: New file.
3126         * tests/test-fseterr.c: New file.
3127
3128         * modules/fseterr: New file.
3129         * lib/fseterr.h: New file.
3130         * lib/fseterr.c: New file.
3131
3132 2007-03-08  Bruno Haible  <bruno@clisp.org>
3133
3134         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
3135         * lib/getopt_.h: Likewise.
3136         * lib/mbswidth.h: Likewise.
3137         * lib/setenv.h: Likewise.
3138         * lib/vasnprintf.h: Likewise.
3139         * lib/vasprintf.h: Likewise.
3140         * lib/verror.h: Likewise.
3141         * lib/xsetenv.h: Likewise.
3142         * lib/xvasprintf.h: Likewise.
3143
3144 2007-03-08  Jim Meyering  <jim@meyering.net>
3145
3146         * users.txt: Add parted.
3147
3148         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
3149
3150 2007-03-07  Bruno Haible  <bruno@clisp.org>
3151
3152         * m4/printf.m4: Make the shell script snippets copy&pastable.
3153
3154 2007-03-02  Bruno Haible  <bruno@clisp.org>
3155
3156         * lib/netinet_in_.h: New file.
3157         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
3158         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
3159         * modules/netinet_in (Files): Add lib/netinet_in_.h.
3160         (Depends-on): Add absolute-header.
3161         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
3162         into netinet/in.h.
3163
3164 2007-03-03  Bruno Haible  <bruno@clisp.org>
3165
3166         * lib/sys_select_.h: New file.
3167         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
3168         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
3169         * modules/sys_select (Files): Add lib/sys_select_.h.
3170         (Depends-on): Add absolute-header.
3171         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
3172         into sys/select.h.
3173
3174 2007-03-02  Bruno Haible  <bruno@clisp.org>
3175
3176         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
3177         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
3178         values.
3179         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
3180         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
3181         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
3182         * modules/sys_socket (Depends-on): Add absolute-header.
3183         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
3184         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
3185         (Include): Remove requirement of inclusion of <sys/types.h>.
3186
3187 2007-03-02  Bruno Haible  <bruno@clisp.org>
3188
3189         * lib/byteswap_.h (bswap_32): Fix formula.
3190
3191 2007-03-06  Bruno Haible  <bruno@clisp.org>
3192
3193         * modules/sprintf-posix-tests: New file.
3194         * tests/test-sprintf-posix.c: New file.
3195
3196         * modules/sprintf-posix: New file.
3197         * lib/sprintf.c: New file.
3198         * m4/sprintf-posix.m4: New file.
3199         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
3200         REPLACE_SPRINTF.
3201         * lib/stdio_.h (sprintf): New declaration.
3202         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
3203         REPLACE_SPRINTF.
3204
3205 2007-03-06  Bruno Haible  <bruno@clisp.org>
3206
3207         * modules/vsprintf-posix-tests: New file.
3208         * tests/test-vsprintf-posix.c: New file.
3209         * tests/test-sprintf-posix.h: New file.
3210
3211         * modules/vsprintf-posix: New file.
3212         * lib/vsprintf.c: New file.
3213         * m4/vsprintf-posix.m4: New file.
3214         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
3215         REPLACE_VSPRINTF.
3216         * lib/stdio_.h (vsprintf): New declaration.
3217         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
3218         REPLACE_VSPRINTF.
3219
3220 2007-03-06  Bruno Haible  <bruno@clisp.org>
3221
3222         * modules/vsnprintf (Depend-on): Remove minmax.
3223
3224 2007-03-06  Bruno Haible  <bruno@clisp.org>
3225
3226         * modules/snprintf-posix-tests: New file.
3227         * tests/test-snprintf-posix.c: New file.
3228
3229         * modules/snprintf-posix: New file.
3230         * m4/snprintf-posix.m4: New file.
3231         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
3232         gl_FUNC_SNPRINTF.
3233         (gl_FUNC_SNPRINTF): Invoke it.
3234         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
3235         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
3236         is set.
3237         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
3238
3239 2007-03-06  Bruno Haible  <bruno@clisp.org>
3240
3241         * modules/vsnprintf-posix-tests: New file.
3242         * tests/test-vsnprintf-posix.c: New file.
3243         * tests/test-snprintf-posix.h: New file.
3244
3245         * modules/vsnprintf-posix: New file.
3246         * m4/vsnprintf-posix.m4: New file.
3247         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
3248         gl_FUNC_VSNPRINTF.
3249         (gl_FUNC_VSNPRINTF): Invoke it.
3250         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
3251         * lib/stdio_.h (vsnprintf): Define as a replacement if
3252         REPLACE_VSNPRINTF is set.
3253         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
3254
3255 2007-03-06  Bruno Haible  <bruno@clisp.org>
3256
3257         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
3258         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
3259
3260 2007-03-06  Bruno Haible  <bruno@clisp.org>
3261
3262         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
3263         (asinl): Declare also if HAVE_DECL_ASINL is set.
3264         (atanl): Declare also if HAVE_DECL_ATANL is set.
3265         (ceill): Declare also if HAVE_DECL_CEILL is set.
3266         (cosl): Declare also if HAVE_DECL_COSL is set.
3267         (expl): Declare also if HAVE_DECL_EXPL is set.
3268         (floorl): Declare also if HAVE_DECL_FLOORL is set.
3269         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
3270         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
3271         (logl): Declare also if HAVE_DECL_LOGL is set.
3272         (sinl): Declare also if HAVE_DECL_SINL is set.
3273         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
3274         (tanl): Declare also if HAVE_DECL_TANL is set.
3275         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
3276         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
3277         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
3278         declaration of frexpl, ldexpl.
3279         * modules/printf-frexpl (Depends-on): Add math.
3280         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
3281
3282 2007-03-05  Bruno Haible  <bruno@clisp.org>
3283
3284         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
3285         frexpl and ldexpl are declared.
3286         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
3287
3288 2007-03-05  Bruno Haible  <bruno@clisp.org>
3289
3290         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
3291         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
3292
3293 2007-03-05  Bruno Haible  <bruno@clisp.org>
3294
3295         * lib/stdio_.h: Include <stddef.h>.
3296
3297 2007-03-05  Bruno Haible  <bruno@clisp.org>
3298
3299         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
3300
3301 2007-03-05  Bruno Haible  <bruno@clisp.org>
3302
3303         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
3304         NetBSD 4, from Ralf Wildenhues.
3305
3306 2007-03-04  Bruno Haible  <bruno@clisp.org>
3307
3308         * lib/vasprintf.h: Update #if logic for the case when the functions
3309         exist but are overridden.
3310
3311 2007-03-04  Bruno Haible  <bruno@clisp.org>
3312
3313         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
3314         implementations: glibc-2.4 and MacOS X 10.3.
3315         * tests/test-vasnprintf-posix.c (test_function): Test also the case
3316         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
3317         * tests/test-vasprintf-posix.c (test_function): Likewise.
3318
3319 2007-03-04  Bruno Haible  <bruno@clisp.org>
3320
3321         * modules/vasprintf-posix-tests: New file.
3322         * tests/test-vasprintf-posix.c: New file.
3323
3324         * modules/vasprintf-posix: New file.
3325         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
3326         defined.
3327         * m4/vasprintf-posix.m4: New file.
3328         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
3329         gl_FUNC_VASPRINTF.
3330         (gl_FUNC_VASPRINTF): Invoke it.
3331         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
3332         here.
3333         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
3334
3335 2007-03-04  Bruno Haible  <bruno@clisp.org>
3336
3337         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
3338         REPLACE_GETTIMEOFDAY.
3339         * modules/sys_time (Makefile.am): Likewise.
3340         * m4/sys_time_h.m4: Likewise.
3341         * m4/gettimeofday.m4: Likewise.
3342
3343 2007-03-04  Bruno Haible  <bruno@clisp.org>
3344
3345         * modules/vasnprintf-posix-tests: New file.
3346         * tests/test-vasnprintf-posix.c: New file.
3347
3348         * modules/vasnprintf-posix: New file.
3349         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
3350         printf-frexpl.h.
3351         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
3352         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
3353         REPLACE_VASNPRINTF is defined.
3354         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
3355         gl_FUNC_VASNPRINTF.
3356         (gl_FUNC_VASNPRINTF): Invoke it.
3357         * m4/vasnprintf-posix.m4: New file.
3358         * m4/printf.m4: New file.
3359
3360 2007-03-04  Bruno Haible  <bruno@clisp.org>
3361
3362         Compile progreloc.c only if --enable-relocatable is specified.
3363         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
3364         if --enable-relocatable was specified.
3365         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
3366         lib_SOURCES.
3367
3368 2007-03-04  Jim Meyering  <jim@meyering.net>
3369
3370         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
3371         Use it consistently, rather than enumerating errno constants.
3372
3373 2007-03-04  Bruno Haible  <bruno@clisp.org>
3374
3375         * modules/xvasprintf-tests: New file.
3376         * tests/test-xvasprintf.c: New file.
3377
3378         * modules/vasprintf-tests: New file.
3379         * tests/test-vasprintf.c: New file.
3380
3381         * modules/vasnprintf-tests: New file.
3382         * tests/test-vasnprintf.c: New file.
3383
3384         * modules/vsnprintf-tests: New file.
3385         * tests/test-vsnprintf.c: New file.
3386
3387         * modules/snprintf-tests: New file.
3388         * tests/test-snprintf.c: New file.
3389
3390 2007-03-04  Bruno Haible  <bruno@clisp.org>
3391
3392         Compile relocatable.c only if --enable-relocatable is specified.
3393         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
3394         gl_RELOCATABLE_LIBRARY.
3395         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
3396         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
3397         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
3398         gl_RELOCATABLE_LIBRARY.
3399         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
3400         (Makefile.am): Remove lib_SOURCES.
3401         * modules/relocatable-lib-lgpl (configure.ac): Invoke
3402         gl_RELOCATABLE_LIBRARY.
3403         (Makefile.am): Remove lib_SOURCES.
3404         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
3405         always.
3406         * modules/relocatable-prog-wrapper (configure.ac): Invoke
3407         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
3408
3409 2007-03-04  Bruno Haible  <bruno@clisp.org>
3410
3411         * modules/argmatch-tests: New file.
3412         * tests/test-argmatch.c: New file.
3413
3414         * tests/test-allocsa.c (main): Halve the number of loop runs.
3415
3416         * modules/alloca-opt-tests: New file.
3417         * tests/test-alloca-opt.c: New file.
3418
3419 2007-03-04  Jim Meyering  <jim@meyering.net>
3420
3421         Work around difference between Linux ACLs and Solaris 10 ZFS.
3422         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
3423         for EINVAL.
3424
3425 2007-03-03  Bruno Haible  <bruno@clisp.org>
3426
3427         * modules/relocatable-prog (Depends-on): Add back progreloc's
3428         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
3429
3430 2007-03-03  Bruno Haible  <bruno@clisp.org>
3431
3432         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
3433         * modules/relocatable-lib: New file.
3434
3435 2007-03-03  Bruno Haible  <bruno@clisp.org>
3436
3437         * modules/relocatable-prog: Renamed from modules/relocatable.
3438         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
3439
3440 2007-03-03  Bruno Haible  <bruno@clisp.org>
3441
3442         * modules/relocatable-script (Files): Add doc/relocatable.texi,
3443         m4/relocatable-lib.m4.
3444         (Depends-on): Remove 'relocatable'.
3445         (configure.ac): Add gl_RELOCATABLE_NOP.
3446
3447 2007-03-03  Bruno Haible  <bruno@clisp.org>
3448
3449         * modules/relocatable-prog-wrapper: New file.
3450         * modules/relocatable (Depends-on): Add it. Remove all other
3451         dependencies except progname.
3452         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
3453
3454         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
3455         (gl_FUNC_STRERROR): Nop.
3456         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
3457
3458         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
3459         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
3460
3461         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
3462         (gl_FUNC_READLINK): Update.
3463
3464         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
3465
3466 2007-03-03  Bruno Haible  <bruno@clisp.org>
3467
3468         * lib/xreadlink.c: Include <unistd.h> unconditionally.
3469         * modules/xreadlink (Depends-on): Add unistd.
3470         * modules/xreadlink-with-size (Depends-on): Likewise.
3471
3472 2007-03-03  Bruno Haible  <bruno@clisp.org>
3473
3474         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
3475         extracted from gt_FUNC_SETENV.
3476         (gt_FUNC_SETENV): Remove macro.
3477         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
3478         remove gt_FUNC_SETENV.
3479
3480 2007-03-03  Bruno Haible  <bruno@clisp.org>
3481
3482         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
3483         ENABLE_RELOCATABLE here.
3484         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
3485
3486 2007-03-03  Bruno Haible  <bruno@clisp.org>
3487
3488         * modules/rbtreehash-list-tests (Depends-on): Add progname.
3489         * tests/test-rbtreehash_list.c: Include progname.h.
3490         (main): Call set_program_name.
3491
3492         * modules/rbtree-oset-tests (Depends-on): Add progname.
3493         * tests/test-rbtree_oset.c: Include progname.h.
3494         (main): Call set_program_name.
3495
3496         * modules/rbtree-list-tests (Depends-on): Add progname.
3497         * tests/test-rbtree_list.c: Include progname.h.
3498         (main): Call set_program_name.
3499
3500         * modules/linked-list-tests (Depends-on): Add progname.
3501         * tests/test-linked_list.c: Include progname.h.
3502         (main): Call set_program_name.
3503
3504 2007-03-03  Bruno Haible  <bruno@clisp.org>
3505
3506         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
3507         All uses of __restrict changed to _Restrict_.
3508         * lib/glob_.h (__restrict): Remove macro.
3509
3510 2007-03-02  Bruno Haible  <bruno@clisp.org>
3511
3512         * modules/gettext (configure.ac): Require gettext infrastructure
3513         from version 0.16.1.
3514
3515 2007-03-02  Bruno Haible  <bruno@clisp.org>
3516
3517         * modules/linkedhash-list-tests (Depends-on): Add progname.
3518         * tests/test-linkedhash_list.c: Include progname.h.
3519         (main): Call set_program_name.
3520
3521         * modules/carray-list-tests (Depends-on): Add progname.
3522         * tests/test-carray_list.c: Include progname.h.
3523         (main): Call set_program_name.
3524
3525         * modules/avltreehash-list-tests (Depends-on): Add progname.
3526         * tests/test-avltreehash_list.c: Include progname.h.
3527         (main): Call set_program_name.
3528
3529         * modules/avltree-oset-tests (Depends-on): Add progname.
3530         * tests/test-avltree_oset.c: Include progname.h.
3531         (main): Call set_program_name.
3532
3533         * modules/avltree-list-tests (Depends-on): Add progname.
3534         * tests/test-avltree_list.c: Include progname.h.
3535         (main): Call set_program_name.
3536
3537         * modules/array-oset-tests (Depends-on): Add progname.
3538         * tests/test-array_oset.c: Include progname.h.
3539         (main): Call set_program_name.
3540
3541         * modules/array-list-tests (Depends-on): Add progname.
3542         * tests/test-array_list.c: Include progname.h.
3543         (main): Call set_program_name.
3544
3545         * modules/argp-tests (Depends-on): Add progname.
3546         * tests/test-argp.c: Include argp.h first. Include progname.h.
3547         (main): Call set_program_name.
3548
3549 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
3550
3551         * doc/gnulib-tool.texi (Initial import): Reword description of
3552         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
3553         limited effect even if defined after the first system include.
3554
3555 2007-03-01  Bruno Haible  <bruno@clisp.org>
3556
3557         * build-aux/config.libpath: Update to libtool-1.5.22.
3558         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
3559
3560 2007-03-01  Bruno Haible  <bruno@clisp.org>
3561
3562         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
3563         foo_CFLAGS.
3564         Reported by Ralf Wildenhues.
3565
3566 2007-03-01  Bruno Haible  <bruno@clisp.org>
3567
3568         * build-aux/install-reloc: Remove object files left over by some
3569         compilers.
3570         Reported by Ralf Wildenhues.
3571
3572 2007-03-01  Bruno Haible  <bruno@clisp.org>
3573
3574         * build-aux/install-reloc: Break long lines.
3575
3576 2007-03-01  Bruno Haible  <bruno@clisp.org>
3577
3578         * doc/relocatable.texi: Document that it may not work on OpenBSD.
3579         Reported by Ralf Wildenhues.
3580
3581 2007-03-01  Bruno Haible  <bruno@clisp.org>
3582
3583         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
3584         include ordering constraints.
3585
3586 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
3587
3588         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
3589         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
3590         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
3591         as another example.
3592         * lib/time_.h: Fix misspelling.
3593         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
3594         Require gl_HEADER_TIME_H_DEFAULTS.
3595         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
3596         * m4/time_r.m4 (gl_TIME_R): Likewise.
3597         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
3598
3599 2007-03-01  Bruno Haible  <bruno@clisp.org>
3600
3601         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
3602         * m4/utimens.m4 (gl_UTIMENS): Likewise.
3603
3604 2007-03-01  Jim Meyering  <jim@meyering.net>
3605
3606         * modules/xreadlink (Maintainer): Add my name.
3607         * modules/xreadlink-with-size (Depends-on): Alphabetize.
3608
3609 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
3610             Bruno Haible  <bruno@clisp.org>
3611
3612         * build-aux/install-reloc: Compile also c-ctype.c.
3613         * build-aux/relocatable.sh.in: New file.
3614         * doc/relocatable.texi: New file.
3615         * doc/relocatable-maint.texi: New file.
3616         * doc/gnulib.texi: Include relocatable-maint.texi.
3617         * lib/progreloc.c: Include unistd.h unconditionally.
3618         * lib/relocwrapper.c: Include unistd.h unconditionally.
3619         Include c-ctype.h.
3620         (add_dotbin): Use c_tolower.
3621         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
3622         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
3623         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
3624         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
3625         to m4/relocatable-lib.m4.
3626         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
3627         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
3628         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
3629         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
3630         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
3631         * modules/relocatable: New file.
3632         * modules/relocatable-lib: New file.
3633         * modules/relocatable-script: New file.
3634
3635 2007-02-28  Bruno Haible  <bruno@clisp.org>
3636
3637         Import --enable-relocatable infrastructure.
3638         * build-aux/config.libpath: New file, from GNU gettext.
3639         * build-aux/install-reloc: New file, from GNU gettext.
3640         * build-aux/reloc-ldflags: New file, from GNU gettext.
3641         * lib/relocatable.h: New file, from GNU gettext.
3642         * lib/relocatable.c: New file, from GNU gettext.
3643         * lib/relocwrapper.c: New file, from GNU gettext.
3644         * m4/relocatable.m4: New file, from GNU gettext.
3645
3646 2007-02-28  Bruno Haible  <bruno@clisp.org>
3647
3648         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
3649
3650         * modules/xreadlink: New file, from GNU gettext with modifications.
3651         * lib/xreadlink.c: New file, from GNU gettext.
3652         * lib/xreadlink.h: Add comments.
3653         (xreadlink): New declaration.
3654
3655         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
3656         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
3657         lib/xreadlink-with-size.c.
3658         (configure.ac): Remove gl_XREADLINK invocation.
3659         (Makefile.am): Augment lib_SOURCES.
3660         * m4/xreadlink.m4: Remove file.
3661         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
3662         (xreadlink_with_size): Renamed from xreadink.
3663         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
3664         * modules/canonicalize (Depends-on): Replace xreadlink with
3665         xreadlink-with-size.
3666         * lib/canonicalize.c (canonicalize_filename_mode): Update.
3667
3668 2007-02-25  Jim Meyering  <jim@meyering.net>
3669
3670         * build-aux/announce-gen: When complaining about excess arguments,
3671         list them.
3672
3673 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
3674
3675         * README: Document signed integer overflow situation more
3676         accurately.
3677
3678 2007-02-25  Bruno Haible  <bruno@clisp.org>
3679
3680         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
3681         'a' or 'A' conversion.
3682
3683 2007-02-25  Bruno Haible  <bruno@clisp.org>
3684
3685         * modules/filename: Renamed from modules/pathname.
3686         (Files): Replace lib/pathname.h with lib/filename.h. Replace
3687         lib/concatpath.c with lib/concat-filename.c.
3688         (Makefile.am): Update.
3689         (Include): Replace pathname.h with filename.h.
3690         * lib/filename.h: Renamed from lib/pathname.h.
3691         (concatenated_filename): Renamed from concatenated_pathname.
3692         * lib/concat-filename.c: Renamed from lib/concatpath.c.
3693         (concatenated_filename): Renamed from concatenated_pathname.
3694         * lib/findprog.c: Include filename.h instead of pathname.h.
3695         (find_in_path): Update.
3696         * lib/javacomp.c: Include filename.h instead of pathname.h.
3697         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
3698         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
3699         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
3700         is_oldgcj_14_13_usable, is_javac_usable): Update.
3701         * lib/javaexec.c: Include filename.h instead of pathname.h.
3702         (execute_java_class): Update.
3703         * modules/findprog: Update.
3704         * modules/javacomp: Update.
3705         * modules/javaexec: Update.
3706         * MODULES.html.sh (File system functions): Add 'filename', remove
3707         'pathname'.
3708
3709 2007-02-25  Bruno Haible  <bruno@clisp.org>
3710
3711         * modules/printf-frexpl-tests: New file.
3712         * tests/test-printf-frexpl.c: New file.
3713
3714         * modules/printf-frexpl: New file.
3715         * lib/printf-frexpl.h: New file.
3716         * lib/printf-frexpl.c: New file.
3717         * m4/printf-frexpl.m4: New file.
3718
3719 2007-02-25  Bruno Haible  <bruno@clisp.org>
3720
3721         * modules/printf-frexp-tests: New file.
3722         * tests/test-printf-frexp.c: New file.
3723
3724         * modules/printf-frexp: New file.
3725         * lib/printf-frexp.h: New file.
3726         * lib/printf-frexp.c: New file.
3727         * m4/printf-frexp.m4: New file.
3728
3729 2007-02-25  Bruno Haible  <bruno@clisp.org>
3730
3731         Assume automake >= 1.10 for the tests.
3732         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
3733         * modules/arctwo-tests: Likewise.
3734         * modules/argp-tests: Likewise.
3735         * modules/avltree-list-tests: Likewise.
3736         * modules/avltree-oset-tests: Likewise.
3737         * modules/avltreehash-list-tests: Likewise.
3738         * modules/carray-list-tests: Likewise.
3739         * modules/crc-tests: Likewise.
3740         * modules/des-tests: Likewise.
3741         * modules/gc-arcfour-tests: Likewise.
3742         * modules/gc-arctwo-tests: Likewise.
3743         * modules/gc-des-tests: Likewise.
3744         * modules/gc-hmac-md5-tests: Likewise.
3745         * modules/gc-hmac-sha1-tests: Likewise.
3746         * modules/gc-md2-tests: Likewise.
3747         * modules/gc-md4-tests: Likewise.
3748         * modules/gc-md5-tests: Likewise.
3749         * modules/gc-pbkdf2-sha1-tests: Likewise.
3750         * modules/gc-rijndael-tests: Likewise.
3751         * modules/gc-sha1-tests: Likewise.
3752         * modules/gc-tests: Likewise.
3753         * modules/getaddrinfo-tests: Likewise.
3754         * modules/hmac-md5-tests: Likewise.
3755         * modules/hmac-sha1-tests: Likewise.
3756         * modules/linked-list-tests: Likewise.
3757         * modules/linkedhash-list-tests: Likewise.
3758         * modules/lock-tests: Likewise.
3759         * modules/md2-tests: Likewise.
3760         * modules/md4-tests: Likewise.
3761         * modules/md5-tests: Likewise.
3762         * modules/rbtree-list-tests: Likewise.
3763         * modules/rbtree-oset-tests: Likewise.
3764         * modules/rbtreehash-list-tests: Likewise.
3765         * modules/read-file-tests: Likewise.
3766         * modules/rijndael-tests: Likewise.
3767         * modules/stdint-tests: Likewise.
3768         * modules/tls-tests: Likewise.
3769
3770 2007-02-24  Bruno Haible  <bruno@clisp.org>
3771
3772         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
3773         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
3774         function; instead check whether isnan with a double argument links.
3775         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
3776         function; instead check whether isnan with a 'long double' argument
3777         links.
3778         Reported by Eric Blake <ebb9@byu.net>.
3779
3780 2007-02-24  Bruno Haible  <bruno@clisp.org>
3781
3782         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
3783         defined.
3784         * lib/isnanl.c: Remove all code. Just include isnan.c.
3785         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
3786
3787 2007-02-25  Jim Meyering  <jim@meyering.net>
3788
3789         Avoid conflicting types for 'unsetenv' on FreeBSD.
3790         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
3791         conflicting with FreeBSD's (5.0 and 6.1) function declaration
3792         in stdlib.h.
3793
3794 2007-02-24  Bruno Haible  <bruno@clisp.org>
3795
3796         * modules/isnanl-nolibm-tests: New file.
3797         * tests/test-isnanl.c: New file.
3798
3799         * modules/isnanl-nolibm: New file.
3800         * lib/isnanl.h: New file.
3801         * lib/isnanl.c: New file.
3802         * m4/isnanl.m4: New file.
3803
3804 2007-02-24  Bruno Haible  <bruno@clisp.org>
3805
3806         * modules/isnan-nolibm-tests: New file.
3807         * tests/test-isnan.c: New file.
3808
3809         * modules/isnan-nolibm: New file.
3810         * lib/isnan.h: New file.
3811         * lib/isnan.c: New file.
3812         * m4/isnan.m4: New file.
3813
3814 2007-02-24  Bruno Haible  <bruno@clisp.org>
3815
3816         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
3817         assume that an exponent fits in 20 bits.
3818
3819 2007-02-24  Jim Meyering  <jim@meyering.net>
3820
3821         * m4/regex.m4: Update the description of the configure-time option,
3822         --without-included-regex, to state accurately what the defaults are,
3823         and perhaps to give people an idea why using this option is risky.
3824
3825 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
3826
3827         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
3828         loops on small arguments.  This attempts to avoid the problem
3829         Bruno Haible reported for AIX 4.3.2 in
3830         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
3831
3832 2007-02-23  Bruno Haible  <bruno@clisp.org>
3833
3834         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
3835         Needed for help2man.
3836
3837 2007-02-23  Karl Berry  <karl@gnu.org>
3838
3839         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
3840         exists, foo.h should be cvs-ignored, not committed.
3841
3842 2007-02-23  Eric Blake  <ebb9@byu.net>
3843
3844         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
3845         * lib/stat-time.h (includes): Likewise.
3846         * lib/utimecmp.c (includes): Likewise.
3847         * lib/utimens.h (includes): Likewise.
3848         * lib/getdate.y (includes): Also include "timespec.h" for use
3849         internal to the module.
3850         * modules/utimens (Depends-on): Revert yesterday's patch.
3851         * modules/nanosleep (Depends-on): Add missing dependency.
3852
3853 2007-02-22  Bruno Haible  <bruno@clisp.org>
3854
3855         * lib/glob.c: Don't include getlogin_r.h.
3856
3857 2007-02-22  Jim Meyering  <jim@meyering.net>
3858
3859         * modules/utimens (Depends-on): Add timespec, required for
3860         utimens.h's inclusion of timespec.h.
3861
3862 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
3863
3864         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
3865         long unreadable paths in GNU/Linux.  Problem reported by Andreas
3866         Schwab in
3867         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
3868         I'll try to think of a better way to fix the Solaris problem.
3869
3870         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
3871         like glibc; on Solaris 10, it fails with errno == EINVAL.
3872         POSIX says the behavior is unspecified if the first argument is NULL,
3873         so play it safe and never pass NULL to the system getcwd.
3874
3875 2007-02-21  Jim Meyering  <jim@meyering.net>
3876
3877         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
3878         of gettimeofday.  It would conflict with the one now always
3879         provided via sys_time_.h.  Reported by Matthew Woehlke, as
3880         an IRIX 6.5 build failure.
3881
3882 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
3883
3884         Minor fixups to port to Solaris 10 with Sun C 5.8.
3885         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
3886         * modules/getcwd (Depends-on): Add dirfd.
3887         * lib/putenv.c (putenv): #undef it.
3888         (rpl_putenv): New decl.
3889         (malloc, free): Include <stdlib.h> rather than prototyping separately.
3890
3891 2007-02-20  Bruno Haible  <bruno@clisp.org>
3892
3893         * modules/stdio-tests: New file.
3894         * tests/test-stdio.c: New file.
3895
3896         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
3897         (Depends-on): Add stdio.
3898         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
3899         (Include): Use <stdio.h> instead of vsnprintf.h.
3900         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
3901         HAVE_DECL_VSNPRINTF.
3902         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
3903
3904         * modules/snprintf (Files): Remove lib/snprintf.h.
3905         (Depends-on): Add stdio.
3906         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
3907         (Include): Use <stdio.h> instead of snprintf.h.
3908         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
3909         HAVE_DECL_SNPRINTF.
3910         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
3911         * lib/getaddrinfo.c: Likewise.
3912
3913         * modules/stdio: New file.
3914         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
3915         * lib/snprintf.h: Remove file.
3916         * lib/vsnprintf.h: Remove file.
3917         * lib/.cppi-disable: Remove snprintf.h.
3918         * m4/stdio_h.m4: New file.
3919         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
3920
3921 2007-02-20  Jim Meyering  <jim@meyering.net>
3922
3923         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
3924         used by e.g., mingw.  From Bruno Haible.
3925
3926 2007-02-19  Bruno Haible  <bruno@clisp.org>
3927
3928         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
3929         warnings.
3930         Reported by Ben Pfaff <blp@cs.stanford.edu>.
3931
3932 2007-02-19  Bruno Haible  <bruno@clisp.org>
3933
3934         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
3935         from mingw users.
3936
3937 2007-02-19  Bruno Haible  <bruno@clisp.org>
3938
3939         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
3940         warnings.
3941         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
3942
3943 2007-02-19  Jim Meyering  <jim@meyering.net>
3944
3945         Don't use FD after a successful "fdopendir (fd)".
3946         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
3947         Reset it by calling dirfd on the just-obtained DIR*.
3948
3949         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
3950         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
3951
3952 2007-02-18  Bruno Haible  <bruno@clisp.org>
3953
3954         * lib/readlink.c: Include <unistd.h>.
3955         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
3956         HAVE_READLINK.
3957         * modules/readlink (Depends-on): Add unistd.
3958         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
3959         (Include): Add <unistd.h>.
3960
3961         * lib/getlogin_r.h: Remove file.
3962         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
3963         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
3964         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
3965         HAVE_DECL_GETLOGIN_R.
3966         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
3967         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
3968         (Include): Use <unistd.h> instead of getlogin_r.h.
3969
3970         * lib/getcwd.h: Remove file.
3971         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
3972         * lib/xgetcwd.c: Likewise.
3973         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
3974         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
3975         * modules/getcwd (Files): Remove lib/getcwd.h.
3976         (Depends-on): Add unistd.
3977         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
3978         (Include): Use <unistd.h> instad of getcwd.h.
3979
3980         * lib/ftruncate.c: Include <unistd.h> first.
3981         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
3982         Set HAVE_FTRUNCATE.
3983         * modules/ftruncate (Depends-on): Add unistd.
3984         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
3985
3986         * lib/fchdir.c: Include <unistd.h> first.
3987         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
3988         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
3989         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
3990         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
3991         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
3992
3993         * lib/dup2.c: Include <unistd.h> first.
3994         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
3995         HAVE_DUP2.
3996         * modules/dup2 (Depends-on): Add unistd.
3997         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
3998
3999         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
4000         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
4001         REPLACE_CHOWN. Don't define chown as a macro here.
4002         * modules/chown (Depends-on): Add unistd.
4003         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4004
4005         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
4006         Add definition for GL_LINK_WARNING.
4007         (chown, dup2): New declarations.
4008         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
4009         link warning.
4010         (ftruncate): New declaration.
4011         (getcwd): New declaration, taken from old getcwd.h.
4012         (getlogin_r): New declaration, taken from old getlogin_r.h.
4013         (readlink): New declaration.
4014         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
4015         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
4016         (gl_PREREQ_UNISTD): Remove macro.
4017         (gl_UNISTD_MODULE_INDICATOR): New macro.
4018         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
4019         many new variables. Don't set UNISTD_H.
4020         * modules/unistd (Description): Change.
4021         (Depends-on): Add link-warning.
4022         (configure.ac): Update.
4023         (Makefile.am): Create unistd.h always. Substitute many new variables
4024         into it.
4025
4026 2007-02-18  Bruno Haible  <bruno@clisp.org>
4027
4028         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
4029         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
4030         HAVE_GETSUBOPT.
4031         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
4032         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
4033         * lib/getsubopt.h: Remove file.
4034         * modules/getsubopt (Files): Remove lib/getsubopt.h.
4035         (Depends-on): Add stdlib.
4036         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
4037         (Includes): Use <stdlib.h> instead of getsubopt.h.
4038         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
4039         Set HAVE_GETSUBOPT.
4040         * lib/getsubopt.c: Don't include getsubopt.h.
4041
4042 2007-02-18  Bruno Haible  <bruno@clisp.org>
4043
4044         * modules/fchdir (Depends-on): Add dup2.
4045
4046 2007-02-18  Bruno Haible  <bruno@clisp.org>
4047
4048         * lib/stdlib_.h: Handle glibc's special invocation convention
4049         specially.
4050
4051 2007-02-18  Bruno Haible  <bruno@clisp.org>
4052
4053         * modules/stdlib-tests: New file.
4054         * tests/test-stdlib.c: New file.
4055
4056         * modules/mkstemp (Files): Remove lib/mkstemp.h.
4057         (Depends-on): Add stdlib.
4058         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
4059         (Includes): Use <stdlib.h> instead of mkstemp.h.
4060         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
4061         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
4062         * lib/mkstemp.c: Don't include mkstemp.h.
4063         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
4064         * lib/stdlib--.h: Don't include mkstemp.h.
4065
4066         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
4067         (Depends-on): Add stdlib.
4068         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
4069         (Includes): Use <stdlib.h> instead of mkdtemp.h.
4070         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
4071         HAVE_MKDTEMP.
4072         * lib/mkdtemp.c: Don't include mkdtemp.h.
4073         * lib/clean-temp.c: Don't include mkdtemp.h.
4074
4075         * modules/exit (Files): Remove lib/exit.h.
4076         (Depends-on): Add stdlib.
4077         (Makefile.am): Remove lib_SOURCES.
4078         (Include): Use <stdlib.h> instead of exit.h.
4079         * lib/argmatch.c: Don't include exit.h.
4080         * lib/execute.c: Likewise.
4081         * lib/pagealign_alloc.c: Likewise.
4082         * lib/pipe.c: Likewise.
4083         * lib/wait-process.c: Likewise.
4084         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
4085         * lib/exitfail.c: Likewise.
4086         * lib/savewd.c: Likewise.
4087         * lib/xsetenv.c: Likewise.
4088
4089         * modules/stdlib: New file.
4090         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
4091         and extra comments about mkstemp().
4092         * lib/exit.h: Remove file.
4093         * lib/mkdtemp.h: Remove file.
4094         * lib/mkstemp.h: Remove file.
4095         * m4/stdlib_h.m4: New file.
4096         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
4097
4098 2007-02-18  Bruno Haible  <bruno@clisp.org>
4099
4100         * modules/math-tests: New file.
4101         * tests/test-math.c: New file.
4102
4103         * modules/math: New file.
4104         * modules/mathl (Files): Remove lib/mathl.h.
4105         (Depends-on): Add math.
4106         (Makefile.am): Don't mention mathl.h.
4107         (Include): Use <math.h> instead of mathl.h.
4108         * lib/math_.h: New file.
4109         * lib/mathl.h: Remove file.
4110         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
4111         mathl.h.
4112         * lib/asinl.c: Likewise.
4113         * lib/atanl.c: Likewise.
4114         * lib/ceill.c: Likewise.
4115         * lib/cosl.c: Likewise.
4116         * lib/expl.c: Likewise.
4117         * lib/floorl.c: Likewise.
4118         * lib/frexpl.c: Likewise.
4119         * lib/ldexpl.c: Likewise.
4120         * lib/logl.c: Likewise.
4121         * lib/sincosl.c: Likewise.
4122         * lib/sinl.c: Likewise.
4123         * lib/sqrtl.c: Likewise.
4124         * lib/tanl.c: Likewise.
4125         * lib/trigl.c: Likewise.
4126         * m4/math_h.m4: New file.
4127         * MODULES.html.sh (Mathematics): Add math.
4128
4129 2007-02-17  Bruno Haible  <bruno@clisp.org>
4130
4131         * modules/wctype-tests: New file.
4132         * tests/test-wctype.c: New file.
4133
4134         * modules/wchar-tests: New file.
4135         * tests/test-wchar.c: New file.
4136
4137         * modules/unistd-tests: New file.
4138         * tests/test-unistd.c: New file.
4139
4140         * modules/time-tests: New file.
4141         * tests/test-time.c: New file.
4142
4143         * modules/sysexits-tests: New file.
4144         * tests/test-sysexits.c: New file.
4145
4146         * modules/sys_time-tests: New file.
4147         * tests/test-sys_time.c: New file.
4148
4149         * modules/sys_stat-tests: New file.
4150         * tests/test-sys_stat.c: New file.
4151
4152         * modules/sys_socket-tests: New file.
4153         * tests/test-sys_socket.c: New file.
4154
4155         * modules/sys_select-tests: New file.
4156         * tests/test-sys_select.c: New file.
4157
4158         * modules/string-tests: New file.
4159         * tests/test-string.c: New file.
4160
4161         * modules/stdbool-tests: New file.
4162         * tests/test-stdbool.c: New file.
4163
4164         * modules/netinet_in-tests: New file.
4165         * tests/test-netinet_in.c: New file.
4166
4167         * modules/inttypes-tests: New file.
4168         * tests/test-inttypes.c: New file.
4169
4170         * modules/fcntl-tests: New file.
4171         * tests/test-fcntl.c: New file.
4172
4173         * modules/byteswap-tests: New file.
4174         * tests/test-byteswap.c: New file.
4175
4176         * modules/arpa_inet-tests: New file.
4177         * tests/test-arpa_inet.c: New file.
4178
4179 2007-02-17  Bruno Haible  <bruno@clisp.org>
4180
4181         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
4182         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
4183         if the corresponding module is not enabled. Emit link warnings if
4184         the function is used nevertheless.
4185         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
4186         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
4187         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
4188         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
4189         * modules/inttypes (Depends-on): Add link-warning.
4190         (Makefile.am): Copy the contents of build-aux/link-warning.h into
4191         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
4192         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
4193         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
4194         * modules/imaxdiv (configure.ac): Likewise.
4195         * modules/strtoimax (configure.ac): Likewise.
4196         * modules/strtoumax (configure.ac): Likewise.
4197
4198 2007-02-17  Bruno Haible  <bruno@clisp.org>
4199
4200         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
4201         gl_STRING_MODULE_INDICATOR_DEFAULTS.
4202         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
4203         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
4204
4205 2007-02-17  Bruno Haible  <bruno@clisp.org>
4206
4207         * modules/link-warning: New file.
4208         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
4209         * lib/string_.h (GL_LINK_WARNING): Remove definition.
4210         * modules/string (Depends-on): Add link-warning.
4211         (Makefile.am): Copy the contents of build-aux/link-warning.h into
4212         string.h.
4213         * MODULES.html.sh (Support for building libraries and executables): Add
4214         link-warning.
4215
4216 2007-02-17  Bruno Haible  <bruno@clisp.org>
4217
4218         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
4219         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
4220         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
4221         long lines.
4222
4223 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
4224             Bruno Haible  <bruno@clisp.org>
4225
4226         * modules/tmpfile: New file.
4227         * lib/tmpfile.c: New file.
4228         * m4/tmpfile.m4: New file.
4229         * MODULES.html.sh (func_all_modules): New section "Input/output".
4230
4231 2007-02-15  Bruno Haible  <bruno@clisp.org>
4232
4233         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
4234         (supports_delete_on_close): New function.
4235         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
4236
4237 2007-02-14  Bruno Haible  <bruno@clisp.org>
4238
4239         * modules/mbspcasecmp-tests: New file.
4240         * tests/test-mbspcasecmp.sh: New file.
4241         * tests/test-mbspcasecmp.c: New file.
4242
4243         New module mbspcasecmp.
4244         * modules/mbspcasecmp: New file.
4245         * lib/mbspcasecmp.c: New file.
4246         * lib/string_.h (strncasecmp): Change warning message.
4247         (mbspcasecmp): New declaration.
4248         * m4/mbspcasecmp.m4: New file.
4249         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
4250         GNULIB_MBSPCASECMP.
4251         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
4252         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
4253
4254 2007-02-14  Bruno Haible  <bruno@clisp.org>
4255
4256         * modules/mbsncasecmp-tests: New file.
4257         * tests/test-mbsncasecmp.sh: New file.
4258         * tests/test-mbsncasecmp.c: New file.
4259
4260         New module mbsncasecmp.
4261         * modules/mbsncasecmp: New file.
4262         * lib/mbsncasecmp.c: New file.
4263         * lib/string_.h (mbsncasecmp): New declaration.
4264         * m4/mbsncasecmp.m4: New file.
4265         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
4266         GNULIB_MBSNCASECMP.
4267         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
4268         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
4269
4270 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
4271
4272         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
4273         Verify that it doesn't overlap with our flags.
4274         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
4275         do not have the desired effect in multibyte locales; instead, use
4276         mbscasecmp.
4277         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
4278         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
4279         we don't require GNU fnmatch ourselves (if our users require it, they
4280         should do so explicitly).
4281
4282         Fix regex code so it doesn't rely on strcasecmp.
4283         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
4284         Otherwise, include gnulib's langinfo.h.
4285         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
4286         undesirable behavior in non-C locales.  Instead, rely on localecharset.
4287         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
4288         * modules/regex (FILES): Remove m4/codeset.m4.
4289         (Depends-on): Add localcharset.  Remove strcase.
4290
4291 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4292
4293         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
4294         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
4295
4296 2007-02-13  Bruno Haible  <bruno@clisp.org>
4297
4298         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
4299         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
4300
4301 2007-02-12  Bruno Haible  <bruno@clisp.org>
4302
4303         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
4304         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
4305         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
4306         time warning rather than a link error.
4307
4308 2007-02-12  Bruno Haible  <bruno@clisp.org>
4309
4310         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
4311         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
4312         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
4313
4314 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
4315
4316         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
4317         args, not 2.
4318
4319 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
4320
4321         New module 'time', so that apps can include <time.h> as per
4322         POSIX and GNU instead of separate include files like time_r.h
4323         and timegm.h.  This implementation tries out a simpler approach
4324         for replacing decls in standard include files (as compared to
4325         the string module), somewhat as an experiment.
4326
4327         * config/srclist.txt: Comment out mktime.c for now.
4328         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
4329         since it doesn't apply any more.  Use generic wording instead.
4330         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
4331         'time'.
4332         * lib/time_.h, m4/time_h.m4, modules/time: New files.
4333         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
4334         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
4335         Don't include <sys/types.h>; no longer needed since we assume C89.
4336         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
4337         * lib/strftime.c: Likewise.
4338         * lib/time_r.c: Likewise.
4339         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
4340         * lib/nanosleep.c: Include <time.h> first, to check interface.
4341         * lib/strptime.c: Likewise.
4342         * lib/time_r.c: Likewise.
4343         * lib/timegm.c: Likewise.
4344         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
4345         needed.
4346         * lib/timegm.c: Don't include timegm.h; no longer needed.
4347         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
4348         time.h now handles any problems in that area.
4349         (struct timespec, nanosleep): Remove; time.h now arranges for these.
4350         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
4351         that time.h defines struct timespec.
4352         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
4353         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
4354         handles that.
4355         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
4356         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
4357         needed.  Set REPLACE_LOCALTIME.
4358         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
4359         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
4360         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
4361         nanosleep; time_h.m4 now does that.  Don't require
4362         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
4363         module handles this now.
4364         * modules/getdate (Depends-on): Remove timespec.  Add time.
4365         * modules/nanosleep (Depends-on): Likewise.
4366         * modules/stat-time (Depends-on): Likewise.
4367         * modules/nanosleep (Include): Include time.h, not timespec.h.
4368         * modules/strptime (Files): Remove lib/strptime.h.
4369         (Depends-on): Add extensions, time.
4370         (Include): Include time.h, not strptime.h.
4371         * modules/time_r (Files): Remove lib/time_r.h.
4372         (Depends-on): Add time.
4373         (Include): Include time.h, not time_r.h.
4374         * modules/timegm: Likewise.
4375         * modules/timespec (Description): Now does timespec-related decls
4376         of our own, instead of struct timespec itself.
4377         (Depends-on): Add time; remove extensions.
4378         (Maintainer): Add self.
4379         * modules/utimecmp (Depends-on): Add time; remove timespec.
4380         * modules/utimens (Depends-on): Likewise.
4381         * modules/xnanosleep (Depends-on): Likewise.
4382
4383 2007-02-11  Bruno Haible  <bruno@clisp.org>
4384
4385         * lib/c-strstr.c: Include allocsa.h.
4386         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
4387         * lib/c-strcasestr.c: Include allocsa.h.
4388         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
4389         * lib/strcasestr.c: Include allocsa.h.
4390         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
4391         * lib/mbsstr.c: Include allocsa.h.
4392         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
4393         allocsa/freesa instead of malloc/free.
4394         * lib/mbscasestr.c: Include allocsa.h.
4395         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
4396         allocsa/freesa instead of malloc/free.
4397         * modules/c-strstr (Depends-on): Add allocsa.
4398         * modules/c-strcasestr (Depends-on): Likewise.
4399         * modules/strcasestr (Depends-on): Likewise.
4400         * modules/mbsstr (Depends-on): Likewise.
4401         * modules/mbscasestr (Depends-on): Likewise.
4402
4403 2007-02-11  Bruno Haible  <bruno@clisp.org>
4404
4405         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
4406
4407         * modules/mbsspn-tests: New file.
4408         * tests/test-mbsspn.sh: New file.
4409         * tests/test-mbsspn.c: New file.
4410
4411 2007-02-11  Bruno Haible  <bruno@clisp.org>
4412
4413         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
4414
4415         * modules/mbspbrk-tests: New file.
4416         * tests/test-mbspbrk.sh: New file.
4417         * tests/test-mbspbrk.c: New file.
4418
4419 2007-02-11  Bruno Haible  <bruno@clisp.org>
4420
4421         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
4422         unneeded cast.
4423
4424         * modules/mbscspn-tests: New file.
4425         * tests/test-mbscspn.sh: New file.
4426         * tests/test-mbscspn.c: New file.
4427
4428 2007-02-11  Bruno Haible  <bruno@clisp.org>
4429
4430         * modules/mbscasecmp-tests: New file.
4431         * tests/test-mbscasecmp.sh: New file.
4432         * tests/test-mbscasecmp.c: New file.
4433
4434 2007-02-11  Bruno Haible  <bruno@clisp.org>
4435
4436         Ensure O(n) worst-case complexity of mbscasestr.
4437         * lib/mbscasestr.c: Include stdbool.h.
4438         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
4439         functions.
4440         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
4441         the bookkeeping indicates that it's worth it.
4442         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
4443
4444         * modules/mbscasestr-tests: New file.
4445         * tests/test-mbscasestr1.c: New file.
4446         * tests/test-mbscasestr2.sh: New file.
4447         * tests/test-mbscasestr2.c: New file.
4448         * tests/test-mbscasestr3.sh: New file.
4449         * tests/test-mbscasestr3.c: New file.
4450         * tests/test-mbscasestr4.sh: New file.
4451         * tests/test-mbscasestr4.c: New file.
4452         * m4/locale-tr.m4: New file.
4453
4454 2007-02-11  Bruno Haible  <bruno@clisp.org>
4455
4456         Ensure O(n) worst-case complexity of mbsstr.
4457         * lib/mbsstr.c: Include stdbool.h.
4458         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
4459         functions.
4460         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
4461         bookkeeping indicates that it's worth it.
4462         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
4463
4464         * modules/mbsstr-tests: New file.
4465         * tests/test-mbsstr1.c: New file.
4466         * tests/test-mbsstr2.sh: New file.
4467         * tests/test-mbsstr2.c: New file.
4468         * tests/test-mbsstr3.sh: New file.
4469         * tests/test-mbsstr3.c: New file.
4470         * m4/locale-fr.m4: New file.
4471
4472 2007-02-11  Bruno Haible  <bruno@clisp.org>
4473
4474         * lib/mbsrchr.c (mbsrchr): Fix bug.
4475
4476         * modules/mbsrchr-tests: New file.
4477         * tests/test-mbsrchr.sh: New file.
4478         * tests/test-mbsrchr.c: New file.
4479
4480 2007-02-11  Bruno Haible  <bruno@clisp.org>
4481
4482         * lib/mbschr.c (mbschr): Fix bug.
4483
4484         * modules/mbschr-tests: New file.
4485         * tests/test-mbschr.sh: New file.
4486         * tests/test-mbschr.c: New file.
4487         * m4/locale-zh.m4: New file.
4488
4489 2007-02-11  Bruno Haible  <bruno@clisp.org>
4490
4491         Support for copying multibyte string iterators.
4492         * lib/mbiter.h: Include <string.h>.
4493         (mbiter_multi_copy): New function.
4494         (mbi_copy): New macro.
4495         * lib/mbuiter.h: Include <string.h>.
4496         (mbuiter_multi_copy): New function.
4497         (mbui_copy): New macro.
4498
4499 2007-02-11  Bruno Haible  <bruno@clisp.org>
4500
4501         New module mbslen.
4502         * modules/mbslen: New file.
4503         * lib/mbslen.c: New file.
4504         * lib/string_.h (mbslen): New declaration.
4505         * m4/mbslen.m4: New file.
4506         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
4507         GNULIB_MBSLEN.
4508         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
4509         * MODULES.html.sh (Internationalization functions): Add mbslen.
4510
4511 2007-02-11  Bruno Haible  <bruno@clisp.org>
4512
4513         Ensure O(n) worst-case complexity of strcasestr substitute.
4514         * lib/strcasestr.c: Include stdbool.h.
4515         (knuth_morris_pratt): New function.
4516         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
4517         bookkeeping indicates that it's worth it.
4518         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
4519
4520         * modules/strcasestr-tests: New file.
4521         * tests/test-strcasestr.c: New file.
4522
4523 2007-02-11  Bruno Haible  <bruno@clisp.org>
4524
4525         Ensure O(n) worst-case complexity of c_strcasestr.
4526         * lib/c-strcasestr.c: Include stdbool.h, string.h.
4527         (knuth_morris_pratt): New function.
4528         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
4529         the bookkeeping indicates that it's worth it.
4530         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
4531
4532         * modules/c-strcasestr-tests: New file.
4533         * tests/test-c-strcasestr.c: New file.
4534
4535 2007-02-11  Bruno Haible  <bruno@clisp.org>
4536
4537         Ensure O(n) worst-case complexity of c_strstr.
4538         * lib/c-strstr.c: Include stdbool.h, string.h.
4539         (knuth_morris_pratt): New function.
4540         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
4541         bookkeeping indicates that it's worth it.
4542         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
4543
4544         * lib/c-strstr.c: Complete rewrite for maintainability.
4545
4546         * modules/c-strstr-tests: New file.
4547         * tests/test-c-strstr.c: New file.
4548
4549 2007-02-11  Bruno Haible  <bruno@clisp.org>
4550
4551         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
4552         5.2.1 and earlier, whereby \055 was treated just like the range
4553         delimiter '-'.
4554         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
4555
4556 2007-02-08  Bruno Haible  <bruno@clisp.org>
4557
4558         * modules/regex (Depends-on): Add stdbool.
4559         Reported by Dalibor Topic <robilad@kaffe.org>.
4560
4561 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
4562
4563         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
4564         Prefer returning from main to exiting from it.
4565         Remove unnecessary parens after sizeof.
4566
4567 2007-02-05  Bruno Haible  <bruno@clisp.org>
4568
4569         New module mbssep.
4570         * modules/mbssep: New file.
4571         * lib/mbssep.c: New file.
4572         * lib/string_.h (strsep): Add a conditional link warning.
4573         (mbssep): New declaration.
4574         * m4/mbssep.m4: New file.
4575         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
4576         GNULIB_MBSSEP.
4577         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
4578         * MODULES.html.sh (Internationalization functions): Add mbssep.
4579
4580 2007-02-05  Bruno Haible  <bruno@clisp.org>
4581
4582         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
4583         Optimize search in case of 1 delimiter.
4584
4585 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
4586
4587         * lib/acl.h: Include sys/types.h before sys/acl.h.
4588
4589 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
4590
4591         Merge upstream fix for glibc bugzilla #3957:
4592
4593         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
4594
4595         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
4596         bit for RE_HAT_LISTS_NOT_NEWLINE.
4597         (build_charclass_op): Remove bogus comment.
4598
4599 2007-02-05  Simon Josefsson  <simon@josefsson.org>
4600
4601         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
4602
4603 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
4604
4605         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
4606         * lib/memmem.c [!defined _LIBC]: Include config.h.
4607
4608 2007-02-04  Bruno Haible  <bruno@clisp.org>
4609
4610         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
4611         warning message.
4612
4613 2007-02-04  Bruno Haible  <bruno@clisp.org>
4614
4615         New module mbstok_r.
4616         * modules/mbstok_r: New file.
4617         * lib/mbstok_r.c: New file.
4618         * lib/string_.h (strtok_r): Change argument names to match the
4619         comments. Add a conditional link warning.
4620         (mbstok_r): New declaration.
4621         * m4/mbstok_r.m4: New file.
4622         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
4623         GNULIB_MBSTOK_R.
4624         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
4625         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
4626
4627 2007-02-04  Bruno Haible  <bruno@clisp.org>
4628
4629         New module mbsspn.
4630         * modules/mbsspn: New file.
4631         * lib/mbsspn.c: New file.
4632         * lib/string_.h (strspn): Add a conditional link warning.
4633         (mbsspn): New declaration.
4634         * m4/mbsspn.m4: New file.
4635         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
4636         GNULIB_MBSSPN.
4637         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
4638         * MODULES.html.sh (Internationalization functions): Add mbsspn.
4639
4640 2007-02-04  Bruno Haible  <bruno@clisp.org>
4641
4642         New module mbspbrk.
4643         * modules/mbspbrk: New file.
4644         * lib/mbspbrk.c: New file.
4645         * lib/string_.h (strpbrk): Add a conditional link warning.
4646         (mbspbrk): New declaration.
4647         * m4/mbspbrk.m4: New file.
4648         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
4649         GNULIB_MBSPBRK.
4650         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
4651         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
4652
4653 2007-02-04  Bruno Haible  <bruno@clisp.org>
4654
4655         New module mbscspn.
4656         * modules/mbscspn: New file.
4657         * lib/mbscspn.c: New file.
4658         * lib/string_.h (strcspn): Add a conditional link warning.
4659         (mbscspn): New declaration.
4660         * m4/mbscspn.m4: New file.
4661         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
4662         GNULIB_MBSCSPN.
4663         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
4664         * MODULES.html.sh (Internationalization functions): Add mbscspn.
4665
4666 2007-02-04  Bruno Haible  <bruno@clisp.org>
4667
4668         New module mbscasestr, reduced goal of strcasestr.
4669         * modules/mbscasestr: New file.
4670         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
4671         (mbscasestr): Renamed from strcasestr.
4672         * lib/strcasestr.c: Don't include mbuiter.h.
4673         (strcasestr): Remove support for multibyte locales.
4674         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
4675         Change the conditional link warning.
4676         (mbscasestr): New declaration.
4677         * m4/mbscasestr.m4: New file.
4678         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
4679         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
4680         REPLACE_STRCASESTR.
4681         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
4682         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
4683         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
4684         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
4685         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
4686         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
4687         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
4688         (Depends-on): Remove mbuiter.
4689         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
4690
4691 2007-02-04  Bruno Haible  <bruno@clisp.org>
4692
4693         Simplify handling of strncasecmp.
4694         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
4695         the conditional link warning.
4696         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
4697         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
4698         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
4699         * modules/strcase (configure.ac): Don't invoke
4700         gl_STRING_MODULE_INDICATOR.
4701         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
4702
4703 2007-02-04  Bruno Haible  <bruno@clisp.org>
4704
4705         New module mbscasecmp, reduced goal of strcasecmp.
4706         * modules/mbscasecmp: New file.
4707         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
4708         (mbscasecmp): Renamed from strcasecmp.
4709         * lib/strcasecmp.c: Don't include mbuiter.h.
4710         (strcasecmp): Remove support for multibyte locales.
4711         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
4712         Change the conditional link warning.
4713         (mbscasecmp): New declaration.
4714         * m4/mbscasecmp.m4: New file.
4715         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
4716         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
4717         REPLACE_STRCASECMP.
4718         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
4719         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
4720         GNULIB_MBSCASECMP.
4721         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
4722         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
4723         * modules/strcase (Files): Remove m4/mbrtowc.m4.
4724         (Depends-on): Remove mbuiter.
4725         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
4726
4727 2007-02-04  Bruno Haible  <bruno@clisp.org>
4728
4729         New module mbsstr. Remove module strstr.
4730         * modules/mbsstr: New file.
4731         * modules/strstr: Remove file.
4732         * lib/mbsstr.c: Renamed from lib/strstr.c.
4733         (mbsstr): Renamed from strstr.
4734         * lib/string_.h (strstr): Remove declaration. Change the conditional
4735         link warning.
4736         (mbsstr): New declaration.
4737         * m4/mbsstr.m4: New file.
4738         * m4/strstr.m4: Remove file.
4739         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
4740         REPLACE_STRSTR.
4741         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
4742         Don't initialize GNULIB_STRSTR.
4743         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
4744         substitute GNULIB_STRSTR and REPLACE_STRSTR.
4745         * MODULES.html.sh (Internationalization functions): Add mbsstr.
4746         (Support for systems lacking ANSI C 89): Remove strstr.
4747
4748 2007-02-04  Bruno Haible  <bruno@clisp.org>
4749
4750         New module mbsrchr.
4751         * modules/mbsrchr: New file.
4752         * lib/mbsrchr.c: New file.
4753         * lib/string_.h (strrchr): Add a conditional link warning.
4754         (mbsrchr): New declaration.
4755         * m4/mbsrchr.m4: New file.
4756         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
4757         GNULIB_MBSRCHR.
4758         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
4759         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
4760
4761 2007-02-04  Bruno Haible  <bruno@clisp.org>
4762
4763         New module mbschr.
4764         * modules/mbschr: New file.
4765         * lib/mbschr.c: New file.
4766         * lib/string_.h (strchr): Add a conditional link warning.
4767         (mbschr): New declaration.
4768         * m4/mbschr.m4: New file.
4769         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
4770         GNULIB_MBSCHR.
4771         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
4772         * MODULES.html.sh (Internationalization functions): Add mbschr.
4773
4774 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
4775
4776         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
4777
4778         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
4779
4780 2007-02-04  Bruno Haible  <bruno@clisp.org>
4781
4782         New module description section 'configure.ac-early'.
4783         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
4784         (func_get_autoconf_early_snippet): New function.
4785         (func_import, func_create_testdir): Use it. Remove special cases for
4786         modules 'extensions' and 'lock'.
4787         * modules/extensions (configure.ac-early): Require
4788         gl_USE_SYSTEM_EXTENSIONS.
4789         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
4790
4791 2007-02-04  Bruno Haible  <bruno@clisp.org>
4792
4793         Make use of gcj-4.3's -fsource and -ftarget option.
4794         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
4795         and if so try the options -fsource and -ftarget.
4796         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
4797         source_version, ftarget_option, target_version arguments.
4798         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
4799         (is_envjavac_oldgcj_14_14_usable): Renamed from
4800         is_envjavac_gcj_14_14_usable.
4801         (is_envjavac_oldgcj_14_13_usable): Renamed from
4802         is_envjavac_gcj_14_13_usable.
4803         (is_gcj_present): Update.
4804         (is_gcj_43, is_gcj43_usable): New functions.
4805         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
4806         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
4807         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
4808         try the options -fsource and -ftarget.
4809
4810 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
4811
4812         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
4813         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
4814         larger value.
4815
4816 2007-02-03  Jim Meyering  <jim@meyering.net>
4817
4818         Give tools a better chance to allocate space for very large buffers.
4819         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
4820
4821         Make pwd and readlink work also when run with an unreadable parent dir
4822         on systems with openat support.
4823         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
4824         provided getcwd function, even when we have openat support.
4825         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
4826
4827 2007-02-02  Bruno Haible  <bruno@clisp.org>
4828
4829         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
4830         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
4831         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
4832         portability problems if one of these functions is only used on specific
4833         platforms.
4834         Reported by Paul Eggert.
4835
4836 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
4837
4838         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
4839         is causing more trouble than it's curing.
4840         * lib/regex_internal.h (__mempcpy): Remove.
4841         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
4842         (and make the code a tad smaller to boot).
4843         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
4844
4845 2007-02-02  Jim Meyering  <jim@meyering.net>
4846
4847         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
4848         section, not in the Makefile.am: one.
4849
4850 2007-02-02  Eric Blake  <ebb9@byu.net>
4851
4852         * lib/strchrnul.c: Always include config.h first.
4853
4854         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
4855         gnulib strstr is not necessary here.
4856
4857 2007-02-02  Simon Josefsson  <simon@josefsson.org>
4858
4859         * m4/socklen.m4: Fix typo.
4860
4861 2007-02-02  Eric Blake  <ebb9@byu.net>
4862
4863         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
4864         * modules/netinet_in (Makefile.am): Likewise.
4865
4866 2007-02-01  Bruno Haible  <bruno@clisp.org>
4867
4868         * lib/string_.h (GL_LINK_WARNING): New macro.
4869         (strcasecmp, strstr, strcasestr): If provided by the system,
4870         conditionally define as a macro that leads to a warning instead of to
4871         an error.
4872         (strncasecmp): Conditionally define as a macro that leads to a warning.
4873
4874 2007-02-01  Karl Berry  <karl@gnu.org>
4875
4876         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
4877
4878 2007-02-01  Bruno Haible  <bruno@clisp.org>
4879
4880         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
4881         renamings.
4882
4883 2007-02-01  Eric Blake  <ebb9@byu.net>
4884
4885         * modules/regex (Depends-on): Revert dependence on mempcpy.
4886         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
4887         module's definition of mempcpy.
4888         Reported by Paul Eggert.
4889
4890 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
4891
4892         * lib/string_.h: If the gnulib module XYZ is not present, undefine
4893         the symbol XYZ before redefining it.  This fixes a problem with
4894         programs that don't use XYZ, when compiled on systems that define
4895         XYZ to something else.
4896
4897 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
4898
4899         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
4900         occurs when "mkdir -m foo" creates a setgid directory that is (1)
4901         writeable to group or other and (2) is intended to have a special
4902         mode bit that is set or cleared.  In such a case, the directory
4903         should be neither group- nor other-writeable until the special
4904         mode bits are right.
4905
4906 2007-01-31  Eric Blake  <ebb9@byu.net>
4907
4908         * modules/mountlist (Depends-on): Add strstr.
4909
4910         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
4911         bug.
4912         * modules/string (Makefile.am): Remove redundant replacement.
4913         * modules/regex (Depends-on): Add mempcpy.
4914
4915 2007-01-31  Bruno Haible  <bruno@clisp.org>
4916
4917         New module description field 'Link'.
4918         * gnulib-tool (func_usage): Document --extract-link-directive.
4919         (sed_extract_prog): Recognize 'Link' directive.
4920         (func_get_link_directive): New function.
4921         (func_import): Show summary of link directives.
4922         Handle --extract-link-directive option.
4923         * modules/acl (Link): New section.
4924         * modules/clock-time (Link): New section.
4925         * modules/euidaccess (Link): New section.
4926         * modules/gettext (Link): New section.
4927         * modules/iconv (Link): New section.
4928         * modules/lock (Link): New section.
4929         * modules/nanosleep (Link): New section.
4930         * modules/readline (Link): New section.
4931
4932 2007-01-27  Bruno Haible  <bruno@clisp.org>
4933
4934         Enforce the use of gnulib modules for unportable <string.h> functions.
4935         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
4936         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
4937         (gl_HEADER_STRING_H_BODY): Require it.
4938         * lib/string_.h: If the gnulib module XYZ is not present, redefine
4939         the symbol XYZ to one that gives a link error.
4940         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
4941         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
4942         * modules/mempcpy (configure.ac): Likewise.
4943         * modules/memrchr (configure.ac): Likewise.
4944         * modules/stpcpy (configure.ac): Likewise.
4945         * modules/stpncpy (configure.ac): Likewise.
4946         * modules/strcase (configure.ac): Likewise.
4947         * modules/strcasestr (configure.ac): Likewise.
4948         * modules/strchrnul (configure.ac): Likewise.
4949         * modules/strdup (configure.ac): Likewise.
4950         * modules/strndup (configure.ac): Likewise.
4951         * modules/strnlen (configure.ac): Likewise.
4952         * modules/strpbrk (configure.ac): Likewise.
4953         * modules/strsep (configure.ac): Likewise.
4954         * modules/strstr (configure.ac): Likewise.
4955         * modules/strtok_r (configure.ac): Likewise.
4956
4957 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
4958
4959         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
4960
4961 2007-01-30  Jim Meyering  <jim@meyering.net>
4962
4963         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
4964
4965 2007-01-29  Bruno Haible  <bruno@clisp.org>
4966
4967         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
4968         * lib/execute.c: Likewise.
4969         * lib/pipe.c: Likewise.
4970         * lib/printf-args.h: Likewise.
4971         * lib/printf-args.c: Likewise.
4972         * lib/printf-parse.c: Likewise.
4973         * lib/vasnprintf.c: Likewise.
4974
4975 2007-01-29  Eric Blake  <ebb9@byu.net>
4976
4977         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
4978         declaration.
4979
4980 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
4981
4982         * lib/strptime.h (strptime): Use 'restrict' for args where
4983         POSIX requires this.
4984         * lib/strptime.c (strptime): Likewise.
4985         Change license notice from LGPL to GPL, since gnulib-tool will
4986         change this as needed.
4987         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
4988         defined.
4989         Include "strptime.h" first, to check interface.
4990         Do not #undef _LIBC and _NL_CURRENT.
4991         Do not include <stdlib.h>; no longer needed.
4992         Include "time_r.h" and declare ptime_locale_status
4993         only if _LIBC is not defined.
4994         (__P): Remove unused macro.
4995         (match_string): Bring back glibc version, but use it only if _LIBC
4996         is defined.
4997         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
4998         Remove unnecessary assertion and abort() call.
4999         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
5000         * m4/strptime.m4: Fix serial number comment.
5001         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
5002         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
5003         (Depends-on): Add time_r.
5004
5005 2007-01-29  Bruno Haible  <bruno@clisp.org>
5006
5007         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
5008         strptime.
5009         * modules/strptime (Depends-on): Add stdbool.
5010         * lib/strptime.h: Include <time.h> always. Add comments.
5011
5012 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
5013
5014         * modules/strptime: New file.
5015         * lib/strptime.h: New file.
5016         * lib/strptime.c: New file.
5017         * m4/strptime.m4: New file.
5018
5019 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
5020
5021         * MODULES.html.sh: New module mpsort.
5022         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
5023
5024         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
5025         a circularity problem with HP-UX ia64 reported by Bob Proulx in
5026         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
5027         All uses changed.
5028         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
5029         All uses changed.
5030         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
5031         to _Restrict_.
5032         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
5033         the parameter matches the prototype.
5034
5035 2007-01-28  Jim Meyering  <jim@meyering.net>
5036
5037         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
5038         sys/time.h here, reverting that part of the previous patch:
5039         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
5040
5041 2007-01-28  Bruno Haible  <bruno@clisp.org>
5042
5043         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
5044         value of $(SYS_TIME_H).
5045         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
5046         remove it conditionally, too. [added by Jim Meyering]
5047         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
5048         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
5049         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
5050         GETTIMEOFDAY_REPLACEMENT to 1.
5051
5052 2007-01-28  Bruno Haible  <bruno@clisp.org>
5053
5054         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
5055         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
5056         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
5057         Set UNISTD_H instead of UNISTD_H2.
5058         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
5059
5060 2007-01-28  Bruno Haible  <bruno@clisp.org>
5061
5062         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
5063         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
5064
5065 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5066
5067         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
5068         (func_create_testdir): Ensure C locale for `grep' and `tr'
5069         character ranges.
5070         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
5071         ACLOCAL_AMFLAGS parsing state machine.
5072
5073 2007-01-27  Bruno Haible  <bruno@clisp.org>
5074
5075         * modules/unistr/base: Update.
5076
5077 2007-01-27  Bruno Haible  <bruno@clisp.org>
5078
5079         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
5080         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
5081         * modules/unistr/u32-mbtouc-unsafe: Renamed from
5082         modules/unistr/u32-mbtouc.
5083         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
5084         * lib/unistr.h: Update.
5085         * lib/linebreak.c: Update.
5086         * modules/unistr/u32-mbtouc: Renamed from
5087         modules/unistr/u32-mbtouc-safe.
5088         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
5089         * lib/unistr.h: Update.
5090         * lib/unistr/u32-to-u8.c: Update.
5091         * lib/unistr/u32-to-u16.c: Update.
5092
5093 2007-01-27  Bruno Haible  <bruno@clisp.org>
5094
5095         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
5096         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
5097         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
5098         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
5099         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
5100         * modules/unistr/u16-mbtouc-unsafe: Renamed from
5101         modules/unistr/u16-mbtouc.
5102         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
5103         * lib/unistr.h: Update.
5104         * lib/linebreak.c: Update.
5105         * modules/linebreak: Update.
5106         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
5107         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
5108         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
5109         * modules/unistr/u16-mbtouc: Renamed from
5110         modules/unistr/u16-mbtouc-safe.
5111         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
5112         * lib/unistr.h: Update.
5113         * lib/unistr/u16-to-u8.c: Update.
5114         * modules/unistr/u16-to-u8: Update.
5115         * lib/unistr/u16-to-u32.c: Update.
5116         * modules/unistr/u16-to-u32: Update.
5117
5118 2007-01-27  Bruno Haible  <bruno@clisp.org>
5119
5120         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
5121         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
5122         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
5123         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
5124         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
5125         * modules/unistr/u8-mbtouc-unsafe: Renamed from
5126         modules/unistr/u8-mbtouc.
5127         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
5128         * lib/unistr.h: Update.
5129         * lib/striconveh.c: Update.
5130         * modules/striconveh: Update.
5131         * lib/linebreak.c: Update.
5132         * modules/linebreak: Update.
5133         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
5134         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
5135         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
5136         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
5137         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
5138         * lib/unistr.h: Update.
5139         * lib/striconveh.c: Update.
5140         * modules/striconveh: Update.
5141         * lib/unistr/u8-to-u16.c: Update.
5142         * modules/unistr/u8-to-u16: Update.
5143         * lib/unistr/u8-to-u32.c: Update.
5144         * modules/unistr/u8-to-u32: Update.
5145
5146 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5147
5148         Sync from Libtool.
5149         * lib/argz.c: Do not include strings.h nor memory.h, include
5150         string.h unconditionally.  Patch by Simon Josefsson.
5151
5152 2007-01-27  Bruno Haible  <bruno@clisp.org>
5153
5154         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
5155         from gl_HEADER_STRING_H_BODY.
5156         (gl_HEADER_STRING_H_BODY): Require it.
5157         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
5158         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
5159         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
5160         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
5161         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
5162         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
5163         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
5164         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
5165         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
5166         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
5167         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
5168         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
5169         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
5170         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
5171         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
5172
5173 2007-01-27  Bruno Haible  <bruno@clisp.org>
5174
5175         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
5176         check_PROGRAMS into noinst_PROGRAMS.
5177         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
5178         check_PROGRAMS in this case.
5179         (func_import): Set for_test to false.
5180         (func_create_testdir): Set for_test to true.
5181
5182 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
5183             Bruno Haible  <bruno@clisp.org>
5184
5185         * modules/strcasestr (Files): Remove lib/strcasestr.h.
5186         (Depends-on): Add string.
5187         (Includes): Use <string.h> instead of strcasestr.h.
5188         * modules/string (Makefile.am): Also substitute the value of
5189         REPLACE_STRCASESTR.
5190         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
5191         assume strcasestr is declared in <string.h> not <strings.h>. Also
5192         set REPLACE_STRCASESTR.
5193         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
5194         REPLACE_STRCASESTR.
5195         * lib/strcasestr.h: Remove file.
5196         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
5197         * lib/string_.h (strcasestr): New declaration.
5198
5199 2007-01-27  Bruno Haible  <bruno@clisp.org>
5200
5201         * lib/string_.h: Use 'extern'.
5202
5203 2007-01-27  Jim Meyering  <jim@meyering.net>
5204
5205         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
5206         of set-but-not-used local, "q".
5207
5208         * lib/mempcpy.c: Include <config.h> before <string.h>.
5209         This fixes a compilation error on HP-UX, due to the system's
5210         "restrict"-using mempcpy prototype.
5211
5212 2007-01-26  Bruno Haible  <bruno@clisp.org>
5213
5214         Small optimization.
5215         * lib/javacomp.c: Include c-strstr.h.
5216          (is_envjavac_gcj): Use c_strstr instead of strstr.
5217         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
5218
5219 2007-01-26  Bruno Haible  <bruno@clisp.org>
5220
5221         * MODULES.html.sh (Unicode string functions): Add the new modules.
5222
5223         * modules/uniconv/u32-strconv-to-locale: New file.
5224         * lib/uniconv/u32-strconv-to-locale.c: New file.
5225
5226         * modules/uniconv/u16-strconv-to-locale: New file.
5227         * lib/uniconv/u16-strconv-to-locale.c: New file.
5228
5229         * modules/uniconv/u8-strconv-to-locale: New file.
5230         * lib/uniconv/u8-strconv-to-locale.c: New file.
5231
5232         * modules/uniconv/u32-strconv-from-locale: New file.
5233         * lib/uniconv/u32-strconv-from-locale.c: New file.
5234
5235         * modules/uniconv/u16-strconv-from-locale: New file.
5236         * lib/uniconv/u16-strconv-from-locale.c: New file.
5237
5238         * modules/uniconv/u8-strconv-from-locale: New file.
5239         * lib/uniconv/u8-strconv-from-locale.c: New file.
5240
5241         * modules/uniconv/u32-strconv-to-enc: New file.
5242         * lib/uniconv/u32-strconv-to-enc.c: New file.
5243         * modules/uniconv/u32-strconv-to-enc-tests: New file.
5244         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
5245
5246         * modules/uniconv/u16-strconv-to-enc: New file.
5247         * lib/uniconv/u16-strconv-to-enc.c: New file.
5248         * lib/uniconv/u-strconv-to-enc.h: New file.
5249         * modules/uniconv/u16-strconv-to-enc-tests: New file.
5250         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
5251
5252         * modules/uniconv/u8-strconv-to-enc: New file.
5253         * lib/uniconv/u8-strconv-to-enc.c: New file.
5254         * modules/uniconv/u8-strconv-to-enc-tests: New file.
5255         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
5256
5257         * modules/uniconv/u32-strconv-from-enc: New file.
5258         * lib/uniconv/u32-strconv-from-enc.c: New file.
5259         * modules/uniconv/u32-strconv-from-enc-tests: New file.
5260         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
5261
5262         * modules/uniconv/u16-strconv-from-enc: New file.
5263         * lib/uniconv/u16-strconv-from-enc.c: New file.
5264         * modules/uniconv/u16-strconv-from-enc-tests: New file.
5265         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
5266
5267         * modules/uniconv/u8-strconv-from-enc: New file.
5268         * lib/uniconv/u8-strconv-from-enc.c: New file.
5269         * lib/uniconv/u-strconv-from-enc.h: New file.
5270         * modules/uniconv/u8-strconv-from-enc-tests: New file.
5271         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
5272
5273         * modules/uniconv/u32-conv-from-enc: New file.
5274         * lib/uniconv/u32-conv-from-enc.c: New file.
5275         * modules/uniconv/u32-conv-from-enc-tests: New file.
5276         * tests/uniconv/test-u32-conv-from-enc.c: New file.
5277
5278         * modules/uniconv/u16-conv-from-enc: New file.
5279         * lib/uniconv/u16-conv-from-enc.c: New file.
5280         * lib/uniconv/u-conv-from-enc.h: New file.
5281         * modules/uniconv/u16-conv-from-enc-tests: New file.
5282         * tests/uniconv/test-u16-conv-from-enc.c: New file.
5283
5284         * modules/uniconv/u8-conv-from-enc: New file.
5285         * lib/uniconv/u8-conv-from-enc.c: New file.
5286         * modules/uniconv/u8-conv-from-enc-tests: New file.
5287         * tests/uniconv/test-u8-conv-from-enc.c: New file.
5288
5289         * modules/uniconv/base: New file.
5290         * lib/uniconv.h: New file.
5291
5292 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
5293
5294         * doc/gnulib-tool.texi (Initial import): Update to match current
5295         behavior with strdup module.
5296         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
5297         * lib/memmem.h: Remove; all uses removed.  This is now done
5298         by <string.h>.
5299         * lib/mempcpy.h: Likewise.
5300         * lib/memrchr.h: Likewise.
5301         * lib/stpcpy.h: Likewise.
5302         * lib/stpncpy.h: Likewise.
5303         * lib/strcase.h: Likewise.
5304         * lib/strchrnul.h: Likewise.
5305         * lib/strdup.h: Likewise.
5306         * lib/strndup.h: Likewise.
5307         * lib/strnlen.h: Likewise.
5308         * lib/strpbrk.h: Likewise.
5309         * lib/strsep.h: Likewise.
5310         * lib/strstr.h: Likewise.
5311         * lib/strtok_r.h: Likewise.
5312         * lib/string_.h: New file.
5313         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
5314         Rely on <string.h> instead.
5315         * lib/canon-host.c: Likewise.
5316         * lib/chdir-long.c: Likewise.
5317         * lib/concatpath.c: Likewise.
5318         * lib/exclude.c: Likewise.
5319         * lib/fchdir.c: Likewise.
5320         * lib/getaddrinfo.c: Likewise.
5321         * lib/getcwd.c: Likewise.
5322         * lib/getsubopt.c: Likewise.
5323         * lib/glob.c: Likewise.
5324         * lib/hard-locale.c: Likewise.
5325         * lib/iconvme.c: Likewise.
5326         * lib/javacomp.c: Likewise.
5327         * lib/mempcpy.c: Likewise.
5328         * lib/memrchr.c: Likewise.
5329         * lib/regex_internal.h: Likewise.
5330         * lib/stpncpy.c: Likewise.
5331         * lib/strcasecmp.c: Likewise.
5332         * lib/strchrnul.c: Likewise.
5333         * lib/strdup.c: Likewise.
5334         * lib/striconv.c: Likewise.
5335         * lib/striconveh.c: Likewise.
5336         * lib/striconveha.c: Likewise.
5337         * lib/strncasecmp.c: Likewise.
5338         * lib/strndup.c: Likewise.
5339         * lib/strnlen.c: Likewise.
5340         * lib/strsep.c: Likewise.
5341         * lib/strstr.c: Likewise.
5342         * lib/strtok_r.c: Likewise.
5343         * lib/userspec.c: Likewise.
5344         * lib/w32spawn.h: Likewise.
5345         * lib/xstrndup.c: Likewise.
5346         * lib/mountlist.c (strstr): Remove decl.
5347         * m4/string_h.m4: New file.
5348         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
5349         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
5350         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
5351         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
5352         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
5353         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
5354         Set REPLACE_STRCASECMP if necessary.
5355         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
5356         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
5357         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
5358         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
5359         HAVE_DECL_STRDUP if necessary.
5360         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
5361         since gl_FUNC_STRNDUP does that now.
5362         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
5363         Check for decl here...
5364         (gl_PREREQ_STRNLEN): ... not here.
5365         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
5366         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
5367         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
5368         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
5369         necessary.
5370         * modules/string: New file.
5371         * modules/memmem (Files): Remove special-purpose include file.
5372         (Depends-on): Add string.
5373         (Include): Include <string.h>, not the removed file.
5374         * modules/mempcpy: Likewise.
5375         * modules/memrchr: Likewise.
5376         * modules/stpcpy: Likewise.
5377         * modules/stpncpy: Likewise.
5378         * modules/strcase: Likewise.
5379         * modules/strchrnul: Likewise.
5380         * modules/strdup: Likewise.
5381         * modules/strndup: Likewise.
5382         * modules/strnlen: Likewise.
5383         * modules/strpbrk: Likewise.
5384         * modules/strsep: Likewise.
5385         * modules/strstr: Likewise.
5386         * modules/strtok_r: Likewise.
5387         * tests/test-dirname.c: Don't include "strdup.h", since
5388         <string.h> now suffices.
5389         * tests/test-memmem.c: Don't include "memmem.h", since
5390         <string.h> now suffices.
5391
5392 2007-01-25  Bruno Haible  <bruno@clisp.org>
5393
5394         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
5395         *resultp is 0.
5396
5397         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
5398         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
5399         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
5400         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
5401
5402         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
5403         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
5404         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
5405         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
5406         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
5407         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
5408
5409 2007-01-24  Bruno Haible  <bruno@clisp.org>
5410
5411         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
5412         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
5413         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
5414         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
5415         gl_FUNC_FTS_CORE.
5416         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
5417         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
5418         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
5419         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
5420         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
5421         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
5422         gl_FUNC_FCHOWNAT.
5423         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
5424         gl_FUNC_STRFTIME.
5425         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
5426         Reported by Ralf Wildenhues.
5427
5428 2007-01-24  Bruno Haible  <bruno@clisp.org>
5429
5430         Drop AC_REQUIRE calls that are redundant with the module dependencies.
5431         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
5432         gl_GETADDRINFO.
5433         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
5434         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
5435         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
5436
5437 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
5438
5439         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
5440         Don't use 'exit'; just return from 'main'.
5441         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
5442
5443         * lib/fnmatch_.h: Readjust white space and comments to match
5444         glibc, to avoid spurious diffs.
5445
5446 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
5447
5448         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
5449         2004-12-01 change by Jakub Jelinek, since this code won't compile
5450         if !LIBC.  Problem reported by Bob Proulx.
5451
5452 2007-01-23  Bruno Haible  <bruno@clisp.org>
5453
5454         * lib/striconveh.c: Include c-strcaseeq.h.
5455         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
5456         * modules/striconveh (Depends-on): Add c-strcaseeq.
5457
5458 2007-01-23  Bruno Haible  <bruno@clisp.org>
5459
5460         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
5461
5462         * modules/c-strcaseeq: New file.
5463         * lib/c-strcaseeq.h: New file.
5464
5465         * modules/streq: New file.
5466         * lib/streq.h: New file.
5467
5468 2007-01-23  Bruno Haible  <bruno@clisp.org>
5469
5470         * modules/striconveha-tests: New file.
5471         * tests/test-striconveha.c: New file.
5472
5473         * lib/striconveha.h: Include <stdbool.h>.
5474         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
5475         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
5476         (mem_iconveha_notranslit): Renamed from mem_iconveha.
5477         (mem_iconveha): New function.
5478         (str_iconveha_notranslit): Renamed from str_iconveha.
5479         (str_iconveha): New function.
5480         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
5481         c-strcase.
5482
5483 2007-01-23  Bruno Haible  <bruno@clisp.org>
5484
5485         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
5486         encodings without forgiving before trying any encoding with handler.
5487         (str_iconveha): Try all encodings without forgiving before trying any
5488         encoding with handler.
5489
5490 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
5491
5492         Import the following changes from libc.
5493
5494         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
5495
5496         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
5497
5498         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
5499
5500         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
5501         normal_bracket label.
5502
5503         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
5504
5505         [BZ #361]
5506         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
5507         to normal_bracket after fetching the next character.
5508
5509 2007-01-22  Bruno Haible  <bruno@clisp.org>
5510
5511         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
5512         argument.
5513         * lib/striconveh.c (iconv_carefully_1): New function.
5514         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
5515         argument.
5516         (str_cd_iconveh): Update.
5517         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
5518         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
5519         * tests/test-striconveh.c (MAGIC): New macro.
5520         (new_offsets): New function.
5521         (main): Test call with and without offsets.
5522
5523 2007-01-22  Bruno Haible  <bruno@clisp.org>
5524
5525         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
5526         * modules/sys_select (Makefile.am): Likewise.
5527         * modules/sys_socket (Makefile.am): Likewise.
5528         * modules/sys_time (Makefile.am): Likewise.
5529
5530 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
5531
5532         * modules/gettimeofday (License): Change from GPL to LGPL, since
5533         gettimeofday is a library function.
5534
5535 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5536
5537         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
5538
5539 2007-01-21  Bruno Haible  <bruno@clisp.org>
5540
5541         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
5542
5543 2007-01-21  Bruno Haible  <bruno@clisp.org>
5544
5545         * modules/striconveha: New file.
5546         * lib/striconveha.h: New file.
5547         * lib/striconveha.c: New file.
5548         * MODULES.html.sh (Internationalization functions): Add striconveha.
5549         * lib/striconv.c (str_iconv): Optimize the case of an empty input
5550         string.
5551         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
5552
5553 2007-01-21  Bruno Haible  <bruno@clisp.org>
5554
5555         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
5556         * lib/striconveh.c (str_iconveh): Likewise.
5557
5558 2007-01-21  Bruno Haible  <bruno@clisp.org>
5559
5560         * lib/striconveh.h (mem_iconveh): New declaration.
5561         * lib/striconveh.c (mem_iconveh): New function.
5562         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
5563
5564 2007-01-21  Bruno Haible  <bruno@clisp.org>
5565
5566         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
5567
5568         * lib/striconveh.h (mem_cd_iconveh): Change specification.
5569         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
5570         original result buffer.
5571         (str_cd_iconveh): Update.
5572         * tests/test-striconveh.c (main): Update.
5573
5574         * lib/striconv.h (mem_cd_iconv): Change specification.
5575         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
5576         result buffer.
5577         (str_cd_iconv): Update.
5578         * tests/test-striconv.c (main): Update.
5579
5580 2007-01-21  Bruno Haible  <bruno@clisp.org>
5581
5582         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
5583
5584 2007-01-20  Jim Meyering  <jim@meyering.net>
5585
5586         * lib/userspec.c (parse_with_separator): If a user or group string
5587         starts with "+", skip the corresponding name-to-ID look-up, since
5588         such a look-up must fail: user and group names may not include "+".
5589
5590 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
5591
5592         * lib/poll.c: Include sys/time.h and time.h unconditionally,
5593         since we now assume the sys_time module.
5594         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
5595         check for sys/time.h; no longer needed.
5596         * modules/poll (Depends-on): Depend on sys_time.
5597
5598 2007-01-18  Bruno Haible  <bruno@clisp.org>
5599
5600         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
5601         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
5602
5603         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
5604         gettimeofday.
5605
5606         * tests/test-gettimeofday.c: Include <time.h>.
5607         (dummy): Remove variable.
5608
5609         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
5610         gl_HEADER_SYS_TIME_H.
5611         (gl_HEADER_SYS_TIME_H): New macro.
5612
5613         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
5614         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
5615         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
5616         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
5617         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
5618         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
5619         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
5620         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
5621         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
5622         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
5623         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
5624
5625         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
5626         last change; it caused a compilation error when cross-compiling to
5627         Cygwin.
5628
5629 2007-01-18  Jim Meyering  <jim@meyering.net>
5630
5631         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
5632         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
5633         than the race-prone "test -d sys || mkdir sys".
5634         (configure.ac): Use AC_PROG_MKDIR_P.
5635         * modules/sys_select: Likewise.
5636         * modules/sys_socket: Likewise.
5637         * modules/sys_time: Likewise.
5638
5639 2007-01-18  Eric Blake  <ebb9@byu.net>
5640
5641         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
5642         replace gettimeofday.
5643         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
5644         name, to avoid infinite recursion.
5645
5646 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
5647
5648         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
5649         module sys_time.
5650         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
5651         assume timespec.h defines struct timeval.
5652         * lib/settime.c: Likewise.
5653         * lib/utimens.c: Likewise.
5654         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
5655         since we now assume the gettimeofday module.
5656         * lib/tempname.c (__gen_tempname): Likewise.
5657         * lib/gettimeofday.h: Remove.
5658         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
5659         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
5660         Include <time.h>, for 'time()'.
5661         (localtime_buffer_addr): Also use this workaround if
5662         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
5663         to simplify the uses.  All uses changed.
5664         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
5665         that #undef is inside {}, and 'const' follows type name consistently.
5666         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
5667         (gettimeofday): Do not use the maximum possible value for
5668         tv->tv_usec, since that might break usages other than ls.c.
5669         Instead, we'll leave ls.c alone.  This undoes today's patch
5670         by Bruno.  Add a compile-time warning for 1s-clock resolution;
5671         we've never observed the problem but might as well keep the
5672         canary.
5673         * lib/nanosleep.c: Include timespec.h first, for interface check.
5674         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
5675         now assume the sys_time module.
5676         * lib/tempname.c: Likewise.
5677         * lib/timespec.h: Likewise.
5678         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
5679         needed.
5680         * lib/strftime.c: Likewise.
5681         * lib/timespec.h: Likewise.
5682         * lib/posixtm.c: Include posixtm.h first, for interface check.
5683         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
5684         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
5685         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
5686         * lib/sys_time_.h: New file.
5687         * lib/timespec.h (struct timespec): Use long int, not long.
5688         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
5689         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
5690         Remove obsolescent call to AC_HEADER_TIME.
5691         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
5692         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
5693         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
5694         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
5695         Likewise.
5696         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
5697         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
5698         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
5699         into the sys_time module.  Check for gettimeofday just once.
5700         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
5701         for gettimeofday signature to just check the signature.  Merely
5702         compile it, since linking doesn't test signature.  Improve test for
5703         whether gettimeofday.o is actually needed.
5704         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
5705         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
5706         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
5707         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
5708         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
5709         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
5710         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
5711         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
5712         than worrying about sys/time.h.
5713         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5714         Don't bother worrying about TIME_WITH_SYS_TIME.
5715         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
5716         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
5717         * m4/sys_time_h.m4: New file.
5718         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
5719         Don't include sys/time.h.  Return from main rather than exiting.
5720         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
5721         all uses changed.
5722         * modules/gethrxtime (Depends-on): Add sys_time.
5723         * modules/gettime (Depends-on): Likewise.
5724         * modules/gettimeofday (Depends-on): Likewise.
5725         * modules/nanosleep (Depends-on): Likewise.
5726         * modules/settime (Depends-on): Likewise.
5727         * modules/tempname (Depends-on): Likewise.
5728         * modules/utimens (Depends-on): Likewise.
5729         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
5730         (Include:) Change back to <sys/time.h>.
5731         (Maintainer:) Add self.
5732         * modules/sys_time: New file.
5733         * modules/tempname (Depends-on): Add gettimeofday.
5734         * tests/test-gettimeofday.c: Include <sys/time.h>
5735         rather than gettimeofday.h.
5736
5737 2007-01-17  Bruno Haible  <bruno@clisp.org>
5738
5739         * gnulib-tool (func_get_license): Revert last patch. Instead, let
5740         the license default to GPL.
5741         (func_create_testdir): Don't complain if a module is LGPL and its
5742         tests module depends on GPLed modules.
5743
5744 2007-01-17  Bruno Haible  <bruno@clisp.org>
5745
5746         * lib/gettimeofday.c (gettimeofday): Add code for the case
5747         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
5748         maximum possible value for tv->tv_usec, rather than the minimum one.
5749
5750 2005-10-08  Martin Lambers  <marlam@marlam.de>
5751 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
5752 2007-01-16  Bruno Haible  <bruno@clisp.org>
5753
5754         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
5755         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
5756         gl_FUNC_GETTIMEOFDAY.
5757         (Include): Add gettimeofday.h.
5758         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
5759         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
5760         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
5761         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
5762         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
5763         * lib/gettimeofday.h: New file.
5764         * lib/gettimeofday.c: Include <sys/timeb.h>.
5765         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
5766         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
5767         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
5768         fall back on time().
5769
5770         * tests/test-gettimeofday.c: New file.
5771         * modules/gettimeofday-tests: New file.
5772
5773 2007-01-16  Eric Blake  <ebb9@byu.net>
5774
5775         * modules/fnmatch (Depends-on): Depend on wchar.
5776         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
5777         * m4/fnmatch.m4: Likewise.
5778         * modules/mbchar (Makefile.am): Assume <wchar.h>.
5779         * m4/mbchar.m4: Likewise.
5780         * modules/mbswidth (Depends-on): Depend on wchar.
5781         * lib/mbswidth.c: Assume <wchar.h>.
5782         * m4/mbswidth.m4: Likewise.
5783         * modules/quotearg (Depends-on): Depend on wchar.
5784         * lib/quotearg.c: Assume <wchar.h>.
5785         * m4/quotearg.m4: Likewise.
5786         * modules/regex (Depends-on): Depend on wchar.
5787         * lib/regex_internal.h: Assume <wchar.h>.
5788         * m4/regex.m4: Likewise.
5789         * modules/stdint (Depends-on): Depend on wchar.
5790         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
5791         * m4/stdint.m4: Likewise.
5792         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
5793         * modules/strftime (Depends-on): Depend on wchar.
5794         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
5795         * modules/strtol (Depends-on): Depend on wchar.
5796         * lib/strtol.c: Assume <wchar.h>.
5797         * modules/wcwidth (Depends-on): Depend on wchar.
5798         * lib/wcwidth.h: Assume <wchar.h>.
5799         * m4/wcwidth.m4: Likewise.
5800
5801 2007-01-16  Bruno Haible  <bruno@clisp.org>
5802
5803         * modules/csharpexec-script: New, created from...
5804         * modules/csharpexec: ... this.
5805
5806 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
5807
5808         * modules/javaexec-script: New, created from...
5809         * modules/javaexec: ... this.
5810
5811 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5812
5813         * modules/poll (Dependencies): Add sys_select.
5814
5815 2007-01-15  Jim Meyering  <jim@meyering.net>
5816
5817         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
5818         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
5819         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
5820         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
5821
5822 2007-01-15  Bruno Haible  <bruno@clisp.org>
5823
5824         * modules/striconveh: New file.
5825         * lib/striconveh.h: New file.
5826         * lib/striconveh.c: New file.
5827         * MODULES.html.sh (Internationalization functions): Add striconveh.
5828
5829         * modules/striconveh-tests: New file.
5830         * tests/test-striconveh.c: New file.
5831
5832 2007-01-15  Bruno Haible  <bruno@clisp.org>
5833
5834         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
5835         not from GNU libiconv or GNU libc.
5836
5837 2007-01-15  Bruno Haible  <bruno@clisp.org>
5838
5839         * doc/gnulib-intro.texi (Copyright): Explain the different license
5840         terms for module descriptions, autoconf macros, tests, documentation.
5841
5842 2007-01-14  Bruno Haible  <bruno@clisp.org>
5843
5844         * modules/striconv-tests: New file.
5845         * tests/test-striconv.c: New file.
5846
5847 2007-01-14  Bruno Haible  <bruno@clisp.org>
5848
5849         * modules/iconv-tests: New file.
5850         * tests/test-iconv.c: New file.
5851
5852 2007-01-14  Bruno Haible  <bruno@clisp.org>
5853
5854         * gnulib-tool (func_get_license): For test modules, use the license of
5855         the main module.
5856
5857 2007-01-14  Bruno Haible  <bruno@clisp.org>
5858
5859         * modules/iconv (Include): Clarify that <iconv.h> can only be included
5860         if iconv is found to exist.
5861
5862 2007-01-14  Bruno Haible  <bruno@clisp.org>
5863
5864         * modules/c-ctype-tests: New file.
5865         * tests/test-c-ctype.c: New file.
5866
5867 2007-01-14  Bruno Haible  <bruno@clisp.org>
5868
5869         * modules/binary-io-tests: New file.
5870         * tests/test-binary-io.sh: New file.
5871         * tests/test-binary-io.c: New file.
5872
5873 2007-01-14  Bruno Haible  <bruno@clisp.org>
5874
5875         * modules/array-oset-tests: New file.
5876         * tests/test-array_oset.c: New file.
5877
5878 2007-01-14  Bruno Haible  <bruno@clisp.org>
5879
5880         * modules/array-list-tests: New file.
5881         * tests/test-array_list.c: New file.
5882
5883 2007-01-14  Bruno Haible  <bruno@clisp.org>
5884
5885         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
5886         and make.
5887         Reported by Simon Josefsson in
5888         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
5889
5890 2007-01-14  Bruno Haible  <bruno@clisp.org>
5891
5892         * modules/allocsa-tests: New file.
5893         * tests/test-allocsa.c: New file.
5894
5895 2007-01-14  Bruno Haible  <bruno@clisp.org>
5896
5897         * modules/fchdir (Depends-on): Add absolute-header.
5898         * modules/unistd (Depends-on): Likewise.
5899
5900 2006-12-30  Bruno Haible  <bruno@clisp.org>
5901
5902         * modules/fchdir: New file.
5903         * modules/unistd (Files): Add lib/unistd_.h.
5904         (Makefile.am): Generate unistd.h from unistd_.h.
5905         * lib/fchdir.c: New file.
5906         * lib/dirent_.h: New file.
5907         * lib/unistd_.h: New file.
5908         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
5909         * m4/fchdir.m4: New file.
5910         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
5911         (gl_HEADER_UNISTD): Invoke it.
5912         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
5913         function.
5914         * lib/backupfile.c (opendir, closedir): Undefine.
5915         * lib/chown.c (open, close): Undefine.
5916         * lib/clean-temp.c (open, close): Undefine.
5917         * lib/copy-file.c (open, close): Undefine.
5918         * lib/execute.c (open, close): Undefine.
5919         * lib/fsusage.c (open, close): Undefine.
5920         * lib/gc-gnulib.c (open, close): Undefine.
5921         * lib/getcwd.c (opendir, closedir): Undefine.
5922         * lib/glob.c (opendir, closedir): Undefine.
5923         * lib/javacomp.c (open, close): Undefine.
5924         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
5925         * lib/openat-proc.c (open, close): Undefine.
5926         * lib/pagealign_alloc.c (open, close): Undefine.
5927         * lib/pipe.c (open, close): Undefine.
5928         * lib/progreloc.c (open, close): Undefine.
5929         * lib/savedir.c (opendir, closedir): Undefine.
5930         * lib/utime.c (open, close): Undefine.
5931         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
5932
5933 2007-01-10  Bruno Haible  <bruno@clisp.org>
5934
5935         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
5936
5937 2007-01-12  Eric Blake  <ebb9@byu.net>
5938
5939         Provide a robust <wchar.h>.  Further simplifications are now
5940         possible in other modules, but not included here.
5941         * modules/wchar: New module.
5942         * m4/wchar.m4: New file.
5943         * lib/wchar_.h: Likewise.
5944         * modules/mbchar (Depends-on): Depend on wchar, as the first use
5945         of the new module.
5946         * MODULES.html.sh (Extended multibyte and wide character utilities):
5947         New section.
5948
5949 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
5950
5951         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
5952         to a reasonable default for memory allocation.
5953         (xreadlink): Don't allocate a huge buffer, to work around a buggy
5954         file system that reports garbage st_size values for symlinks.
5955         Problem reported by Liyang Hu.
5956
5957 2007-01-11  Simon Josefsson  <simon@josefsson.org>
5958
5959         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
5960         Emacs .#* auto-save files).
5961
5962 2007-01-11  Bruno Haible  <bruno@clisp.org>
5963
5964         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
5965         directory.
5966
5967 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
5968
5969         Use @...@ consistently in lib/wctype_.h.
5970         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
5971         on it being set to 1 or 0.
5972         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
5973         go back to AC_SUBSTing it.
5974         * modules/wctype (Makefile.am): Undo previous change.
5975
5976 2007-01-10  Eric Blake  <ebb9@byu.net>
5977
5978         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
5979         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
5980         * modules/wctype (Makefile.am): Likewise.
5981         Reported by Chris McGuire.
5982
5983 2007-01-10  Jim Meyering  <jim@meyering.net>
5984
5985         fts.c: a small readability/maintainability improvement
5986         * lib/fts.c (fts_read): Make this code slightly more readable and
5987         maintainable by hoisting the "sp->fts_cur = p" assignments to
5988         immediately follow the statements that set P.  Derived from
5989         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
5990
5991 2007-01-10  Eric Blake  <ebb9@byu.net>
5992
5993         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
5994         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
5995         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
5996         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
5997         Reported by Chris McGuire.
5998
5999 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6000
6001         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
6002         in sed script.
6003
6004 2007-01-09  Bruno Haible  <bruno@clisp.org>
6005
6006         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
6007         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
6008         variables.
6009         (func_module): Use them.
6010
6011 2007-01-09  Bruno Haible  <bruno@clisp.org>
6012
6013         * modules/unistr/base: New file.
6014         * lib/unistr.h: New file.
6015
6016         * modules/unistr/u8-to-u16: New file.
6017         * lib/unistr/u8-to-u16.c: New file.
6018
6019         * modules/unistr/u8-to-u32: New file.
6020         * lib/unistr/u8-to-u32.c: New file.
6021
6022         * modules/unistr/u16-to-u8: New file.
6023         * lib/unistr/u16-to-u8.c: New file.
6024
6025         * modules/unistr/u16-to-u32: New file.
6026         * lib/unistr/u16-to-u32.c: New file.
6027
6028         * modules/unistr/u32-to-u8: New file.
6029         * lib/unistr/u32-to-u8.c: New file.
6030
6031         * modules/unistr/u32-to-u16: New file.
6032         * lib/unistr/u32-to-u16.c: New file.
6033
6034         * modules/unistr/u8-check: New file.
6035         * modules/unistr/u16-check: New file.
6036         * modules/unistr/u32-check: New file.
6037         * lib/unistr/u8-check.c: New file.
6038         * lib/unistr/u16-check.c: New file.
6039         * lib/unistr/u32-check.c: New file.
6040
6041         * modules/unistr/u8-chr: New file.
6042         * modules/unistr/u16-chr: New file.
6043         * modules/unistr/u32-chr: New file.
6044         * lib/unistr/u8-chr.c: New file.
6045         * lib/unistr/u16-chr.c: New file.
6046         * lib/unistr/u32-chr.c: New file.
6047
6048         * modules/unistr/u8-cmp: New file.
6049         * modules/unistr/u16-cmp: New file.
6050         * modules/unistr/u32-cmp: New file.
6051         * lib/unistr/u8-cmp.c: New file.
6052         * lib/unistr/u16-cmp.c: New file.
6053         * lib/unistr/u32-cmp.c: New file.
6054
6055         * modules/unistr/u8-cpy: New file.
6056         * modules/unistr/u16-cpy: New file.
6057         * modules/unistr/u32-cpy: New file.
6058         * lib/unistr/u8-cpy.c: New file.
6059         * lib/unistr/u16-cpy.c: New file.
6060         * lib/unistr/u32-cpy.c: New file.
6061         * lib/unistr/u-cpy.h: New file.
6062
6063         * modules/unistr/u8-cpy-alloc: New file.
6064         * modules/unistr/u16-cpy-alloc: New file.
6065         * modules/unistr/u32-cpy-alloc: New file.
6066         * lib/unistr/u8-cpy-alloc.c: New file.
6067         * lib/unistr/u16-cpy-alloc.c: New file.
6068         * lib/unistr/u32-cpy-alloc.c: New file.
6069         * lib/unistr/u-cpy-alloc.h: New file.
6070
6071         * modules/unistr/u8-endswith: New file.
6072         * modules/unistr/u16-endswith: New file.
6073         * modules/unistr/u32-endswith: New file.
6074         * lib/unistr/u8-endswith.c: New file.
6075         * lib/unistr/u16-endswith.c: New file.
6076         * lib/unistr/u32-endswith.c: New file.
6077         * lib/unistr/u-endswith.h: New file.
6078
6079         * modules/unistr/u8-mblen: New file.
6080         * modules/unistr/u16-mblen: New file.
6081         * modules/unistr/u32-mblen: New file.
6082         * lib/unistr/u8-mblen.c: New file.
6083         * lib/unistr/u16-mblen.c: New file.
6084         * lib/unistr/u32-mblen.c: New file.
6085
6086         * modules/unistr/u8-mbtouc: New file.
6087         * modules/unistr/u16-mbtouc: New file.
6088         * modules/unistr/u32-mbtouc: New file.
6089         * lib/unistr/u8-mbtouc.c: New file.
6090         * lib/unistr/u16-mbtouc.c: New file.
6091         * lib/unistr/u32-mbtouc.c: New file.
6092
6093         * modules/unistr/u8-mbtouc-safe: New file.
6094         * modules/unistr/u16-mbtouc-safe: New file.
6095         * modules/unistr/u32-mbtouc-safe: New file.
6096         * lib/unistr/u8-mbtouc-safe.c: New file.
6097         * lib/unistr/u16-mbtouc-safe.c: New file.
6098         * lib/unistr/u32-mbtouc-safe.c: New file.
6099
6100         * modules/unistr/u8-move: New file.
6101         * modules/unistr/u16-move: New file.
6102         * modules/unistr/u32-move: New file.
6103         * lib/unistr/u8-move.c: New file.
6104         * lib/unistr/u16-move.c: New file.
6105         * lib/unistr/u32-move.c: New file.
6106         * lib/unistr/u-move.h: New file.
6107
6108         * modules/unistr/u8-next: New file.
6109         * modules/unistr/u16-next: New file.
6110         * modules/unistr/u32-next: New file.
6111         * lib/unistr/u8-next.c: New file.
6112         * lib/unistr/u16-next.c: New file.
6113         * lib/unistr/u32-next.c: New file.
6114
6115         * modules/unistr/u8-prev: New file.
6116         * modules/unistr/u16-prev: New file.
6117         * modules/unistr/u32-prev: New file.
6118         * lib/unistr/u8-prev.c: New file.
6119         * lib/unistr/u16-prev.c: New file.
6120         * lib/unistr/u32-prev.c: New file.
6121
6122         * modules/unistr/u8-set: New file.
6123         * modules/unistr/u16-set: New file.
6124         * modules/unistr/u32-set: New file.
6125         * lib/unistr/u8-set.c: New file.
6126         * lib/unistr/u16-set.c: New file.
6127         * lib/unistr/u32-set.c: New file.
6128         * lib/unistr/u-set.h: New file.
6129
6130         * modules/unistr/u8-startswith: New file.
6131         * modules/unistr/u16-startswith: New file.
6132         * modules/unistr/u32-startswith: New file.
6133         * lib/unistr/u8-startswith.c: New file.
6134         * lib/unistr/u16-startswith.c: New file.
6135         * lib/unistr/u32-startswith.c: New file.
6136         * lib/unistr/u-startswith.h: New file.
6137
6138         * modules/unistr/u8-stpcpy: New file.
6139         * modules/unistr/u16-stpcpy: New file.
6140         * modules/unistr/u32-stpcpy: New file.
6141         * lib/unistr/u8-stpcpy.c: New file.
6142         * lib/unistr/u16-stpcpy.c: New file.
6143         * lib/unistr/u32-stpcpy.c: New file.
6144         * lib/unistr/u-stpcpy.h: New file.
6145
6146         * modules/unistr/u8-stpncpy: New file.
6147         * modules/unistr/u16-stpncpy: New file.
6148         * modules/unistr/u32-stpncpy: New file.
6149         * lib/unistr/u8-stpncpy.c: New file.
6150         * lib/unistr/u16-stpncpy.c: New file.
6151         * lib/unistr/u32-stpncpy.c: New file.
6152         * lib/unistr/u-stpncpy.h: New file.
6153
6154         * modules/unistr/u8-strcat: New file.
6155         * modules/unistr/u16-strcat: New file.
6156         * modules/unistr/u32-strcat: New file.
6157         * lib/unistr/u8-strcat.c: New file.
6158         * lib/unistr/u16-strcat.c: New file.
6159         * lib/unistr/u32-strcat.c: New file.
6160         * lib/unistr/u-strcat.h: New file.
6161
6162         * modules/unistr/u8-strchr: New file.
6163         * modules/unistr/u16-strchr: New file.
6164         * modules/unistr/u32-strchr: New file.
6165         * lib/unistr/u8-strchr.c: New file.
6166         * lib/unistr/u16-strchr.c: New file.
6167         * lib/unistr/u32-strchr.c: New file.
6168
6169         * modules/unistr/u8-strcmp: New file.
6170         * modules/unistr/u16-strcmp: New file.
6171         * modules/unistr/u32-strcmp: New file.
6172         * lib/unistr/u8-strcmp.c: New file.
6173         * lib/unistr/u16-strcmp.c: New file.
6174         * lib/unistr/u32-strcmp.c: New file.
6175
6176         * modules/unistr/u8-strcpy: New file.
6177         * modules/unistr/u16-strcpy: New file.
6178         * modules/unistr/u32-strcpy: New file.
6179         * lib/unistr/u8-strcpy.c: New file.
6180         * lib/unistr/u16-strcpy.c: New file.
6181         * lib/unistr/u32-strcpy.c: New file.
6182         * lib/unistr/u-strcpy.h: New file.
6183
6184         * modules/unistr/u8-strcspn: New file.
6185         * modules/unistr/u16-strcspn: New file.
6186         * modules/unistr/u32-strcspn: New file.
6187         * lib/unistr/u8-strcspn.c: New file.
6188         * lib/unistr/u16-strcspn.c: New file.
6189         * lib/unistr/u32-strcspn.c: New file.
6190         * lib/unistr/u-strcspn.h: New file.
6191
6192         * modules/unistr/u8-strdup: New file.
6193         * modules/unistr/u16-strdup: New file.
6194         * modules/unistr/u32-strdup: New file.
6195         * lib/unistr/u8-strdup.c: New file.
6196         * lib/unistr/u16-strdup.c: New file.
6197         * lib/unistr/u32-strdup.c: New file.
6198         * lib/unistr/u-strdup.h: New file.
6199
6200         * modules/unistr/u8-strlen: New file.
6201         * modules/unistr/u16-strlen: New file.
6202         * modules/unistr/u32-strlen: New file.
6203         * lib/unistr/u8-strlen.c: New file.
6204         * lib/unistr/u16-strlen.c: New file.
6205         * lib/unistr/u32-strlen.c: New file.
6206         * lib/unistr/u-strlen.h: New file.
6207
6208         * modules/unistr/u8-strmblen: New file.
6209         * modules/unistr/u16-strmblen: New file.
6210         * modules/unistr/u32-strmblen: New file.
6211         * lib/unistr/u8-strmblen.c: New file.
6212         * lib/unistr/u16-strmblen.c: New file.
6213         * lib/unistr/u32-strmblen.c: New file.
6214
6215         * modules/unistr/u8-strmbtouc: New file.
6216         * modules/unistr/u16-strmbtouc: New file.
6217         * modules/unistr/u32-strmbtouc: New file.
6218         * lib/unistr/u8-strmbtouc.c: New file.
6219         * lib/unistr/u16-strmbtouc.c: New file.
6220         * lib/unistr/u32-strmbtouc.c: New file.
6221
6222         * modules/unistr/u8-strncat: New file.
6223         * modules/unistr/u16-strncat: New file.
6224         * modules/unistr/u32-strncat: New file.
6225         * lib/unistr/u8-strncat.c: New file.
6226         * lib/unistr/u16-strncat.c: New file.
6227         * lib/unistr/u32-strncat.c: New file.
6228         * lib/unistr/u-strncat.h: New file.
6229
6230         * modules/unistr/u8-strncmp: New file.
6231         * modules/unistr/u16-strncmp: New file.
6232         * modules/unistr/u32-strncmp: New file.
6233         * lib/unistr/u8-strncmp.c: New file.
6234         * lib/unistr/u16-strncmp.c: New file.
6235         * lib/unistr/u32-strncmp.c: New file.
6236
6237         * modules/unistr/u8-strncpy: New file.
6238         * modules/unistr/u16-strncpy: New file.
6239         * modules/unistr/u32-strncpy: New file.
6240         * lib/unistr/u8-strncpy.c: New file.
6241         * lib/unistr/u16-strncpy.c: New file.
6242         * lib/unistr/u32-strncpy.c: New file.
6243         * lib/unistr/u-strncpy.h: New file.
6244
6245         * modules/unistr/u8-strnlen: New file.
6246         * modules/unistr/u16-strnlen: New file.
6247         * modules/unistr/u32-strnlen: New file.
6248         * lib/unistr/u8-strnlen.c: New file.
6249         * lib/unistr/u16-strnlen.c: New file.
6250         * lib/unistr/u32-strnlen.c: New file.
6251         * lib/unistr/u-strnlen.h: New file.
6252
6253         * modules/unistr/u8-strpbrk: New file.
6254         * modules/unistr/u16-strpbrk: New file.
6255         * modules/unistr/u32-strpbrk: New file.
6256         * lib/unistr/u8-strpbrk.c: New file.
6257         * lib/unistr/u16-strpbrk.c: New file.
6258         * lib/unistr/u32-strpbrk.c: New file.
6259         * lib/unistr/u-strpbrk.h: New file.
6260
6261         * modules/unistr/u8-strrchr: New file.
6262         * modules/unistr/u16-strrchr: New file.
6263         * modules/unistr/u32-strrchr: New file.
6264         * lib/unistr/u8-strrchr.c: New file.
6265         * lib/unistr/u16-strrchr.c: New file.
6266         * lib/unistr/u32-strrchr.c: New file.
6267
6268         * modules/unistr/u8-strspn: New file.
6269         * modules/unistr/u16-strspn: New file.
6270         * modules/unistr/u32-strspn: New file.
6271         * lib/unistr/u8-strspn.c: New file.
6272         * lib/unistr/u16-strspn.c: New file.
6273         * lib/unistr/u32-strspn.c: New file.
6274         * lib/unistr/u-strspn.h: New file.
6275
6276         * modules/unistr/u8-strstr: New file.
6277         * modules/unistr/u16-strstr: New file.
6278         * modules/unistr/u32-strstr: New file.
6279         * lib/unistr/u8-strstr.c: New file.
6280         * lib/unistr/u16-strstr.c: New file.
6281         * lib/unistr/u32-strstr.c: New file.
6282         * lib/unistr/u-strstr.h: New file.
6283
6284         * modules/unistr/u8-strtok: New file.
6285         * modules/unistr/u16-strtok: New file.
6286         * modules/unistr/u32-strtok: New file.
6287         * lib/unistr/u8-strtok.c: New file.
6288         * lib/unistr/u16-strtok.c: New file.
6289         * lib/unistr/u32-strtok.c: New file.
6290         * lib/unistr/u-strtok.h: New file.
6291
6292         * modules/unistr/u8-uctomb: New file.
6293         * modules/unistr/u16-uctomb: New file.
6294         * modules/unistr/u32-uctomb: New file.
6295         * lib/unistr/u8-uctomb.c: New file.
6296         * lib/unistr/u16-uctomb.c: New file.
6297         * lib/unistr/u32-uctomb.c: New file.
6298
6299         * MODULES.html.sh (Unicode string functions): Add the new modules.
6300
6301 2007-01-08  Bruno Haible  <bruno@clisp.org>
6302
6303         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
6304         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
6305         subdirectories.
6306
6307 2007-01-08  Karl Berry  <karl@gnu.org>
6308
6309         * doc/error.texi: mention that main() fns must set program_name
6310         when progname is used.
6311
6312 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
6313
6314         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
6315         WCTYPE_H is empty, for the benefit of builds from non-distclean
6316         directories.  Problem reported by Eric Blake in
6317         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
6318
6319 2007-01-08  Bruno Haible  <bruno@clisp.org>
6320
6321         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
6322         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
6323         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
6324         PROVIDE_CANONICALIZE_FILENAME_MODE.
6325         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
6326
6327 2007-01-08  Bruno Haible  <bruno@clisp.org>
6328
6329         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
6330         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
6331         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
6332         * lib/fts.c: Likewise.
6333         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
6334
6335 2006-12-25  Bruno Haible  <bruno@clisp.org>
6336
6337         * modules/utf8-ucs4-safe: New file.
6338         * lib/utf8-ucs4-safe.h: New file.
6339         * lib/unistr/utf8-ucs4-safe.c: New file.
6340
6341         * modules/utf16-ucs4-safe: New file.
6342         * lib/utf16-ucs4-safe.h: New file.
6343         * lib/unistr/utf16-ucs4-safe.c: New file.
6344
6345         * MODULES.html.sh (Unicode string functions): Add the new modules.
6346
6347 2007-01-08  Bruno Haible  <bruno@clisp.org>
6348
6349         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
6350         (Depends-on): Add unitypes.
6351         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
6352         (u8_mbtouc_aux): Move out to separate file.
6353         (u8_mbtouc): Use ucs4_t, uint8_t types.
6354         * lib/unistr/utf8-ucs4.c: New file.
6355
6356         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
6357         (Depends-on): Add unitypes.
6358         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
6359         (u16_mbtouc_aux): Move out to separate file.
6360         (u16_mbtouc): Use ucs4_t, uint16_t types.
6361         * lib/unistr/utf16-ucs4.c: New file.
6362
6363         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
6364         (Depends-on): Add unitypes.
6365         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
6366         (u8_uctomb_aux): Move out to separate file.
6367         (u8_uctomb): Use ucs4_t, uint8_t types.
6368         * lib/unistr/ucs4-utf8.c: New file.
6369
6370         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
6371         (Depends-on): Add unitypes.
6372         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
6373         (u16_uctomb_aux): Move out to separate file.
6374         (u16_uctomb): Use ucs4_t, uint16_t types.
6375         * lib/unistr/ucs4-utf16.c: New file.
6376
6377 2006-12-25  Bruno Haible  <bruno@clisp.org>
6378
6379         * modules/unitypes: New file.
6380         * lib/unitypes.h: New file.
6381         * MODULES.html.sh (func_all_modules): New section "Unicode string
6382         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
6383         this section. Add unitypes.
6384
6385 2007-01-08  Bruno Haible  <bruno@clisp.org>
6386
6387         Avoid variable names that conflict with those from libtool.
6388         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
6389         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
6390         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
6391         library_names_spec to acl_library_names_spec, hardcode_* to
6392         acl_hardcode_*.
6393         Reported by Ralf Wildenhues.
6394
6395 2007-01-08  Bruno Haible  <bruno@clisp.org>
6396
6397         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
6398         definition.
6399         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
6400         definition.
6401         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
6402         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
6403         definition.
6404         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
6405         definition.
6406         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
6407         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
6408         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
6409         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
6410         definition.
6411         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
6412         definition.
6413         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
6414         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
6415         GC_USE_<algorithm>.
6416         * lib/gc-libgcrypt.c: Likewise.
6417         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
6418         * modules/gc-arctwo (configure.ac): Likewise.
6419         * modules/gc-des (configure.ac): Likewise.
6420         * modules/gc-hmac-md5 (configure.ac): Likewise.
6421         * modules/gc-hmac-sha1 (configure.ac): Likewise.
6422         * modules/gc-md2 (configure.ac): Likewise.
6423         * modules/gc-md4 (configure.ac): Likewise.
6424         * modules/gc-md5 (configure.ac): Likewise.
6425         * modules/gc-random (configure.ac): Likewise.
6426         * modules/gc-rijndael (configure.ac): Likewise.
6427         * modules/gc-sha1 (configure.ac): Likewise.
6428
6429 2007-01-08  Bruno Haible  <bruno@clisp.org>
6430
6431         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
6432         macro definition.
6433         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
6434         definition.
6435         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
6436         definition.
6437         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
6438         * modules/fcntl-safer (configure.ac): Likewise.
6439         * modules/fopen-safer (configure.ac): Likewise.
6440         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
6441         GNULIB_FWRITEERROR macro definition.
6442
6443 2007-01-08  Bruno Haible  <bruno@clisp.org>
6444
6445         * m4/gnulib-common.m4: New file.
6446         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
6447         (func_get_filelist): Add m4/gnulib-common.m4.
6448
6449 2007-01-08  Bruno Haible  <bruno@clisp.org>
6450
6451         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
6452         command.
6453
6454 2007-01-08  Jim Meyering  <jim@meyering.net>
6455
6456         Use a more robust test for a "can't happen" condition.
6457         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
6458         narrowed the st_size value.  Presuming the "can't happen" condition
6459         is true, that narrowing could conceivably convert an invalid st_size
6460         value into a valid one.  Instead, use a change based on Matthew
6461         Woehlke's original patch.
6462
6463         Slight readability improvement: use an assert-like macro
6464         in place of literal "abort ()" uses.
6465         * lib/fts.c (fts_assert): Define.
6466         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
6467         Use this macro instead of a bare 'abort'.
6468
6469 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
6470
6471         Don't worry about using IRIX 5.3's wctype.h broken definitions;
6472         simply work around them.
6473         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
6474         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
6475         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
6476         declaring.
6477         Don't bother to define as macros, since the standard doesn't require it.
6478         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
6479         longer worry about IRIX 5.3.
6480         (HAVE_WCTYPE_CTMP_BUG): Remove.
6481
6482 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
6483
6484         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
6485         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
6486         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
6487         Problems reported by Georg Schwarz for IRIX 5.3.
6488
6489         * gnulib-tool (autoconf_minversion): Take the maximum version number
6490         found, not the minimum.  Problem reported by James Youngman.
6491
6492 2007-01-03  Karl Berry  <karl@gnu.org>
6493
6494         * doc/error.texi: new file, explaining interaction with progname.
6495         * doc/gnulib.texi: include it.  Update copyright.
6496
6497 2007-01-03  Simon Josefsson  <simon@josefsson.org>
6498
6499         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
6500         AC_CANONICAL_HOST, to improve autobuild outputs.
6501
6502 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
6503             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
6504
6505         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
6506         sockets, server sockets, and other file descriptors.  Count errors
6507         to compute the return value.  Reorder the code a bit to be easier
6508         to follow.  Don't set event bits that were not requested (except
6509         POLLERR and POLLHUP).
6510
6511 2007-01-01  Bruno Haible  <bruno@clisp.org>
6512
6513         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
6514
6515 2007-01-03  Jim Meyering  <jim@meyering.net>
6516
6517         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
6518
6519 2007-01-02  Bruno Haible  <bruno@clisp.org>
6520
6521         * modules/settime (Include): Require timespec.h.
6522         * modules/nanosleep (Include): Likewise.
6523
6524 2007-01-01  Bruno Haible  <bruno@clisp.org>
6525
6526         * gnulib-tool (func_emit_copyright_notice): Bump year.
6527         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
6528
6529 2007-01-01  Bruno Haible  <bruno@clisp.org>
6530
6531         Improve support for OpenBSD.
6532         * build-aux/config.rpath (libname_spec): Export.
6533         (library_names_spec): New variable. Export.
6534         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
6535         library_names_spec from the config.rpath output. Locate shared library
6536         through the name pattern in library_names_spec.
6537
6538 2007-01-01  Eric Blake  <ebb9@byu.net>
6539
6540         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
6541
6542 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
6543
6544         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
6545         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
6546         assume the C locale, and avoid an "eval" that could cause trouble.
6547         Problem with SORT reported by Bob Proulx.
6548
6549         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
6550         Define.  Trivial patch from Henning Nielsen Lund, originally
6551         sent to bug-grep@gnu.org today.
6552
6553 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
6554
6555         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
6556         struct stat.  Problem reported by Henning Nielsen Lund.
6557         * lib/acl.c: Include acl.h first, to check interface.  Don't
6558         bother to include sys/types.h and sys/stat.h again.
6559
6560 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
6561
6562         Import the following change from libc; problem reported by
6563         Sven Verdoolaege.
6564
6565         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
6566
6567         [BZ #1373]
6568         * lib/argp.h: Remove __NTH for __argp_usage inline function.
6569
6570 2006-12-28  Jim Meyering  <jim@meyering.net>
6571
6572         * build-aux/announce-gen: Do not assume that the package
6573         builds any of tar.gz, tar.bz2, and .xdelta files.
6574         Suggestion from Simon Josefsson.
6575
6576 2006-12-28  Simon Josefsson  <simon@josefsson.org>
6577
6578         * modules/announce-gen: New file.
6579
6580 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
6581
6582         * lib/mbchar.h: Just include <wctype.h>; the wctype module
6583         handles its gotchas now.
6584         * lib/mbswidth.c: Likewise.
6585         * lib/wcwidth.h: Likewise.
6586         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
6587         and iswcntrl; the wctype module does this stuff now.
6588         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
6589         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
6590         * modules/mbchar (Depends-on): Add wctype.
6591         * modules/mbswidth (Depends-on): Likewise.
6592         * modules/wcwidth (Depends-on): Likewise.
6593
6594 2006-12-27  Eric Blake  <ebb9@byu.net>
6595
6596         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
6597         module uses more than what <wctype.h> is required to provide.
6598
6599 2006-12-26  Eric Blake  <ebb9@byu.net>
6600
6601         * gnulib-tool (sed_extract_prog): Avoid space-tab.
6602
6603 2006-12-26  Eric Blake  <ebb9@byu.net>
6604
6605         * modules/absolute-header: New module.
6606         * modules/fcntl (Depends-on): Depend on it.
6607         * modules/inttypes (Depends-on): Likewise.
6608         * modules/stdint (Depends-on): Likewise.
6609         * modules/sys_stat (Depends-on): Likewise.
6610         * modules/wctype (Depends-on): Likewise.
6611         * MODULES.html.sh (Support for building libraries and
6612         executables): Document it.
6613
6614 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
6615
6616         * gnulib-tool (SED): Remove, undoing previous change.
6617         The problem was that it broke coreutils on Solaris, because
6618         "sed --posix" leaked into a makefile.
6619         (sed): New alias, if 'alias' and GNU sed.
6620
6621 2006-12-24  Jim Meyering  <jim@meyering.net>
6622
6623         Work around an fchownat bug in glibc-2.4:
6624         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
6625         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
6626         in spite of the -P option.
6627         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
6628         New macros.
6629         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
6630         * modules/openat (Files): Add lib/fchownat.c.
6631         * lib/openat.c (fchownat): Don't define here.  Move to...
6632         * lib/fchownat.c: ...this new file.
6633
6634 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
6635
6636         Fix bug reported by Bruno Haible in
6637         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
6638         where quotearg.c didn't compile on Mac OS X 10.2 because it
6639         lacks <wchar.h> and wint_t.
6640         * lib/wctype_.h (__wctype_wint_t): New type.
6641         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
6642         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
6643         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
6644         Arg is now of type __wctype_wint_t, not wint_t.
6645         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
6646         substitute HAVE_WINT_T.
6647         * modules/wctype (Files): Add m4/wint_t.m4.
6648         (wctype.h): Substitute HAVE_WINT_T.
6649
6650 2006-12-23  Bruno Haible  <bruno@clisp.org>
6651
6652         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
6653
6654 2006-12-23  Bruno Haible  <bruno@clisp.org>
6655
6656         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
6657         S_ISLNK.
6658         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
6659         mingw.
6660
6661 2006-12-22  Bruno Haible  <bruno@clisp.org>
6662
6663         * lib/copy-file.c: Include acl.h.
6664         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
6665         Close the file descriptors only after being done with copy_acl.
6666         * modules/copy-file (Depends-on): Add acl.
6667
6668 2006-12-22  Bruno Haible  <bruno@clisp.org>
6669
6670         * gnulib-tool (SED): New variable.
6671         Use $SED instead of sed everywhere.
6672
6673 2006-12-22  Bruno Haible  <bruno@clisp.org>
6674
6675         * modules/no-c++: New file.
6676         * m4/no-c++.m4: New file.
6677         * MODULES.html.sh (Support for building libraries and executables):
6678         Add no-c++.
6679
6680 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
6681
6682         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
6683         Include <limits.h>, and use its INT_MAX to rewrite the
6684         j loop so that it does not overflow 'int'.  Problem reported by
6685         Ralf Wildenhues in
6686         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
6687         Play it safe by shifting left by 1 rather than multiplying by 2,
6688         as GCC is less likely to optimize this away when the value
6689         is signed (when it assumes overflow leads to undefined behavior).
6690         Also, don't assume time_t uses two's complement.
6691
6692 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
6693
6694         * MODULES.html.sh: New module wctype.
6695         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
6696         * lib/fnmatch.c: Don't bother to include <wchar.h> before
6697         <wctype.h>, since the new wctype module should fix this.
6698         * lib/quotearg.c: Include <wctype.h> unconditionally, since
6699         the wctype module should arrange for it.
6700         * lib/regex_internal.h: Likewise.
6701         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
6702         since the wctype module should handle this now.
6703         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
6704         * modules/fnmatch (Depends-on): Add wctype.
6705         * modules/quotearg (Depends-on): Likewise.
6706         * modules/regex (Depends-on): Likewise.
6707
6708 2006-12-19  Bruno Haible  <bruno@clisp.org>
6709
6710         * lib/strdup.h [C++]: Wrap definitions in extern "C".
6711         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
6712
6713 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6714
6715         * modules/savewd (Depends-on): Fix dependency on fcntl.
6716
6717 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
6718
6719         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
6720         conforms to C99, rather than relying on the user's environment
6721         setting of STDINT_H.
6722
6723 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
6724         and Eric Blake  <ebb9@byu.net>
6725
6726         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
6727         This is more consistent with the other defines here.
6728         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
6729         Port to z/OS.  Problem reported by Paul Gilmartin.
6730         Change local vars to use gl_ prefix rather than ac_.
6731         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
6732         with other defines.
6733         * modules/double-slash-root: New module.
6734         * modules/dirname (Files): Remove m4/double-slash-root.m4.
6735         (Depends-on): Add double-slash-root.
6736         * MODULES.html.sh (File system functions): Mention new module.
6737
6738 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
6739
6740         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
6741         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
6742         This is for the benefit of gzip, which doesn't do i18n.
6743
6744 2006-12-12  Jim Meyering  <jim@meyering.net>
6745
6746         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
6747         Reported by Andreas Schwab <schwab@suse.de>.
6748
6749 2006-12-12  Bruno Haible  <bruno@clisp.org>
6750
6751         Merge these changes.
6752         2006-09-05  Bruno Haible  <bruno@clisp.org>
6753         * lib/iconvme.c (iconv_string): No need to save and restore errno when
6754         iconv_alloc succeeded.
6755         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
6756         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
6757         test for " && dest " at the end - dest is always != NULL there. Call
6758         iconv with 4xNULL arguments initially, to reset the state. Call iconv
6759         with 2xNULL arguments, also to flush the state storage. Handle the
6760         IRIX iconv behaviour. Realloc the final result, to throw away unused
6761         memory.
6762
6763 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
6764
6765         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
6766         and fchmodat unconditionally, since glibc 2.4 has them.
6767         Problem reported by Arkadiusz Miskiewicz.
6768
6769 2006-12-10  Bruno Haible  <bruno@clisp.org>
6770
6771         * gnulib-tool (func_import): Show the include files only for those
6772         modules that are copied and specified.
6773         Reported by Karl Berry.
6774
6775 2006-12-08  Jim Meyering  <jim@meyering.net>
6776
6777         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
6778         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
6779
6780         * build-aux/announce-gen: Add two new options, both optional:
6781         --bootstrap-tools=TOOL_LIST
6782               a comma-separated list of tools, e.g.,
6783               autoconf,automake,bison,gnulib
6784         --gnulib-snapshot-date=DATE
6785               if gnulib is in the bootstrap tool list,
6786               then report this as the snapshot date.
6787               If not specified, use the current date/time.
6788               If you specify a date here, be sure it's UTC.
6789
6790 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6791
6792         * tests/test-argp-2.sh: Fix test to match actual output.
6793         (func_compare): Fix sed script to be portable.
6794
6795 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
6796
6797         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
6798         workaround for this case.  It is not autoconfigured now; offhand
6799         it's hard to see how to autoconfigure it.
6800
6801 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
6802
6803         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
6804         a directory that is about to be chowned.  Such a directory's
6805         initial file permissions should permit the owner only and this
6806         should not be changed until after the chown, since the group and
6807         other bits would be incorrect if they granted permission before
6808         the chown.
6809
6810         Fix porting problem for iswctype reported by Georg Schwarz in:
6811         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
6812         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
6813         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
6814         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
6815         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
6816
6817 2006-12-03  Jim Meyering  <jim@meyering.net>
6818
6819         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
6820         p->fts_statp may not yet be defined.
6821         (fts_read): Instead, set it in the caller, once p->fts_statp is
6822         sure to be defined, and corresponds to a top-level directory.
6823         This bug made du -x fail.  Here's the coreutils test case:
6824         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
6825         Reported by Mike Frysinger.
6826
6827 2006-12-01  Jim Meyering  <jim@meyering.net>
6828
6829         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
6830         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
6831         Reported by Simon Josefsson.
6832
6833 2006-11-30  Jim Meyering  <jim@meyering.net>
6834
6835         * m4/warning.m4: Use the all-permissive copyright notice
6836         recommended by RMS (rather than LGPL).
6837         * m4/vararrays.m4: Likewise.
6838         * m4/flexmember.m4: Likewise.
6839
6840 2006-11-29  Bruno Haible  <bruno@clisp.org>
6841
6842         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
6843         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
6844         using +=.
6845         Reported by Simon Josefsson <simon@josefsson.org>.
6846
6847 2006-11-28  James Youngman <jay@gnu.org>
6848
6849         * README: Advise users that they might find the bug-gnulib@gnu.org
6850         and autotools-announce@gnu.org mailing lists useful.
6851
6852 2006-11-28  Bruno Haible  <bruno@clisp.org>
6853
6854         * m4/ptrdiff_max.m4: Remove file.
6855
6856 2006-11-21  Bruno Haible  <bruno@clisp.org>
6857
6858         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
6859         _AC_COMPUTE_INT.
6860         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
6861         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
6862         _AC_COMPUTE_INT.
6863         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
6864         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
6865         _AC_COMPUTE_INT.
6866         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
6867
6868 2006-11-28  Jim Meyering  <jim@meyering.net>
6869
6870         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
6871         warning from "gcc -Wshadow" about shadowing the builtin.
6872
6873 2006-11-27  Bruno Haible  <bruno@clisp.org>
6874
6875         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
6876         _AC_COMPUTE_INT.
6877         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
6878
6879 2006-11-27  Bruno Haible  <bruno@clisp.org>
6880             Paul Eggert  <eggert@cs.ucla.edu>
6881
6882         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
6883
6884 2006-11-26  Bruno Haible  <bruno@clisp.org>
6885
6886         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
6887         noinst_LTLIBRARIES.
6888
6889 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
6890             Bruno Haible  <bruno@clisp.org>
6891
6892         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
6893         if compiling with "gcc -ansi".
6894
6895 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
6896
6897         Fix some incompatibilities with gcc -ansi -pedantic.
6898         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
6899         if compiling pedantically with GCC, unless it's C99 or later.
6900         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
6901         it mishandles gcc -ansi -pedantic as well.
6902         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
6903         if gcc -pedantic.
6904         * lib/regexec.c (check_node_accept_bytes): Don't use auto
6905         initializers for struct if -pedantic, unless it's C99 or later.
6906
6907 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
6908
6909         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
6910         Don't close an fd more than once. Identical atimes indicate
6911         success, not failure.
6912
6913 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
6914
6915         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
6916
6917 2006-11-23  Jim Meyering  <jim@meyering.net>
6918
6919         * build-aux/announce-gen: New file.  From coreutils.
6920
6921 2006-11-22  Jim Meyering  <jim@meyering.net>
6922
6923         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
6924         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
6925         (fts_read): Use a temporary to narrow the overused st_size member
6926         before using it in a switch statement.  Reported by Matthew Woehlke.
6927
6928         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
6929         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
6930
6931 2006-11-20  Bruno Haible  <bruno@clisp.org>
6932
6933         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
6934         changequote instead of pairs of brackets.
6935         Reported by Andreas Schwab <schwab@suse.de>.
6936
6937 2006-11-21  Jim Meyering  <jim@meyering.net>
6938
6939         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
6940         so as to remain compatible with older compilers.
6941         Patch from Michael Deutschmann.
6942
6943 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
6944
6945         * MODULES.html.sh (File system functions): Add openat.
6946
6947         * lib/openat.h (rpl_fstatat): New macro, if
6948         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
6949         (fstatat): Define to rpl_fstatat under the same conditions,
6950         unless COMPILING_FSTATAT.
6951         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
6952         seems to have the bug.
6953         * lib/fstatat.c: New file.
6954         * modules/openat (Files): Add it.
6955
6956 2006-11-20  Bruno Haible  <bruno@clisp.org>
6957
6958         * Makefile: New file.
6959
6960 2006-11-20  Jim Meyering  <jim@meyering.net>
6961
6962         The beginnings of syntax-related checks for gnulib.
6963         * lib/Makefile: New file.
6964         * lib/t-idcache: New script.  Ensure that the two halves of
6965         idcache.c stay in sync.
6966
6967         * lib/idcache.c: Adjust comments in user- and group- portions to
6968         be more accurate, and to be consistent with one another.
6969
6970 2006-11-20  Jim Meyering  <jim@meyering.net>
6971
6972         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
6973         continue using the flexible array member (thus, this module performs
6974         half as many malloc calls), with the addition that...
6975         (getgroup, getuser): Consistently record a non-match via an empty
6976         "name" string, and map an empty string match to a NULL return value.
6977         * modules/idcache (Depends-on): Re-add flexmember.
6978
6979         * lib/idcache.c (getuser): Remove all uses of the register keyword.
6980         (getuidbyname, getgroup, getgidbyname): Likewise.
6981
6982         Use cleaner syntax: NULL rather than 0.
6983         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
6984
6985 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
6986
6987         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
6988         It mishandled the case where the group was missing.
6989         Problem reported by Greg Schafer.
6990         * modules/idcache: Likewise.
6991
6992 2006-11-18  Jim Meyering  <jim@meyering.net>
6993
6994         * check-module (%exempt_header): Add exception for some
6995         conditionally-included headers.
6996
6997         * modules/i-ring (Depends-on): Add verify.
6998         (License): Change to LGPL.
6999
7000 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
7001
7002         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
7003         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
7004         and inttostr.h.  Use snprintf rather than uinttostr, so that
7005         LGPLed code doesn't depend on GPLed.
7006
7007 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
7008
7009         * modules/inline (License): Change from GPL to LGPL.
7010
7011 2006-11-17  Jim Meyering  <jim@meyering.net>
7012
7013         * modules/d-type (License): Switch to LGPL.
7014
7015 2006-11-15  Bruno Haible  <bruno@clisp.org>
7016
7017         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
7018
7019 2006-11-15  Eric Blake  <ebb9@byu.net>
7020
7021         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
7022         the module dependency.
7023
7024 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7025             Bruno Haible  <bruno@clisp.org>
7026
7027         * gnulib-tool (func_create_testdir): Add license consistency check.
7028
7029 2006-11-15  Eric Blake  <ebb9@byu.net>
7030
7031         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
7032         random "(cached)" in configure output.
7033
7034 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7035
7036         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
7037         test for conforming inttypes.h is both announced and cached.
7038
7039         * MODULES.html.sh (seen_modules, seen_files): New variables.
7040         (func_module): Rewrite to use a few less gnulib-tool and sed
7041         invocations.  Avoid a couple of quadratic algorithms for ...
7042         (missed_modules, missed_files): ... these, with ...
7043         (func_append, func_tmpdir): ... these new functions, from
7044         gnulib-tool.  Analogously, install traps for cleanup.
7045
7046         * tests/test-gc.c (main): Remove unused variables.
7047         * tests/test-read-file.c: Include stdlib.h, for 'free'.
7048
7049 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
7050
7051         * modules/inttostr (License): Change to LGPL.
7052
7053 2006-11-14  Eric Blake  <ebb9@byu.net>
7054
7055         * modules/tempname (License): Change to LGPL.
7056
7057 2006-11-14  Eric Blake  <ebb9@byu.net>
7058
7059         * doc/functions.texi (Function Portability): *printf functions on
7060         Cygwin now understand all POSIX size specifiers.
7061
7062 2006-11-14  Bruno Haible  <bruno@clisp.org>
7063
7064         * modules/c-ctype (License): Change to LGPL.
7065
7066 2006-11-12  Bruno Haible  <bruno@clisp.org>
7067
7068         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
7069         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
7070         for GNOME libraries, for which the include files are installed in
7071         subdirectories of $prefix/include.
7072
7073 2006-11-12  Bruno Haible  <bruno@clisp.org>
7074
7075         * m4/lib-link.m4: Require at least autoconf-2.54.
7076         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
7077         name to underscores for the --with option.
7078
7079 2006-11-13  Bruno Haible  <bruno@clisp.org>
7080
7081         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
7082         the tests directory.
7083         Reported by Ralf Wildenhues.
7084
7085 2006-11-13  Bruno Haible  <bruno@clisp.org>
7086
7087         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
7088         (func_emit_initmacro_end): Undo the override here.
7089         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
7090         Works around the famous automake error in coreutils.
7091
7092 2006-11-13  Eric Blake  <ebb9@byu.net>
7093
7094         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
7095         element, not its node.
7096
7097 2006-11-12  Bruno Haible  <bruno@clisp.org>
7098
7099         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
7100         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
7101
7102 2006-11-12  Bruno Haible  <bruno@clisp.org>
7103
7104         * gnulib-tool: New option --local-symlink.
7105         (func_usage): Document it.
7106         (lsymbolic): New variable.
7107         (func_import, func_create_testdir): If --symlink was not specified,
7108         test whether --local-symlink was specified and the file comes from
7109         the local_gnulib_dir.
7110
7111 2006-11-12  Bruno Haible  <bruno@clisp.org>
7112
7113         * gnulib-tool (func_ln): New function.
7114         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
7115
7116 2006-11-12  Bruno Haible  <bruno@clisp.org>
7117
7118         Finish support for source files in subdirectories.
7119         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
7120         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
7121         AUTOMAKE_OPTIONS.
7122         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
7123
7124 2006-11-12  Bruno Haible  <bruno@clisp.org>
7125
7126         * gnulib-tool (func_get_automake_snippet): Synthesize also an
7127         EXTRA_lib_SOURCES augmentation.
7128         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
7129
7130 2006-11-12  Jim Meyering  <jim@meyering.net>
7131
7132         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
7133         file descriptors.  This also averts a failure on systems with
7134         native openat support when a traversed directory lacks "x" access.
7135         * lib/fts_.h: Include "i-ring.h"
7136         (struct FTS) [fts_fd_ring]: New member.
7137         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
7138         (FCHDIR): Add parentheses.
7139         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
7140         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
7141         When descending, rather than simply closing the previous
7142         fts_cwd_fd value, push that file descriptor onto the ring.
7143         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
7144         (fts_open): Initialize the new fd_ring member.
7145         (fts_close): Clear the ring.
7146         (fts_safe_changedir): When possible, use our new fd_ring to skip
7147         the diropen and fstat and dev/ino comparison that would normally
7148         accompany a virtual `chdir ("..")'.
7149
7150         * modules/fts (Depends-on): Add i-ring.
7151         * modules/i-ring: New module.
7152         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
7153         * m4/i-ring.m4: New file.
7154
7155 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7156
7157         * gnulib-tool (func_create_testdir): Fix replacement of
7158         `build-aux' in configure.ac.  Run autotools in gltests
7159         subdirectory.
7160         (func_create_testdir, func_create_megatestdir, test): There is
7161         no need for '--force' in most autotool invocations in a new
7162         tree.  Actually fail the whole test if any of the tools, or the
7163         configure or make stages fail.
7164
7165         Sync from Automake.
7166         * build-aux/gnupload: Revert last change.  Add pointer to upload
7167         instructions of the GNU Maintenance Instructions.
7168         Suggestion by Karl Berry.
7169
7170 2006-11-10  Jim Meyering  <jim@meyering.net>
7171
7172         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
7173
7174 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
7175
7176         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
7177         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
7178         (bind_textdomain_codeset) [! ENABLE_NLS]:
7179         Evaluate all the arguments.  That way, callers get compatible behavior
7180         if the arguments have side effects.  Also, it avoids some GCC
7181         diagnostics in some cases; Joel E. Denny reported problems when Bison
7182         was configured with --enable-gcc-warnigs.
7183
7184 2006-11-10  Jim Meyering  <jim@meyering.net>
7185
7186         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
7187         relevant options in CFLAGS (like -O, -fno-inline) are taken into
7188         account.
7189
7190 2006-11-10  Jim Meyering  <jim@meyering.net>
7191
7192         * modules/inline: New file/module.
7193         * modules/xalloc (Files): Remove m4/inline.m4.
7194         (Depends-on): Add inline, instead.
7195         * modules/oset: Likewise.
7196         * modules/list: Likewise.
7197
7198 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
7199
7200         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
7201         Problem reported by Matthew Woehlke.
7202
7203 2006-11-09  Bruno Haible  <bruno@clisp.org>
7204
7205         * lib/tempname.c (gen_tempname): Remove variant that invokes
7206         __gen_tempname.
7207         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
7208         __gen_tempname.
7209
7210 2006-11-08  Bruno Haible  <bruno@clisp.org>
7211
7212         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
7213         to 'yes' instead of 'cross-compiling'.
7214
7215 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
7216
7217         * lib/quotearg.h (quotearg_free): New decl.
7218         * lib/quotearg.c (quotearg_free): New function.
7219         (slot0, nslots, slotvec0, slotvec):
7220         Now file-scope so that quotearg_free can get at them.
7221
7222 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7223
7224         Sync from Automake.
7225         * build-aux/gnupload: Add missing 'gnu' to example URL.
7226         Report by Karl Berry.
7227
7228 2006-11-08  Bruno Haible  <bruno@clisp.org>
7229
7230         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
7231         Suggested by Paul Eggert.
7232
7233 2006-11-08  Jim Meyering  <jim@meyering.net>
7234
7235         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
7236         It's already included if !_LIBC.
7237         (fts_safe_changedir): Add a comment.
7238
7239 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
7240
7241         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
7242         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
7243         Matthew Woehlke.
7244
7245         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
7246         definitions up, to avoid colliding with change below.
7247         (static_inline) [HAVE_INLINE]: New macro.
7248         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
7249         Provide extern decls when !HAVE_INLINE.  Do not define unless
7250         static_inline is defined, either by us or by xmalloc.c.  Use
7251         static_inline rather than static inline.
7252         (XCALLOC): Optimize sizeof(T) = 1 case.
7253         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
7254
7255 2006-11-07  Bruno Haible  <bruno@clisp.org>
7256
7257         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
7258         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
7259         AC_C_INLINE.
7260         * modules/xalloc (Files): Add m4/inline.m4.
7261
7262 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7263
7264         * README: Fix typo.
7265         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
7266         (Miscellanous Notes): ...from this.
7267
7268 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
7269
7270         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
7271         Mention that offsetof should be used instead of sizeof.
7272         From Bruno Haible.
7273
7274 2006-11-07  Bruno Haible  <bruno@clisp.org>
7275
7276         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
7277
7278 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
7279
7280         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
7281         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
7282         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
7283         (gl_tree_add_before, gl_tree_add_after):
7284         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
7285         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
7286         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
7287         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
7288         (gl_linked_add_after, gl_linked_add_at): Likewise.
7289         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
7290         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
7291         (gl_tree_add_before, gl_tree_add_after): Likewise.
7292         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
7293         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
7294         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
7295
7296 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7297
7298         * lib/gl_oset.h: Use C comment style, not C++ comment style.
7299
7300 2006-11-06  Bruno Haible  <bruno@clisp.org>
7301
7302         * m4/inline.m4: New file.
7303         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
7304         * modules/list (Files): Add m4/inline.m4.
7305         * modules/oset (Files): Likewise.
7306
7307 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
7308
7309         * lib/idcache.c: Include <stddef.h>, for offsetof.
7310         (struct userid.name): Change from char * to a flexible array member.
7311         All uses changed.
7312         * modules/idcache (Depends-on): Add flexmember.
7313
7314         * MODULES.html.sh (Core language properties): New module flexmember.
7315         * modules/flexmember, m4/flexmember.m4: New files.
7316
7317         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
7318         inline functions that are identical with the old xnmalloc_inline,
7319         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
7320         that we can avoid some unnecessary integer multiplications and
7321         divisions in the common case where the element size is known at
7322         compile time.
7323         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
7324         needed.
7325         (xnboundedmalloc): Remove.
7326         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
7327         arguments, for consistency with rest of this header.
7328         (xcharalloc): Rewrite using XNMALLOC.
7329         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
7330         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
7331         versions have been moved to lib/xalloc.h and renamed to be the
7332         non-*_inline versions.
7333         (xmalloc, xrealloc): Implement without reference to the xnmalloc
7334         and xnrealloc functions, since those functions are now inline and
7335         now call us.
7336         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
7337         renaming described above.
7338         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
7339         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
7340         captures the dependency in AC_C_INLINE.
7341
7342         New module canonicalize-lgpl, proposed by Charles Wilson in
7343         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
7344         with a few small changes afterwards.
7345         * MODULES.html.sh (File system functions): New module
7346         canonicalize-lgpl.
7347         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
7348         and canonicalize_file_name.
7349         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
7350         * modules/canonicalize-lgpl: New files.
7351
7352 2006-11-05  Bruno Haible  <bruno@clisp.org>
7353
7354         * gnulib-tool (func_import, func_create_testdir): Create directories
7355         also for files in subdirectories of lib/.
7356
7357 2006-11-05  Bruno Haible  <bruno@clisp.org>
7358
7359         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
7360         ANSI C compliant.
7361
7362 2006-11-03  Bruno Haible  <bruno@clisp.org>
7363
7364         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
7365         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
7366         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
7367         (xnboundedmalloc): New inline function.
7368         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
7369         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
7370         xmalloc.
7371         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
7372         xmalloc.
7373         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
7374         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
7375         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
7376         xmalloc.
7377         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
7378         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
7379         xmalloc.
7380         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
7381         gl_tree_add_after): Use XMALLOC instead of xmalloc.
7382         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
7383         xmalloc.
7384         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
7385         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
7386         gl_tree_add_after): Use XMALLOC instead of xmalloc.
7387         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
7388         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
7389         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
7390         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
7391
7392 2006-11-03  Bruno Haible  <bruno@clisp.org>
7393
7394         * lib/c-ctype.h [C++]: Define functions without name mangling.
7395         * lib/fwriteerror.h [C++]: Likewise.
7396         * lib/gcd.h [C++]: Likewise.
7397         * lib/linebreak.h [C++]: Likewise.
7398
7399 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
7400
7401         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
7402         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
7403         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
7404         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
7405         Check for functions and headers just once.
7406         Check for declaration of canonicalize_file_name.
7407         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
7408
7409 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
7410
7411         * gnulib-tool (func_import): Fix typo in actioncmd.
7412
7413 2006-11-02  Bruno Haible  <bruno@clisp.org>
7414
7415         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
7416         newline sequence in the Makefile.am snippet as a space, like "make"
7417         does.
7418         Reported by Roger Persson <perrog@gmail.com>.
7419
7420 2006-11-01  Bruno Haible  <bruno@clisp.org>
7421
7422         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
7423         already declared in <string.h>.
7424         * lib/strcase.h (strncasecmp): Don't declare it if yes.
7425
7426 2006-11-01  Bruno Haible  <bruno@clisp.org>
7427
7428         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
7429         * lib/strcase.h: Include <string.h>.
7430         (strcasecmp): Define to rpl_strcasecmp here.
7431
7432 2006-11-01  Bruno Haible  <bruno@clisp.org>
7433
7434         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
7435
7436 2006-11-01  Eric Blake  <ebb9@byu.net>
7437
7438         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
7439
7440         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
7441
7442 2006-10-29  Bruno Haible  <bruno@clisp.org>
7443
7444         Make it compile in C++ mode.
7445         * lib/full-write.c (full_rw): Add a cast.
7446
7447 2006-11-01  Bruno Haible  <bruno@clisp.org>
7448
7449         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
7450         be POSIX compliant.
7451         Reported by Roger Persson <perrog@gmail.com>.
7452
7453 2006-11-01  Eric Blake  <ebb9@byu.net>
7454
7455         * lib/getopt_.h: Fix comments.
7456
7457 2006-10-31  Eric Blake  <ebb9@byu.net>
7458
7459         * modules/tmpdir (Depends-on): Add sys_stat.
7460         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
7461         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
7462         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
7463         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
7464         tempname.
7465
7466 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
7467
7468         Avoid some C++ diagnostics reported by Bruno Haible.
7469         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
7470         xmalloc.
7471         (quotearg_alloc): Use xcharalloc rather than xmalloc.
7472         (struct slotvec): Move to top level.
7473         (quotearg_n_options): Rewrite to avoid xmalloc.
7474         * lib/xalloc.h (xcharalloc): New function.
7475         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
7476         [defined __cplusplus]: Add function template that provides result
7477         type propagation.  This part of the change is from Bruno Haible.
7478
7479 2006-10-29  Bruno Haible  <bruno@clisp.org>
7480
7481         Make it compile in C++ mode.
7482         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
7483         * lib/strnlen1.c (strnlen1): Cast memchr result.
7484         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
7485         * lib/clean-temp.c (string_equals, string_hash): Add casts.
7486         (create_temp_dir): Rename local variable 'template'.
7487         (compile_csharp_using_sscli): Add cast.
7488         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
7489         * lib/findprog.c (find_in_path): Likewise.
7490         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
7491         * lib/wait-process.c (register_slave_subprocess): Likewise.
7492
7493 2006-10-22  Bruno Haible  <bruno@clisp.org>
7494
7495         * modules/tsearch: New file.
7496         * lib/tsearch.h: New file.
7497         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
7498         * m4/tsearch.m4: New file.
7499         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
7500
7501 2006-10-29  Eric Blake  <ebb9@byu.net>
7502
7503         * lib/arcfour.c: Assume config.h.
7504         * lib/arctwo.c: Likewise.
7505         * lib/base64.c: Likewise.
7506         * lib/check-version.c: Likewise.
7507         * lib/crc.c: Likewise.
7508         * lib/des.c: Likewise.
7509         * lib/gc-gnulib.c: Likewise.
7510         * lib/gc-libgcrypt.c: Likewise.
7511         * lib/gc-pbkdf2-sha1.c: Likewise.
7512         * lib/getaddrinfo.c: Likewise.
7513         * lib/getdelim.c: Likewise.
7514         * lib/getline.c: Likewise.
7515         * lib/hmac-md5.c: Likewise.
7516         * lib/hmac-sha1.c: Likewise.
7517         * lib/iconvme.c: Likewise.
7518         * lib/md2.c: Likewise.
7519         * lib/md4.c: Likewise.
7520         * lib/memxor.c: Likewise.
7521         * lib/read-file.c: Likewise.
7522         * lib/readline.c: Likewise.
7523         * lib/rijndael-alg-fst.c: Likewise.
7524         * lib/rijndael-api-fst.c: Likewise.
7525         * lib/xgetdomainname.c: Likewise.
7526
7527 2006-10-28  Eric Blake  <ebb9@byu.net>
7528
7529         * lib/xstrndup.c: Assume config.h.
7530
7531 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
7532
7533         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
7534         stat-macros.h is now for our own macros, whereas stat_h is for
7535         macros in the <sys/stat.h> name space.
7536         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
7537         (STAT_MACROS_H): Remove.
7538         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
7539         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
7540         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
7541         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
7542         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
7543         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
7544         Move these macros to ...
7545         * lib/stat_.h: here.  Don't include stat-macros.h.
7546         * lib/canonicalize.c: Don't include stat-macros.h.
7547         * lib/chown.c: Likewise.
7548         * lib/euidaccess.c: Likewise.
7549         * lib/file-type.c: Likewise.
7550         * lib/filemode.c: Likewise.
7551         * lib/glob.c: Likewise.
7552         * lib/isapipe.c: Likewise.
7553         * lib/lchown.c: Likewise.
7554         * lib/lstat.c: Likewise.
7555         * lib/mkdir-p.c: Likewise.
7556         * lib/rmdir.c: Likewise.
7557         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
7558         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
7559         unless mkdir isn't declared, to speed up 'configure'.
7560         Always create sys/stat.h, since it's unlikely any real sys/stat.h
7561         would define all the S_* symbols.
7562         * modules/canonicalize (Depends-on):
7563         Depend on sys_stat, not stat-macros.
7564         * modules/chown: Likewise.
7565         * modules/euidaccess: Likewise.
7566         * modules/filemode: Likewise.
7567         * modules/file-type: Likewise.
7568         * modules/glob: Likewise.
7569         * modules/isapipe: Likewise.
7570         * modules/lchown: Likewise.
7571         * modules/lstat: Likewise.
7572         * modules/mkancesdirs: Likewise.
7573         * modules/rmdir: Likewise.
7574         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
7575         * modules/modechange: Likewise.
7576         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
7577         (configure.ac): Remove gl_STAT_MACROS.
7578         * modules/sys_stat (Depends-on): Remove stat-macros.
7579
7580 2006-10-27  Bruno Haible  <bruno@clisp.org>
7581
7582         * m4/signed.m4: Remove file.
7583         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
7584         invocation.
7585         * modules/vasnprintf (Files): Remove m4/signed.m4.
7586
7587 2006-10-27  Bruno Haible  <bruno@clisp.org>
7588
7589         Update to GNU gettext 0.16.
7590         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
7591         m4/inttypes-h.m4, m4/signed.m4.
7592         * m4/gettext.m4: Update to GNU gettext 0.16.
7593         * m4/intl.m4: New file, from GNU gettext.
7594         * m4/intldir.m4: New file, from GNU gettext.
7595         * config/srclist.txt: Update
7596
7597 2006-10-27  Eric Blake  <ebb9@byu.net>
7598
7599         * MODULES.html.sh: Document tempname.
7600         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
7601         dependencies.
7602         (Files): Move lib/tempname.c...
7603         * modules/tempname: ...to this new module.
7604         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
7605         (gl_PREREQ_TEMPNAME): Move...
7606         * m4/tempname.m4: ...to this new file.
7607         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
7608         * modules/sys_stat (Depends-on): Add stat-macros.
7609         * lib/stat_.h (includes): Pick up stat macros.
7610         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
7611         if stat macros are broken.
7612         * lib/tempname.c (includes): No need to include "stat-macros.h".
7613         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
7614         (direxists, __path_search) [!_LIBC]: Don't compile these in
7615         gnulib; the tmpdir module covers that.
7616         * lib/tempname.h: New file.
7617
7618 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
7619
7620         * COPYING: Explain how gnulib-tool converts licence headers.
7621         Almost all wording by Eric Blake.
7622
7623 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
7624
7625         * lib/mbchar.h (is_basic_table): Make read-only.
7626         * lib/mbchar.c (is_basic_table): Likewise.
7627         Reported by John Darrington.
7628
7629 2006-10-25  Bruno Haible  <bruno@clisp.org>
7630
7631         * lib/progname.h (set_program_name): Undefine before defining.
7632
7633 2006-10-25  Bruno Haible  <bruno@clisp.org>
7634
7635         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
7636         false for non-gcc C++ compilers.
7637         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
7638
7639 2006-10-24  Bruno Haible  <bruno@clisp.org>
7640
7641         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
7642         iconv implementations like Irix iconv.
7643
7644 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
7645
7646         * modules/vararrays: New file.
7647         * m4/vararrays.m4: New file, taken from diffutils.
7648         * MODULES.html.sh: New module vararrays.
7649
7650 2006-10-24  Karl Berry  <karl@gnu.org>
7651
7652         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
7653         Don't call GNU Unix.
7654
7655 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7656
7657         * users.txt: Add Libtool.
7658
7659         Sync from Libtool:
7660
7661         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
7662
7663         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
7664         to gnulib's policy of including config.h unconditionally.
7665
7666 2006-10-24  Bruno Haible  <bruno@clisp.org>
7667
7668         * modules/wcwidth (Files): Add m4/wint_t.m4.
7669         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
7670         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
7671
7672 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
7673
7674         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
7675         to pacify GCC with some -W flags enabled.  Problem reported by
7676         Bruno Haible.
7677
7678 2006-10-24  Jim Meyering  <jim@meyering.net>
7679
7680         * MODULES.html.sh: Remove uinttostr.  It's not a module.
7681         Reported by Karl Berry.
7682
7683 2006-10-23  Bruno Haible  <bruno@clisp.org>
7684
7685         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
7686
7687 2006-10-24  Bruno Haible  <bruno@clisp.org>
7688
7689         * lib/gl_list.h: Use C comment style, not C++ comment style.
7690
7691 2006-10-23  Eric Blake  <ebb9@byu.net>
7692
7693         * lib/getaddrinfo.c (includes): Add missing include.
7694
7695 2006-10-23  Bruno Haible  <bruno@clisp.org>
7696             Paul Eggert  <eggert@cs.ucla.edu>
7697
7698         Ability to rename obstack_free.
7699         * lib/obstack.h (__obstack_free): New macro. Declare instead of
7700         obstack_free.
7701         (obstack_free): Invoke the __obstack_free macro.
7702         * lib/obstack.c (obstack_free): Use __obstack_free macro.
7703
7704 2006-10-23  Bruno Haible  <bruno@clisp.org>
7705             Paul Eggert  <eggert@cs.ucla.edu>
7706
7707         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
7708         __argc, __argv from the declaration. (They are defined as macros on
7709         mingw.)
7710
7711 2006-10-22  Bruno Haible  <bruno@clisp.org>
7712
7713         * doc/gnulib-intro.texi: New file.
7714         * doc/gnulib.texi: Include it.
7715
7716 2006-10-21  Bruno Haible  <bruno@clisp.org>
7717
7718         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
7719         "Introduction", "Miscellanous Notes", "Particular Modules".
7720
7721 2006-10-21  Bruno Haible  <bruno@clisp.org>
7722
7723         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7724         Change mostlyclean-local rule to avoid sh syntax error from bash
7725         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
7726
7727 2006-10-23  Jim Meyering  <jim@meyering.net>
7728
7729         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
7730         in place of snprintf.
7731
7732         * modules/inttostr (Files): Add lib/uinttostr.c.
7733         * lib/uinttostr.c (inttostr): New file/function.
7734         * lib/inttostr.h (uinttostr): Declare.
7735         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
7736         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
7737         Add uinttostr.
7738         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
7739
7740 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
7741
7742         * lib/canonicalize.c (ELOOP): Define if not already defined.
7743         Problem reported by Bruno Haible in
7744         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
7745
7746 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
7747
7748         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
7749         Problem reported by Perry Smith and Ville Laurikari.
7750
7751         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
7752         uses.
7753
7754 2006-10-19  Bruno Haible  <bruno@clisp.org>
7755
7756         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
7757         for mingw.
7758
7759 2006-10-19  Bruno Haible  <bruno@clisp.org>
7760
7761         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
7762         Needed for mingw.
7763
7764 2006-10-19  Bruno Haible  <bruno@clisp.org>
7765
7766         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
7767
7768 2006-10-19  Bruno Haible  <bruno@clisp.org>
7769
7770         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
7771         it.
7772
7773 2006-10-19  Bruno Haible  <bruno@clisp.org>
7774
7775         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
7776         invocation.
7777
7778 2006-10-19  Bruno Haible  <bruno@clisp.org>
7779
7780         * gnulib-tool (func_create_testdir): Don't include ftruncate and
7781         mountlist by default.
7782
7783 2006-10-16  Bruno Haible  <bruno@clisp.org>
7784
7785         * lib/c-strstr.c: Include c-strstr.h.
7786
7787 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
7788
7789         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
7790         in a slash.
7791
7792 2006-10-18  Bruno Haible  <bruno@clisp.org>
7793
7794         * lib/lock.h [C++]: Wrap definitions in extern "C".
7795
7796 2006-10-18  Bruno Haible  <bruno@clisp.org>
7797
7798         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
7799         gl_LIBOBJS list.
7800
7801 2006-10-18  Bruno Haible  <bruno@clisp.org>
7802
7803         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
7804
7805 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
7806
7807         * lib/xstrtol.h: Include gettext.h.
7808         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
7809         Problem reported by Eric Blake.
7810         * modules/xstrtol (Depends-on): Add gettext-h.
7811
7812 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
7813
7814         * lib/strftime.c (advance): New macro.
7815         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
7816         incomplete type, so you can't add 0 to it.  Problem and patch
7817         reported by Eelco Dolstra for dietlibc.
7818
7819 2006-10-18  Jim Meyering  <jim@meyering.net>
7820
7821         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
7822         type for a local, and rename it: s/up/user_proc/.
7823
7824 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
7825
7826         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
7827         READ_UTMP_USER_PROCESS.
7828         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
7829
7830 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
7831
7832         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
7833         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
7834
7835 2006-10-17  Eric Blake  <ebb9@byu.net>
7836
7837         * lib/sigprocmask.c (sigprocmask): Fix typo.
7838
7839         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
7840
7841         * modules/clean-temp (Makefile.am): Don't add to make output...
7842         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
7843         config.h.
7844
7845 2006-10-17  Bruno Haible  <bruno@clisp.org>
7846
7847         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
7848         differently if DEFAULT_TEXT_DOMAIN is set.
7849
7850 2006-10-16  Bruno Haible  <bruno@clisp.org>
7851
7852         * lib/clean-temp.c: Include fwriteerror.h.
7853
7854 2006-10-16  Bruno Haible  <bruno@clisp.org>
7855
7856         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
7857
7858 2006-10-16  Bruno Haible  <bruno@clisp.org>
7859
7860         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
7861         * lib/sigprocmask.h: Include <sys/types.h>.
7862         (sigset_t): Use the system's definition if present.
7863
7864 2006-10-17  Eric Blake  <ebb9@byu.net>
7865
7866         * lib/xvasprintf.c (includes): Assume config.h.
7867         * lib/xasprintf.c (includes): Likewise.
7868
7869 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
7870
7871         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
7872         at least as wide as intmax_t.
7873
7874 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
7875
7876         (Imported from Automake.)
7877         * build-aux/gnupload: Update to version 1.1 of directive file.
7878
7879 2006-10-16  Eric Blake  <ebb9@byu.net>
7880
7881         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
7882         match Automake 1.10a.
7883
7884 2006-10-14  Bruno Haible  <bruno@clisp.org>
7885
7886         * modules/sigprocmask: New file.
7887         * lib/sigprocmask.h: New file.
7888         * lib/sigprocmask.c: New file.
7889         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
7890         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
7891         request sigprocmask.o.
7892         (gl_PREREQ_SIGPROCMASK): New macro.
7893         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
7894         (Depends-on): Add sigprocmask.
7895         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
7896         gt_SIGNALBLOCKING. Test for 'raise' only once.
7897         * lib/fatal-signal.c: Include sigprocmask.h.
7898         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
7899         unblock_fatal_signals): Define always.
7900         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
7901         sigprocmask.
7902
7903 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
7904
7905         Sync from Automake.
7906         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
7907         which incorrectly sets the mode of an existing destination
7908         directory.  In some cases the unpatched install-sh could do the
7909         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
7910         system.  We hope this is rare in practice, but it's clearly worth
7911         fixing.  Problem reported by Alex Unleashed in
7912         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
7913         Also, don't bother to check for -m bugs unless we're using -m;
7914         suggested by Stepan Kasal.
7915
7916 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7917
7918         Sync from Automake.
7919         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
7920         `-c' flag, so they appear at the same position as in %FASTDEP%
7921         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
7922         which ignores unknown options only after the first non-option.
7923         Bug report against M4 by Nelson H. F. Beebe.
7924
7925 2006-10-13  Jim Meyering  <jim@meyering.net>
7926
7927         Fix a bug in yesterday's change.
7928         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
7929         p->fts_statp->st_dev would be used uninitialized.
7930         Ensures that we always call fts_stat on the very first entry.
7931         Miklos Szeredi reported that find -xdev stopped working.
7932
7933 2006-10-12  Bruno Haible  <bruno@clisp.org>
7934
7935         * gnulib-tool (func_get_automake_snippet): Append an automatically
7936         computed EXTRA_DIST augmentation.
7937         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
7938         * modules/alloca-opt (Makefile.am): Likewise.
7939         * modules/allocsa (Makefile.am): Likewise.
7940         * modules/arcfour (Makefile.am): Likewise.
7941         * modules/arctwo (Makefile.am): Likewise.
7942         * modules/argmatch (Makefile.am): Likewise.
7943         * modules/argz (Makefile.am): Likewise.
7944         * modules/atexit (Makefile.am): Likewise.
7945         * modules/backupfile (Makefile.am): Likewise.
7946         * modules/byteswap (Makefile.am): Likewise.
7947         * modules/c-strtod (Makefile.am): Likewise.
7948         * modules/c-strtold (Makefile.am): Likewise.
7949         * modules/calloc (Makefile.am): Likewise.
7950         * modules/canon-host (Makefile.am): Likewise.
7951         * modules/canonicalize (Makefile.am): Likewise.
7952         * modules/chdir-long (Makefile.am): Likewise.
7953         * modules/chdir-safer (Makefile.am): Likewise.
7954         * modules/check-version (Makefile.am): Likewise.
7955         * modules/chown (Makefile.am): Likewise.
7956         * modules/cloexec (Makefile.am): Likewise.
7957         * modules/close-stream (Makefile.am): Likewise.
7958         * modules/closeout (Makefile.am): Likewise.
7959         * modules/crc (Makefile.am): Likewise.
7960         * modules/csharpexec (Makefile.am): Likewise.
7961         * modules/cycle-check (Makefile.am): Likewise.
7962         * modules/des (Makefile.am): Likewise.
7963         * modules/dev-ino (Makefile.am): Likewise.
7964         * modules/dirfd (Makefile.am): Likewise.
7965         * modules/dirname (Makefile.am): Likewise.
7966         * modules/dup2 (Makefile.am): Likewise.
7967         * modules/eealloc (Makefile.am): Likewise.
7968         * modules/error (Makefile.am): Likewise.
7969         * modules/euidaccess (Makefile.am): Likewise.
7970         * modules/exclude (Makefile.am): Likewise.
7971         * modules/exitfail (Makefile.am): Likewise.
7972         * modules/fcntl-safer (Makefile.am): Likewise.
7973         * modules/fcntl (Makefile.am): Likewise.
7974         * modules/file-type (Makefile.am): Likewise.
7975         * modules/fileblocks (Makefile.am): Likewise.
7976         * modules/filemode (Makefile.am): Likewise.
7977         * modules/filenamecat (Makefile.am): Likewise.
7978         * modules/fnmatch (Makefile.am): Likewise.
7979         * modules/fopen-safer (Makefile.am): Likewise.
7980         * modules/fpending (Makefile.am): Likewise.
7981         * modules/fprintftime (Makefile.am): Likewise.
7982         * modules/free (Makefile.am): Likewise.
7983         * modules/fsusage (Makefile.am): Likewise.
7984         * modules/ftruncate (Makefile.am): Likewise.
7985         * modules/fts (Makefile.am): Likewise.
7986         * modules/gc-arcfour (Makefile.am): Likewise.
7987         * modules/gc-des (Makefile.am): Likewise.
7988         * modules/gc-hmac-md5 (Makefile.am): Likewise.
7989         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
7990         * modules/gc-md4 (Makefile.am): Likewise.
7991         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
7992         * modules/gc-sha1 (Makefile.am): Likewise.
7993         * modules/gc (Makefile.am): Likewise.
7994         * modules/getaddrinfo (Makefile.am): Likewise.
7995         * modules/getcwd (Makefile.am): Likewise.
7996         * modules/getdelim (Makefile.am): Likewise.
7997         * modules/getdomainname (Makefile.am): Likewise.
7998         * modules/getgroups (Makefile.am): Likewise.
7999         * modules/gethostname (Makefile.am): Likewise.
8000         * modules/gethrxtime (Makefile.am): Likewise.
8001         * modules/getline (Makefile.am): Likewise.
8002         * modules/getloadavg (Makefile.am): Likewise.
8003         * modules/getlogin_r (Makefile.am): Likewise.
8004         * modules/getndelim2 (Makefile.am): Likewise.
8005         * modules/getopt (Makefile.am): Likewise.
8006         * modules/getpagesize (Makefile.am): Likewise.
8007         * modules/getpass-gnu (Makefile.am): Likewise.
8008         * modules/getpass (Makefile.am): Likewise.
8009         * modules/getsubopt (Makefile.am): Likewise.
8010         * modules/gettime (Makefile.am): Likewise.
8011         * modules/gettimeofday (Makefile.am): Likewise.
8012         * modules/getugroups (Makefile.am): Likewise.
8013         * modules/getusershell (Makefile.am): Likewise.
8014         * modules/glob (Makefile.am): Likewise.
8015         * modules/group-member (Makefile.am): Likewise.
8016         * modules/hard-locale (Makefile.am): Likewise.
8017         * modules/hash (Makefile.am): Likewise.
8018         * modules/hmac-md5 (Makefile.am): Likewise.
8019         * modules/hmac-sha1 (Makefile.am): Likewise.
8020         * modules/human (Makefile.am): Likewise.
8021         * modules/idcache (Makefile.am): Likewise.
8022         * modules/imaxabs (Makefile.am): Likewise.
8023         * modules/imaxdiv (Makefile.am): Likewise.
8024         * modules/inet_ntop (Makefile.am): Likewise.
8025         * modules/inet_pton (Makefile.am): Likewise.
8026         * modules/intprops (Makefile.am): Likewise.
8027         * modules/inttostr (Makefile.am): Likewise.
8028         * modules/inttypes (Makefile.am): Likewise.
8029         * modules/isapipe (Makefile.am): Likewise.
8030         * modules/javaversion (Makefile.am): Likewise.
8031         * modules/lchmod (Makefile.am): Likewise.
8032         * modules/lchown (Makefile.am): Likewise.
8033         * modules/localcharset (Makefile.am): Likewise.
8034         * modules/long-options (Makefile.am): Likewise.
8035         * modules/lstat (Makefile.am): Likewise.
8036         * modules/malloc (Makefile.am): Likewise.
8037         * modules/mathl (Makefile.am): Likewise.
8038         * modules/mbchar (Makefile.am): Likewise.
8039         * modules/md2 (Makefile.am): Likewise.
8040         * modules/md4 (Makefile.am): Likewise.
8041         * modules/md5 (Makefile.am): Likewise.
8042         * modules/memcasecmp (Makefile.am): Likewise.
8043         * modules/memchr (Makefile.am): Likewise.
8044         * modules/memcmp (Makefile.am): Likewise.
8045         * modules/memcoll (Makefile.am): Likewise.
8046         * modules/memcpy (Makefile.am): Likewise.
8047         * modules/memmem (Makefile.am): Likewise.
8048         * modules/memmove (Makefile.am): Likewise.
8049         * modules/mempcpy (Makefile.am): Likewise.
8050         * modules/memrchr (Makefile.am): Likewise.
8051         * modules/memset (Makefile.am): Likewise.
8052         * modules/memxor (Makefile.am): Likewise.
8053         * modules/mkancesdirs (Makefile.am): Likewise.
8054         * modules/mkdir-p (Makefile.am): Likewise.
8055         * modules/mkdir (Makefile.am): Likewise.
8056         * modules/mkdtemp (Makefile.am): Likewise.
8057         * modules/mkstemp (Makefile.am): Likewise.
8058         * modules/mktime (Makefile.am): Likewise.
8059         * modules/modechange (Makefile.am): Likewise.
8060         * modules/mountlist (Makefile.am): Likewise.
8061         * modules/nanosleep (Makefile.am): Likewise.
8062         * modules/obstack (Makefile.am): Likewise.
8063         * modules/openat (Makefile.am): Likewise.
8064         * modules/pagealign_alloc (Makefile.am): Likewise.
8065         * modules/pathmax (Makefile.am): Likewise.
8066         * modules/physmem (Makefile.am): Likewise.
8067         * modules/poll (Makefile.am): Likewise.
8068         * modules/posixtm (Makefile.am): Likewise.
8069         * modules/posixver (Makefile.am): Likewise.
8070         * modules/putenv (Makefile.am): Likewise.
8071         * modules/quote (Makefile.am): Likewise.
8072         * modules/quotearg (Makefile.am): Likewise.
8073         * modules/raise (Makefile.am): Likewise.
8074         * modules/read-file (Makefile.am): Likewise.
8075         * modules/readline (Makefile.am): Likewise.
8076         * modules/readlink (Makefile.am): Likewise.
8077         * modules/readtokens (Makefile.am): Likewise.
8078         * modules/readutmp (Makefile.am): Likewise.
8079         * modules/realloc (Makefile.am): Likewise.
8080         * modules/regex (Makefile.am): Likewise.
8081         * modules/rename-dest-slash (Makefile.am): Likewise.
8082         * modules/rename (Makefile.am): Likewise.
8083         * modules/rijndael (Makefile.am): Likewise.
8084         * modules/rmdir (Makefile.am): Likewise.
8085         * modules/rpmatch (Makefile.am): Likewise.
8086         * modules/safe-read (Makefile.am): Likewise.
8087         * modules/safe-write (Makefile.am): Likewise.
8088         * modules/same-inode (Makefile.am): Likewise.
8089         * modules/same (Makefile.am): Likewise.
8090         * modules/save-cwd (Makefile.am): Likewise.
8091         * modules/savedir (Makefile.am): Likewise.
8092         * modules/setenv (Makefile.am): Likewise.
8093         * modules/settime (Makefile.am): Likewise.
8094         * modules/sha1 (Makefile.am): Likewise.
8095         * modules/sig2str (Makefile.am): Likewise.
8096         * modules/snprintf (Makefile.am): Likewise.
8097         * modules/stat-macros (Makefile.am): Likewise.
8098         * modules/stat-time (Makefile.am): Likewise.
8099         * modules/stdbool (Makefile.am): Likewise.
8100         * modules/stdint (Makefile.am): Likewise.
8101         * modules/stdlib-safer (Makefile.am): Likewise.
8102         * modules/stpcpy (Makefile.am): Likewise.
8103         * modules/stpncpy (Makefile.am): Likewise.
8104         * modules/strcase (Makefile.am): Likewise.
8105         * modules/strcasestr (Makefile.am): Likewise.
8106         * modules/strchrnul (Makefile.am): Likewise.
8107         * modules/strcspn (Makefile.am): Likewise.
8108         * modules/strdup (Makefile.am): Likewise.
8109         * modules/strerror (Makefile.am): Likewise.
8110         * modules/strftime (Makefile.am): Likewise.
8111         * modules/strndup (Makefile.am): Likewise.
8112         * modules/strnlen (Makefile.am): Likewise.
8113         * modules/strpbrk (Makefile.am): Likewise.
8114         * modules/strsep (Makefile.am): Likewise.
8115         * modules/strstr (Makefile.am): Likewise.
8116         * modules/strtod (Makefile.am): Likewise.
8117         * modules/strtoimax (Makefile.am): Likewise.
8118         * modules/strtok_r (Makefile.am): Likewise.
8119         * modules/strtol (Makefile.am): Likewise.
8120         * modules/strtoll (Makefile.am): Likewise.
8121         * modules/strtoul (Makefile.am): Likewise.
8122         * modules/strtoull (Makefile.am): Likewise.
8123         * modules/strtoumax (Makefile.am): Likewise.
8124         * modules/strverscmp (Makefile.am): Likewise.
8125         * modules/sys_socket (Makefile.am): Likewise.
8126         * modules/sys_stat (Makefile.am): Likewise.
8127         * modules/sysexits (Makefile.am): Likewise.
8128         * modules/time_r (Makefile.am): Likewise.
8129         * modules/timegm (Makefile.am): Likewise.
8130         * modules/timespec (Makefile.am): Likewise.
8131         * modules/tmpfile-safer (Makefile.am): Likewise.
8132         * modules/trim (Makefile.am): Likewise.
8133         * modules/unistd-safer (Makefile.am): Likewise.
8134         * modules/unlinkdir (Makefile.am): Likewise.
8135         * modules/unlocked-io (Makefile.am): Likewise.
8136         * modules/userspec (Makefile.am): Likewise.
8137         * modules/utime (Makefile.am): Likewise.
8138         * modules/utimecmp (Makefile.am): Likewise.
8139         * modules/utimens (Makefile.am): Likewise.
8140         * modules/vasnprintf (Makefile.am): Likewise.
8141         * modules/vasprintf (Makefile.am): Likewise.
8142         * modules/vsnprintf (Makefile.am): Likewise.
8143         * modules/xalloc (Makefile.am): Likewise.
8144         * modules/xgetcwd (Makefile.am): Likewise.
8145         * modules/xnanosleep (Makefile.am): Likewise.
8146         * modules/xreadlink (Makefile.am): Likewise.
8147         * modules/xstrtod (Makefile.am): Likewise.
8148         * modules/xstrtol (Makefile.am): Likewise.
8149         * modules/xstrtold (Makefile.am): Likewise.
8150         * modules/yesno (Makefile.am): Likewise.
8151         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
8152
8153 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
8154
8155         * modules/error (Makefile.am): Distribute files through
8156         EXTRA_DIST, not lib_SOURCES.
8157
8158 2006-10-12  Eric Blake  <ebb9@byu.net>
8159
8160         * modules/error (Makefile.am): Distribute files in /lib.
8161         * modules/obstack (Makefile.am): Likewise.
8162
8163 2006-10-12  Bruno Haible  <bruno@clisp.org>
8164
8165         * modules/acl (Makefile.am): Distribute all files in lib/ through
8166         EXTRA_DIST.
8167         * modules/arcfour (Makefile.am): Likewise.
8168         * modules/arctwo (Makefile.am): Likewise.
8169         * modules/argmatch (Makefile.am): Likewise.
8170         * modules/argz (Makefile.am): Likewise.
8171         * modules/atexit (Makefile.am): Likewise.
8172         * modules/backupfile (Makefile.am): Likewise.
8173         * modules/c-strtod (Makefile.am): Likewise.
8174         * modules/c-strtold (Makefile.am): Likewise.
8175         * modules/calloc (Makefile.am): Likewise.
8176         * modules/canon-host (Makefile.am): Likewise.
8177         * modules/canonicalize (Makefile.am): Likewise.
8178         * modules/chdir-long (Makefile.am): Likewise.
8179         * modules/chdir-safer (Makefile.am): Likewise.
8180         * modules/check-version (Makefile.am): Likewise.
8181         * modules/chown (Makefile.am): Likewise.
8182         * modules/cloexec (Makefile.am): Likewise.
8183         * modules/close-stream (Makefile.am): Likewise.
8184         * modules/closeout (Makefile.am): Likewise.
8185         * modules/crc (Makefile.am): Likewise.
8186         * modules/cycle-check (Makefile.am): Likewise.
8187         * modules/des (Makefile.am): Likewise.
8188         * modules/dirfd (Makefile.am): Likewise.
8189         * modules/dirname (Makefile.am): Likewise.
8190         * modules/dup2 (Makefile.am): Likewise.
8191         * modules/euidaccess (Makefile.am): Likewise.
8192         * modules/exclude (Makefile.am): Likewise.
8193         * modules/exitfail (Makefile.am): Likewise.
8194         * modules/fcntl-safer (Makefile.am): Likewise.
8195         * modules/file-type (Makefile.am): Likewise.
8196         * modules/fileblocks (Makefile.am): Likewise.
8197         * modules/filemode (Makefile.am): Likewise.
8198         * modules/filenamecat (Makefile.am): Likewise.
8199         * modules/fnmatch (Makefile.am): Likewise.
8200         * modules/fopen-safer (Makefile.am): Likewise.
8201         * modules/fpending (Makefile.am): Likewise.
8202         * modules/fprintftime (Makefile.am): Likewise.
8203         * modules/free (Makefile.am): Likewise.
8204         * modules/fsusage (Makefile.am): Likewise.
8205         * modules/ftruncate (Makefile.am): Likewise.
8206         * modules/fts (Makefile.am): Likewise.
8207         * modules/gc (Makefile.am): Likewise.
8208         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
8209         * modules/getaddrinfo (Makefile.am): Likewise.
8210         * modules/getcwd (Makefile.am): Likewise.
8211         * modules/getdelim (Makefile.am): Likewise.
8212         * modules/getdomainname (Makefile.am): Likewise.
8213         * modules/getgroups (Makefile.am): Likewise.
8214         * modules/gethostname (Makefile.am): Likewise.
8215         * modules/gethrxtime (Makefile.am): Likewise.
8216         * modules/getline (Makefile.am): Likewise.
8217         * modules/getloadavg (Makefile.am): Likewise.
8218         * modules/getlogin_r (Makefile.am): Likewise.
8219         * modules/getopt (Makefile.am): Likewise.
8220         * modules/getpass (Makefile.am): Likewise.
8221         * modules/getpass-gnu (Makefile.am): Likewise.
8222         * modules/getsubopt (Makefile.am): Likewise.
8223         * modules/gettime (Makefile.am): Likewise.
8224         * modules/gettimeofday (Makefile.am): Likewise.
8225         * modules/getugroups (Makefile.am): Likewise.
8226         * modules/getusershell (Makefile.am): Likewise.
8227         * modules/glob (Makefile.am): Likewise.
8228         * modules/group-member (Makefile.am): Likewise.
8229         * modules/hard-locale (Makefile.am): Likewise.
8230         * modules/hash (Makefile.am): Likewise.
8231         * modules/hmac-md5 (Makefile.am): Likewise.
8232         * modules/hmac-sha1 (Makefile.am): Likewise.
8233         * modules/human (Makefile.am): Likewise.
8234         * modules/idcache (Makefile.am): Likewise.
8235         * modules/imaxabs (Makefile.am): Likewise.
8236         * modules/imaxdiv (Makefile.am): Likewise.
8237         * modules/inet_ntop (Makefile.am): Likewise.
8238         * modules/inet_pton (Makefile.am): Likewise.
8239         * modules/inttostr (Makefile.am): Likewise.
8240         * modules/isapipe (Makefile.am): Likewise.
8241         * modules/lchown (Makefile.am): Likewise.
8242         * modules/long-options (Makefile.am): Likewise.
8243         * modules/lstat (Makefile.am): Likewise.
8244         * modules/malloc (Makefile.am): Likewise.
8245         * modules/mathl (Makefile.am): Likewise.
8246         * modules/mbchar (Makefile.am): Likewise.
8247         * modules/md2 (Makefile.am): Likewise.
8248         * modules/md4 (Makefile.am): Likewise.
8249         * modules/md5 (Makefile.am): Likewise.
8250         * modules/memcasecmp (Makefile.am): Likewise.
8251         * modules/memchr (Makefile.am): Likewise.
8252         * modules/memcmp (Makefile.am): Likewise.
8253         * modules/memcoll (Makefile.am): Likewise.
8254         * modules/memcpy (Makefile.am): Likewise.
8255         * modules/memmem (Makefile.am): Likewise.
8256         * modules/memmove (Makefile.am): Likewise.
8257         * modules/mempcpy (Makefile.am): Likewise.
8258         * modules/memrchr (Makefile.am): Likewise.
8259         * modules/memset (Makefile.am): Likewise.
8260         * modules/memxor (Makefile.am): Likewise.
8261         * modules/mkancesdirs (Makefile.am): Likewise.
8262         * modules/mkdir (Makefile.am): Likewise.
8263         * modules/mkdir-p (Makefile.am): Likewise.
8264         * modules/mkdtemp (Makefile.am): Likewise.
8265         * modules/mkstemp (Makefile.am): Likewise.
8266         * modules/mktime (Makefile.am): Likewise.
8267         * modules/modechange (Makefile.am): Likewise.
8268         * modules/mountlist (Makefile.am): Likewise.
8269         * modules/nanosleep (Makefile.am): Likewise.
8270         * modules/openat (Makefile.am): Likewise.
8271         * modules/pagealign_alloc (Makefile.am): Likewise.
8272         * modules/physmem (Makefile.am): Likewise.
8273         * modules/poll (Makefile.am): Likewise.
8274         * modules/posixtm (Makefile.am): Likewise.
8275         * modules/posixver (Makefile.am): Likewise.
8276         * modules/putenv (Makefile.am): Likewise.
8277         * modules/quote (Makefile.am): Likewise.
8278         * modules/quotearg (Makefile.am): Likewise.
8279         * modules/raise (Makefile.am): Likewise.
8280         * modules/read-file (Makefile.am): Likewise.
8281         * modules/readline (Makefile.am): Likewise.
8282         * modules/readlink (Makefile.am): Likewise.
8283         * modules/readtokens (Makefile.am): Likewise.
8284         * modules/readutmp (Makefile.am): Likewise.
8285         * modules/realloc (Makefile.am): Likewise.
8286         * modules/regex (Makefile.am): Likewise.
8287         * modules/rename (Makefile.am): Likewise.
8288         * modules/rename-dest-slash (Makefile.am): Likewise.
8289         * modules/rijndael (Makefile.am): Likewise.
8290         * modules/rmdir (Makefile.am): Likewise.
8291         * modules/rpmatch (Makefile.am): Likewise.
8292         * modules/safe-read (Makefile.am): Likewise.
8293         * modules/safe-write (Makefile.am): Likewise.
8294         * modules/same (Makefile.am): Likewise.
8295         * modules/save-cwd (Makefile.am): Likewise.
8296         * modules/savedir (Makefile.am): Likewise.
8297         * modules/setenv (Makefile.am): Likewise.
8298         * modules/settime (Makefile.am): Likewise.
8299         * modules/sha1 (Makefile.am): Likewise.
8300         * modules/sig2str (Makefile.am): Likewise.
8301         * modules/snprintf (Makefile.am): Likewise.
8302         * modules/stdlib-safer (Makefile.am): Likewise.
8303         * modules/stpcpy (Makefile.am): Likewise.
8304         * modules/stpncpy (Makefile.am): Likewise.
8305         * modules/strcase (Makefile.am): Likewise.
8306         * modules/strcasestr (Makefile.am): Likewise.
8307         * modules/strchrnul (Makefile.am): Likewise.
8308         * modules/strcspn (Makefile.am): Likewise.
8309         * modules/strdup (Makefile.am): Likewise.
8310         * modules/strerror (Makefile.am): Likewise.
8311         * modules/strftime (Makefile.am): Likewise.
8312         * modules/strndup (Makefile.am): Likewise.
8313         * modules/strnlen (Makefile.am): Likewise.
8314         * modules/strpbrk (Makefile.am): Likewise.
8315         * modules/strsep (Makefile.am): Likewise.
8316         * modules/strstr (Makefile.am): Likewise.
8317         * modules/strtod (Makefile.am): Likewise.
8318         * modules/strtoimax (Makefile.am): Likewise.
8319         * modules/strtok_r (Makefile.am): Likewise.
8320         * modules/strtol (Makefile.am): Likewise.
8321         * modules/strtoll (Makefile.am): Likewise.
8322         * modules/strtoul (Makefile.am): Likewise.
8323         * modules/strtoull (Makefile.am): Likewise.
8324         * modules/strtoumax (Makefile.am): Likewise.
8325         * modules/strverscmp (Makefile.am): Likewise.
8326         * modules/time_r (Makefile.am): Likewise.
8327         * modules/timegm (Makefile.am): Likewise.
8328         * modules/tmpfile-safer (Makefile.am): Likewise.
8329         * modules/unistd-safer (Makefile.am): Likewise.
8330         * modules/unlinkdir (Makefile.am): Likewise.
8331         * modules/userspec (Makefile.am): Likewise.
8332         * modules/utime (Makefile.am): Likewise.
8333         * modules/utimecmp (Makefile.am): Likewise.
8334         * modules/utimens (Makefile.am): Likewise.
8335         * modules/vasnprintf (Makefile.am): Likewise.
8336         * modules/vasprintf (Makefile.am): Likewise.
8337         * modules/vsnprintf (Makefile.am): Likewise.
8338         * modules/xalloc (Makefile.am): Likewise.
8339         * modules/xgetcwd (Makefile.am): Likewise.
8340         * modules/xnanosleep (Makefile.am): Likewise.
8341         * modules/xreadlink (Makefile.am): Likewise.
8342         * modules/xstrtod (Makefile.am): Likewise.
8343         * modules/xstrtol (Makefile.am): Likewise.
8344         * modules/xstrtold (Makefile.am): Likewise.
8345         * modules/yesno (Makefile.am): Likewise.
8346
8347 2006-10-12  Jim Meyering  <jim@meyering.net>
8348
8349         * m4/getloadavg.m4: Revert the change below.
8350
8351         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
8352         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
8353         fail with a symlink, which is what coreutils' ./bootstrap now
8354         creates by default.
8355
8356 2006-10-12  Bruno Haible  <bruno@clisp.org>
8357
8358         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
8359         mingw.
8360         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
8361         MSVC and mingw explicitly.
8362
8363 2006-10-11  Simon Josefsson  <jas@extundo.com>
8364             Bruno Haible  <bruno@clisp.org>
8365
8366         Add support for multiple gnulib-tool invocations in the scope of a
8367         single configure.ac file.
8368         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
8369         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
8370         with the same contents as the _LIBADD variable.
8371         (func_emit_initmacro_start, func_emit_initmacro_end,
8372         func_emit_initmacro_done): New functions.
8373         (func_import, func_create_testdir): Invoke them. Allow the identifiers
8374         gl_LIBOBJS and gl_LTLIBOBJS.
8375
8376 2006-10-11  Bruno Haible  <bruno@clisp.org>
8377
8378         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
8379         (func_create_testdir): Don't create po/Makefile.am, don't invoke
8380         autoreconf. Instead, invoke autopoint explicitly but move back the
8381         *.m4 files from gnulib.
8382
8383 2006-10-11  Bruno Haible  <bruno@clisp.org>
8384
8385         * gnulib-tool (func_usage): Make module names after --create-testdir
8386         optional.
8387         (func_create_testdir): If no module was specified, use nearly all
8388         modules.
8389
8390 2006-10-12  Jim Meyering  <jim@meyering.net>
8391
8392         Big performance improvement for fts-based tools that use FTS_NOSTAT.
8393         Avoid spurious inode-mismatch problems on non-POSIX file systems.
8394         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
8395         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
8396         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
8397         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
8398         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
8399         (fts_set_stat_required): New function.
8400         (fts_open): Defer the calls to fts_stat, if possible or requested.
8401         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
8402         into fts_stat itself.
8403         (fts_read): Perform any required (deferred) fts_stat call.
8404         (fts_build): Likewise, for the directory we're about to open and read.
8405         In the readdir loop, carefully decide whether each entry will require
8406         an eventual call to fts_stat, using dirent.d_type info if available.
8407         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
8408         a command line argument into this function.  Update all callers.
8409         Map a return value of FTS_DOT to FTS_D for a command line argument.
8410         * modules/fts (Depends-on): Add d-type.  Alphabetize.
8411         Thanks to Miklos Szeredi for his tenacity and for the initial
8412         bug report about "find" failing on a FUSE-based file system.
8413
8414         * lib/fts.c (fts_open): Use consistent indentation.
8415
8416 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
8417
8418         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
8419         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
8420         reported by Jim Meyering.  All uses of cache variables renamed
8421         to match Autoconf's.
8422         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
8423         the other one.
8424
8425         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
8426         Fix misspelling in diagnostic.
8427
8428 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
8429
8430         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
8431         defined.  Problem reported by Matthew Woehlke.
8432
8433         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
8434         Add support for Tandem NonStop R series.
8435         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
8436         Use new macro.
8437
8438         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
8439         (has_trailing_slash): Omit size arg; all callers changed.
8440         Omit 'inline', since it doesn't help performance and we'd
8441         need to configure it.
8442         Don't count //, ///, etc. as having a trailing slash.
8443         As a side effect, this removes a C99ism reported by Matthew Woehlke.
8444         (rpl_rename_dest_slash): On failure, use rename's errno rather
8445         than (in some cases) an incorrect or junk errno.
8446         Simplify code by removing need to compute length; this does
8447         cause it to make two passes instead of one over the file name,
8448         but it's worth it.
8449
8450         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
8451         change, since Autoconf's version may no longer be appropriate now
8452         that we are using CVS Autoconf's version.  Add support for Tandem.
8453
8454 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
8455             Bruno Haible  <bruno@clisp.org>
8456
8457         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
8458         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
8459         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
8460         gl_AC_TYPE_LONG_LONG.
8461
8462         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
8463         instead of HAVE_LONG_LONG.
8464         * lib/printf-args.c (printf_fetchargs): Likewise.
8465         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
8466         * lib/vasnprintf.c (VASNPRINTF): Likewise.
8467         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
8468         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
8469         gl_AC_TYPE_LONG_LONG.
8470
8471 2006-10-11  Bruno Haible  <bruno@clisp.org>
8472
8473         * m4/longlong.m4: Add comments.
8474         * m4/ulonglong.m4: Likewise.
8475
8476 2006-10-10  Bruno Haible  <bruno@clisp.org>
8477
8478         Make it possible to #define stpcpy, strdup to aliases.
8479         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
8480         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
8481
8482 2006-10-10  Bruno Haible  <bruno@clisp.org>
8483
8484         Make it possible to #define gcd to an alias.
8485         * lib/gcd.c: Include config.h.
8486
8487 2006-10-10  Bruno Haible  <bruno@clisp.org>
8488
8489         Make it possible to #define c_isascii to an alias.
8490         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
8491         defined. Undefine the macros before defining them, to avoid gcc
8492         warnings.
8493         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
8494         define NO_C_CTYPE_MACROS early.
8495
8496 2006-10-10  Bruno Haible  <bruno@clisp.org>
8497
8498         Make it possible to #define set_program_name to an alias.
8499         * lib/progname.c: Don't undefine set_program_name; instead, undefine
8500         ENABLE_RELOCATABLE early.
8501
8502 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
8503
8504         Port to Tandem NSK OSS, which has 64-bit signed int but at most
8505         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
8506         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
8507         More generally, don't assume that 64-bit signed int is available
8508         if unsigned int is, and vice versa.
8509         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
8510         unsigned symbols, not on their signed counterparts.
8511         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
8512         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
8513         (UINT64_C, UINTMAX_C):
8514         Likewise.
8515         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
8516         unsigned counterparts.
8517         (Have_long_long, Unsigned): New macros.
8518         (Int): Renamed from INT.
8519         (strtoimax): Use the new macros.
8520         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
8521         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
8522         * modules/inttypes (inttypes.h): Substitute
8523         HAVE_UNSIGNED_LONG_LONG_INT.
8524         * modules/stdint (stdint.h): Likewise.
8525         (Files): Add m4/ulonglong.m4.
8526
8527 2006-10-10  Bruno Haible  <bruno@clisp.org>
8528
8529         Fix a gcc -Wshadow warning.
8530         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
8531         to 'bucket'.
8532         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
8533         gl_linked_indexof_from_to): Likewise.
8534         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
8535         Likewise.
8536         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
8537         Likewise.
8538         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
8539         Reported by Eric Blake.
8540
8541 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
8542
8543         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
8544         for NetBSD.  Problem reported by Bruno Haible.
8545
8546 2006-10-09  Jim Meyering  <jim@meyering.net>
8547
8548         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
8549         Patch from Bruno Haible.
8550
8551 2006-10-09  Jim Meyering  <jim@meyering.net>
8552
8553         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
8554         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
8555         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
8556
8557 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
8558
8559         Don't include <config.h> twice; this doesn't work in some cases,
8560         e.g., when config.h has "#define intmax_t long long int" and
8561         we include <config.h>, <inttypes.h>, <config.h> in that order.
8562         Problem reported by Matthew Woehlke in:
8563         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
8564         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
8565         * lib/fts-cycle.c: Don't include config.h.
8566         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
8567         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
8568         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
8569         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
8570         inttypes.h.
8571         * lib/xstrtoumax.c: Likewise.
8572         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
8573         __strtol and the like, so that this module is more like its siblings.
8574         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
8575         Remove; no longer needed now that we assume gnulib inttypes.h.
8576
8577 2006-10-08  Bruno Haible  <bruno@clisp.org>
8578
8579         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
8580         option.
8581
8582 2006-10-07  Jim Meyering  <jim@meyering.net>
8583
8584         * modules/inttypes (inttypes.h): Revert what seems to have been
8585         an inadvertent part of today's change: use "|", not "/" in the
8586         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
8587
8588 2006-10-07  Bruno Haible  <bruno@clisp.org>
8589
8590         * modules/sublist: New file.
8591
8592 2006-10-07  Bruno Haible  <bruno@clisp.org>
8593
8594         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
8595         * modules/argz (argz.h): Likewise.
8596         * modules/arpa_inet (arpa/inet.h): Likewise.
8597         * modules/byteswap (byteswap.h): Likewise.
8598         * modules/configmake (configmake.h): Likewise.
8599         * modules/fcntl (fcntl.h): Likewise.
8600         * modules/fnmatch (fnmatch.h): Likewise.
8601         * modules/getopt (getopt.h): Likewise.
8602         * modules/glob (glob.h): Likewise.
8603         * modules/inttypes (inttypes.h): Likewise.
8604         * modules/netinet_in (netinet/in.h): Likewise.
8605         * modules/poll (poll.h): Likewise.
8606         * modules/stdbool (stdbool.h): Likewise.
8607         * modules/stdint (stdint.h): Likewise.
8608         * modules/sys_select (sys/select.h): Likewise.
8609         * modules/sys_socket (sys/socket.h): Likewise.
8610         * modules/sys_stat (sys/stat.h): Likewise.
8611         * modules/sysexits (sysexits.h): Likewise.
8612         * modules/unistd (unistd.h): Likewise.
8613         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8614         Add a "DO NOT EDIT" comment to the generated file.
8615         (func_import): Likewise for gnulib-comp.m4.
8616
8617 2006-10-07  Bruno Haible  <bruno@clisp.org>
8618
8619         * lib/gl_sublist.h: New file.
8620         * lib/gl_sublist.c: New file.
8621
8622 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
8623
8624         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
8625         name (relative to the original working directory) and the file
8626         name component (relative to the temporary working directory).  All
8627         callers changed.
8628         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
8629         * lib/mkdir-p.c (make_dir_parents): Likewise.
8630         * lib/mkdir-p.h (make_dir_parents): Likewise.
8631
8632 2006-10-06  Eric Blake  <ebb9@byu.net>
8633
8634         Define several macros for use by the clean-temp module.
8635         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
8636         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
8637         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
8638
8639         * lib/clean-temp.h (close_stream_temp): New declaration.
8640         * lib/clean-temp.c (includes): Pull in headers according to what
8641         other modules are in use.
8642         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
8643
8644 2006-10-06  Bruno Haible  <bruno@clisp.org>
8645
8646         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
8647         instead of fopen, fwriteerror.
8648
8649 2006-10-06  Bruno Haible  <bruno@clisp.org>
8650
8651         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
8652         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
8653         int.
8654         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
8655         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
8656         Return an error indicator.
8657         Suggested by Eric Blake.
8658
8659 2006-10-06  Bruno Haible  <bruno@clisp.org>
8660
8661         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
8662         Reported by Eric Blake.
8663
8664 2006-10-06  Bruno Haible  <bruno@clisp.org>
8665
8666         * modules/closeout (Description): Mention stderr too.
8667
8668 2006-10-06  Bruno Haible  <bruno@clisp.org>
8669         and Paul Eggert  <eggert@cs.ucla.edu>
8670
8671         * lib/closeout.c (close_stdout): Also close stderr.
8672         * lib/closeout.h: Update comment.
8673
8674 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
8675
8676         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
8677         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
8678         * lib/dirchownmod.c: Include lchown.h.
8679         * lib/lchown.c: Don't include files that lchown.h now includes.
8680         Don't declare chown, since lchown.h now does that.
8681         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
8682         (lchown): Define to rpl_chown if lchown is declared but
8683         does not exist.  Declare using a prototype if lchown is not
8684         declared.  Add a copyright notice.
8685         * lib/mkstemp.h: Include <unistd.h>.
8686         * lib/openat.c: Include lchown.h.
8687
8688         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
8689         we now test for that separately.
8690         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
8691         rather than O_NOFOLLOW, when testing whether it's possible to
8692         avoid a race condition reliably.
8693         * lib/savewd.c (savewd_chdir): Likewise.
8694
8695         Remove macros that are no longer needed now that stdint.h is
8696         reliable.
8697         * lib/fsusage.c (UINTMAX_MAX): Remove.
8698         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
8699         * lib/utimecmp.c (SIZE_MAX): Remove.
8700
8701         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
8702
8703         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
8704         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
8705         O_NOATIME works.
8706
8707 2006-10-05  Bruno Haible  <bruno@clisp.org>
8708
8709         * lib/gl_list.h (gl_sortedlist_search_from_to,
8710         gl_sortedlist_indexof_from_to): New declarations.
8711         (gl_list_implementation): New fields sortedlist_search_from_to,
8712         sortedlist_indexof_from_to.
8713         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
8714         inline functions.
8715         * lib/gl_list.c (gl_sortedlist_search_from_to,
8716         gl_sortedlist_indexof_from_to): New functions.
8717         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
8718         function.
8719         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
8720         (gl_array_sortedlist_search_from_to): New function.
8721         (gl_array_list_implementation): Update.
8722         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
8723         function.
8724         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
8725         (gl_carray_sortedlist_search_from_to): New function.
8726         (gl_carray_list_implementation): Update.
8727         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
8728         gl_linked_sortedlist_indexof_from_to): New functions.
8729         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
8730         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
8731         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
8732         gl_tree_sortedlist_indexof_from_to): New functions.
8733         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
8734         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
8735         Update.
8736         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
8737         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
8738         Update.
8739
8740 2006-10-05  Bruno Haible  <bruno@clisp.org>
8741
8742         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
8743         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
8744         (struct gl_list_implementation): Add fields search_from_to,
8745         indexof_from_to. Remove fields search, indexof.
8746         (gl_list_search): Use the search_from_to method.
8747         (gl_list_search_from, gl_list_search_from_to): New functions.
8748         (gl_list_indexof): Use the indexof_from_to method.
8749         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
8750         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
8751         (gl_list_search_from, gl_list_search_from_to): New functions.
8752         (gl_list_indexof): Use the indexof_from_to method.
8753         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
8754         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
8755         gl_array_indexof. Add start_index, end_index arguments.
8756         (gl_array_search_from_to): Renamed from gl_array_search. Add
8757         start_index, end_index arguments.
8758         (gl_array_remove, gl_array_list_implementation): Update.
8759         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
8760         gl_carray_indexof. Add start_index, end_index arguments.
8761         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
8762         start_index, end_index arguments.
8763         (gl_carray_remove, gl_carray_list_implementation): Update.
8764         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
8765         gl_linked_search. Add start_index, end_index arguments.
8766         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
8767         start_index, end_index arguments.
8768         (gl_linked_remove): Update.
8769         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
8770         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
8771         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
8772         field to 'size_t'.
8773         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
8774         gl_tree_search. Add start_index, end_index arguments.
8775         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
8776         start_index, end_index arguments.
8777         (gl_tree_remove): Update.
8778         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
8779         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
8780         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
8781         function.
8782         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
8783         gl_tree_search. Add start_index, end_index arguments.
8784         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
8785         start_index, end_index arguments.
8786         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
8787         Update.
8788         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
8789
8790 2006-10-05  Bruno Haible  <bruno@clisp.org>
8791
8792         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
8793
8794         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
8795         fwriteerror_temp): New declarations.
8796         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
8797         (descriptors): New variable.
8798         (cleanup): First, close the descriptors.
8799         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
8800         fclose_temp, fwriteerror_temp): New functions.
8801
8802 2006-10-04  Jim Meyering  <jim@meyering.net>
8803
8804         * lib/fts.c (fts_open): Tiny comment change.
8805
8806 2006-10-04  Bruno Haible  <bruno@clisp.org>
8807
8808         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
8809         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
8810         gl_LOCK_BODY.
8811         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
8812         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
8813         gl_LOCK_EARLY_BODY.
8814         (gl_LOCK): Require gl_LOCK_BODY.
8815
8816 2006-10-04  Bruno Haible  <bruno@clisp.org>
8817
8818         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
8819         (gl_oset_search_atleast): New declaration.
8820         (struct gl_oset_implementation): Add field 'search_atleast'.
8821         (gl_oset_search_atleast): New inline function.
8822         * lib/gl_oset.c (gl_oset_search_atleast): New function.
8823         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
8824         (gl_array_oset_implementation): Update.
8825         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
8826         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
8827         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
8828
8829 2006-10-04  Bruno Haible  <bruno@clisp.org>
8830
8831         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
8832
8833 2006-10-03  Bruno Haible  <bruno@clisp.org>
8834
8835         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
8836         from gl_avltreehash_list_implementation.
8837
8838 2006-10-03  Bruno Haible  <bruno@clisp.org>
8839
8840         * lib/gl_oset.c (gl_oset_add): Fix return type.
8841
8842 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
8843
8844         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
8845
8846 2006-10-02  Eric Blake  <ebb9@byu.net>
8847
8848         * modules/strnlen (Depends-on): Add extensions.
8849
8850 2006-10-02  Eric Blake  <ebb9@byu.net>
8851
8852         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
8853         definition in 2.60+.
8854
8855 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
8856
8857         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
8858         checks.
8859
8860 2006-10-02  Bruno Haible  <bruno@clisp.org>
8861
8862         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
8863         to the AUTOMAKE_OPTIONS.
8864         Reported by Jim Meyering.
8865
8866 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
8867
8868         Work around bug in Solaris 10 /proc file system:
8869         /proc/self/fd/NNN/.. isn't the parent directory of
8870         the directory whose file descriptor is NNN.  This needs to
8871         be worked around at run time, not compile time, since a
8872         program might be built on Solaris 8, where things work, and
8873         run on Solaris 10.
8874         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
8875         to use the following interface instead:
8876         (OPENAT_BUFFER_SIZE): New macro.
8877         (openat_proc_name): New function.
8878         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
8879         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
8880         Likewise.
8881         * lib/openat-proc.c: New file.
8882         * modules/openat (Files): Add lib/openat-proc.c.
8883         (Depends-on): Add same-inode, stdbool.
8884         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
8885
8886 2006-09-29  Bruno Haible  <bruno@clisp.org>
8887
8888         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
8889         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
8890         argument. Set stdout_closed before testing for ferror, not after.
8891         (fwriteerror, fwriteerror_no_ebadf): New functions.
8892
8893 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8894
8895         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
8896
8897 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
8898
8899         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
8900         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
8901
8902 2006-09-28  Jim Meyering  <jim@meyering.net>
8903
8904         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
8905         Include <unistd.h>.
8906
8907 2006-09-28  Bruno Haible  <bruno@clisp.org>
8908
8909         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
8910         * modules/linkedhash-list (Depends-on): Likewise.
8911         * modules/rbtreehash-list (Depends-on): Likewise.
8912
8913 2006-09-28  Bruno Haible  <bruno@clisp.org>
8914
8915         * lib/strndup.h: Simplify the redefinition of strndup.
8916         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
8917         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
8918
8919 2006-09-28  Bruno Haible  <bruno@clisp.org>
8920
8921         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
8922         * lib/gl_linkedhash_list.c: Likewise.
8923         * lib/gl_rbtreehash_list.c: Likewise.
8924
8925 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
8926
8927         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
8928         getaddrinfo.
8929
8930         * lib/__fpending.h: Don't include <stdio_ext.h> unless
8931         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
8932         it causes <stdio_ext.h> to cause a compile-time error.
8933         Problem reported by Nelson H. F. Beebe.
8934         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
8935         of HAVE_DECL___PENDING.
8936
8937         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
8938         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
8939         declaration.
8940
8941 2006-09-27  Jim Meyering  <jim@meyering.net>
8942
8943         This file could end up with a definition for a function
8944         named __strndup, rather than rpl_strndup on a system with
8945         incomplete weak_alias support.
8946         * lib/strndup.c (strndup): Rename from __strndup.
8947         Remove #defines that used to map __strndup to strndup.
8948         Don't use K&R prototypes.
8949         Remove LIBC-related code, since this file is not sync'd with glibc.
8950         * lib/strndup.h: Revamp, accordingly.
8951         * m4/strndup.m4: Modernize.
8952
8953 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
8954
8955         * modules/savewd (Depends-on): Add 'raise'.
8956         * lib/savewd.c: Include <signal.h>, for 'raise'.
8957
8958 2006-09-26  Jim Meyering  <jim@meyering.net>
8959
8960         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
8961         when we detect Darwin 8.7.0's acl_get_file bug.
8962         Rearrange to perform the new (below) run-test while $LIBS
8963         contains any acl-related library.  Set USE_ACL at the end.
8964         (gl_ACL_GET_FILE): New function.
8965
8966 2006-09-26  Eric Blake  <ebb9@byu.net>
8967
8968         * lib/verror.c: Include <config.h> unconditionally.
8969
8970 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
8971
8972         * modules/clock-time (Maintainer): Add self.
8973         * modules/getlogin_r (Depends-on): Add extensions.
8974
8975 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8976
8977         * modules/clock-time: New module.
8978         * modules/nanosleep (Depends-on): Add clock-time.
8979         * modules/gethrxtime (Depends-on): Likewise.
8980         * modules/gettime (Depends-on): Likewise.
8981         * modules/settime (Depends-on): Likewise.
8982
8983         * modules/fts-lgpl: Depend on openat.
8984         * modules/mkancesdirs: Depend on savewd.
8985         * modules/mkdir-p: Likewise.
8986
8987 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8988
8989         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
8990
8991         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
8992         `gl_have_arbitrary_file_name_length_limit' to
8993         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
8994         actually works between configure runs.
8995
8996 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8997             Bruno Haible  <bruno@clisp.org>
8998
8999         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
9000
9001 2006-09-25  Jim Meyering  <jim@meyering.net>
9002
9003         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
9004         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
9005
9006 2006-09-25  Eric Blake  <ebb9@byu.net>
9007
9008         * gnulib-tool (func_import, func_create_testdir): Fix typos in
9009         exec's in 2006-09-18 patch when shuffling fds.
9010
9011 2006-09-25  Bruno Haible  <bruno@clisp.org>
9012
9013         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
9014         Reported by Jim Meyering.
9015
9016 2006-09-24  Jim Meyering  <jim@meyering.net>
9017
9018         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
9019         compare a pointer against a literal "0".  That caused failures with
9020         at least HP-UX's hpcc.
9021
9022 2006-09-22  Simon Josefsson  <jas@extundo.com>
9023
9024         * modules/gc-sha1:
9025         * modules/gc-md4:
9026         * modules/gc-hmac-sha1:
9027         * modules/gc-hmac-md5:
9028         * modules/gc-des:
9029         * modules/gc-arcfour: Distribute more files.
9030
9031 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9032
9033         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
9034         (gl_linked_iterator_from_to): Initialize struct completely.
9035         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
9036         (gl_tree_iterator_from_to): Likewise
9037         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
9038         * lib/gl_array_list.c [lint] (gl_array_iterator)
9039         (gl_array_iterator_from_to): Likewise.
9040         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
9041         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
9042         (gl_carray_iterator_from_to): Likewise.
9043
9044         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
9045         * lib/md4.c (md4_process_block): Remove unused variable.
9046         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
9047         parentheses for clarity.
9048
9049 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9050
9051         * modules/bison-i18n (Depends-on): Add gettext.
9052
9053 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9054
9055         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
9056         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
9057         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
9058         also add missing comma that caused broken test.
9059         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
9060         stdlib.h, for `abort'.
9061         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
9062         variables.
9063         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
9064         include unistd.h if present, for `rmdir'.
9065         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
9066         variables.
9067         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
9068         in the process include standard headers for prototypes.
9069         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
9070         gets declared on GNU/Linux.
9071         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
9072         unistd.h, for `rmdir'.
9073         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
9074
9075         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
9076         always true.
9077         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
9078
9079         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
9080
9081 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9082
9083         * gnulib-tool (func_version): Create output all at once.  This
9084         may help avoid triggering unnecessary SIGPIPEs, and at any
9085         rate it doesn't hurt.
9086
9087 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9088             Bruno Haible  <bruno@clisp.org>
9089
9090         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
9091         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
9092         * m4/signed.m4 (bh_C_SIGNED): Likewise.
9093
9094         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
9095         (gl_FUNC_VASPRINTF): Invoke it.
9096
9097 2006-09-22  Bruno Haible  <bruno@clisp.org>
9098
9099         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
9100         getloadavg.c as first argument.
9101
9102 2006-09-22  Bruno Haible  <bruno@clisp.org>
9103
9104         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
9105         at the beginning of the gl_INIT macro.
9106         * modules/getloadavg (configure.ac): Pass $gl_source_base to
9107         gl_GETLOADAVG.
9108
9109 2006-09-22  Bruno Haible  <bruno@clisp.org>
9110
9111         * gnulib-tool (func_create_megatestdir): Don't include the config-h
9112         module.
9113         Suggested by Ralf Wildenhues.
9114
9115 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
9116
9117         Import this patch from libc:
9118
9119         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
9120
9121         * lib/regex_internal.c (re_string_reconstruct): Handle
9122         offset < pstr->valid_raw_len && pstr->offsets_needed case.
9123         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
9124         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
9125         re_string_context_at.
9126
9127         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
9128         now requires it.
9129         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
9130         gl_REGEX now does it for us.
9131         (gl_REGEX): Add test taken from
9132         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
9133
9134         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
9135         Check that large offsets work.  Modernize Autoconf usages.
9136         Prefer "yes" to mean a good thing rather than a bad.
9137         Don't put "#define mkstemp" in config.h, as this might interfere
9138         with standard system headers that "#define mkstemp mkstemp64".
9139
9140         * modules/mkstemp (Depends-on): Add extensions, so that
9141         mkstemp is visible on some platforms.
9142         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
9143         (Include): Change to "mkstemp.h" from <stdlib.h>.
9144         (Files): Add mkstemp.h.
9145
9146         * lib/mkstemp.h: New file, since some standard headers
9147         #define mkstemp.
9148         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
9149         Include "mkstemp.h".
9150         Make the _LIBC code resemble glibc original more,
9151         e.g., use K&R style.
9152         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
9153         (mkstemp): Remove, since mkstemp.h does this for us.
9154         * lib/stdlib--.h: Include mkstemp.h.
9155
9156         Import this patch from libc:
9157
9158         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
9159
9160         * lib/tempname.c (__gen_tempname): Change attempts_min
9161         into a macro.  Use preprocessor to decide how to initialize
9162         attempts [Coverity CID 67].
9163
9164 2006-09-20  Bruno Haible  <bruno@clisp.org>
9165
9166         * lib/mkdtemp.c: Import from libc.
9167         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
9168                 * sysdeps/posix/tempname.c (__gen_tempname): Change
9169                 attempts_min into a macro.  Use preprocessor to decide how to
9170                 initialize attempts [Coverity CID 67].
9171         2001-11-27  Paul Eggert  <eggert@twinsun.com>
9172                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
9173                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
9174
9175 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9176
9177         * gnulib-tool (func_exit): New function, to allow to pass the
9178         exit status portably through the trap.  Use everywhere.
9179         (--help, --version): Signal a write error.
9180         (trap): catch SIGPIPE, for write errors.
9181         Exit at the end of the trap, with the correct exit status.
9182
9183 2006-09-19  Karl Berry  <karl@gnu.org>
9184
9185         * doc/gnulib.texi: note about the license texinfo files.
9186
9187 2006-09-19  Eric Blake  <ebb9@byu.net>
9188
9189         * gnulib-tool: Avoid space-tab.
9190
9191 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
9192
9193         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
9194         that prevented coreutils 6.1 from building.  Problem reported
9195         by Petter Reinholdtsen.
9196
9197 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
9198
9199         * gnulib-tool (avoidlist): Fix typo that broke options like
9200         --avoid=lock that are used by coreutils bootstrap.
9201
9202 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
9203
9204         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
9205         more systematically.
9206
9207 2006-09-18  Jim Meyering  <jim@meyering.net>
9208
9209         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
9210
9211 2006-09-18  Bruno Haible  <bruno@clisp.org>
9212
9213         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
9214
9215 2006-09-18  Bruno Haible  <bruno@clisp.org>
9216
9217         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
9218         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
9219         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
9220         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
9221         * m4/gettext.m4: Require autoconf >= 2.52.
9222         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
9223         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
9224         of gl_cv_header_inttypes_h.
9225
9226 2006-09-18  Bruno Haible  <bruno@clisp.org>
9227
9228         * lib/javaversion.c: Include configmake.h.
9229
9230 2006-09-18  Bruno Haible  <bruno@clisp.org>
9231
9232         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
9233         avoid that the while loops be executed in a subshell.
9234
9235 2006-09-18  Bruno Haible  <bruno@clisp.org>
9236
9237         * MODULES.html.sh (func_module): Break long lines.
9238         Suggested by Bruce Korb <bkorb@gnu.org>.
9239
9240 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9241
9242         Speed up by a factor of 1.12.
9243         * gnulib-tool (nl): New variable.
9244         (func_import): Rewrite include directive extraction to only read each
9245         directive once.
9246
9247 2006-09-17  Bruno Haible  <bruno@clisp.org>
9248
9249         * modules/javaversion (Makefile.am): Remove DEFS setting.
9250         (Depends-on): Add configmake, for PKGDATADIR definition.
9251
9252 2006-09-17  Bruno Haible  <bruno@clisp.org>
9253
9254         * gnulib-tool (func_create_testdir): Rewrite all files at once.
9255
9256 2006-09-17  Bruno Haible  <bruno@clisp.org>
9257
9258         * gnulib-tool (func_append): New function, stolen from libtool.m4.
9259         (func_modules_transitive_closure, func_modules_add_dummy,
9260         func_modules_to_filelist, func_import, func_create_testdir,
9261         func_create_megatestdir, ...): Use it wherever possible.
9262         Suggested by Ralf Wildenhues.
9263
9264 2006-09-16  Karl Berry  <karl@gnu.org>
9265
9266         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
9267         to avoid sectioning errors.
9268         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
9269         [ifinfo]: blank line after @center-ed titles.
9270         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
9271         Spell FSF address consistently with others.
9272         (These changes approved by rms.)
9273
9274 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9275
9276         Speed up by a factor of 1.61.
9277         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
9278         already checked module names again.
9279
9280 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9281
9282         Speed up by a factor of 1.13.
9283         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
9284         for new_files, and the input to func_add_or_update.
9285
9286 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9287
9288         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
9289         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
9290
9291 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
9292
9293         * modules/mkancesdirs (Depends-on): Add fcntl.
9294         * modules/savewd: New file.
9295         * MODULES.html.sh (File system functions): Add savewd.
9296
9297         * modules/configmake (Makefile.am): Add support for the
9298         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
9299
9300 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
9301
9302         * m4/savewd.m4: New file.
9303
9304 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
9305
9306         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
9307         (dirchownmod): New arg FD.  All callers changed.
9308         Use FD rather than opening the directory ourself, as opening is
9309         now the caller's responsibility.
9310         * lib/dirchownmod.h: Likewise.
9311         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
9312         hosts that require <sys/types.h> before <sys/stat.h>.  Include
9313         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
9314         (test_dir): Remove.
9315         (mkancesdirs): Return length of prefix of FILE that has already
9316         been made, or -2 if there is a child doing the work.  Redo
9317         algorithm so that it is O(N) rather than O(N**2).  Optimize away
9318         ".", and treat ".." specially since it might stray back into
9319         already-created areas.  Use a subprocess if necessary.  New arg
9320         WD; all users changed.  MAKE_DIR function should now return 1
9321         if it creates a directory that is not readable.  Return -2 if
9322         a child process is spun off.
9323         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
9324         Adjust signature to match code.
9325         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
9326         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
9327         all users changed.
9328         * lib/savewd.c, lib/savewd.h: New files.
9329
9330 2006-09-15  Jim Meyering  <jim@meyering.net>
9331
9332         * modules/rename-dest-slash: New module.
9333         * MODULES.html.sh (posix_compat): Add it here.
9334
9335         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
9336
9337 2006-09-15  Jim Meyering  <jim@meyering.net>
9338
9339         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
9340         file.
9341
9342         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
9343
9344 2006-09-15  Jim Meyering  <jim@meyering.net>
9345
9346         * lib/rename-dest-slash.c (has_trailing_slash): Use
9347         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
9348         (rpl_rename_dest_slash): Perform the cheaper trailing slash
9349         test before testing whether SRC is a directory.
9350         Suggestions from Bruno Haible.
9351
9352         Avoid a warning about an unused variable.
9353         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
9354         into the #ifdef block where it's used.
9355
9356         * lib/rename-dest-slash.c: New file.
9357
9358 2006-09-14  Bruno Haible  <bruno@clisp.org>
9359
9360         * lib/allocsa.c: Include <config.h> unconditionally.
9361         * lib/asnprintf.c: Likewise.
9362         * lib/asprintf.c: Likewise.
9363         * lib/c-strcasecmp.c: Likewise.
9364         * lib/c-strcasestr.c: Likewise.
9365         * lib/c-strncasecmp.c: Likewise.
9366         * lib/c-strstr.c: Likewise.
9367         * lib/classpath.c: Likewise.
9368         * lib/clean-temp.c: Likewise.
9369         * lib/concatpath.c: Likewise.
9370         * lib/copy-file.c: Likewise.
9371         * lib/csharpcomp.c: Likewise.
9372         * lib/csharpexec.c: Likewise.
9373         * lib/execute.c: Likewise.
9374         * lib/fatal-signal.c: Likewise.
9375         * lib/findprog.c: Likewise.
9376         * lib/fwriteerror.c: Likewise.
9377         * lib/gl_array_list.c: Likewise.
9378         * lib/gl_array_oset.c: Likewise.
9379         * lib/gl_avltree_list.c: Likewise.
9380         * lib/gl_avltree_oset.c: Likewise.
9381         * lib/gl_avltreehash_list.c: Likewise.
9382         * lib/gl_carray_list.c: Likewise.
9383         * lib/gl_linked_list.c: Likewise.
9384         * lib/gl_linkedhash_list.c: Likewise.
9385         * lib/gl_list.c: Likewise.
9386         * lib/gl_oset.c: Likewise.
9387         * lib/gl_rbtree_list.c: Likewise.
9388         * lib/gl_rbtree_oset.c: Likewise.
9389         * lib/gl_rbtreehash_list.c: Likewise.
9390         * lib/imaxabs.c: Likewise.
9391         * lib/imaxdiv.c: Likewise.
9392         * lib/javacomp.c: Likewise.
9393         * lib/javaexec.c: Likewise.
9394         * lib/javaversion.c: Likewise.
9395         * lib/linebreak.c: Likewise.
9396         * lib/localcharset.c: Likewise.
9397         * lib/lock.c: Likewise.
9398         * lib/mbchar.c: Likewise.
9399         * lib/mbswidth.c: Likewise.
9400         * lib/mkdtemp.c: Likewise.
9401         * lib/pipe.c: Likewise.
9402         * lib/printf-args.c: Likewise.
9403         * lib/printf-parse.c: Likewise.
9404         * lib/progname.c: Likewise.
9405         * lib/progreloc.c: Likewise.
9406         * lib/readlink.c: Likewise.
9407         * lib/sh-quote.c: Likewise.
9408         * lib/stpcpy.c: Likewise.
9409         * lib/stpncpy.c: Likewise.
9410         * lib/strcasecmp.c: Likewise.
9411         * lib/strcasestr.c: Likewise.
9412         * lib/strcspn.c: Likewise.
9413         * lib/striconv.c: Likewise.
9414         * lib/strncasecmp.c: Likewise.
9415         * lib/strnlen1.c: Likewise.
9416         * lib/strstr.c: Likewise.
9417         * lib/strtok_r.c: Likewise.
9418         * lib/tls.c: Likewise.
9419         * lib/tmpdir.c: Likewise.
9420         * lib/unicodeio.c: Likewise.
9421         * lib/unsetenv.c: Likewise.
9422         * lib/vasnprintf.c: Likewise.
9423         * lib/vasprintf.c: Likewise.
9424         * lib/wait-process.c: Likewise.
9425         * lib/xallocsa.c: Likewise.
9426         * lib/xsetenv.c: Likewise.
9427         * lib/xstriconv.c: Likewise.
9428
9429 2006-09-13  Simon Josefsson  <jas@extundo.com>
9430
9431         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
9432         that internally, suggested by Ralf Wildenhues
9433         <Ralf.Wildenhues@gmx.de>.
9434
9435 2006-09-13  Simon Josefsson  <jas@extundo.com>
9436
9437         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
9438         @LIBOBJS@.
9439         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9440
9441 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
9442
9443         * lib/_fpending.c: Include <config.h> unconditionally, since we no
9444         longer worry about uses that don't define HAVE_CONFIG_H.
9445         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
9446         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
9447         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
9448         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
9449         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
9450         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
9451         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
9452         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
9453         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
9454         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
9455         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
9456         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
9457         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
9458         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
9459         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
9460         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
9461         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
9462         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
9463         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
9464         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
9465         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
9466         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
9467         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
9468         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
9469         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
9470         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
9471         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
9472         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
9473         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
9474         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
9475         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
9476         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
9477         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
9478         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
9479         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
9480         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
9481         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
9482         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
9483         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
9484         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
9485         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
9486         Likewise.
9487
9488 2006-09-13  Eric Blake  <ebb9@byu.net>
9489
9490         * lib/getopt.c: Fix typo in last commit.
9491
9492 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
9493
9494         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
9495         dgettext.
9496
9497 2006-09-12  Jim Meyering  <jim@meyering.net>
9498
9499         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
9500         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
9501         Reported by Nelson H. F. Beebe.
9502
9503 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9504
9505         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
9506         program_invocation_name and program_invocation_short_name are
9507         initialized.
9508         * lib/argp-namefrob.h: Move declarations of program_invocation_name
9509         and program_invocation_short_name to argp.h, so they are visible
9510         to user programs.
9511         * lib/argp.h: Likewise
9512
9513 2006-09-10  Bruno Haible  <bruno@clisp.org>
9514
9515         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
9516         m4/inttypes_h.m4, m4/uintmax_t.m4.
9517
9518 2006-09-10  Bruno Haible  <bruno@clisp.org>
9519
9520         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
9521         gl_AC_TYPE_UINTMAX_T.
9522
9523 2006-09-10  Bruno Haible  <bruno@clisp.org>
9524
9525         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
9526
9527 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9528
9529         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
9530         convention.  Text proposed by Bruno Haible.
9531         (struct argp_option): Document the use of N_() wrappers.
9532
9533         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
9534         '\v', and translate the two parts separately, instead of feeding
9535         the whole string to gettext.  This allows to exclude
9536         '\v' from the strings visible to the translator by writing doc
9537         strings as N_("..") "\v" N_("..").
9538
9539 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
9540
9541         * config/srclist.txt: Undo latest change; the bug was fixed.
9542
9543 2006-09-09  Bruno Haible  <bruno@clisp.org>
9544
9545         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
9546         assignments if building a library without libtool.
9547         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
9548         in func_emit_lib_Makefile_am.
9549         (func_import): When building a static library libfoo.a, arrange to
9550         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
9551         (func_create_testdir): Likewise.
9552         * modules/gc (configure.ac, Makefile.am): If building statically,
9553         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
9554         * modules/iconvme (configure.ac, Makefile.am): Likewise.
9555         * modules/striconv (configure.ac, Makefile.am): Likewise.
9556         Based on a suggestion by Ralf Wildenhues.
9557
9558 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9559
9560         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
9561         Check for unistd.h too, since Autoconf doesn't assume POSIX.
9562         Also:
9563
9564         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9565         Add year_2050_test to catch glibc bug 2821
9566         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
9567
9568         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
9569         Prefer #ifdef to #if.
9570
9571         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
9572         Return from 'main' instead of calling 'exit'.
9573
9574 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9575
9576         * lib/mktime.c (guess_time_tm): Fix bug where mktime
9577         returned the maximum time_t value rather than (time_t) -1.
9578         Problem originally reported by William Bardwell
9579         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
9580
9581         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
9582         Moved to here ...
9583         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
9584         ... from here.
9585
9586 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9587
9588         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
9589         2821 is fixed.
9590
9591 2006-09-08  Jim Meyering  <jim@meyering.net>
9592
9593         Don't make generated files read-only.  That would bother too many
9594         people.  However, do retain the ability to work when targets are
9595         read-only: remove the destination and temporary files before writing
9596         them (when generated via sed or echo), or by using the -f option for
9597         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
9598         * modules/alloca-opt, modules/argz, modules/arpa_inet:
9599         * modules/byteswap, modules/configmake, modules/fcntl:
9600         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
9601         * modules/localcharset, modules/netinet_in, modules/poll:
9602         * modules/stdbool, modules/stdint, modules/sys_select:
9603         * modules/sys_socket, modules/sys_stat, modules/sysexits:
9604
9605 2006-09-08  Jim Meyering  <jim@meyering.net>
9606
9607         Avoid new build failure on FreeBSD 6.0.
9608         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
9609         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
9610         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
9611
9612 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9613
9614         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
9615
9616 2006-09-07  Jim Meyering  <jim@meyering.net>
9617
9618         Fix global typo in last change: use chmod u-w, not chmod u-x.
9619         Spotted by Paul Eggert and Bruce Korb.
9620         * modules/alloca-opt, modules/argz, modules/arpa_inet:
9621         * modules/byteswap, modules/configmake, modules/fcntl:
9622         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
9623         * modules/localcharset, modules/netinet_in, modules/poll:
9624         * modules/stdbool, modules/stdint, modules/sys_select:
9625         * modules/sys_socket, modules/sys_stat, modules/sysexits:
9626
9627 2006-09-06  Jim Meyering  <jim@meyering.net>
9628
9629         Make generated files be read-only.
9630         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
9631         Ensure that each generated file is now read-only.
9632         * modules/argz: Likewise.
9633         * modules/arpa_inet: Likewise.
9634         * modules/byteswap: Likewise.
9635         * modules/configmake: Likewise.
9636         * modules/fcntl: Likewise.
9637         * modules/fnmatch: Likewise.
9638         * modules/getopt: Likewise.
9639         * modules/glob: Likewise.
9640         * modules/inttypes: Likewise.
9641         * modules/netinet_in: Likewise.
9642         * modules/poll: Likewise.
9643         * modules/stdbool: Likewise.
9644         * modules/stdint: Likewise.
9645         * modules/sys_select: Likewise.
9646         * modules/sys_socket: Likewise.
9647         * modules/sys_stat: Likewise.
9648         * modules/sysexits: Likewise.
9649         * modules/localcharset: Same as above, but continue using temporary
9650         file named "t-$@" (why different?) rather than the "$@-t" used
9651         everywhere else.
9652
9653         * modules/sysexits (Makefile.am): Replace literal occurrences
9654         of "sysexit.h" more readable, and more consistent, "$@".
9655
9656 2006-09-06  Bruno Haible  <bruno@clisp.org>
9657
9658         * modules/striconv: New file.
9659         * modules/xstriconv: New file.
9660         * MODULES.html.sh (Internationalization functions): Add striconv,
9661         xstriconv.
9662
9663 2006-09-06  Bruno Haible  <bruno@clisp.org>
9664
9665         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
9666         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
9667         not using libtool correctly.
9668
9669 2006-09-06  Bruno Haible  <bruno@clisp.org>
9670
9671         * lib/striconv.h: New file.
9672         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
9673         iconvstring.c.
9674         * lib/xstriconv.h: New file.
9675         * lib/xstriconv.c: New file.
9676
9677 2006-09-06  Bruno Haible  <bruno@clisp.org>
9678
9679         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
9680         lib_..._LDFLAGS.
9681
9682 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9683
9684         * lib/argz_.h: Sync from Libtool.
9685
9686         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
9687                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9688
9689         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
9690
9691 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
9692
9693         * modules/trim: New file.
9694
9695 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
9696
9697         * lib/trim.h: New file.
9698         * lib/trim.c: New file.
9699
9700 2006-09-05  Bruno Haible  <bruno@clisp.org>
9701
9702         * MODULES.html.sh (String handling): Add trim.
9703
9704 2006-09-04  Karl Berry  <karl@gnu.org>
9705
9706         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
9707         until next release.
9708
9709 2006-09-03  Bruno Haible  <bruno@clisp.org>
9710
9711         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
9712         correctly.
9713
9714 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
9715
9716         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
9717         not gl_GETLOADAVG.  Omit unneeded semicolons.
9718         Problems reported by Ralf Wildenhues in
9719         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
9720         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
9721         at the end, which is the usual gnulib style.
9722
9723         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
9724         of doing all the work ourselves.
9725         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
9726         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
9727
9728 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
9729
9730         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
9731         Problem reported by Ralf Wildenhues in
9732         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
9733
9734         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
9735         HAVE_STRUCT_STATFS_F_FSTYPENAME.
9736
9737 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
9738
9739         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
9740         yesterday's patch by changing test -n to test -z.
9741
9742 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9743
9744         * modules/getloadavg (Files): Add m4/getloadavg.m4.
9745         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
9746         the former is now obsolescent.
9747
9748         * modules/chdir-long (Depends-on): Add fcntl.
9749
9750 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9751
9752         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
9753         obsolescent, and programs should use gnulib instead.
9754         * m4/getloadavg.m4: New file, with contents taken from Autoconf
9755         but with prefixes changed.
9756
9757 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9758
9759         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
9760         or stdbool.h, because they might not exist while configuring.
9761
9762         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
9763         Don't include unistd.h or limits.h; not needed, since chdir-long.h
9764         does that for us.
9765         (O_DIRECTORY): Remove.
9766
9767 2006-08-31  Eric Blake  <ebb9@byu.net>
9768
9769         * gnulib-tool: Don't let emacs change spaces to TAB.
9770
9771 2006-08-31  Bruno Haible  <bruno@clisp.org>
9772
9773         * gnulib-tool: When calling func_import more than once, do it in a
9774         subshell.
9775         Reported by Eric Blake <ebb9@byu.net>.
9776
9777 2006-08-31  Bruno Haible  <bruno@clisp.org>
9778
9779         * gnulib-tool (nl): Remove variable.
9780         (sed_transform_lib_file): Use more robust test for config-h module.
9781         (func_import): Fix typo in 2006-08-25 patch.
9782
9783 2006-08-31  Bruno Haible  <bruno@clisp.org>
9784
9785         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
9786         specified, augment Makefile.am variables instead of assigning them.
9787
9788 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
9789
9790         Work around a bug in both the Linux and SunOS 64-bit kernels:
9791         nanosleep mishandles sleeps for longer than 2**31 seconds.
9792         Problem reported by Frank v Waveren in
9793         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
9794         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
9795         Check for nanosleep bug.
9796         (LIB_NANOSLEEP): Append clock_gettime library if needed.
9797
9798 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
9799
9800         Work around a bug in both the Linux and SunOS 64-bit kernels:
9801         nanosleep mishandles sleeps for longer than 2**31 seconds.
9802         Problem reported by Frank v Waveren in
9803         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
9804         * lib/nanosleep.c (BILLION): New constant.
9805         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
9806         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
9807         implementation.
9808
9809 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
9810
9811         * modules/nanosleep (Depends-on): Add gettime.
9812
9813 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
9814         and Simon Josefsson  <jas@extundo.com>
9815         and Oskar Liljeblad  <oskar@osk.mine.nu>
9816
9817         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
9818         * gnulib-tool (func_import): New license type 'unmodifiable license
9819         text'.
9820         * modules/fdl: Use it.  Longer description.
9821         * module/gpl, module/lgpl: New files.
9822
9823 2006-08-30  Jim Meyering  <jim@meyering.net>
9824
9825         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
9826         shadowing the parameter.
9827
9828 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9829
9830         Sync from Libtool:
9831
9832         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9833
9834         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
9835         sharing with gnulib.  Report by Eric Blake.
9836
9837 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
9838
9839         * modules/isapipe: New file.
9840         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
9841
9842 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
9843
9844         * modules/configmake (Makefile.am): Add a comment, and omit
9845         the CONFIGMAKE_ prefix from generated macro names.  Suggested
9846         by Bruno Haible.
9847
9848 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
9849
9850         * m4/isapipe.m4: New file.
9851
9852 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
9853
9854         * lib/isapipe.c, lib/isapipe.h: New files.
9855
9856 2006-08-29  Jim Meyering  <jim@meyering.net>
9857
9858         * modules/configmake (Makefile.am): Make configmake.h depend on
9859         Makefile.  Otherwise, a stale configmake.h could hang around.
9860
9861 2006-08-29  Eric Blake  <ebb9@byu.net>
9862
9863         * lib/error.c (error_at_line, print_errno_message): Match libc, after
9864         resolution of upstream bug 3044.
9865
9866 2006-08-29  Bruno Haible  <bruno@clisp.org>
9867
9868         * modules/localcharset (Depends-on): Add configmake.
9869         (Makefile.am): Remove setting of LIBDIR through DEFS.
9870
9871 2006-08-29  Bruno Haible  <bruno@clisp.org>
9872
9873         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
9874         defined.
9875
9876 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
9877
9878         * modules/fcntl: New file.
9879         * modules/chdir-safer (Depends-on): Add fcntl.
9880         * modules/fts: Likewise.
9881         * modules/mkdir-p: Likewise.
9882
9883         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
9884         This undoes the most recent change, since we're now addressing the
9885         problem in a different way.
9886
9887         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
9888         into output, since the output might be called Makefile.am even
9889         if $makefile_name is something different.
9890         (func_import): Use $makefile_am rather than
9891         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
9892         empty.
9893
9894         * modules/inttypes (Files): Add m4/inttypes-h.m4.
9895
9896 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
9897
9898         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
9899         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
9900         recent change to stdint.m4, since we're now addressing the problem in a
9901         different way.
9902
9903 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
9904
9905         * m4/fcntl_h.m4: New file.
9906
9907 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
9908
9909         * lib/fcntl_.h: New file.
9910         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
9911         the fcntl module.
9912         * lib/dirchownmod.c: Likewise.
9913         * lib/fts.c: Likewise.
9914
9915         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
9916         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
9917         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
9918         just before including <inttypes.h>, to avoid circular inclusion.
9919
9920 2006-08-28  Jim Meyering  <jim@meyering.net>
9921
9922         * doc/visibility.texi: Actually read and correct the grammar of the
9923         sentence affected by yesterday's change.
9924
9925 2006-08-28  Eric Blake  <ebb9@byu.net>
9926
9927         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
9928         needs wrapper.
9929
9930 2006-08-28  Eric Blake  <ebb9@byu.net>
9931
9932         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
9933
9934 2006-08-28  Eric Blake  <ebb9@byu.net>
9935
9936         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
9937
9938 2006-08-28  Bruno Haible  <bruno@clisp.org>
9939
9940         * modules/c-strstr: New file, from GNU gettext.
9941         * MODULES.html.sh (String handling): Add c-strstr.
9942
9943 2006-08-28  Bruno Haible  <bruno@clisp.org>
9944
9945         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
9946         macros.
9947         Reported by Eric Blake.
9948
9949 2006-08-28  Bruno Haible  <bruno@clisp.org>
9950
9951         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
9952         (VASNPRINTF): Return a string of length > INT_MAX without failing.
9953         * lib/vasprintf.c: Include errno.h, limits.h.
9954         (EOVERFLOW): New fallback definition.
9955         (vasprintf): Test here whether the string length is > INT_MAX.
9956         * lib/vsnprintf.c: Include errno.h, limits.h.
9957         (EOVERFLOW): New fallback definition.
9958         (vsnprintf): Fix bug when generated string was too long for the buffer.
9959         Test here whether the string length is > INT_MAX.
9960
9961 2006-08-28  Bruno Haible  <bruno@clisp.org>
9962
9963         * lib/inttypes_.h (SCNX*): Remove definitions.
9964         Reported by Eric Blake.
9965
9966 2006-08-28  Bruno Haible  <bruno@clisp.org>
9967
9968         * lib/c-strstr.h: New file, from GNU gettext.
9969         * lib/c-strstr.c: New file, from GNU gettext.
9970
9971 2006-08-28  Bruno Haible  <bruno@clisp.org>
9972
9973         * gnulib-tool: Reorder some statements.
9974
9975 2006-08-28  Bruno Haible  <bruno@clisp.org>
9976
9977         * gnulib-tool: New option --makefile-name.
9978         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
9979         $makefile_name.
9980         (func_import): Write $makefile_name to the cache file, and read it from
9981         there unless explicitly specified. Use $makefile_name as file name
9982         instead of Makefile.am. Adjust the recommendations accordingly.
9983
9984 2006-08-28  Bruno Haible  <bruno@clisp.org>
9985
9986         * gnulib-tool (func_verify_module): Check against misapplying patch.
9987
9988 2006-08-28  Bruno Haible  <bruno@clisp.org>
9989
9990         * gnulib-tool (func_relativize, func_relconcat): New functions.
9991         Give an error if --local-dir is given with --update.
9992         Remove trailing slashes from $local_gnulib_dir.
9993         (func_import): Store the relativized $local_gnulib_dir in
9994         gnulib-cache.m4, and read it from there if not specified explicitly.
9995
9996 2006-08-28  Bruno Haible  <bruno@clisp.org>
9997
9998         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
9999         is the current directory. Respect also $local_gnulib_dir.
10000
10001 2006-08-28  Bruno Haible  <bruno@clisp.org>
10002             Simon Josefsson  <jas@extundo.com>
10003
10004         BeOS portability.
10005         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
10006
10007 2006-08-27  Jim Meyering  <jim@meyering.net>
10008
10009         * doc/visibility.texi: Remove duplicate word: "pointer".
10010
10011 2006-08-26  Bruno Haible  <bruno@clisp.org>
10012
10013         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
10014         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
10015         (Makefile.am): Create inttypes.h from inttypes_.h.
10016         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
10017
10018         * modules/imaxabs: New file.
10019
10020         * modules/imaxdiv: New file.
10021
10022 2006-08-26  Bruno Haible  <bruno@clisp.org>
10023
10024         * m4/inttypes.m4: New file.
10025         * m4/_inttypes_h.m4: Remove file.
10026         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
10027         PRI_MACROS_BROKEN.
10028         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
10029
10030         * m4/imaxabs.m4: New file.
10031
10032         * m4/imaxdiv.m4: New file.
10033
10034 2006-08-26  Bruno Haible  <bruno@clisp.org>
10035
10036         * lib/inttypes_.h: New file.
10037         * lib/inttypes.h: Remove file.
10038         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
10039
10040         * lib/imaxabs.c: New file.
10041
10042         * lib/imaxdiv.c: New file.
10043
10044 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10045
10046         New config-h module, so that "make" output needn't be cluttered
10047         by -DHAVE_CONFIG_H.
10048         * MODULES.html.sh (Support for building libraries and executables):
10049         Add config-h.
10050         * modules/config-h: New file.
10051         * gnulib-tool (nl, sed_transform_lib_file): New vars.
10052         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
10053         the config-h module is used.
10054
10055         New configmake module, so that "make" output needn't be cluttered
10056         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
10057         * MODULES.html.sh (Support for building libraries and executables):
10058         Add configmake.
10059         * modules/configmake: New file.
10060
10061 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10062
10063         * m4/config-h.m4: New file.
10064
10065 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10066
10067         * config/srclist.txt: Add elisp-comp.
10068
10069 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10070
10071         * MODULES.html.sh (Support for building libraries and executables):
10072         Add elisp-comp.
10073         * build-aux/elisp-comp: New file.
10074         * modules/elisp-comp: New file.
10075
10076 2006-08-24  Bruno Haible  <bruno@clisp.org>
10077
10078         * gnulib-tool (func_create_testdir): Use non-default values of
10079         sourcebase and m4base.
10080
10081 2006-08-24  Bruno Haible  <bruno@clisp.org>
10082
10083         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
10084         HTML structure.
10085
10086 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
10087
10088         * modules/openat (Depends-on): Add lchown.
10089
10090 2006-08-23  Bruno Haible  <bruno@clisp.org>
10091
10092         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
10093         of gl_LOCK_EARLY instead of gl_LOCK.
10094
10095 2006-08-23  Bruno Haible  <bruno@clisp.org>
10096
10097         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
10098         on OSF/1 to no.
10099         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
10100
10101 2006-08-23  Bruno Haible  <bruno@clisp.org>
10102
10103         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
10104         as unusable.
10105
10106         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
10107         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
10108         (gl_LOCK): New macro.
10109
10110 2006-08-22  Simon Josefsson  <jas@extundo.com>
10111
10112         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
10113         to md5 module.
10114
10115 2006-08-22  Simon Josefsson  <jas@extundo.com>
10116
10117         * MODULES.html.sh: Add "Support for maintaining and release
10118         projects".
10119
10120         * build-aux/gnupload: New file, from coreutils.
10121
10122 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
10123
10124         Avoid the need for AC_LIBSOURCES in m4 macros.
10125         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
10126         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
10127         * modules/check-version (EXTRA_DIST): Add check-version.h.
10128         * modules/crc (EXTRA_DIST): Add crc.h.
10129         * modules/des (EXTRA_DIST): Add des.h.
10130         * modules/gc (EXTRA_DIST): Add gc.h.
10131         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
10132         * modules/getline (EXTRA_DIST): Add getline.h.
10133         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
10134         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
10135         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
10136         * modules/md2 (EXTRA_DIST): Add md2.h.
10137         * modules/md4 (EXTRA_DIST): Add md4.h.
10138         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
10139         * modules/read-file (EXTRA_DIST): Add read-file.h.
10140         * modules/readline (EXTRA_DIST): Add readline.h.
10141         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
10142         rijndael-api-fst.h.
10143
10144 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
10145
10146         * m4/rijndael.m4 (gl_ARCFOUR):
10147         * m4/arctwo.m4 (gl_ARCTWO):
10148         * m4/check-version.m4 (gl_CHECK_VERSION):
10149         * m4/crc.m4 (gl_CRC):
10150         * m4/des.m4 (gl_DES):
10151         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
10152         * m4/gc.m4 (gl_GC):
10153         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
10154         * m4/getline.m4 (gl_FUNC_GETLINE):
10155         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
10156         * m4/hmac-md5.m4 (gl_HMAC_MD5):
10157         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
10158         * m4/md2.m4 (gl_MD2):
10159         * m4/md4.m4 (gl_MD4):
10160         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
10161         * m4/read-file.m4 (gl_FUNC_READ_FILE):
10162         * m4/readline.m4 (gl_FUNC_READLINE):
10163         * m4/rijndael.m4 (gl_RIJNDAEL):
10164         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
10165         to get the necessary .h files and whatnot.
10166
10167 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
10168
10169         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
10170         gnulib rather than the other way around.
10171         * config/srclistvars.sh (COREUTILS): Remove.
10172
10173 2006-08-22  Jim Meyering  <jim@meyering.net>
10174
10175         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
10176
10177         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
10178
10179 2006-08-22  Eric Blake  <ebb9@byu.net>
10180
10181         * modules/regexprops-generic: New file.
10182         * MODULES.html.sh (Support for building documentation): List it.
10183
10184 2006-08-22  Eric Blake  <ebb9@byu.net>
10185
10186         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
10187         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
10188         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
10189         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
10190
10191 2006-08-22  Bruno Haible  <bruno@clisp.org>
10192
10193         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
10194         and lib_LTLIBRARIES like the other lib_* variables.
10195
10196 2006-08-22  Bruno Haible  <bruno@clisp.org>
10197
10198         * build-aux/x-to-1.in: New file, from GNU gettext.
10199
10200 2006-08-22  Bruno Haible  <bruno@clisp.org>
10201
10202         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
10203         <utmpx.h> exists.
10204
10205 2006-08-22  Bruno Haible  <bruno@clisp.org>
10206
10207         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
10208         <utmpx.h> exists.
10209
10210 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
10211
10212         BeOS portability.
10213         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
10214         exist.
10215         Problem reported by Bruno Haible.
10216
10217 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
10218
10219         Avoid the need for AC_LIBSOURCES in m4 macros.
10220         * modules/acl (EXTRA_DIST): Add acl.h.
10221         * modules/argmatch (Files): Add m4/argmatch.m4.
10222         (configure.ac): Add gl_ARGMATCH.
10223         (EXTRA_DIST): Renamed from lib_SOURCES, for
10224         consistency with the other modules.  Remove argmatch.c.
10225         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
10226         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
10227         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
10228         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
10229         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
10230         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
10231         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
10232         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
10233         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
10234         * modules/closeout (EXTRA_DIST): Add closeout.h.
10235         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
10236         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
10237         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
10238         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
10239         dirname.h; remove basename.c and stripslash.c.
10240         * modules/exclude (EXTRA_DIST): Add exclude.h.
10241         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
10242         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
10243         * modules/file-type (EXTRA_DIST): Add file-type.h.
10244         * modules/filemode (EXTRA_DIST): Add filemode.h.
10245         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
10246         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
10247         * modules/fpending (EXTRA_DIST): Add __fpending.h.
10248         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
10249         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
10250         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
10251         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
10252         * modules/getdate (EXTRA_DIST): Add getdate.c.
10253         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
10254         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
10255         * modules/getpass (EXTRA_DIST): Add getpass.h.
10256         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
10257         * modules/group-member (EXTRA_DIST): Add group-member.h.
10258         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
10259         * modules/hash (EXTRA_DIST): Add hash.h.
10260         * modules/human (EXTRA_DIST): Add human.h.
10261         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
10262         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
10263         * modules/lchown (EXTRA_DIST): Add lchown.h.
10264         * modules/long-options (EXTRA_DIST): Add long-options.h.
10265         * modules/lstat (EXTRA_DIST): Add lstat.h.
10266         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
10267         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
10268         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
10269         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
10270         * modules/memxor (EXTRA_DIST): Add memxor.h.
10271         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
10272         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
10273         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
10274         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
10275         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
10276         * modules/physmem (EXTRA_DIST): Add physmem.h.
10277         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
10278         * modules/posixver (EXTRA_DIST): Add posixver.h.
10279         * modules/quote (EXTRA_DIST): Add quote.h.
10280         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
10281         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
10282         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
10283         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
10284         regex_internal.h regexec.c.
10285         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
10286         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
10287         * modules/same (EXTRA_DIST): Add same.h.
10288         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
10289         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
10290         * modules/savedir (EXTRA_DIST): Add savedir.h.
10291         * modules/sha1 (EXTRA_DIST): Add sha1.h.
10292         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
10293         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
10294         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
10295         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
10296         * modules/strdup (EXTRA_DIST): Add strdup.h.
10297         * modules/strftime (EXTRA_DIST): Add strftime.h.
10298         * modules/strndup (EXTRA_DIST): Add strndup.h.
10299         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
10300         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
10301         * modules/time_r (EXTRA_DIST): Add time_r.h.
10302         * modules/timespec (EXTRA_DIST): Add timespec.h.
10303         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
10304         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
10305         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
10306         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
10307         * modules/userspec (EXTRA_DIST): Add userspec.h.
10308         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
10309         * modules/utimens (EXTRA_DIST): Add utimens.h.
10310         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
10311         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
10312         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
10313         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
10314         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
10315         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
10316         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
10317         * modules/yesno (EXTRA_DIST): Add yesno.h.
10318
10319 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
10320
10321         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
10322
10323         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
10324         * m4/dev-ino.m4, same-inode.m4: Remove.
10325
10326         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
10327         * m4/acl.m4 (AC_FUNC_ACL):
10328         * m4/backupfile.m4 (gl_BACKUPFILE):
10329         * m4/c-strtod.m4 (gl_C99_STRTOLD):
10330         * m4/canon-host.m4 (gl_CANON_HOST):
10331         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
10332         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
10333         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
10334         * m4/cloexec.m4 (gl_CLOEXEC):
10335         * m4/close-stream.m4 (gl_CLOSE_STREAM):
10336         * m4/closeout.m4 (gl_CLOSEOUT):
10337         * m4/dirfd.m4 (gl_FUNC_DIRFD):
10338         * m4/dirname.m4 (gl_DIRNAME):
10339         * m4/exclude.m4 (gl_EXCLUDE):
10340         * m4/exitfail.m4 (gl_EXITFAIL):
10341         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
10342         * m4/file-type.m4 (gl_FILE_TYPE):
10343         * m4/filemode.m4 (gl_FILEMODE):
10344         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
10345         * m4/fpending.m4 (gl_FUNC_FPENDING):
10346         * m4/fprintftime.m4 (gl_FPRINTFTIME):
10347         * m4/fts.m4 (gl_FUNC_FTS):
10348         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
10349         * m4/getdate.m4 (gl_GETDATE):
10350         * m4/gethrxtime.m4 (gl_GETHRXTIME):
10351         * m4/getpagesize.m4 (gl_GETPAGESIZE):
10352         * m4/getpass.m4 (gl_FUNC_GETPASS):
10353         * m4/gettime.m4 (gl_GETTIME):
10354         * m4/getugroups.m4 (gl_GETUGROUPS):
10355         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
10356         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
10357         * m4/hard-locale.m4 (gl_HARD_LOCALE):
10358         * m4/hash.m4 (gl_HASH):
10359         * m4/idcache.m4 (gl_IDCACHE):
10360         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
10361         * m4/lchown.m4 (gl_FUNC_LCHOWN):
10362         * m4/long-options.m4 (gl_LONG_OPTIONS):
10363         * m4/lstat.m4 (gl_FUNC_LSTAT):
10364         * m4/md5.m4 (gl_MD5):
10365         * m4/memcasecmp.m4 (gl_MEMCASECMP):
10366         * m4/memcoll.m4 (gl_MEMCOLL):
10367         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
10368         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
10369         * m4/memxor.m4 (gl_MEMXOR):
10370         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
10371         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
10372         * m4/modechange.m4 (gl_MODECHANGE):
10373         * m4/mountlist.m4 (gl_MOUNTLIST):
10374         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
10375         * m4/openat.m4 (gl_FUNC_OPENAT):
10376         * m4/pathmax.m4 (gl_PATHMAX):
10377         * m4/physmem.m4 (gl_PHYSMEM):
10378         * m4/posixtm.m4 (gl_POSIXTM):
10379         * m4/posixver.m4 (gl_POSIXVER):
10380         * m4/quote.m4 (gl_QUOTE):
10381         * m4/quotearg.m4 (gl_QUOTEARG):
10382         * m4/readtokens.m4 (gl_READTOKENS):
10383         * m4/readutmp.m4 (gl_READUTMP):
10384         * m4/regex.m4 (gl_REGEX):
10385         * m4/safe-read.m4 (gl_SAFE_READ):
10386         * m4/safe-write.m4 (gl_SAFE_WRITE):
10387         * m4/same.m4 (gl_SAME):
10388         * m4/save-cwd.m4 (gl_SAVE_CWD):
10389         * m4/savedir.m4 (gl_SAVEDIR):
10390         * m4/settime.m4 (gl_SETTIME):
10391         * m4/sha1.m4 (gl_SHA1):
10392         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
10393         * m4/stat-macros.m4 (gl_STAT_MACROS):
10394         * m4/stat-time.m4 (gl_STAT_TIME):
10395         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
10396         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
10397         * m4/strdup.m4 (gl_FUNC_STRDUP):
10398         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
10399         * m4/strndup.m4 (gl_FUNC_STRNDUP):
10400         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
10401         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
10402         * m4/time_r.m4 (gl_TIME_R):
10403         * m4/timespec.m4 (gl_TIMESPEC):
10404         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
10405         * m4/unlinkdir.m4 (gl_UNLINKDIR):
10406         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
10407         * m4/userspec.m4 (gl_USERSPEC):
10408         * m4/utimecmp.m4 (gl_UTIMECMP):
10409         * m4/utimens.m4 (gl_UTIMENS):
10410         * m4/xalloc.m4 (gl_XALLOC):
10411         * m4/xgetcwd.m4 (gl_XGETCWD):
10412         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
10413         * m4/xreadlink.m4 (gl_XREADLINK):
10414         * m4/xstrtod.m4 (gl_XSTRTOD):
10415         * m4/yesno.m4 (gl_YESNO):
10416         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
10417         to get the necessary .h files and whatnot.
10418
10419 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
10420             Bruno Haible  <bruno@clisp.org>
10421
10422         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
10423         /bin/sh understanding of '!' conditional negation.
10424
10425 2006-08-21  Jim Meyering  <jim@meyering.net>
10426
10427         * modules/openat (Depends-on): Really alphabetize.
10428
10429         * modules/acl (Depends-on): Add error and quote.
10430
10431         * check-module (find_included_lib_files): Add at-func.c to the
10432         ok-to-include-more-than-once white list.
10433
10434         * modules/openat (Depends-on): Add lstat.  Alphabetize.
10435
10436 2006-08-21  Bruno Haible  <bruno@clisp.org>
10437
10438         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10439         Emit a pkgdata_DATA variable only if some snippets add contents to it.
10440         Reported by Martin Lambers <marlam@marlam.de>.
10441
10442 2006-08-21  Bruno Haible  <bruno@clisp.org>
10443
10444         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
10445         specify an installation location, don't emit a noinst_LIBRARIES or
10446         noinst_LTLIBRARIES assignment.
10447
10448 2006-08-21  Bruno Haible  <bruno@clisp.org>
10449
10450         BeOS portability.
10451         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
10452         BeOS has mbrtowc() but no <wctype.h>.
10453
10454 2006-08-21  Bruno Haible  <bruno@clisp.org>
10455
10456         BeOS portability.
10457         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
10458         exist.
10459
10460 2006-08-21  Bruno Haible  <bruno@clisp.org>
10461
10462         BeOS portability.
10463         * lib/mbchar.h: Include <wctype.h> only if it exists.
10464
10465 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
10466
10467         Remove files that are no longer needed by their respective modules.
10468         * m4/obstack.m4: Remove.
10469         * m4/strerror_r.m4: Remove.
10470         * m4/uint32_t.m4: Remove.
10471         * m4/uintptr_t.m4: Remove.
10472         * m4/ullong_max.m4: Remove.
10473         * m4/xstrtoimax.m4: Remove.
10474         * m4/xstrtoumax.m4: Remove.
10475
10476         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
10477         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
10478         dependencies now capture this.
10479
10480         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
10481         Do not use AC_LIBSOURCES, since gnulib modules now do this.
10482         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
10483         * m4/human.m4 (gl_HUMAN): Likewise.
10484         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
10485         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
10486
10487         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
10488
10489         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
10490         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
10491         stdint.
10492         * m4/human.m4 (gl_HUMAN): Likewise.
10493         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
10494         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
10495         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
10496         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
10497         * m4/xstrtol (gl_XSTRTOL): Likewise.
10498
10499         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
10500         AC_TYPE_LONG_LONG_INT.
10501         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
10502         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
10503         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
10504         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
10505
10506         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
10507         on stdbool.
10508
10509         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
10510         (gl_PREREQ_XSTRTOUL): Remove.
10511
10512         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
10513
10514         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
10515         mode.
10516
10517 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
10518
10519         Add and change modules to make it easier for coreutils to use
10520         gnulib-tool.
10521         * modules/backupfile (Files): Remove m4/d-ino.m4.
10522         (Depends-on): Add d-ino.
10523         * modules/cycle-check (Depends-on): Add stdint.
10524         (lib_SOURCES): Add cycle-check.h.
10525         * modules/d-ino: New module.
10526         * modules/d-type: New module.
10527         * modules/error (Files): Remove m4/strerror_r.m4.
10528         * modules/filemode (Files): Add m4/st_dm_mode.m4.
10529         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
10530         m4/inttypes_h.m4, m4/uintmax_t.m4.
10531         (Depends-on): Add stdint.
10532         (lib_SOURCES): Add fsusage.h.
10533         * modules/getcwd (Files): Remove d-ino.m4.
10534         (Depends-on): Add d-ino.
10535         * modules/getndelim2 (Depends-on): Add stdint.
10536         * modules/glob (Files): Remove m4/d-type.m4.
10537         (Depends-on): Add d-type.
10538         * modules/host-os: New module.
10539         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
10540         m4/inttypes_h.m4, m4/uintmax_t.m4.
10541         * Depends-on: Add stdint.
10542         (lib_SOURCES): Add human.h.
10543         * modules/inttostr (Files): Remove m4/intmax_t.m4,
10544         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
10545         m4/uintmax_t.m4, m4/ulonglong.m4.
10546         (Depends-on): Add stdint.
10547         (EXTRA_DIST): Add inttostr.h.
10548         * modules/lchmod: New module.
10549         * modules/link-follow: New module.
10550         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
10551         (Depends-on): Add lchmod.
10552         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
10553         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
10554         (Depends-on): Add stdint.
10555         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
10556         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
10557         (Depends-on): Add stdint.
10558         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
10559         * modules/perl: New module.
10560         * modules/regex (Depends-on): Add stdint.
10561         * modules/rmdir-errno: New module.
10562         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
10563         m4/intmax_t.m4.
10564         (Depends-on): Add stdint.
10565         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
10566         m4/uintmax_t.m4.
10567         (Depends-on): Add stdint.
10568         * modules/unlink-busy: New module.
10569         * modules/utimecmp (Depends-on): Add stdint.
10570         * modules/uptime: New module.
10571         * modules/winsz-ioctl: New module.
10572         * modules/winsz-termios: New module.
10573         * modules/xnanosleep (Depends-on): Add nanosleep.
10574         * modules/ullong_max: Remove.
10575         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
10576         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
10577         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
10578         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
10579         (Depends-on): Add inttypes.
10580         (lib_SOURCES): Add xstrtol.h.
10581         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
10582         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
10583         * MODULES.html.sh: Move 'assert' into the assert section.
10584         Move 'dummy' into the linking section.
10585         Remove ullong_max.
10586         Add section for compatibility checks for POSIX:2001 functions,
10587         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
10588         winsz-ioctl, and winsz-termios into it.
10589         Add lchmod.
10590         Add top-level Misc section and put host-os, perl, and uptime
10591         into it.
10592
10593 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
10594
10595         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
10596         now assume the stdint module.  Do not include inttypes.h.
10597         * lib/fsusage.h: Likewise.
10598         * lib/getndelim2.c: Likewise.
10599         * lib/human.h: Likewise.
10600         * lib/inttostr.h: Likewise.
10601         * lib/obstack.c: Likewise.
10602         * lib/regex_internal.h: Likewise.
10603         * lib/tempname.c: Likewise.
10604         * lib/utimecmp.c: Likewise.
10605         * lib/xstrtol.h: Likewise.
10606
10607         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
10608
10609         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
10610         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
10611         * lib/xtime.h: Likewise.
10612
10613 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
10614
10615         * modules/openat (Files): Add lib/fchmodat.c.
10616         Fixes problem reported by Jay Youngman.
10617
10618 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
10619
10620         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
10621         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
10622
10623 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
10624             Bruno Haible  <bruno@clisp.org>
10625
10626         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
10627         and is a script that invokes bison. Tighten the code. Add comments.
10628
10629 2006-08-18  Jim Meyering  <jim@meyering.net>
10630
10631         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
10632         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
10633         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
10634         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
10635
10636 2006-08-18  Bruno Haible  <bruno@clisp.org>
10637
10638         * modules/bison-i18n: New file.
10639         * MODULES.html.sh (Internationalization functions): Add it.
10640
10641 2006-08-18  Bruno Haible  <bruno@clisp.org>
10642
10643         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
10644         sys/statvfs.h. When getmntinfo was found, check its declaration and
10645         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
10646
10647 2006-08-18  Bruno Haible  <bruno@clisp.org>
10648
10649         * m4/bison-i18n.m4: New file, from bison.
10650
10651 2006-08-18  Bruno Haible  <bruno@clisp.org>
10652
10653         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
10654         (ME_DUMMY): Treat "kernfs" as a dummy.
10655         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
10656
10657 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
10658
10659         Update from coreutils.
10660
10661         2006-08-15  Jim Meyering  <jim@meyering.net>
10662
10663         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
10664
10665         2006-01-17  Jim Meyering  <jim@meyering.net>
10666
10667         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
10668
10669         2006-01-11  Jim Meyering  <jim@meyering.net>
10670
10671         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
10672         Check for the lchmod function.
10673
10674 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
10675
10676         Update from coreutils.
10677
10678         * lib/__fpending.h: Add copyright notice.
10679         * lib/fprintftime.h: Likewise.
10680         * lib/savedir.c: Use (C) in copyright notice.
10681         * lib/savedir.h: Likewise.
10682
10683         2006-08-15  Jim Meyering  <jim@meyering.net>
10684
10685         * lib/at-func.c: New file, with the logic of all emulated at-functions.
10686         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
10687         in support of the EXPECTED_ERRNO macro.
10688         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
10689         definitions.  Instead, define the appropriate symbols and include
10690         "at-func.c".
10691         * lib/mkdirat.c (mkdirat): Likewise.
10692         * lib/fchmodat.c (fchmodat): Likewise.
10693         (ENOSYS): Remove definition.
10694         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
10695         it.  Don't include "unistd--.h" -- it wasn't ever used.
10696
10697         2006-01-17  Jim Meyering  <jim@meyering.net>
10698
10699         Rewrite fts.c not to change the current working directory,
10700         by using openat, fstatat, fdopendir, etc..
10701
10702         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
10703         (HAVE_OPENAT_SUPPORT): Define.
10704         [_LIBC] (fchdir): Don't undef or define; no longer used.
10705         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
10706         Now, this `function' always succeeds, and consumes its file descriptor
10707         parameter -- so callers must not close such FDs.  Update callers.
10708         (diropen_fd, opendirat, cwd_advance_fd): New functions.
10709         (diropen): Add parameter, SP.  Adjust all callers.
10710         Implement using diropen_fd, rather than open.
10711         (fts_open): Initialize new member, fts_cwd_fd.
10712         Remove fts_rft-setting code.
10713         (fts_close): Close fts_cwd_fd, if necessary.
10714         (__opendir2): Define in terms of opendir or opendirat,
10715         depending on whether the FST_NOCHDIR flag is set.
10716         (fts_build): Since fts_safe_changedir consumes its FD, and since
10717         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
10718         and close the dup'd file descriptor upon failure.
10719         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
10720         (fts_safe_changedir): Tweak semantics to reflect that this function
10721         now calls cwd_advance_fd and hence consumes its FD argument.
10722         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
10723         [struct FTS] (fts_rft): Remove now-unused member.
10724         [struct FTS] (fts_cycle.state): Improve comment.
10725
10726         * lib/openat.c (openat_needs_fchdir): New function.
10727         * lib/openat.h (openat_needs_fchdir): Declare it.
10728
10729 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
10730
10731         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
10732         Problem and fix reported by Pádraig Brady in
10733         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
10734
10735 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
10736
10737         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
10738
10739 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
10740
10741         * lib/memcoll.c (memcoll): Optimize for the common case where the
10742         arguments are bytewise equal.
10743
10744 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
10745
10746         * doc/regexprops-generic.texi: Add a copyright notice.
10747
10748 2006-08-15  Bruno Haible  <bruno@clisp.org>
10749
10750         * modules/tmpdir (License): Change to LGPL.
10751
10752 2006-08-15  Bruno Haible  <bruno@clisp.org>
10753
10754         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
10755         module.
10756
10757 2006-08-14  Simon Josefsson  <jas@extundo.com>
10758
10759         * config/srclist.txt: Add gnupload.
10760
10761 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
10762
10763         Change copyright notice from LGPL 2 to GPL 2, since that's the
10764         standard form used in the gnulib repository.
10765         * tests/test-lock.c: Likewise.
10766         * tests/test-stdint.c: Likewise.
10767         * tests/test-tls.c: Likewise.
10768
10769         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
10770         prelude-manager.  User shorter URLs for GNU projects, without '?'.
10771         Add copyright notice.
10772
10773         * check-module: Add copyright notice.  Output a copyright
10774         notice if "--version" is specified.
10775         * modules/COPYING: New file.
10776         * tests/test-getaddrinfo.c: Add copyright notice.
10777         * tests/test-verify.c: Likewise.
10778
10779 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
10780
10781         Change copyright notice from LGPL 2 to GPL 2, since that's the
10782         standard form used in the gnulib repository.
10783         * lib/lock.c: LGPL -> GPL.
10784         * lib/lock.h: Likewise.
10785         * lib/strnlen1.c: Likewise.
10786         * lib/strnlen1.h: Likewise.
10787         * lib/tls.c: Likewise.
10788         * lib/tls.h: Likewise.
10789         * lib/tmpdir.c: Likewise.
10790
10791         * lib/TODO: Remove; this belongs only in coreutils.
10792
10793 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
10794
10795         Add copyright notices to long-enough files that lack them, since
10796         otherwise the files aren't clearly free.  Use the same notice that
10797         getdate.texi already uses.
10798         * doc/alloca-opt.texi: Add copyright notice.
10799         * doc/alloca.texi: Likewise.
10800         * doc/ctime.texi: Likewise.
10801         * doc/functions.texi: Likewise.
10802         * doc/gcd.texi: Likewise.
10803         * doc/gnulib-tool.texi: Likewise.
10804         * doc/inet_ntoa.texi: Likewise.
10805         * doc/visibility.texi: Likewise.
10806
10807         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
10808         * doc/quote.texi: Add copyright notice.
10809
10810         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
10811         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
10812         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
10813         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
10814         is now obsolete, and give a pointer to the Sun list.
10815         Add copyright notice.
10816
10817 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
10818
10819         * config/srclistvars.sh: Add copyright notice.
10820
10821 2006-08-14  Eric Blake  <ebb9@byu.net>
10822
10823         Import the following change from libc:
10824
10825         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
10826
10827         Upstream bug 2997.
10828         * lib/misc/error.c: Add space between program name and message if file
10829         name is missing.
10830
10831 2006-08-12  Karl Berry  <karl@gnu.org>
10832
10833         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
10834         remove, these originate in gnulib now.
10835
10836 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10837
10838         * doc/Makefile (standards.info standards.html standards.dvi):
10839         Also depend on make-stds.texi.
10840
10841 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
10842
10843         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
10844         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
10845
10846         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
10847         in wchar_t.  Problem reported by Eric Blake.
10848
10849         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
10850         LEN is smaller than SIZE.  Suggested by Bruno Haible.
10851         Also, help the compiler to keep LEN in a register.
10852
10853 2006-08-11  Eric Blake  <ebb9@byu.net>
10854
10855         * users.txt: Sort.  Add tar.
10856
10857 2006-08-11  Bruno Haible  <bruno@clisp.org>
10858
10859         * users.txt: New file.
10860
10861 2006-08-11  Bruno Haible  <bruno@clisp.org>
10862
10863         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
10864         before <wchar.h>. Needed for OSF/1 and BSD/OS.
10865
10866 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
10867
10868         * modules/snprintf (Depends-on): Remove minmax.
10869         (Maintainer): Add self and Bruno.
10870
10871 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
10872
10873         * lib/.cppi-disable: Add snprintf.h, socket_.h.
10874         * lib/snprintf.c: Include <errno.h> and <limits.h>.
10875         (EOVERFLOW): Define if the system does not.
10876         Do not include "minmax.h"; it wasn't used.
10877         (snprintf): Don't assume size_t promotes to an unsigned type.
10878         Fix bug when generated string was too long for the buffer: the
10879         buffer's contents are supposed to be the initial prefix of the
10880         output.  Don't assume vasnprintf returns EOVERFLOW if the size
10881         exceeds INT_MAX; do the check ourselves.
10882
10883         Import the following changes from libc:
10884
10885         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
10886
10887         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
10888         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
10889         set wc to the byte which couldn't be converted.
10890         (re_string_reconstruct): Don't clear valid_raw_len before calling
10891         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
10892         tip_context using re_string_context_at.
10893
10894         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
10895
10896         * lib/posix/regex.h: g++ still cannot handled [restrict].
10897
10898         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
10899
10900         * lib/posix/regex.h: Remove special handling for VMS.
10901
10902 2006-08-10  Jim Meyering  <jim@meyering.net>
10903
10904         * modules/same-inode: New module.
10905         * modules/dev-ino: New module.
10906         * modules/cycle-check: Depend on these modules, rather than simply
10907         including their .h files.
10908         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
10909         required via m4/cycle-check.m4.
10910         * modules/same: Depend on new same-inode module, rather than
10911         including same-inode.h.
10912         * modules/chdir-safer: New file.
10913
10914         * modules/chown (Depends-on): Add stat-macros.
10915
10916 2006-08-10  Jim Meyering  <jim@meyering.net>
10917
10918         * m4/cycle-check.m4: New file.
10919         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
10920         * m4/dev-ino.m4, m4/same-inode.m4: New files.
10921
10922 2006-08-10  Eric Blake  <ebb9@byu.net>
10923
10924         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
10925         in from original proposal.
10926
10927 2006-08-10  Eric Blake  <ebb9@byu.net>
10928         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10929
10930         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
10931         namespace.
10932
10933 2006-08-10  Bruno Haible  <bruno@clisp.org>
10934
10935         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
10936         as well.
10937
10938 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
10939
10940         Sync from coreutils.
10941
10942         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
10943
10944         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
10945         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
10946
10947 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
10948
10949         * modules/restrict: Remove; no longer needed now that we assume
10950         Autoconf 2.59 or later.
10951         * MODULES.html.sh: Remove 'restrict'.
10952         * modules/argp (Depends-on): Remove 'restrict'.
10953         * modules/base64 (Depends-on): Likewise.
10954         * modules/gc (Depends-on): Likewise.
10955         * modules/getaddrinfo (Depends-on): Likewise.
10956         * modules/glob (Depends-on): Likewise.
10957         * modules/inet_ntop (Depends-on): Likewise.
10958         * modules/inet_pton (Depends-on): Likewise.
10959         * modules/memxor (Depends-on): Likewise.
10960         * modules/regex (Depends-on): Likewise.
10961         * modules/strtok_r (Depends-on): Likewise.
10962         * modules/time_r (Depends-on): Likewise.
10963
10964 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
10965
10966         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
10967         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
10968         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
10969         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
10970         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
10971         * m4/memxor.m4 (gl_MEMXOR): Likewise.
10972         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
10973         gl_C_RESTRICT replaced by AC_C_RESTRICT.
10974
10975         Merge from coreutils.
10976         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
10977         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
10978         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
10979         * m4/time_r.m4 (gl_TIME_R): Likewise.
10980
10981 2006-08-09  Karl Berry  <karl@gnu.org>
10982
10983         * config/srclist.txt: no more gettext-tools, per Bruno.
10984
10985 2006-08-08  Eric Blake  <ebb9@byu.net>
10986
10987         * modules/verror: New module.
10988         * MODULES.html.sh: Document it.
10989
10990 2006-08-08  Eric Blake  <ebb9@byu.net>
10991
10992         * lib/verror.h, lib/verror.c: New files.
10993
10994 2006-08-08  Eric Blake  <ebb9@byu.net>
10995
10996         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
10997         verror_at_line output complies with GNU Coding Standards even when
10998         file is NULL.
10999
11000 2006-08-07  Bruno Haible  <bruno@clisp.org>
11001
11002         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
11003         versions of AIX.
11004         Reported by Ralf Wildenhues.
11005
11006 2006-08-07  Bruno Haible  <bruno@clisp.org>
11007
11008         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
11009         in an AC_DEFUN. Needed so that the autoconf snippets can use
11010         AC_REQUIRE.
11011
11012 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11013
11014         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11015         Initialize pkgdata_DATA.
11016         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
11017         overriding it.
11018
11019 2006-08-06  Eric Blake  <ebb9@byu.net>
11020
11021         * lib/error.h: Fold in some upstream changes from glibc.
11022         * lib/error.c: Likewise.
11023
11024 2006-08-04  Bruno Haible  <bruno@clisp.org>
11025
11026         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11027         Make the mostlyclean-local rule depend on mostlyclean-generic.
11028         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
11029
11030 2006-07-31  Bruno Haible  <bruno@clisp.org>
11031
11032         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
11033         <stdlib.h>, <string.h>.
11034
11035 2006-07-30  Bruno Haible  <bruno@clisp.org>
11036
11037         * modules/readlink (License): Change to LGPL.
11038
11039 2006-07-30  Bruno Haible  <bruno@clisp.org>
11040
11041         * modules/javaversion (Makefile.am): Distribute javaversion.java and
11042         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
11043         set PKGDATADIR to point to it.
11044
11045 2006-07-30  Bruno Haible  <bruno@clisp.org>
11046
11047         * modules/csharpexec (configure.ac): Comment out macro invocation.
11048         * modules/javaexec (configure.ac): Likewise.
11049         * modules/javacomp-script (configure.ac): Likewise.
11050
11051         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
11052
11053 2006-07-30  Bruno Haible  <bruno@clisp.org>
11054
11055         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
11056         linked-list.
11057
11058 2006-07-30  Bruno Haible  <bruno@clisp.org>
11059
11060         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
11061
11062 2006-07-30  Bruno Haible  <bruno@clisp.org>
11063
11064         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11065         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
11066         get removed.
11067
11068 2006-07-29  Bruno Haible  <bruno@clisp.org>
11069
11070         Make it possible for gnulib-tool to work with locally modified or
11071         augmented gnulib repositories.
11072         * gnulib-tool (func_usage): Document --local-dir option.
11073         (local_gnulib_dir): New variable.
11074         Handle --local-dir option.
11075         (func_lookup_file): New function.
11076         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
11077         (func_get_description, func_get_filelist, func_get_description,
11078         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
11079         func_get_automake_snippet, func_get_include_directive,
11080         func_get_license, func_get_maintainer): Use func_lookup_file.
11081         (func_import, func_create_testdir): Use func_lookup_file.
11082
11083 2006-07-29  Bruno Haible  <bruno@clisp.org>
11084
11085         * modules/setenv (Depends-on): Add unistd.
11086
11087 2006-07-29  Bruno Haible  <bruno@clisp.org>
11088
11089         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
11090
11091 2006-07-29  Bruno Haible  <bruno@clisp.org>
11092
11093         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
11094
11095 2006-07-29  Bruno Haible  <bruno@clisp.org>
11096
11097         * gnulib-tool (import, update): If there is no Makefile.am, look at
11098         aclocal.m4, instead of bailing out.
11099
11100 2006-07-29  Bruno Haible  <bruno@clisp.org>
11101
11102         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
11103         Categorize the options by when they are useful.
11104
11105 2006-07-29  Bruno Haible  <bruno@clisp.org>
11106
11107         * gnulib-tool (func_usage): Document option --no-libtool.
11108         Handle option --no-libtool.
11109         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
11110         for changed semantics of $libtool variable.
11111         (func_import): Likewise. If libtool is not used, show this through
11112         an option --no-libtool.
11113         (func_create_testdir): Update.
11114
11115 2006-07-29  Bruno Haible  <bruno@clisp.org>
11116
11117         * gnulib-tool (func_import): Extend error message about missing
11118         --doc-base.
11119
11120 2006-07-29  Bruno Haible  <bruno@clisp.org>
11121
11122         * gnulib-tool (func_import): Don't create the $docbase directory if
11123         there is no file to store there.
11124
11125 2006-07-29  Bruno Haible  <bruno@clisp.org>
11126
11127         * gnulib-tool (autoconf_minversion): If a --dir option is given and
11128         relevant, look for configure.ac there, not in the current directory.
11129         Also use a simple search for AC_PREREQ, not "autoconf --trace".
11130
11131 2006-07-29  Bruno Haible  <bruno@clisp.org>
11132
11133         * gnulib-tool (SORT): New variable.
11134         (func_usage): Undocument --assume-autoconf option.
11135         Remove --assume-autoconf option handling.
11136         (autoconf_minversion): Determine from the contents of configure.ac.
11137         (func_import): Remove autoconf_minversion handling.
11138         Suggested by Eric Blake.
11139
11140 2006-07-29  Bruno Haible  <bruno@clisp.org>
11141
11142         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
11143
11144 2006-07-29  Bruno Haible  <bruno@clisp.org>
11145
11146         * config/srclist.txt (*setenv.[ch]): Remove rules.
11147
11148 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11149
11150         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
11151
11152 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11153
11154         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
11155         arpa/inet.h.
11156
11157 2006-07-28  Simon Josefsson  <jas@extundo.com>
11158
11159         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
11160         * modules/inet_pton (Depends-on): Likewise.
11161
11162 2006-07-28  Simon Josefsson  <jas@extundo.com>
11163
11164         * m4/netinet_in_h.m4: New file.
11165
11166 2006-07-28  Simon Josefsson  <jas@extundo.com>
11167
11168         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
11169         #include's.
11170
11171 2006-07-28  Simon Josefsson  <jas@extundo.com>
11172
11173         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
11174         #include's.
11175
11176 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
11177
11178         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
11179         setgid on directories only if they set these bits.
11180         * lib/modechange.h: Remove obsolete comment about masks.
11181
11182 2006-07-28  Eric Blake  <ebb9@byu.net>
11183
11184         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
11185         macro expansion.
11186
11187 2006-07-28  Bruno Haible  <bruno@clisp.org>
11188
11189         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
11190
11191 2006-07-28  Bruno Haible  <bruno@clisp.org>
11192
11193         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
11194
11195 2006-07-28  Bruno Haible  <bruno@clisp.org>
11196
11197         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
11198         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
11199         Define fallbacks.
11200         Avoids link error on FreeBSD 4.x.
11201         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11202
11203         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
11204         encoding.
11205         * lib/mbswidth.c (iswcntrl): Likewise.
11206
11207 2006-07-27  Bruno Haible  <bruno@clisp.org>
11208
11209         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
11210         test.
11211
11212 2006-07-27  Bruno Haible  <bruno@clisp.org>
11213
11214         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
11215         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
11216         defined.
11217
11218 2006-07-26  Eric Blake  <ebb9@byu.net>
11219
11220         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
11221
11222 2006-07-26  Eric Blake  <ebb9@byu.net>
11223
11224         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
11225         like mingw that lack mkstemp.
11226         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
11227         avoid compilation warning on mingw.
11228
11229 2006-07-26  Bruno Haible  <bruno@clisp.org>
11230
11231         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
11232         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
11233         INT_FAST*_MIN, INTPTR_MIN.
11234
11235 2006-07-25  Bruno Haible  <bruno@clisp.org>
11236
11237         * modules/version-etc (Depends-on): Add stdarg.
11238
11239 2006-07-25  Bruno Haible  <bruno@clisp.org>
11240
11241         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
11242         complex commands.
11243
11244 2006-07-25  Bruno Haible  <bruno@clisp.org>
11245
11246         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
11247         defined in <stdarg.h> or config.h.
11248
11249 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
11250
11251         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
11252         (gl_STDIO_SAFER): Remove.
11253
11254 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
11255
11256         * MODULES.html.sh (File stream based Input/Output):
11257         Add fopen-safer, tmpfile-safer; remove stdio-safer.
11258         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
11259         * modules/fopen-safer, modules/tmpfile-safer: New files.
11260         * modules/stdio-safer: Remove.
11261
11262 2006-07-24  Bruno Haible  <bruno@clisp.org>
11263
11264         * modules/tmpdir: New file.
11265         * MODULES.html.sh (File system functions): Add it.
11266
11267 2006-07-24  Bruno Haible  <bruno@clisp.org>
11268
11269         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
11270         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
11271
11272 2006-07-24  Bruno Haible  <bruno@clisp.org>
11273
11274         * modules/clean-temp: New file.
11275
11276 2006-07-24  Bruno Haible  <bruno@clisp.org>
11277
11278         * m4/tmpdir.m4: New file, from GNU gettext.
11279
11280 2006-07-24  Bruno Haible  <bruno@clisp.org>
11281
11282         * lib/tmpdir.h: New file, from GNU gettext.
11283         * lib/tmpdir.c: New file, from GNU gettext.
11284
11285 2006-07-24  Bruno Haible  <bruno@clisp.org>
11286
11287         * lib/clean-temp.h: New file, from GNU gettext.
11288         * lib/clean-temp.c: New file, from GNU gettext.
11289
11290 2006-07-23  Eric Blake  <ebb9@byu.net>
11291
11292         * modules/stdio-safer (Files): Add tmpfile-safer.c.
11293         (Depends-on): Add binary-io.
11294
11295 2006-07-23  Eric Blake  <ebb9@byu.net>
11296
11297         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
11298
11299 2006-07-23  Eric Blake  <ebb9@byu.net>
11300
11301         * lib/tmpfile-safer.c: New file.
11302         * lib/stdio-safer.h (fopen_safer): Add prototype.
11303         * lib/stdio--.h (tmpfile): Make safer.
11304
11305 2006-07-23  Bruno Haible  <bruno@clisp.org>
11306
11307         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
11308         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
11309         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
11310         gl_linked_remove_at): Use it.
11311
11312 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11313         and Simon Josefsson <jas@extundo.com>
11314
11315         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
11316
11317         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
11318
11319 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
11320
11321         * modules/close-stream: New file.
11322         * modules/closeout (Description): Make it clear that it exits
11323         with a diagnostic on error.
11324         (Depends-on): Add close-stream.  Remove fpending, stdbool.
11325         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
11326
11327 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
11328
11329         * m4/close-stream.m4: New file.
11330
11331 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
11332
11333         * lib/close-stream.c, lib/close-stream.h: New files.
11334
11335 2006-07-22  Bruno Haible  <bruno@clisp.org>
11336
11337         Merge from GNU gettext 0.15.
11338
11339         2006-05-01  Bruno Haible  <bruno@clisp.org>
11340
11341                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
11342
11343         2006-07-22  Bruno Haible  <bruno@clisp.org>
11344
11345                 * modules/javaversion: New file.
11346                 * MODULES.html.sh (Java): Add javaversion.
11347
11348         2006-03-12  Bruno Haible  <bruno@clisp.org>
11349
11350                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
11351
11352         2005-12-04  Bruno Haible  <bruno@clisp.org>
11353
11354                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
11355                 (untested).
11356
11357         2006-06-21  Bruno Haible  <bruno@clisp.org>
11358
11359                 Avoid warnings from recent versions of mcs.
11360                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
11361                 -o, -L, -r any more. Use options documented since mcs-1.0
11362                 instead. Similarly for -g.
11363
11364         2005-12-04  Bruno Haible  <bruno@clisp.org>
11365
11366                 * build-aux/csharpcomp.sh.in: Suffix for resources is
11367                 .resources, not .resource.
11368
11369         2005-07-09  Bruno Haible  <bruno@clisp.org>
11370
11371                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
11372                 add a .dll suffix.
11373                 Reported by Mark Junker <mjscod@gmx.de>.
11374
11375         2006-07-22  Bruno Haible  <bruno@clisp.org>
11376
11377                 * modules/gettext: Upgrade to gettext-0.15.
11378                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
11379                 m4/visibility.m4.
11380                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
11381
11382 2006-07-22  Bruno Haible  <bruno@clisp.org>
11383
11384         Merge from GNU gettext 0.15.
11385
11386         2006-03-25  Bruno Haible  <bruno@clisp.org>
11387
11388                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
11389
11390         2006-07-21  Bruno Haible  <bruno@clisp.org>
11391
11392                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
11393                 "1.1".
11394
11395         2006-05-09  Bruno Haible  <bruno@clisp.org>
11396
11397                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
11398                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
11399                 for the conftestver execution.
11400
11401         2006-05-01  Bruno Haible  <bruno@clisp.org>
11402
11403                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
11404                 optional target-version argument. Verify that the compiler
11405                 groks source of the specified source-version, or add -source
11406                 option as necessary. Verify that the compiler produces
11407                 bytecode in the specified target-version, or add -target and
11408                 -source options as necessary. Make the result of the test
11409                 available as variable CONF_JAVAC. Also log error output in
11410                 config.log.
11411
11412         2006-03-11  Bruno Haible  <bruno@clisp.org>
11413
11414                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
11415
11416         2006-05-09  Bruno Haible  <bruno@clisp.org>
11417
11418                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
11419                 CLASSPATH_SEPARATOR to a semicolon.
11420
11421         2006-03-12  Bruno Haible  <bruno@clisp.org>
11422
11423                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
11424                 available as variable CONF_JAVA, for subsequent autoconf
11425                 tests. Also log error output in config.log.
11426
11427         2006-07-19  Bruno Haible  <bruno@clisp.org>
11428
11429                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
11430                 that getline works on glibc2 systems. Needed to avoid trouble
11431                 in relocatable.c.
11432                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
11433
11434         2005-12-04  Bruno Haible  <bruno@clisp.org>
11435
11436                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
11437                 launcher (untested).
11438
11439         2005-12-04  Bruno Haible  <bruno@clisp.org>
11440
11441                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
11442
11443         2006-07-22  Bruno Haible  <bruno@clisp.org>
11444
11445                 * gettext.m4: Update from GNU gettext-0.15.
11446                 * nls.m4: Likewise.
11447                 * po.m4: Likewise.
11448                 * inttypes-pri.m4: Likewise.
11449                 * inttypes-h.m4: Renamed from inttypes.m4.
11450                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
11451
11452 2006-07-22  Bruno Haible  <bruno@clisp.org>
11453
11454         Merge from GNU gettext 0.15.
11455
11456         2005-07-05  Bruno Haible  <bruno@clisp.org>
11457
11458                 * printf-args.c (printf_fetchargs): Work around broken
11459                 definition of wint_t on mingw.
11460
11461         2005-02-12  Bruno Haible  <bruno@clisp.org>
11462
11463                 * xallocsa.h: Add extern "C" for C++.
11464
11465         2006-05-17  Bruno Haible  <bruno@clisp.org>
11466
11467                 Cygwin portability.
11468                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
11469
11470         2006-04-30  Bruno Haible  <bruno@clisp.org>
11471
11472                 * progreloc.c: Include <mach-o/dyld.h> if available.
11473                 (find_executable): Use _NSGetExecutablePath when possible.
11474
11475         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
11476
11477                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
11478                 function.
11479
11480         2005-12-29  Bruno Haible  <bruno@clisp.org>
11481
11482                 * progreloc.c (set_program_name_and_installdir): Fix
11483                 compilation error.
11484
11485         2005-12-04  Bruno Haible  <bruno@clisp.org>
11486
11487                 Cygwin portability.
11488                 * progreloc.c: Include <windows.h> also on Cygwin.
11489                 (find_executable): Add support for Cygwin.
11490                 (set_program_name_and_installdir): Handle also platforms with
11491                 nonempty EXEEXT.
11492
11493         2006-07-11  Bruno Haible  <bruno@clisp.org>
11494
11495                 * javacomp.c: Fix a comment.
11496                 Reported by Jim Meyering.
11497
11498         2006-04-30  Bruno Haible  <bruno@clisp.org>
11499
11500                 * javacomp.h (compile_java_class): Add source_version,
11501                 target_version arguments.
11502                 * javacomp.c: Rewritten to choose only a compiler that
11503                 respects the specified source_version and target_version.
11504
11505         2006-06-27  Bruno Haible  <bruno@clisp.org>
11506
11507                 Assume correct S_ISDIR macro.
11508                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
11509
11510         2006-07-22  Bruno Haible  <bruno@clisp.org>
11511
11512                 * javaversion.h: New file, from GNU gettext.
11513                 * javaversion.c: New file, from GNU gettext.
11514                 * javaversion.java: New file, from GNU gettext.
11515                 * javaversion.class: New file, from GNU gettext.
11516
11517         2006-05-17  Bruno Haible  <bruno@clisp.org>
11518
11519                 Cygwin portability.
11520                 * javaexec.c (execute_java_class): Test for jview program
11521                 also on Cygwin.
11522
11523         2006-04-09  Bruno Haible  <bruno@clisp.org>
11524
11525                 * fatal-signal.c: Don't include string.h.
11526                 (at_fatal_signal): Use a copying loop instead of memcpy.
11527
11528         2005-12-04  Bruno Haible  <bruno@clisp.org>
11529
11530                 * csharpexec.c: Add support for 'clix' launcher (untested).
11531                 (execute_csharp_using_sscli): New function.
11532                 (execute_csharp_program): Call it.
11533
11534         2006-06-21  Bruno Haible  <bruno@clisp.org>
11535
11536                 Avoid warnings from recent versions of mcs.
11537                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
11538                 -o, -L, -r any more. Use options documented since mcs-1.0
11539                 instead. Similarly for -g.
11540
11541         2005-07-09  Bruno Haible  <bruno@clisp.org>
11542
11543                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
11544                 add a .dll suffix.
11545                 Reported by Mark Junker <mjscod@gmx.de>.
11546
11547         2006-06-17  Bruno Haible  <bruno@clisp.org>
11548
11549                 * config.charset: Update for NetBSD 3.0.
11550
11551         2006-05-17  Bruno Haible  <bruno@clisp.org>
11552
11553                 Cygwin portability.
11554                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
11555
11556         2006-05-16  Bruno Haible  <bruno@clisp.org>
11557
11558                 * localcharset.c [CYGWIN]: Include <windows.h>.
11559                 (get_charset_aliases): For Cygwin, return the same CPxxx
11560                 aliases list as under WIN32.
11561                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
11562                 the environment variables. Fall back to GetACP().
11563
11564         2006-04-05  Bruno Haible  <bruno@clisp.org>
11565
11566                 * config.charset: Update Juan Manuel Guerrero's address.
11567
11568         2005-02-12  Bruno Haible  <bruno@clisp.org>
11569
11570                 * allocsa.h: Add extern "C" for C++.
11571
11572         2005-02-10  Bruno Haible  <bruno@clisp.org>
11573
11574                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
11575                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
11576
11577         2006-07-22  Bruno Haible  <bruno@clisp.org>
11578
11579                 * gettext.h: Update to GNU gettext-0.15.
11580
11581 2006-07-22  Bruno Haible  <bruno@clisp.org>
11582
11583         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
11584         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
11585         lib-prefix.m4, longdouble.m4, ssize_t.m4.
11586
11587 2006-07-21  Eric Blake  <ebb9@byu.net>
11588
11589         * modules/stdlib-safer: New file.
11590         * MODULES.html.sh (File stream based Input/Output): Add
11591         stdlib-safer.
11592
11593 2006-07-21  Eric Blake  <ebb9@byu.net>
11594
11595         * lib/stdlib-safer.h: New file from coreutils, required by
11596         stdlib--.h.
11597
11598 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
11599
11600         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
11601
11602 2006-07-20  Bruno Haible  <bruno@clisp.org>
11603
11604         * gnulib-tool: Recognize new option --assume-autoconf.
11605         (autoconf_minversion): New variable.
11606         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
11607
11608 2006-07-20  Bruno Haible  <bruno@clisp.org>
11609
11610         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
11611
11612 2006-07-19  Derek R. Price  <derek@ximbiot.com>
11613
11614         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
11615         Reindent and repaginate.
11616
11617 2006-07-19  Derek Price  <derek@ximbiot.com>
11618
11619         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
11620         Correct grammar.
11621
11622 2006-07-17  Bruno Haible  <bruno@clisp.org>
11623
11624         * modules/list: New file.
11625         * modules/array-list: New file.
11626         * modules/carray-list, modules/carray-list-tests: New files.
11627         * modules/linked-list, modules/linked-list-tests: New files.
11628         * modules/avltree-list, modules/avltree-list-tests: New files.
11629         * modules/rbtree-list, modules/rbtree-list-tests: New files.
11630         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
11631         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
11632         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
11633         * modules/oset: New file.
11634         * modules/array-oset: New file.
11635         * modules/avltree-oset, modules/avltree-oset-tests: New files.
11636         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
11637         * tests/test-carray_list.c: New file.
11638         * tests/test-linked_list.c: New file.
11639         * tests/test-avltree_list.c: New file.
11640         * tests/test-rbtree_list.c: New file.
11641         * tests/test-linkedhash_list.c: New file.
11642         * tests/test-avltreehash_list.c: New file.
11643         * tests/test-rbtreehash_list.c: New file.
11644         * tests/test-avltree_oset.c: New file.
11645         * tests/test-rbtree_oset.c: New file.
11646         * MODULES.html.sh (Container data structures): New section.
11647
11648 2006-07-17  Bruno Haible  <bruno@clisp.org>
11649
11650         * m4/gl_list.m4: New file.
11651
11652 2006-07-17  Bruno Haible  <bruno@clisp.org>
11653
11654         * lib/gl_list.h: New file.
11655         * lib/gl_list.c: New file.
11656         * lib/gl_array_list.h: New file.
11657         * lib/gl_array_list.c: New file.
11658         * lib/gl_carray_list.h: New file.
11659         * lib/gl_carray_list.c: New file.
11660         * lib/gl_linked_list.h: New file.
11661         * lib/gl_linked_list.c: New file.
11662         * lib/gl_anylinked_list1.h: New file.
11663         * lib/gl_anylinked_list2.h: New file.
11664         * lib/gl_avltree_list.h: New file.
11665         * lib/gl_avltree_list.c: New file.
11666         * lib/gl_anyavltree_list1.h: New file.
11667         * lib/gl_anyavltree_list2.h: New file.
11668         * lib/gl_rbtree_list.h: New file.
11669         * lib/gl_rbtree_list.c: New file.
11670         * lib/gl_anyrbtree_list1.h: New file.
11671         * lib/gl_anyrbtree_list2.h: New file.
11672         * lib/gl_anytree_list1.h: New file.
11673         * lib/gl_anytree_list2.h: New file.
11674         * lib/gl_linkedhash_list.h: New file.
11675         * lib/gl_linkedhash_list.c: New file.
11676         * lib/gl_anyhash_list1.h: New file.
11677         * lib/gl_anyhash_list2.h: New file.
11678         * lib/gl_avltreehash_list.h: New file.
11679         * lib/gl_avltreehash_list.c: New file.
11680         * lib/gl_rbtreehash_list.h: New file.
11681         * lib/gl_rbtreehash_list.c: New file.
11682         * lib/gl_anytreehash_list1.h: New file.
11683         * lib/gl_anytreehash_list2.h: New file.
11684
11685         * lib/gl_oset.h: New file.
11686         * lib/gl_oset.c: New file.
11687         * lib/gl_array_oset.h: New file.
11688         * lib/gl_array_oset.c: New file.
11689         * lib/gl_avltree_oset.h: New file.
11690         * lib/gl_avltree_oset.c: New file.
11691         * lib/gl_rbtree_oset.h: New file.
11692         * lib/gl_rbtree_oset.c: New file.
11693         * lib/gl_anytree_oset.h: New file.
11694
11695 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
11696
11697         * m4/mkancesdirs.m4: New file.
11698         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
11699         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
11700         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
11701         it.
11702
11703 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
11704
11705         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
11706         * lib/mkancesdirs.h: New files.
11707         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
11708         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
11709         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
11710         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
11711         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
11712         callers changed.  Revamp internals significantly, by not
11713         attempting to create directories that are temporarily more
11714         permissive than the final results.  Do not attempt to use
11715         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
11716         This removes some race conditions, fixes some bugs, and simplifies
11717         things.  Use new dirchownmod function to do owner and mode changes.
11718         * lib/mkdir-p.h: Likewise.
11719         * lib/modechange.c (octal_to_mode): New function.
11720         (struct mode_change): New member mentioned.
11721         (make_node_op_equals): New arg mentioned.  All callers changed.
11722         (mode_compile): Keep track of which mode bits the user has explicitly
11723         mentioned.
11724         (mode_adjust): New arg DIR, so that we implement the X op correctly.
11725         New arg PMODE_BITS, to keep track of which mode bits the user
11726         mentioned; it treats S_ISUID and S_ISGID speciall.
11727         All callers changed.
11728         * lib/modechange.h: Likewise.
11729
11730 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
11731
11732         * MODULES.html.sh: Add mkancestors.
11733         * modules/mkancesdirs: New module.
11734         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
11735         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
11736         The chdir-safer and afs files are now orphans; I'll remove them
11737         unless someone speaks up.
11738         Add lib/dirchownmod.c, lib/dirchownmod.h.
11739         (Depends-on): Remove alloca, chown, save-cwd, dirname.
11740         Add lchown, mkancesdirs.
11741         (Maintainer): Add self.
11742
11743 2006-07-15  Karl Berry  <karl@gnu.org>
11744
11745         * gnulib-tool: help message wording/arrangement.
11746
11747 2006-07-14  Simon Josefsson  <jas@extundo.com>
11748
11749         * doc/gnulib.texi (Libtool and Windows): New section.
11750
11751 2006-07-12  Simon Josefsson  <jas@extundo.com>
11752
11753         * modules/gendocs (License): Fix license, approved by Karl.
11754
11755 2006-07-12  Eric Blake  <ebb9@byu.net>
11756
11757         * MODULES.html.sh: Add gendocs.
11758
11759 2006-07-11  Eric Blake  <ebb9@byu.net>
11760
11761         * modules/fdl: New module, to install doc/fdl.texi.
11762         * MODULES.html.sh: Add new section for documentation modules.
11763         * gnulib-tool: Avoid space-tab.
11764         (--doc-base): New option, to manage files from doc.
11765
11766 2006-07-11  Eric Blake  <ebb9@byu.net>
11767
11768         * m4/absolute-header.m4: Fix comments to match recent change.
11769
11770 2006-07-11  Eric Blake  <ebb9@byu.net>
11771
11772         * gnulib-tool: List --doc-base before --tests-base.
11773
11774 2006-07-11  Derek R. Price  <derek@ximbiot.com>
11775
11776         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
11777
11778 2006-07-11  Bruno Haible  <bruno@clisp.org>
11779
11780         * README: Mention where to put documentation.
11781
11782 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11783
11784         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
11785
11786 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
11787
11788         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
11789         to stdint.m4.
11790
11791 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
11792
11793         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
11794         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
11795         "no/such/file/stdint.h" when there is no such file, so that
11796         the resulting C code can be parsed by dodgy compilers.
11797         Problems reported by Bob Proulx.
11798
11799 2006-07-10  Derek R. Price  <derek@ximbiot.com>
11800
11801         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
11802         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
11803         macros into the GNU _D_EXACT_NAMLEN.
11804         * lib/savedir.c:  Likewise.
11805         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
11806
11807 2006-07-10  Derek R. Price  <derek@ximbiot.com>
11808         and Paul Eggert  <eggert@cs.ucla.edu>
11809
11810         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
11811         * m4/savedir.m4:
11812         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
11813         macros into the GNU _D_EXACT_NAMLEN.
11814
11815 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
11816
11817         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
11818         around the absolute name, to work around a problem with the HP-UX
11819         11.23 native C compiler, reported by Bob Proulx.
11820
11821 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
11822
11823         * doc/maintain.texi, make-stds.texi: Sync from
11824         <http://savannah.gnu.org/projects/gnustandards>.
11825
11826 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
11827
11828         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
11829
11830 2006-07-09  Jim Meyering  <jim@meyering.net>
11831
11832         * m4/glob.m4: Remove a doubled word in a comment.
11833
11834 2006-07-09  Jim Meyering  <jim@meyering.net>
11835
11836         * lib/argp-pv.c: Remove a doubled word in a comment.
11837         * lib/check-version.c (check_version): Likewise.
11838         * lib/javacomp.c (compile_java_class): Likewise.
11839
11840 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
11841
11842         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
11843         for the benefit of people using Autoconf 2.60.  If you want to
11844         support older Autoconf versions you can copy m4/onceonly_2_57.m4
11845         (or m4/onceonly.m4, if pre-2.57) manually.
11846
11847 2006-07-08  Jim Meyering  <jim@meyering.net>
11848
11849         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
11850         comment.
11851         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
11852         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
11853         comment.
11854
11855 2006-07-08  Jim Meyering  <jim@meyering.net>
11856
11857         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
11858
11859 2006-07-07  Simon Josefsson  <jas@extundo.com>
11860
11861         * tests/test-crc.c: Change expected crc value, the test vector
11862         were probably computed using the old broken crc.c?
11863
11864 2006-07-06  Simon Josefsson  <jas@extundo.com>
11865
11866         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
11867         now the canonical place for the M4 file).
11868
11869         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
11870         from the sys_socket dependency now.
11871
11872         * modules/inet_pton (Files): Ditto.
11873
11874         * modules/inet_ntop (Files): Ditto.
11875
11876 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11877
11878         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
11879         not gl_PREREQ_GETUSERSHELL.
11880
11881 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11882
11883         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
11884         with only one argument, for Autoconf 2.60.
11885         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
11886         expand to nothing, so add a shell command to avoid syntax error.
11887         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
11888
11889 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11890
11891         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
11892
11893 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
11894
11895         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
11896         no longer needed.  Check for isblank decl.
11897         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
11898         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
11899         of existence.
11900
11901 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
11902
11903         * lib/getloadavg.c: Use __VMS, not VMS.
11904         * lib/getopt.c: Likewise.
11905         * lib/getpagesize.h: Likewise.
11906         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
11907         and probably does not work.
11908
11909 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
11910
11911         * lib/.cppi-disable: Add wcwidth.
11912         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
11913         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
11914         (ISGRAPH): Remove.  All uses changed to isgraph.
11915         (FOLD) [!defined _LIBC]: Remove special case.
11916         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
11917         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
11918         HAVE_ISBLANK.
11919         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
11920         case.
11921
11922 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
11923
11924         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
11925         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
11926         brackets.  Other minor changes to suppress some compiler
11927         warnings.
11928
11929 2006-07-06  Derek R. Price  <derek@ximbiot.com>
11930         and Paul Eggert  <eggert@cs.ucla.edu>
11931
11932         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
11933         of invoking obsolescent AC_HEADER_DIRENT macro.
11934         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
11935         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
11936         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
11937         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
11938         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
11939         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
11940         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
11941         * m4/readdir.m4: Remove; no longer needed.
11942
11943 2006-07-06  Derek R. Price  <derek@ximbiot.com>
11944         and Paul Eggert  <eggert@cs.ucla.edu>
11945
11946         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
11947         Don't worry about this obsolete case any more.
11948         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
11949         directories.
11950         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
11951         worry about this obsolete case any more.
11952         * lib/fts.c: Likewise.
11953         * lib/getcwd.c: Likewise.
11954         * lib/glob.h: Likewise.
11955         * lib/savedir.c: Likewise.
11956
11957 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
11958
11959         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
11960         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
11961         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
11962         needed.
11963         All uses removed.
11964         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
11965         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
11966         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
11967         needed.
11968         * m4/getdate.m4 (gl_GETDATE): Likewise.
11969         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
11970         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
11971         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
11972         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
11973         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
11974         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
11975         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
11976         needed.
11977
11978 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
11979
11980         * lib/memcasecmp.c: Include <limits.h>.
11981         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
11982         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
11983         Don't assume isdigit succeeds only on '0' through '9'.
11984
11985 2006-07-05  Eric Blake  <ebb9@byu.net>
11986
11987         * modules/getaddrinfo (Depends-on): Add snprintf.
11988
11989 2006-07-05  Eric Blake  <ebb9@byu.net>
11990
11991         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
11992         to avoid 'header present but could not be compiled' on cygwin.
11993
11994 2006-07-05  Eric Blake  <ebb9@byu.net>
11995
11996         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
11997         missing from netdb.h.
11998         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
11999
12000 2006-07-05  Derek R. Price  <derek@ximbiot.com>
12001
12002         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
12003         no longer needed.
12004         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
12005         * m4/getdate.m4 (gl_GETDATE): Likewise.
12006         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
12007         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
12008         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
12009         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
12010         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
12011
12012 2006-07-05  Derek R. Price  <derek@ximbiot.com>
12013
12014         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
12015         All uses of is_space replaced by isspace.
12016         * lib/exit.h: Don't talk about STDC_HEADERS.
12017         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
12018         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
12019         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
12020         replaced by isprint etc.
12021         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
12022         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
12023         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
12024         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
12025         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
12026         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
12027
12028 2006-07-05  Bruno Haible  <bruno@clisp.org>
12029
12030         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
12031         the function exists, before testing against AIX.
12032         Reported by Martin Lambers <marlam@marlam.de>.
12033
12034 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
12035
12036         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
12037         From Mark D. Baushke.
12038
12039 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
12040
12041         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
12042         to the absolute name, not just one, to bypass Sun C 5.8's
12043         "warning: #include of /usr/include/... may be non-portable".
12044
12045 2006-07-04  Eric Blake  <ebb9@byu.net>
12046
12047         * modules/dirname-tests: New test module.
12048         * tests/test-dirname.c: New file, replacing dirname.c
12049         TEST_DIRNAME section that was recently deleted.
12050
12051 2006-07-04  Bruno Haible  <bruno@clisp.org>
12052
12053         Assume ANSI C header files and <ctype.h> functions.
12054         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
12055         (mbsnwidth): Use isprint, iscntrl instead.
12056
12057 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12058
12059         Merge from coreutils.
12060         * MODULES.html.sh: Add xstrtold.
12061         * modules/xstrtold: New file.
12062         * modules/cycle-check (Files): Add lib/same-inode.h.
12063         * modules/dirname (Files): Add m4/double-slash-root.m4.
12064         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
12065         * modules/mkdir-p (Files): Add lib/same-inode.h.
12066         * modules/same (Files): Add lib/same-inode.h.
12067
12068 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12069
12070         * m4/absolute-header.m4: Renamed from full-header-path.m4.
12071         This is to keep the terminology clean; POSIX talks about
12072         "absolute pathnames", not "full pathnames", but the GNU
12073         Coding Standards say to use "path" for something else;
12074         so use "absolute" to keep both sides happy.
12075         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
12076         Set gl_absolute_header, not gl_full_header_path.
12077         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
12078         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
12079         All uses changed.
12080
12081         Merge from coreutils.
12082
12083         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
12084
12085         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
12086         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
12087         want to require the building of c-strtod.o.
12088         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
12089         needs -lm directly.
12090         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
12091
12092         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
12093
12094         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
12095         --as-needed option if available.  Problem reported by Albert Chin in
12096         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
12097         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
12098         cc merely issues a bunch of annoying warnings for --as-needed
12099         (this problem was reported by Bob Proulx).  Also, try linking with
12100         -lm to detect a bug in binutils 2.16 (this problem was reported
12101         by Ralf Wildenhues).
12102
12103         2006-06-18  Jim Meyering  <jim@meyering.net>
12104
12105         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
12106         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
12107         macro.
12108         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
12109         also check for glibc-2.4's abort-inducing bug.
12110
12111         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
12112         Low-probability clean-up should be to use rmdir to get rid of
12113         the just-created directory, not unlink.
12114
12115         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
12116         configure fail, and request a bug report to inform us about it.
12117         Add a comment that, barring reports to the contrary, in 2007 we'll
12118         assume ftruncate is universally available.
12119
12120         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
12121
12122         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
12123
12124         2006-03-12  Jim Meyering  <jim@meyering.net>
12125
12126         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
12127         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
12128         * m4/same.m4 (gl_SAME): Likewise.
12129         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
12130
12131         2006-03-11  Eric Blake  <ebb9@byu.net>
12132
12133         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
12134         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
12135         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
12136         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
12137
12138 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12139
12140         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
12141         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
12142         reported by Mark D. Baushke, one in
12143         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
12144
12145         Merge from coreutils.
12146
12147         * lib/.cppi-disable: Add stdint_.h.
12148         * lib/.cvsignore: Add stdint.h.
12149
12150         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
12151
12152         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
12153         both double and long double versions.
12154         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
12155         * lib/xstrtold.c: New file.
12156         * lib/xstrtod.h (xstrtold): New decl.
12157
12158         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
12159
12160         * lib/filemode.c (setst): Remove.
12161         (strmode): Rewrite to avoid setst.  This makes the code shorter,
12162         (arguably) clearer, and the generated code is a bit smaller on my
12163         Debian GNU/Linux stable x86 host.
12164
12165         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
12166
12167         * lib/filemode.c: Include "filemode.h" first, to test the interface.
12168         Assume that filemode.h includes sys/types.h and sys/stat.h.
12169         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
12170         (ftypelet): Reorder to put common cases first, for efficiency.
12171         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
12172         to do 'M'.
12173         (strmode): Renamed from mode_string, and now stores 12 bytes instead
12174         of 10, for compatibility with FreeBSD.  All callers changed.
12175         (filemodestring): Now stores 12 bytes instead of 10, and sets file
12176         types that can't be deduced solely from st_mode.  First arg is now a
12177         const pointer.
12178         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
12179         (strmode): Renamed from mode_string.
12180         (filemodestring): New decl.
12181         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
12182         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
12183         needed.
12184         (S_ISPORT, S_ISWHT): New macros, if not already defined.
12185
12186         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
12187
12188         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
12189         fsusage.h now does that.  Include fsusage.h first, to test interface.
12190         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
12191         at most one method (the old code could have generated decls that
12192         didn't conform to C89, not that this was ever exercised).
12193         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
12194
12195         2006-03-19  Jim Meyering  <jim@meyering.net>
12196
12197         Work even in a chroot where d_ino values for entries in "/"
12198         don't match the stat.st_ino values for the same names.
12199         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
12200         number, iterate through all entries again, using lstat instead.
12201         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
12202         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
12203
12204         * lib/getcwd.c (__getcwd): Clarify a comment.
12205         Use memcpy in place of a call to strcpy.
12206
12207         2006-03-12  Jim Meyering  <jim@meyering.net>
12208
12209         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
12210         matches that of the current directory (which we're about to chdir ".."
12211         out of), then save the dev-ino of the parent, instead.
12212
12213         * lib/same-inode.h (SAME_INODE): New file/macro.
12214         * lib/chdir-safer.c (SAME_INODE): Remove definition.
12215         Include "same-inode.h", instead.
12216         * lib/same.c: Likewise.
12217         * lib/cycle-check.h: Include "same-inode.h".
12218         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
12219         * lib/cycle-check.c (SAME_INODE): Remove definition.
12220         * lib/root-dev-ino.h: Include "same-inode.h".
12221
12222         2006-03-11  Eric Blake  <ebb9@byu.net>
12223
12224         * lib/same.c (same_name): s/base_name/last_component/
12225         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
12226         * lib/filenamecat.c (file_name_concat): Likewise.
12227
12228         2006-03-11  Eric Blake  <ebb9@byu.net>,
12229                     Paul Eggert  <eggert@cs.ucla.edu>
12230
12231         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
12232         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
12233         drive prefix.
12234         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
12235         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
12236         (last_component): New method.
12237         * lib/dirname.c (dir_len): Determine when drive letters need a
12238         subsequent slash.  Preserve // when it is special.
12239         (dir_name): Don't append dot when drive letter is absolute.
12240         [TEST_DIRNAME]: Move into a full-blown gnulib test.
12241         * lib/basename.c (base_name): New semantics - malloc the result.
12242         Preserve // when it is special.  Preserve relative files that look
12243         like drive letters.
12244         (base_len): Preserve // when it is special.
12245         (last_component): New method, similar to old base_name semantics.
12246         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
12247         base_name.  Strip redundant slashes from ///.
12248
12249 2006-07-03  Jim Meyering  <jim@meyering.net>
12250
12251         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
12252         macro is used before the first cycle_check call.
12253
12254 2006-07-03  Eric Blake  <ebb9@byu.net>
12255
12256         * modules/dirname (Depends-on): Add xstrndup.
12257
12258 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
12259
12260         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
12261         test cases, so that config.log is a bit easier to follow.
12262
12263 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
12264
12265         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
12266         both are 64 bits, since this seems to be the tradition, and this
12267         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
12268         we ever run into a host that prefers long long to long in this
12269         case, we'll need another configure-time test.  Problem reported by
12270         Jim Meyering.
12271
12272 2006-07-02  Eric Blake  <ebb9@byu.net>
12273
12274         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
12275
12276 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12277
12278         * modules/inttypes (Depends-on): No longer depends on stdint.
12279         * modules/stdint (Description): Say more about assumptions.
12280         Say that the fast types might differ.  Say macros are used.
12281         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
12282         (Makefile.am): Revise list of substituted symbols to match
12283         new stdint.m4.
12284         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
12285         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
12286         * tests/test-stdint.c (verify_same_types)
12287         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
12288         the code conforms to C99/C89.
12289         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
12290         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
12291
12292 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12293
12294         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
12295         but fix a bug, by requiring at least 64 bits.
12296         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
12297         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
12298         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
12299         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
12300
12301         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
12302         changes.  Make 2.59 a prerequisite.  Check and substitute for
12303         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
12304         inttypes.h.  Do not use special include files; just use the
12305         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
12306         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
12307         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
12308         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
12309         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
12310         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
12311         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
12312         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
12313         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
12314         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
12315         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
12316         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
12317         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
12318         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
12319         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
12320         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
12321         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
12322         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
12323         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
12324         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
12325         WINT_MAX.  Check for C99 conformance more strictly, by detecting
12326         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
12327         not check for things that C99 does not require, e.g., int8_t.  If
12328         a test isn't needed unless <stdint.h> isn't working, and is
12329         unlikely to be needed for any other reason, then don't do it
12330         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
12331         size_t, since we assume C89 freestanding at least.  Do not check
12332         for sig_atomic_t, wchar_t, or wint_t, since the code now does
12333         the right thing even if the types are not defined.  Instead use:
12334         (gl_STDINT_TYPE_PROPERTIES): New macro.
12335         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
12336         testing whether <sys/types.h> clashes, as Autoconf does this for
12337         us now.  All uses removed.
12338         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
12339         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
12340         (gl_CHECK_TYPE_SAME):
12341         Remove; no longer needed.
12342         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
12343         exists, since we'll return 0 anyway in that case.
12344         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
12345
12346 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12347
12348         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
12349         possible collision with system files.
12350         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
12351         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
12352         WCHAR_MIN and WCHAR_MAX in this case.
12353         (<stddef.h>): Do not include; no longer needed.
12354         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
12355         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
12356         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
12357         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
12358         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
12359         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
12360         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
12361         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
12362         !defined(__c99))]: Include in this case too, since it's harmless
12363         now.
12364         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
12365         dangerous to do so.
12366         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
12367         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
12368         (_STDINT_MIN, _STDINT_MAX): New macros.
12369         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
12370         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
12371         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
12372         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
12373         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
12374         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
12375         macros, not typedefs; this simplifies things quite a bit.
12376         Use long int for all types narrower than int64_t.
12377         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
12378         Define in terms of long long int or int64_t or long int,
12379         not int64_t or int32_t.  This saves some compile-time testing.
12380         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
12381         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
12382         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
12383         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
12384         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
12385         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
12386         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
12387         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
12388         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
12389         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
12390         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
12391         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
12392         undef any previous version and define our own version, for
12393         simplicity and consistency with the new macros for types.
12394         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
12395         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
12396         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
12397         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
12398         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
12399         @WINT_T_SUFFIX@ to keep things simple here.
12400         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
12401         Simplify by assuming typical 8/16/32/64 host, since we're
12402         already doing that elsewhere anyway.
12403         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
12404         and assume long long int is 64 bits if available.  This
12405         speeds up 'configure'.
12406
12407 2006-07-01  Eric Blake  <ebb9@byu.net>
12408
12409         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
12410         Reported by Andreas Buening.
12411
12412 2006-07-01  Eric Blake  <ebb9@byu.net>
12413
12414         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
12415
12416 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
12417
12418         * lib/getaddrinfo.c: fixed typo
12419
12420 2006-06-29  Jim Meyering  <jim@meyering.net>
12421
12422         * modules/strftime (Maintainer): Add my name, since with the
12423         FPRINTFTIME changes strftime.c has forked from glibc.
12424
12425 2006-06-29  Eric Blake  <ebb9@byu.net>
12426
12427         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
12428
12429 2006-06-29  Eric Blake  <ebb9@byu.net>
12430
12431         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
12432
12433 2006-06-29  Eric Blake  <ebb9@byu.net>
12434
12435         * lib/stat_.h: New file.
12436
12437 2006-06-29  Eric Blake  <ebb9@byu.net>
12438
12439         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
12440         unused static function.
12441
12442 2006-06-29  Eric Blake  <ebb9@byu.net>
12443
12444         * doc/functions.texi (Function Portability): Document missing lstat
12445         on mingw.
12446
12447 2006-06-29  Eric Blake  <ebb9@byu.net>
12448
12449         * MODULES.html.sh: Add sys_stat.
12450         * modules/sys_stat: New module.
12451         * modules/mkstemp (Depends-on): Add sys_stat.
12452
12453 2006-06-29  Derek R. Price  <derek@ximbiot.com>
12454
12455         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
12456
12457 2006-06-29  Derek R. Price  <derek@ximbiot.com>
12458
12459         * m4/c-bs-a.m4: Removed.
12460
12461 2006-06-29  Derek R. Price  <derek@ximbiot.com>
12462
12463         * lib/strftime.c: Assume strftime() exists.
12464
12465 2006-06-29  Derek Price  <derek@ximbiot.com>
12466
12467         * modules/c-bs-a: Removed - \a is C89.
12468         * MODULES.html.sh: Remove c-bs-a.
12469
12470 2006-06-29  Bruno Haible  <bruno@clisp.org>
12471
12472         * modules/wcwidth (License): Change to LGPL.
12473
12474 2006-06-28  Simon Josefsson  <jas@extundo.com>
12475
12476         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
12477         on _WIN32.
12478
12479         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
12480         getnameinfo.
12481
12482 2006-06-28  Simon Josefsson  <jas@extundo.com>
12483
12484         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
12485
12486 2006-06-28  Simon Josefsson  <jas@extundo.com>
12487
12488         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
12489         functions there.  It will succeed on Windows XP, but on Windows
12490         2000 and (presumably) earlier, it will fail, and use the internal
12491         re-implementation.
12492         (use_win32_p): New function.
12493         (getaddrinfo): Use strtoul on servname, to support numeric ports.
12494         Support AI_NUMERICSERV to disable getservbyname.
12495         (getnameinfo): New function, only supports
12496         NI_NUMERICHOST|NI_NUMERICSERV for now.
12497
12498         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
12499         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
12500         getnameinfo.
12501
12502 2006-06-28  Eric Blake  <ebb9@byu.net>
12503
12504         * modules/wcwidth: New file.
12505         * modules/mbchar (Depends-on): Add wcwidth.
12506         * modules/mbswidth (Depends-on): Add wcwidth.
12507         * MODULES.html.sh: Add wcwidth.
12508
12509 2006-06-28  Eric Blake  <ebb9@byu.net>
12510
12511         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
12512         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
12513
12514 2006-06-28  Eric Blake  <ebb9@byu.net>
12515
12516         * lib/xvasprintf.h: Fix comments.
12517
12518 2006-06-28  Eric Blake  <ebb9@byu.net>
12519
12520         * lib/mbchar.h (wcwidth): Include wcwidth.h.
12521         * lib/mbswidth.c (wcwidth): Move from here...
12522         * lib/wcwidth.h: ...to this new file.
12523
12524 2006-06-28  Derek R. Price  <derek@ximbiot.com>
12525
12526         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
12527
12528         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
12529         it's obsolete.
12530         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
12531
12532 2006-06-28  Derek R. Price  <derek@ximbiot.com>
12533
12534         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
12535         Autoconf 2.60 says this stuff was obsolete.
12536
12537 2006-06-28  Bruno Haible  <bruno@clisp.org>
12538
12539         * modules/wcwidth (Files): Add m4/wchar_t.m4.
12540
12541 2006-06-28  Bruno Haible  <bruno@clisp.org>
12542
12543         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
12544         gt_TYPE_WCHAR_T.
12545
12546 2006-06-28  Bruno Haible  <bruno@clisp.org>
12547
12548         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
12549         declaration for wcwidth.
12550         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
12551
12552 2006-06-28  Bruno Haible  <bruno@clisp.org>
12553
12554         * lib/mkdtemp.c [MINGW]: Include <io.h>.
12555         (mkdir): Define using _mkdir.
12556
12557 2006-06-28  Bruno Haible  <bruno@clisp.org>
12558
12559         * lib/getaddrinfo.h: Fix POSIX URL.
12560         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
12561         _WIN32.
12562         (use_win32_p): Make static.
12563         (getaddrinfo): Reject service name if it is empty or does not consist
12564         solely of decimal digits, or if its value is > 65535.
12565         (getnameinfo): Remove useless casts.
12566
12567 2006-06-27  Simon Josefsson  <jas@extundo.com>
12568
12569         * modules/sys_select: New file, suggested by Bruno Haible, Paul
12570         Eggert and Martin Lambers.
12571
12572 2006-06-27  Simon Josefsson  <jas@extundo.com>
12573
12574         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
12575         Eggert and Martin Lambers.
12576
12577 2006-06-27  Bruno Haible  <bruno@clisp.org>
12578
12579         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
12580         result to 0, not to empty.
12581         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
12582
12583 2006-06-27  Bruno Haible  <bruno@clisp.org>
12584
12585         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
12586
12587 2006-06-26  Simon Josefsson  <jas@extundo.com>
12588
12589         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
12590         present.
12591
12592 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
12593
12594         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
12595         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
12596         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
12597
12598 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
12599
12600         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
12601
12602 2006-06-26  Bruno Haible  <bruno@clisp.org>
12603
12604         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
12605
12606 2006-06-26  Bruno Haible  <bruno@clisp.org>
12607
12608         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
12609
12610 2006-06-26  Bruno Haible  <bruno@clisp.org>
12611
12612         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
12613         SGI C compiler in pre-C99 mode.
12614         Suggested by Mark D. Baushke and Larry Jones.
12615
12616 2006-06-26  Bruno Haible  <bruno@clisp.org>
12617
12618         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
12619         WCHAR_MAX.
12620         Reported by Mark D. Baushke and Larry Jones.
12621
12622 2006-06-26  Bruno Haible  <bruno@clisp.org>
12623
12624         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
12625         in pre-C99 mode.
12626         Suggested by Mark D. Baushke and Larry Jones.
12627
12628 2006-06-23  Simon Josefsson  <jas@extundo.com>
12629             Bruno Haible  <bruno@clisp.org>
12630
12631         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
12632         Emit mostlyclean-local rule.
12633         (func_emit_tests_Makefile_am): Likewise.
12634         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
12635
12636 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
12637
12638         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
12639
12640 2006-06-23  Bruno Haible  <bruno@clisp.org>
12641
12642         * tests/test-stdint.c: Update to match ISO C 99 Technical
12643         Corrigendum 1.
12644
12645 2006-06-23  Bruno Haible  <bruno@clisp.org>
12646
12647         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
12648
12649 2006-06-23  Bruno Haible  <bruno@clisp.org>
12650
12651         * lib/stdint_.h: Treat IRIX like OpenBSD.
12652
12653 2006-06-23  Bruno Haible  <bruno@clisp.org>
12654
12655         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
12656         ISO C 99 Technical Corrigendum 1.
12657
12658 2006-06-22  Simon Josefsson  <jas@extundo.com>
12659
12660         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
12661         MinGW.
12662
12663 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
12664
12665         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
12666         needed.  Some compiler complained about some of them.  Problem reported
12667         by Larry Jones in
12668         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
12669
12670 2006-06-21  Simon Josefsson  <jas@extundo.com>
12671
12672         * tests/test-getaddrinfo.c: New file.
12673
12674         * modules/getaddrinfo-tests: New file.
12675
12676         * MODULES.html.sh: Add inet_pton.
12677
12678         * modules/inet_pton: New file.
12679
12680 2006-06-21  Simon Josefsson  <jas@extundo.com>
12681
12682         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
12683         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
12684         of using the (limited) gnulib implementation on Windows XP.
12685
12686         * m4/inet_pton.m4: New file.
12687
12688 2006-06-21  Simon Josefsson  <jas@extundo.com>
12689
12690         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
12691         variable.
12692
12693         * lib/socket_.h: Don't define WINVER.
12694
12695         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
12696         slightly modified to work in gnulib.
12697
12698 2006-06-21  Simon Josefsson  <jas@extundo.com>
12699
12700         * doc/gnulib.texi (Windows sockets): Add.
12701
12702 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
12703
12704         * lib/read-file.c (fread_file): Start with buffer allocation of
12705         0 bytes rather than 1 byte; this simplifies the code.
12706         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
12707         code to free buffer and save/restore errno.
12708         (internal_read_file): Remove unused local.
12709
12710 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
12711
12712         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
12713         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
12714         Problem reported by Denis Excoffier in
12715         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
12716
12717 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12718
12719         * modules/sys_socket, modules/socklen: Include sys/types since
12720         FreeBSD 4.x's sys/socket.h needs it.
12721
12722 2006-06-19  Simon Josefsson  <jas@extundo.com>
12723
12724         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
12725
12726 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
12727
12728         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
12729
12730 2006-06-19  Bruno Haible  <bruno@clisp.org>
12731
12732         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
12733         and FULL_PATH_INTTYPES_H in angle brackets.
12734         Reported by Mark D. Baushke <mdb@gnu.org>.
12735
12736 2006-06-17  Eric Blake  <ebb9@byu.net>
12737
12738         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
12739         errno.
12740
12741 2006-06-17  Bruno Haible  <bruno@clisp.org>
12742
12743         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
12744         <sys/inttypes.h>.
12745
12746 2006-06-17  Bruno Haible  <bruno@clisp.org>
12747
12748         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
12749         whether errno is declared. Assume <errno.h> declares errno.
12750
12751 2006-06-17  Bruno Haible  <bruno@clisp.org>
12752
12753         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
12754
12755 2006-06-17  Bruno Haible  <bruno@clisp.org>
12756
12757         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
12758         problem on Solaris 2.5.1.
12759
12760 2006-06-16  Eric Blake  <ebb9@byu.net>
12761
12762         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
12763         * lib/unicodeio.c [!defined errno]: Likewise.
12764         * lib/strtol.c [!defined errno]: Likewise.
12765         * lib/strtod.c [!defined errno]: Likewise.
12766
12767 2006-06-15  Eric Blake  <ebb9@byu.net>
12768
12769         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
12770
12771 2006-06-15  Eric Blake  <ebb9@byu.net>
12772
12773         * config/srclist.txt (ssize_t.m4): Lose sync.
12774
12775 2006-06-15  Bruno Haible  <bruno@clisp.org>
12776
12777         * modules/stdint (Files): Include m4/full-header-path.m4,
12778         m4/size_max.m4, m4/wchar_t.m4.
12779         (Makefile.am): Many more substitutions.
12780         * modules/stdint-tests: New file.
12781         * tests/test-stdint.c: New file.
12782
12783 2006-06-15  Bruno Haible  <bruno@clisp.org>
12784
12785         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
12786         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
12787         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
12788         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
12789         gl_CHECK_TYPE_SAME): New macros.
12790
12791 2006-06-15  Bruno Haible  <bruno@clisp.org>
12792
12793         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
12794
12795 2006-06-15  Bruno Haible  <bruno@clisp.org>
12796
12797         * lib/stdint_.h: Rewritten to be fully auto-configured.
12798         Fixes bug on HP-UX/IA64.
12799
12800 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
12801
12802         * lib/getdate.y (__attribute__): Don't define if already defined.
12803         Problem reported by Larry Jones.
12804         * lib/utimens.c (__attribute__): Likewise.
12805
12806 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
12807
12808         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
12809         reported by Andreas Schwab.
12810
12811 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12812             Bruno Haible  <bruno@clisp.org>
12813
12814         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
12815         check for the declaration of strnlen and a run test that exposes the
12816         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
12817         rpl_strndup.
12818
12819 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12820             Bruno Haible  <bruno@clisp.org>
12821
12822         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
12823
12824 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12825
12826         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
12827         compile test, for Tru64 4.0D.
12828
12829 2006-05-28  Karl Berry  <karl@gnu.org>
12830
12831         * config/srclist.txt (printf-args.c): lose sync.
12832
12833 2006-05-26  Martin Lambers  <marlam@marlam.de>
12834
12835         * lib/getpass.c: Updates the test for the native W32 API, and adds
12836         missing includes, thus fixing compilation warnings.
12837
12838 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
12839
12840         * lib/exclude.c (exclude_fnmatch): New function.
12841         (excluded_file_name): Call exclude_fnmatch.
12842         * lib/exclude.h (excluded_file_name): New prototype
12843
12844 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
12845
12846         * lib/tempname.c (small_open, large_open): New macros.
12847         (__open, __open64) [!_LIBC]: Remove.
12848         (__gen_tempname): Use small_open and large_open instead of __open
12849         and __open64.  This fixes a portability bug on HP-UX 11.11i
12850         reported by Simon Wing-Tang in
12851         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
12852
12853 2006-05-24  Bruno Haible  <bruno@clisp.org>
12854
12855         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
12856         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
12857         Reported by Thorsten Maerz <torte@netztorte.de> via
12858         Aaron Stone <aaron@serendipity.cx>.
12859
12860 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
12861
12862         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
12863         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
12864         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
12865         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
12866         not really conditional on the cache.
12867         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
12868
12869 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
12870
12871         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
12872         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
12873         (my_usleep): Don't mishandle maximum value.
12874
12875 2006-05-19  Jim Meyering  <jim@meyering.net>
12876
12877         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
12878
12879 2006-05-17  Bruno Haible  <bruno@clisp.org>
12880
12881         Cygwin portability.
12882         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
12883
12884 2006-05-17  Bruno Haible  <bruno@clisp.org>
12885
12886         * lib/stdint_.h: Fix recognition of Cygwin.
12887
12888 2006-05-15  Bruno Haible  <bruno@clisp.org>
12889
12890         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
12891         on libtool patch by Ralf Wildenhues.
12892
12893 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12894
12895         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
12896         test for C99 conformance; (bool) 0.5 is an integer constant
12897         expression, but (bool) -0.5 is not.  Problem reported by Fedor
12898         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
12899
12900 2006-05-11  Simon Josefsson  <jas@extundo.com>
12901
12902         * m4/xvasprintf.m4: Fix obvious typo.
12903
12904 2006-05-11  Jim Meyering  <jim@meyering.net>
12905
12906         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
12907         James Lemley.
12908
12909 2006-05-10  Simon Josefsson  <jas@extundo.com>
12910
12911         * lib/md4.c: Typo fix, update copyright years.
12912         (K1, K2): Don't use L because it turn computations into 64-bit on
12913         64-bit platforms.
12914
12915 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
12916
12917         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
12918         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
12919         unwanted sign propagation, e.g., on hosts with 64-bit int.
12920         There still are some problems with reeelly weird theoretical hosts
12921         (e.g., 33-bit int) but it's not worth worrying about now.
12922         * lib/sha1.c (rol): Likewise.
12923         (K1, K2, K3, K4): Remove unnecessary L suffix.
12924
12925 2006-05-10  Bruno Haible  <bruno@clisp.org>
12926
12927         * lib/des.c: Cast to avoid warnings.
12928
12929 2006-05-09  Bruno Haible  <bruno@clisp.org>
12930
12931         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
12932         (Depends-on): Depend also on xsize, stdarg.
12933         (configure.ac): Add gl_XVASPRINTF.
12934
12935 2006-05-09  Bruno Haible  <bruno@clisp.org>
12936
12937         * m4/xvasprintf.m4: New file.
12938
12939 2006-05-09  Bruno Haible  <bruno@clisp.org>
12940
12941         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
12942         (EOVERFLOW): Define fallback value.
12943         (xstrcat): New function.
12944         (xvasprintf): Recognize the special case of a string concatenation.
12945
12946 2006-05-08  Eric Blake  <ebb9@byu.net>
12947
12948         * gnulib-tool (func_version): Base copyright year on CVS date.
12949         (func_emit_copyright_notice): New function.
12950         (func_emit_lib_Makefile_am): Use it.
12951         (func_emit_tests_Makefile_am): Likewise.
12952         (func_import): Likewise.
12953
12954 2006-05-08  Bruno Haible  <bruno@clisp.org>
12955
12956         * modules/stdarg: New file.
12957         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
12958
12959 2006-05-08  Bruno Haible  <bruno@clisp.org>
12960
12961         * m4/stdarg.m4: New file, from GNU gettext.
12962
12963 2006-05-08  Bruno Haible  <bruno@clisp.org>
12964
12965         * config/srclist.txt (build-aux/config.rpath): different from latest
12966         release.
12967
12968 2006-05-08  Bruno Haible  <bruno@clisp.org>
12969
12970         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
12971
12972 2006-05-05  Jim Meyering  <jim@meyering.net>
12973
12974         * m4/warning.m4: New file, derived from bison's file by the same name.
12975
12976 2006-05-03  Bruno Haible  <bruno@clisp.org>
12977
12978         * lib/stdint_.h: Shorter URL.
12979         * lib/inttypes.h: Likewise.
12980
12981 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
12982
12983         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
12984
12985 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
12986
12987         * lib/verify.h: Document the internals better.  Most of this change
12988         was written by Bruno Haible.
12989
12990 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
12991
12992         * doc/verify.texi: New file, partly based on a proposal by
12993         Bruno Haible.
12994
12995 2006-05-02  Bruno Haible  <bruno@clisp.org>
12996
12997         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
12998         test from here...
12999         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
13000
13001 2006-04-29  Bruno Haible  <bruno@clisp.org>
13002
13003         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
13004         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
13005
13006 2006-04-29  Bruno Haible  <bruno@clisp.org>
13007
13008         * gnulib-tool: Make --update option actually work.
13009
13010 2006-04-29  Bruno Haible  <bruno@clisp.org>
13011
13012         * doc/gcd.texi: New file.
13013         * doc/gnulib.texi: Include it.
13014
13015 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
13016
13017         * lib/getdate.y (get_date): When adding relative date, start with the
13018         initial time, not with the result of the first mktime call.
13019
13020 2006-04-25  Bruno Haible  <bruno@clisp.org>
13021
13022         * gnulib-tool (func_import): Output the include directives in three
13023         blocks, sorted separately.
13024         Reported by Ben Pfaff <blp@cs.stanford.edu>.
13025
13026 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
13027
13028         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
13029         to define main with arguments, for C++.  Reported by Eric Blake.
13030         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
13031         Prefer 'int main ()' to 'int main (void)', for C++.
13032         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
13033         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
13034         for 'main', for C99 and C++.
13035
13036 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
13037
13038         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
13039         Don't assume that exit status -1 is valid.
13040         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
13041         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
13042         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
13043         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
13044         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
13045         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
13046         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
13047         functions can be used without declaring them, or that you can
13048         exit with status -1.
13049         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
13050
13051 2006-04-24  Karl Berry  <karl@gnu.org>
13052
13053         * config/srclist.txt (longdouble.m4): sync lost.
13054
13055 2006-04-24  Eric Blake  <ebb9@byu.net>
13056
13057         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
13058
13059 2006-04-24  Bruno Haible  <bruno@clisp.org>
13060
13061         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
13062         poll() implementation in AIX.
13063         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
13064
13065 2006-04-24  Bruno Haible  <bruno@clisp.org>
13066
13067         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
13068         assigned exactly once.
13069
13070 2006-04-23  Claudio Fontana  <claudio@gnu.org>
13071             Bruno Haible  <bruno@clisp.org>
13072
13073         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
13074         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
13075         for AM_CPPFLAGS.
13076
13077 2006-04-23  Bruno Haible  <bruno@clisp.org>
13078
13079         * modules/copy-file: Depend on unistd.
13080         * modules/execute: Likewise.
13081         * modules/fatal-signal: Likewise.
13082         * modules/findprog: Likewise.
13083         * modules/mkdtemp : Likewise.
13084         * modules/pipe: Likewise.
13085         * modules/wait-process: Likewise.
13086
13087 2006-04-23  Bruno Haible  <bruno@clisp.org>
13088
13089         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
13090         condition was already detected.
13091         Reported by Ben Pfaff <blp@cs.stanford.edu>.
13092
13093 2006-04-23  Bruno Haible  <bruno@clisp.org>
13094
13095         * lib/copy-file.c: Include <unistd.h> unconditionally.
13096         * lib/execute.c: Likewise.
13097         * lib/fatal-signal.c: Likewise.
13098         * lib/findprog.c: Likewise.
13099         * lib/mkdtemp.c: Likewise.
13100         * lib/pipe.h: Likewise.
13101         * lib/pipe.c: Likewise.
13102         * lib/wait-process.h: Likewise.
13103
13104 2006-04-23  Bruno Haible  <bruno@clisp.org>
13105
13106         * gnulib-tool (func_usage): Fix --import description. Document
13107         --update.
13108         (func_import): Create temporary file in a temporary directory, if
13109         --dry-run is specified. Silence errors from 'grep' when there are no
13110         m4 files in $m4dir.
13111         (func_create_testdir): Silence errors from 'grep' when there are no
13112         m4 files in $m4dir.
13113         Reported by Karl Berry <karl@freefriends.org>.
13114
13115 2006-04-20  Bruno Haible  <bruno@clisp.org>
13116
13117         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
13118         one argument, so that the code will be portable to Autoconf 2.60.
13119         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
13120         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
13121         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
13122
13123 2006-04-19  Derek Price  <derek@ximbiot.com>
13124             Eric Blake  <ebb9@byu.net>
13125
13126         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
13127         rather than "/full/path.h".  Update comment to match.  Shorten &
13128         generalize m4_translit call via AS_TR_CPP.
13129
13130 2006-04-19  Derek Price  <derek@ximbiot.com>
13131             Eric Blake  <ebb9@byu.net>
13132
13133         * lib/inttypes.h: Correct grammar in comment.
13134
13135 2006-04-18  Derek Price  <derek@ximbiot.com>
13136             Paul Eggert  <eggert@cs.ucla.edu>
13137
13138         * modules/inttypes: New file.
13139         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
13140
13141 2006-04-18  Derek Price  <derek@ximbiot.com>
13142             Paul Eggert  <eggert@cs.ucla.edu>
13143
13144         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
13145         New files.
13146
13147 2006-04-18  Derek Price  <derek@ximbiot.com>
13148             Paul Eggert  <eggert@cs.ucla.edu>
13149
13150         * lib/inttypes.h: New file.
13151         * lib/strtoimax.c: Assume <inttypes.h>.
13152
13153 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
13154
13155         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
13156         isn't mounted.  Problem reported by Kir Kolyshkin.
13157
13158 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
13159
13160         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
13161         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
13162         Derek R. Price.
13163         * lib/regex.h (RE_DUP_MAX): Update comment to match current
13164         implementation.
13165
13166 2006-04-12  Eric Blake  <ebb9@byu.net>
13167
13168         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
13169         is now done automatically by the corresponding Autoconf macro.
13170
13171 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
13172
13173         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
13174         time_r.h.
13175
13176 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
13177
13178         Merge regex changes from libc, removing some of our
13179         POSIX-conformance changes that were rejected and redoing them in a
13180         less-intrusive way.
13181
13182         * lib/regcomp.c (re_compile_internal, init_dfa):
13183         Length arg is now size_t, not Idx.  All uses changed.
13184         (peek_token): Forward decl now says internal_function.
13185         (__re_error_msgid, __re_error_msgid_idx):
13186         Now static rather than extern with attribute_hidden.
13187         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
13188         For some reason libc prefers K&R style defns for external functions.
13189         (regerror) [!defined _LIBC]: Likewise.
13190         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
13191         (seek_collating_symbol_entry, lookup_collation_sequence_value):
13192         (build_range_exp, build_collating_symbol):
13193         Use K&R-style defn.
13194         (re_compile_fastmap): Use '\0' to memset, not 0.
13195         (utf8_sb_map): Make the calculations more obvious.
13196         (init_dfa, parse_bracket_exp, build_charclass_op):
13197         Call calloc and cast result, as glibc does.
13198         (init_word_char, fetch_token, peek_token, peek_token_bracket):
13199         (build_range_exp, build_collating_symbol):
13200         Now internal functions.
13201
13202         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
13203
13204         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
13205         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
13206         Don't depend on VMS; depend on __VMS instead, for POSIX
13207         namespace cleanness.
13208         (regoff_t): Define to ssize_t, not long int.
13209
13210         Remove the REG_ macros named below.  Instead, make the old names
13211         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
13212         __USE_GNU_REGEX.
13213         (REG_BACKSLASH_ESCAPE_IN_LISTS):
13214         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
13215         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
13216         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
13217         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
13218         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
13219         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
13220         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
13221         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
13222         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
13223         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
13224         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
13225         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
13226         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
13227         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
13228         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
13229         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
13230         (REG_NREGS):
13231         Remove.  All uses replaced by the old RE_* names.
13232         (RE_BACKSLASH_ESCAPE_IN_LISTS):
13233         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
13234         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
13235         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
13236         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
13237         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
13238         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
13239         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
13240         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
13241         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
13242         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
13243         Don't bother having these macros be independent of each others'
13244         values, since they no longer exist in the POSIX name space.
13245
13246         Rename the following member names back to their old names,
13247         unless !__USE_GNU_REGEX.  All uses changed back.
13248         (buffer): Renamed from re_buffer.
13249         (allocated): Renamed from re_allocated.
13250         (used): Renamed from re_used.
13251         (syntax): Renamed from re_syntax.
13252         (fastmap): Renamed from re_fastmap.
13253         (translate): Renamed from re_translate.
13254         (can_be_null): Renamed from re_can_be_null.
13255         (regs_allocated): Renamed from re_regs_allocated.
13256         (fastmap_accurate): Renamed from re_fastmap_accurate.
13257         (no_sub): Renamed from re_no_sub.
13258         (not_bol): Renamed from re_not_bol.
13259         (not_eol): Renamed from re_not_eol.
13260         (newline_anchor): Renamed from re_newline_anchor.
13261         (num_regs): Renamed from rm_num_regs.
13262         (start): Renamed from rm_start.
13263         (end): Renamed from rm_end.
13264
13265         (free_state): Move up a bit.
13266
13267         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
13268         #define to be empty.
13269         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
13270         when that is what is intended.
13271         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
13272         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
13273         (MAX): New macro.
13274         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
13275         All uses changed back to re_malloc, etc.  It's now the caller's
13276         responsibility to check for overflow; all callers changed.
13277         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
13278         (re_x2nrealloc): Remove.
13279         (free_state): Remove decl.
13280
13281         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
13282         (re_set_registers, re_exec):
13283         Use K&R-style defn.
13284
13285         2006-01-31  Roland McGrath  <roland@redhat.com>
13286
13287         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
13288         Reported by Mike Frysinger <vapier@gentoo.org>.
13289
13290         2006-01-15  Andreas Jaeger  <aj@suse.de>
13291
13292         [BZ #1950]
13293         * lib/regex_internal.c (re_string_reconstruct): Adjust for
13294         build_wcs_upper_buffer change.
13295         (build_wcs_upper_buffer): Change return type.
13296
13297         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
13298
13299         * lib/regex_internal.h: Include <stdint.h> if available.
13300
13301         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
13302
13303         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
13304
13305         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
13306
13307         * lib/regcomp.c: Adjust for changed secondary hash function.
13308
13309         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
13310
13311         * lib/regex.h: Pretty printing.
13312         Clean up namespace a bit.
13313
13314         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
13315
13316         * lib/regexec.c (update_cur_sifted_state, check_arrival,
13317         check_arrival_add_next_nodes): Avoid using uninitialized variable.
13318
13319         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
13320                     Ulrich Drepper  <drepper@redhat.com>
13321
13322         [BZ #1302]
13323         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
13324         changed.
13325         (bitset_word_t): Renamed from bitset_word.  All uses changed.
13326
13327         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
13328
13329         [BZ #281]
13330         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
13331         * lib/regcomp.c: Remove unnecessary uses of
13332         unsigned RE_TRANSLATE_TYPE.
13333         * lib/regex_internal.h: Likewise.
13334         * lib/regex_internal.c: Likewise.
13335         * lib/regexec.c: Likewise.
13336         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
13337
13338         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
13339
13340         * lib/regexec.c (find_recover_state): Remove unnecessary
13341         initialization.
13342         (transit_state_bkref): Make DFA a const pointer.
13343         (get_subexp): Likewise.
13344         (check_arrival): Likewise.
13345         (update_cur_sifted_state): Likewise.
13346         (re_search_internal): Likewise.
13347         (prune_impossible_nodes): Likewise.
13348         (acquire_init_state_context): Likewise.
13349         (proceed_next_node): Likewise.
13350         (set_regs): Likewise.
13351         (free_fail_stack_return): Likewise.
13352         (check_arrival_expand_ecl): Mark DFA parameter as const.
13353         (check_arrival_expand_ecl_sub): Likewise.
13354         (check_subexp_limits): Likewise.
13355         (sub_epsilon_src_nodes):  Likewise.
13356         (add_epsilon_src_nodes):  Likewise.
13357         (merge_state_array): Likewise.
13358         (update_regs): Likewise.
13359         (build_trtable): Likewise.
13360         (sift_states_backward): Mark MCTX parameter as const.
13361         (build_sifted_states): Likewise.
13362         (update_cur_sifted_state): Likewise.
13363         (sift_states_mkref): Likewise.
13364         (check_arrival_expand_ecl): Mark eclosure as const.
13365         (check_dst_limits_calc_pos_1): Likewise.
13366         * lib/regex_internal.h (re_match_context_t): Make dfa a const
13367         pointer.
13368
13369         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
13370
13371         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
13372         (transit_state_sb): Likewise.
13373         (transit_state_mb): Likewise.
13374         (sift_states_iter_mb): Likewise.
13375         (check_arrival_add_next_nodes): Likewise.
13376         (check_node_accept_bytes): Change first parameter to pointer-to-const.
13377         [_LIBC] (re_search_2_stub): Use mempcpy.
13378
13379         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
13380         mbrtowc for very simple UTF-8 case.
13381
13382         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
13383         a pointer-to-const.
13384         (re_acquire_state_context): Likewise.
13385         * lib/regex_internal.h: Adjust prototypes.
13386
13387         * lib/regex.c: Prevent using C++ compilers.
13388
13389         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
13390         (re_acquire_state_context): Likewise.
13391
13392 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
13393
13394         * modules/regex (Depends-on): Add ssize_t.
13395
13396 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
13397
13398         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
13399         translation table.
13400
13401 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
13402
13403         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
13404
13405 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
13406             Bruno Haible  <bruno@clisp.org>
13407
13408         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
13409         <sys/types.h> and <inttypes.h>.
13410
13411 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13412
13413         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
13414         `__error_t_defined', so argp.h will not typedef the former.
13415
13416 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
13417
13418         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
13419         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
13420         glibc names.  Even if glibc is changed to conform to POSIX, the
13421         traditional names will be available anyway, since regex depends on
13422         the extensions module.  Also, fix a longstanding typo in the
13423         implementation of Spencer ERE test #75 from grep 2.3.  Problems
13424         reported by Emanuele Giaquinta.  Also, change sense of cached
13425         variable, so that the message makes sense.
13426
13427 2006-03-24  Simon Josefsson  <jas@extundo.com>
13428
13429         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
13430         including some doc fixes.
13431         (base64_encode_alloc): Fix +1 bug on allocation failures.
13432
13433 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13434
13435         * lib/base64.c (base64_encode): Do not read past end of array with
13436         unsanitized input on systems with CHAR_BIT > 8.
13437
13438 2006-03-24  Eric Blake  <ebb9@byu.net>
13439
13440         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
13441
13442 2006-03-22  Karl Berry  <karl@gnu.org>
13443
13444         * config/srclist.txt (*setenv.[ch]): get from coreutils.
13445         * config/srclistvars.sh (COREUTILS): new var.
13446
13447 2006-03-17  Jim Meyering  <jim@meyering.net>
13448
13449         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
13450         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
13451
13452 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
13453
13454         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
13455         no longer needs it.  Instead, check that regoff_t is as least
13456         as wide as ptrdiff_t.
13457
13458         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
13459         so that our regex.h stays compatible with the installed regex.
13460         This is helpful for installers who configure --without-included-regex.
13461         Problem reported by Emanuele Giaquinta.
13462
13463 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
13464
13465         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
13466         Typedef to long int, not to off_, as POSIX will likely change
13467         in that direction.
13468
13469 2006-03-15  Eric Blake  <ebb9@byu.net>
13470
13471         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
13472
13473 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
13474
13475         * lib/argp-help.c (validate_uparams): Fix typo
13476         * lib/argp-parse.c (argp_default_options): Consistently begin help
13477         messages with a lowercase letter.
13478
13479 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
13480
13481         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
13482         overrun buffers and shouldn't be used (much as gets shouldn't be
13483         used).
13484         * lib/time_r.c (asctime_r, ctime_r): Likewise.
13485
13486 2006-03-08  Simon Josefsson  <jas@extundo.com>
13487
13488         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
13489         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
13490
13491 2006-03-08  Simon Josefsson  <jas@extundo.com>
13492
13493         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
13494         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
13495
13496 2006-03-08  Simon Josefsson  <jas@extundo.com>
13497
13498         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
13499         signal that configure disabled the device.
13500
13501 2006-03-08  Simon Josefsson  <jas@extundo.com>
13502
13503         * build-aux/maint.mk: Fix refresh-po, to handle no translated
13504         languages.
13505
13506 2006-03-07  Simon Josefsson  <jas@extundo.com>
13507
13508         * modules/getopt (Depends-on): Add unistd.
13509
13510         * modules/unistd: New file.
13511
13512 2006-03-07  Simon Josefsson  <jas@extundo.com>
13513
13514         * modules/gc-random: New file.
13515
13516 2006-03-07  Simon Josefsson  <jas@extundo.com>
13517
13518         * m4/unistd_h.m4: New file.
13519
13520 2006-03-07  Simon Josefsson  <jas@extundo.com>
13521
13522         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
13523         test to be side-effect free by storing the result in the cache
13524         variable gl_cv_lib_readline, and moving the assignment of
13525         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
13526         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
13527
13528 2006-03-07  Simon Josefsson  <jas@extundo.com>
13529
13530         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
13531         error on missing devices (the functions will return an error).
13532
13533         * m4/gc.m4: Move random stuff to gc-random.m4
13534
13535 2006-03-07  Simon Josefsson  <jas@extundo.com>
13536
13537         * lib/unistd_.h: New file.
13538
13539 2006-03-07  Simon Josefsson  <jas@extundo.com>
13540
13541         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
13542
13543 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
13544
13545         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
13546         Problem reported by Juan Manuel Guerrero.
13547
13548 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
13549
13550         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
13551         the unistd module.
13552         * lib/getlogin_r.c: Likewise.
13553         * lib/getlogin_r.h: Likewise.
13554         * lib/glob.c: Likewise.
13555         * lib/pagealign_alloc.c: Likewise.
13556         * lib/unistd_.h: Remove; no longer needed.
13557
13558 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
13559
13560         * MODULES.html.sh (Support for systems lacking POSIX:2001):
13561         Add unistd.
13562         * modules/c-stack (Depends-on): Add unistd.
13563         * modules/getlogin_r: Likewise.
13564         * modules/glob: Likewise.
13565         * modules/pagealign_alloc: Likewise.
13566         * modules/unistd (Files): Remove lib/unistd_.h.
13567         (EXTRA_DIST): Remove.
13568         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
13569         need unistd_.h.
13570         (MOSTLYCLEANFILES): Remove unistd.h-t.
13571
13572 2006-03-03  Simon Josefsson  <jas@extundo.com>
13573
13574         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
13575
13576 2006-03-03  Simon Josefsson  <jas@extundo.com>
13577
13578         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
13579         libidn and bison.
13580
13581 2006-03-03  Simon Josefsson  <jas@extundo.com>
13582
13583         * build-aux/maint.mk: Add indent target.
13584
13585 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
13586
13587         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
13588         our replacement poll.h in any case, to avoid a differing
13589         declaration from a system header.  Seen on AIX.
13590
13591 2006-03-01  Simon Josefsson  <jas@extundo.com>
13592
13593         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
13594         <kasal@ucw.cz>.
13595
13596 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13597
13598         * modules/gettime (Depends-on): Add extensions module.
13599         * modules/nanosleep (Depends-on): Likewise.
13600         * modules/settime (Depends-on): Likewise.
13601
13602 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13603
13604         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
13605         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
13606         pedantically.
13607         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
13608         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
13609
13610         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
13611         not "==".  Reported by Ralf Wildenhues.
13612
13613 2006-03-01  Karl Berry  <karl@gnu.org>
13614
13615         * doc/Copyright/request-*: new files, synced from gnuorg.
13616
13617 2006-03-01  Karl Berry  <karl@gnu.org>
13618
13619         * config/srclist.txt (Copyright/*): new entries.
13620
13621 2006-02-28  Simon Josefsson  <jas@extundo.com>
13622
13623         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
13624
13625 2006-02-27  Simon Josefsson  <jas@extundo.com>
13626
13627         * lib/base64.h: Indent #define's.  From Jim Meyering
13628         <jim@meyering.net>.
13629
13630 2006-02-27  Jim Meyering  <jim@meyering.net>
13631
13632         Revert the change of 2006-02-24, so these files can continue
13633         to be sync'd from gettext.
13634         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
13635         of `config.h'.
13636
13637 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
13638
13639         * modules/intprops: New file.
13640         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
13641         Add intprops.
13642         * modules/getloadavg (Files): Remove lib/intprops.h.
13643         (Depends-on): Add intprops.
13644         * modules/human: Likewise.
13645         * modules/inttostr: Likewise.
13646         * modules/openat: Likewise.
13647         * modules/sig2str: Likewise.
13648         * modules/userspec: Likewise.
13649         * modules/utimecmp: Likewise.
13650         * modules/xnanosleep: Likewise.
13651         * modules/xstrtol: Likewise.
13652
13653 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
13654
13655         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
13656         * modules/lock-tests (TESTS): Use $(EXEEXT).
13657         * modules/tls-tests: Likewise.
13658         * modules/argp-tests: Likewise.
13659         (check_PROGRAMS): New var, replacing...
13660         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
13661
13662 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13663
13664         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
13665         `config.h'.
13666
13667 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
13668
13669         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
13670
13671 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13672
13673         Sync from coreutils.
13674         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
13675         gl_CHDIR_SAFER.
13676
13677 2006-02-22  Jim Meyering  <jim@meyering.net>
13678
13679         Sync from coreutils.
13680         * m4/chdir-safer.m4: New file.
13681
13682 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
13683
13684         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
13685         AT_FDCWD exceeds INT_MAX.
13686         * lib/openat.h (AT_FDCWD): Likewise.
13687
13688 2006-02-17  Eric Blake  <address@hidden>
13689
13690         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
13691
13692 2006-02-16  Simon Josefsson  <jas@extundo.com>
13693
13694         * modules/getaddrinfo (Depends-on): Add sys_socket.
13695
13696 2006-02-15  Simon Josefsson  <jas@extundo.com>
13697
13698         * build-aux/maint.mk: Add dsyntax-check rule.
13699
13700 2006-02-15  Eric Blake  <ebb9@byu.net>
13701
13702         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
13703         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
13704         'present but cannot compile' warnings on cygwin.
13705         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
13706         use ws2tcpip.h if sys/socket.h works.
13707         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
13708         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
13709
13710 2006-02-14  Simon Josefsson  <jas@extundo.com>
13711
13712         * modules/maintainer-makefile (Files): Rename.
13713
13714         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
13715         and (the local) Makefile.cfg to maint-cfg.mk.
13716
13717         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
13718         to the latter.
13719
13720         * modules/maintainer-makefile: New module.
13721
13722         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
13723         severaly stripped to make it possible to build it up from scratch
13724         with reliable tests.
13725
13726         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
13727         fixes to permit overriding the default actions when configure and
13728         makefile are not available.
13729
13730 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
13731
13732         Sync from coreutils.
13733         * modules/lstat (Depends-on): Don't depend on xalloc.
13734         (License): Change from GPL to LGPL, since this is now simply a
13735         replacement for a libc function.
13736
13737 2006-02-14  Jim Meyering  <jim@meyering.net>
13738
13739         Sync from coreutils.
13740
13741         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
13742         failure on deficient systems, and simplify gnulib lgpl dependencies.
13743         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
13744         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
13745
13746         * lib/xalloc-die.c: Remove unused definition of N_.
13747
13748 2006-02-14  Jim Meyering  <jim@meyering.net>
13749
13750         Sync from coreutils.
13751         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
13752         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
13753         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
13754         double-quote uses of that variable, to accommodate the rare case in
13755         which getmntent is available in none of the libraries checked.  This
13756         happens at least on FreeBSD 5.0.
13757
13758 2006-02-13  Simon Josefsson  <jas@extundo.com>
13759
13760         * gnulib-tool (Usage): Fix --import, from
13761         karl@freefriends.org (Karl Berry).
13762
13763 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
13764
13765         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
13766
13767 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
13768
13769         * lib/argp-namefrob.h: Restore changes accidentally lost during the
13770         "autoupdate" on 2005-12-12.
13771
13772 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
13773
13774         * modules/closeout (Depends-on): Remove atexit.
13775
13776 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
13777
13778         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
13779         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
13780
13781 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
13782
13783         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
13784         __EXTENSIONS__ if this causes compilation to fail.  Problem
13785         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
13786         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
13787
13788 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
13789
13790         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
13791         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
13792         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
13793         All uses changed.
13794
13795 2006-01-26  Simon Josefsson  <jas@extundo.com>
13796
13797         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
13798         prototype is visible on mingw32.
13799
13800         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
13801         for mingw32.
13802
13803         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
13804         mingw32).
13805
13806 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
13807
13808         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
13809         attempt to open for write; this always fails, at least on POSIX
13810         hosts.  This reinstates the 2006-01-09 change, which was
13811         inadvertently removed.
13812
13813 2006-01-26  Bruno Haible  <bruno@clisp.org>
13814
13815         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
13816         Reported by Paul Eggert.
13817
13818 2006-01-26  Bruno Haible  <bruno@clisp.org>
13819             Paul Eggert  <eggert@cs.ucla.edu>
13820
13821         * lib/stdbool_.h (_Bool)
13822         [(! (defined __cplusplus || defined __BEOS__)
13823           && !defined __GNUC__
13824           && !(defined __HP_cc || defined __xlc__
13825                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
13826                || defined __sgi))]:
13827         #define to signed char in these cases too; this simplifies
13828         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
13829         etc., separately) and makes it more conservative.
13830
13831 2006-01-25  Simon Josefsson  <jas@extundo.com>
13832
13833         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
13834         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
13835         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
13836
13837 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
13838
13839         * lib/argp-namefrob.h: Bugfix. Remove stray #
13840
13841 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
13842
13843         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
13844         so that we test the test.
13845         Check for yet another HP-UX cc bug involving *bool |= bool.
13846
13847 2006-01-25  Karl Berry  <karl@gnu.org>
13848
13849         * config/srclist.txt (vasnprintf.c): sync lost.
13850
13851 2006-01-25  Jim Meyering  <jim@meyering.net>
13852
13853         Sync from the stable (b5) branch of coreutils:
13854
13855         * lib/fts.c (fts_children): Don't let close() clobber errno from
13856         failed fchdir().
13857
13858         * lib/fts.c (fts_stat): When following a symlink-to-directory,
13859         don't necessarily interpret stat-fails+lstat-succeeds as indicating
13860         a dangling symlink.  That can also happen at least for ELOOP.
13861         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
13862         FYI, this bug predates the inclusion of fts.c in coreutils.
13863
13864         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
13865         in their own block, so pre-c99 compilers don't object.
13866
13867         Avoid the double-free (first in fts_read, second in fts_close) that
13868         would occur when an `active' directory is made inaccessible (e.g.,
13869         via chmod a-x) during a traversal.
13870         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
13871         before returning.  Reproduce this failure by
13872         mkdir -p a/b; cd a; chmod a-x . b
13873         Reported by Stavros Passas.
13874
13875 2006-01-25  Jim Meyering  <jim@meyering.net>
13876
13877         * lib/fileblocks.c: Remove more useless parentheses.
13878         * lib/readutmp.h: Likewise.
13879
13880 2006-01-25  Bruno Haible  <bruno@clisp.org>
13881
13882         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
13883         warnings.
13884         Reported by Paul Eggert.
13885
13886 2006-01-25  Bruno Haible  <bruno@clisp.org>
13887
13888         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
13889         rid of a trap command. For Solaris sh.
13890         Reported by Mark D. Baushke <mdb@gnu.org>.
13891
13892 2006-01-24  Simon Josefsson  <jas@extundo.com>
13893
13894         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
13895         Bruno.
13896
13897 2006-01-24  Karl Berry  <karl@gnu.org>
13898
13899         * config/srclist.txt (argp-namefrob.h): sync lost.
13900
13901 2006-01-24  Jim Meyering  <jim@meyering.net>
13902
13903         * modules/openat (Files): Add lib/intprops.h.
13904         From Mark D. Baushke.
13905
13906 2006-01-24  Jim Meyering  <jim@meyering.net>
13907
13908         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
13909         Reported by Mark D. Baushke.
13910
13911 2006-01-24  Jim Meyering  <jim@meyering.net>
13912
13913         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
13914
13915 2006-01-24  Bruno Haible  <bruno@clisp.org>
13916
13917         * modules/strnlen (Maintainer): Change from glibc to all.
13918
13919 2006-01-24  Bruno Haible  <bruno@clisp.org>
13920
13921         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
13922         Patch by Paul Eggert.
13923
13924 2006-01-24  Bruno Haible  <bruno@clisp.org>
13925
13926         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
13927         already has it.
13928         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
13929         2005-11-26.
13930
13931         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
13932         'signed char' to avoid problems with the built-in _Bool type.
13933         Reported by Paul Eggert on 2005-11-26.
13934
13935 2006-01-24  Bruno Haible  <bruno@clisp.org>
13936
13937         * gnulib-tool (func_import): Avoid constructing complicated sed
13938         expressions inside backquote.
13939         Report and solution by Mark D. Baushke <mdb@gnu.org>.
13940
13941 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
13942
13943         These changes imported from libc.
13944         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
13945         test and two separate function calls.
13946         * lib/strndup.c (__strndup): Add libc_hidden_def.
13947
13948 2006-01-23  Simon Josefsson  <jas@extundo.com>
13949
13950         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
13951         Remove the test_*_SOURCES variable: automake infers it by default.
13952         * modules/tls-tests: Likewise.
13953
13954 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
13955
13956         Work around porting bugs reported by Dieter in
13957         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
13958         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
13959         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
13960         Include "getopt.h" first, to check interface.
13961         (getenv): Declare only if defined HAVE_DECL_GETENV &&
13962         !HAVE_DECL_GETENV.
13963         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
13964         (__strndup): Revert to K&R-style function dfns, the glibc style.
13965         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
13966         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
13967         Include strnlen.h first, to get prototype properly.
13968         (strnlen): Renamed from __strnlen.
13969         Remove weak alias.
13970
13971 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
13972
13973         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
13974
13975 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
13976
13977         * config/srclist.txt: Adjust to reflect glibc reorganization.
13978         This affects only comments.
13979
13980 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13981
13982          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
13983          Reported by Bruce Korb <bkorb@gnu.org>.
13984
13985 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
13986
13987         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
13988         to pacify gcc -Wswitch-default.
13989
13990 2006-01-22  Bruno Haible  <bruno@clisp.org>
13991
13992         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
13993         temporary buffer for sprintf, take into account the precision also
13994         for 'd', 'i', 'u', 'o', 'x', 'X'.
13995
13996 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
13997
13998         * modules/argp-tests: New module
13999         * tests/test-argp.c: New file
14000         * tests/test-argp-2.sh: New file
14001
14002 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
14003
14004         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
14005         (__argp_base_name): Removed
14006         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
14007         typo.
14008         (__argp_base_name): Provide macro definition or extern declaration
14009         depending on the configuration
14010
14011 2006-01-20  Simon Josefsson  <jas@extundo.com>
14012
14013         * modules/inet_ntop (Depends-on): Depend on sys_socket.
14014
14015 2006-01-20  Simon Josefsson  <jas@extundo.com>
14016
14017         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
14018
14019 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14020
14021         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
14022         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
14023         Suggested by Bruno Haible.
14024
14025 2006-01-20  Karl Berry  <karl@gnu.org>
14026
14027         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
14028         until changes propagate, I guess.
14029
14030 2006-01-19  Simon Josefsson  <jas@extundo.com>
14031
14032         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
14033
14034 2006-01-19  Simon Josefsson  <jas@extundo.com>
14035
14036         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
14037
14038 2006-01-19  Simon Josefsson  <jas@extundo.com>
14039
14040         * gnulib-tool: Set check_PROGRAMS.
14041
14042         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
14043         modules/des-tests, modules/gc-arcfour-tests,
14044         modules/gc-arctwo-tests, modules/gc-des-tests,
14045         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
14046         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
14047         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
14048         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
14049         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
14050         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
14051         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
14052         test_*_SOURCES.
14053
14054 2006-01-18  Simon Josefsson  <jas@extundo.com>
14055
14056         * modules/socklen (Depends-on): Depend on sys_socket.
14057
14058 2006-01-18  Simon Josefsson  <jas@extundo.com>
14059
14060         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
14061         modules/des-tests, modules/gc-arcfour-tests,
14062         modules/gc-arctwo-tests, modules/gc-des-tests,
14063         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
14064         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
14065         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
14066         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
14067         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
14068         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
14069         $(EXEEXT) to automake TESTS variable, for mingw32.
14070
14071 2006-01-17  Simon Josefsson  <jas@extundo.com>
14072
14073         * modules/socklen (Include): Need sys/socket.h.
14074
14075 2006-01-17  Bruno Haible  <bruno@clisp.org>
14076
14077         * modules/ssize_t (Include): Add <sys/types.h>.
14078
14079 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
14080
14081         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
14082         it's not portable and it doesn't work with cross-compiles.
14083         Problem reported by Bruno Haible.  Fix missing-$ typo in
14084         'test "gl_cv_ignore_unused_libraries" ...' that prevented
14085         -zignore from being used with Sun's C compiler.
14086
14087 2006-01-12  Simon Josefsson  <jas@extundo.com>
14088
14089         * lib/base64.c: Fix warning, reported by Bruno Haible
14090         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
14091
14092 2006-01-12  Bruno Haible  <bruno@clisp.org>
14093
14094         * modules/ldd: New file.
14095         * build-aux/ldd.sh.in: New file.
14096         * MODULES.html.sh (Support for building libraries and executables): Add
14097         ldd.
14098
14099 2006-01-12  Bruno Haible  <bruno@clisp.org>
14100
14101         * m4/ldd.m4: New file.
14102
14103 2006-01-12  Bruno Haible  <bruno@clisp.org>
14104
14105         * gnulib-tool (func_import, func_create_testdir): Don't go into an
14106         endless loop while replacing $auxdir with build-aux.
14107
14108 2006-01-11  Simon Josefsson  <jas@extundo.com>
14109
14110         * lib/stdint_.h (SIZE_MAX): Add missing (.
14111
14112 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
14113
14114         Sync from coreutils.
14115         * lib/md5.c: Fix commentary typos.
14116         (alignof, UNALIGNED_P): No need for a GCC-specific version.
14117         * lib/md5.h (__attribute__): Remove; unused.
14118         * lib/sha1.c: Fix commentary to match md5 better.
14119         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
14120         so that we don't need to worry about alignment.  All uses changed.
14121         This merges the 2005-10-28 md5 change into sha1.
14122
14123 2006-01-11  Jim Meyering  <jim@meyering.net>
14124
14125         Sync from coreutils.
14126         * lib/md5.c (OP): Fix spacing.
14127
14128 2006-01-11  Bruno Haible  <bruno@clisp.org>
14129
14130         Ensure automatic ordering between gl_LOCK and gl_ARGP.
14131         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
14132         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
14133
14134 2006-01-11  Bruno Haible  <bruno@clisp.org>
14135
14136         Ensure automatic ordering between gl_LOCK and gl_ARGP.
14137         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
14138         the "early" section as well.
14139
14140 2006-01-11  Bruno Haible  <bruno@clisp.org>
14141
14142         Avoid "ar: no archive members specified" error on MacOS X.
14143         * gnulib-tool (func_modules_add_dummy): New function.
14144         (func_import, func_create_testdir): Invoke it.
14145
14146 2006-01-11  Bruno Haible  <bruno@clisp.org>
14147
14148         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
14149         with $auxdir in AC_CONFIG_FILES statements.
14150
14151 2006-01-11  Bruno Haible  <bruno@clisp.org>
14152
14153         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
14154         Initialize also noinst_HEADERS to empty.
14155
14156 2006-01-11  Bruno Haible  <bruno@clisp.org>
14157
14158         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
14159         variables.
14160         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
14161         autoreconf.
14162
14163 2006-01-11  Bruno Haible  <bruno@clisp.org>
14164
14165         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
14166         overridable by the user.
14167         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14168
14169 2006-01-10  Simon Josefsson  <jas@extundo.com>
14170
14171         * modules/sys_socket: New file.
14172
14173 2006-01-10  Simon Josefsson  <jas@extundo.com>
14174
14175         * m4/sys_socket_h.m4: New file.
14176
14177 2006-01-10  Simon Josefsson  <jas@extundo.com>
14178
14179         * lib/socket_.h: New file.
14180
14181 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
14182
14183         * modules/readutmp (Maintainer): Add myself.
14184
14185 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
14186
14187         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
14188         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
14189         People who are still concerned with buggy memcmp implementations
14190         can invoke gl_FUNC_MEMCMP themselves.
14191
14192 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
14193
14194         * lib/regex_internal.h (BITSET_WORD_BITS):
14195         Work around a bug in 64-bit PGC (before version 6.1-2), where the
14196         preprocessor mishandles large unsigned values as if they were signed.
14197         Problem reported by Claudio Fontana in
14198         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
14199
14200 2006-01-10  Jim Meyering  <jim@meyering.net>
14201
14202         Avoid the double-free (first in fts_read, second in fts_close) that
14203         would occur when an `active' directory is made inaccessible (e.g.,
14204         via chmod a-x) during a traversal.
14205         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
14206         before returning.  Reproduce this failure by
14207         mkdir -p a/b; cd a; chmod a-x . b
14208         Reported by Stavros Passas.
14209
14210         Sync from coreutils.
14211         * lib/sha1.c: Tweak grammar in a comment.
14212
14213 2006-01-10  Jim Meyering  <jim@meyering.net>
14214
14215         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
14216         Patch by Joerg Sonnenberger.
14217
14218 2006-01-10  Bruno Haible  <bruno@clisp.org>
14219
14220         * modules/readutmp: Depend on module free.
14221         * modules/strtok_r: Depend on module restrict.
14222
14223 2006-01-10  Bruno Haible  <bruno@clisp.org>
14224
14225         * modules/gettext (configure.ac): Add an invocation of
14226         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
14227
14228 2006-01-10  Bruno Haible  <bruno@clisp.org>
14229
14230         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
14231         Reported by Werner Lemberg <wl@gnu.org>.
14232
14233 2006-01-10  Bruno Haible  <bruno@clisp.org>
14234
14235         * lib/localcharset.c: Update from GNU gettext.
14236
14237 2006-01-10  Bruno Haible  <bruno@clisp.org>
14238
14239         * lib/argp.h (__const): Remove macro. Use const instead.
14240         * lib/argp-fmtstream.h (__const): Likewise.
14241         * lib/glob_.h (__const): Remove macro.
14242         * lib/glob-libc.h: Use const instead of __const.
14243
14244 2006-01-10  Bruno Haible  <bruno@clisp.org>
14245
14246         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
14247         variable.
14248         Needed to avoid an automake error regarding the 'gettext' module.
14249
14250 2006-01-09  Simon Josefsson  <jas@extundo.com>
14251
14252         * modules/inet_ntop (Depends-on): Add restrict.
14253
14254 2006-01-09  Simon Josefsson  <jas@extundo.com>
14255
14256         * modules/gc-rijndael-tests (License): Put under LGPL.
14257
14258         * modules/gc-des-tests (License): Likewise.
14259
14260         * modules/gc-arcfour-tests (License): Likewise.
14261
14262         * modules/gc-arctwo-tests (License): Likewise.
14263
14264         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
14265
14266         * modules/gc-hmac-sha1-tests (Files): Likewise.
14267
14268         * modules/gc-hmac-md5-tests (License): Likewise.
14269
14270         * modules/gc-sha1-tests (License): Likewise.
14271
14272         * modules/gc-md5-tests (License): Likewise.
14273
14274         * modules/gc-md4-tests (License): Likewise.
14275
14276         * modules/gc-md2-tests (License): Likewise.
14277
14278         * modules/gc-tests (License): Likewise.
14279
14280         * modules/des-tests (License): Likewise.
14281
14282         * modules/md4-tests (License): Likewise.
14283
14284         * modules/md2-tests (License): Likewise.
14285
14286 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
14287
14288         Sync from coreutils:
14289
14290         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
14291         * modules/lib-ignore: New file.
14292         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
14293         chdir-safer.m4, lchmod.m4.
14294         * modules/openat: Add mkdirat.c, openat-priv.h.
14295
14296 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
14297
14298         Sync from coreutils.
14299         * m4/lib-ignore.m4: New file.
14300         * m4/lchmod.m4: New file.
14301
14302 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
14303
14304         Sync from coreutils.
14305         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
14306         for write access: POSIX says that must fail.
14307         * lib/fts.c (diropen): Likewise.
14308         * lib/save-cwd.c (save_cwd): Likewise.
14309         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
14310         well, for minor improvements on hosts that lack O_DIRECTORY.
14311         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
14312         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
14313         Fall back on chown if open failed with EACCES.
14314
14315         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
14316         Report an error at compile-time if only a 1-second nominal clock
14317         resolution is found.
14318
14319         * lib/lchmod.h: New file.
14320         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
14321         (make_dir_parents): Use lchown rather than chown, and
14322         lchmod rather than chmod.
14323
14324         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
14325         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
14326         "proc" reported by n0dalus.
14327
14328         * lib/mountlist.c: Include <limits.h>.
14329         (dev_from_mount_options)
14330         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
14331         New function.  It no longer assumes "dev=" has the System V meaning
14332         on Linux (since it doesn't).  It also parses "dev=" more carefully.
14333         (read_file_system_list)
14334         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
14335         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
14336         dev= in that case.
14337
14338         * lib/posixtm.h (PDS_PRE_2000): New macro.
14339         * lib/posixtm.c (year): Arg is now syntax_bits rather than
14340         allow_century.  All usages changed.  Reject dates outside the range
14341         1969-1999 if PDS_PRE_2000 is used.
14342
14343 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
14344
14345         Sync from coreutils.
14346         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
14347         (Time of day items): Mention the possibility of leap seconds.
14348         Problem reported by Dr. David Alan Gilbert.
14349
14350 2006-01-09  Jim Meyering  <jim@meyering.net>
14351
14352         Sync from coreutils.
14353
14354         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
14355
14356         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
14357
14358         * lib/modechange.c (mode_compile): Reject an invalid mode string
14359         that starts with an octal digit.  From Andreas Gruenbacher.
14360
14361         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
14362         and dup to open_safer and dup_safer, respectively.
14363         (openat_permissive): Fix typo in comment.
14364
14365         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
14366         "gettext.h"; either no longer needed or are guaranteed by openat.h.
14367         (_): Remove; no longer needed.
14368         (openat): Renamed from rpl_openat; no need for rpl_openat
14369         since openat.h renames openat for us.
14370         Replace most of the body with a call to openat_permissive,
14371         to avoid duplicate code.
14372         Port to (probably hypothetical) environments were mode_t is
14373         wider than int.
14374         (openat_permissive): Require mode arg, so that we can check
14375         types better.  Put it just after flags.  Change cwd failure
14376         indicator from pointer-to-bool to pointer-to-errno-value.
14377         All callers changed.
14378         Invoke openat_save_fail and/or openat_restore_fail if
14379         cwd_errno is null, so that openat can call us.
14380         (openat_permissive, fdopendir, fstatat, unlinkat):
14381         Simplify errno handling to avoid some duplicate code,
14382         as it's OK to set errno on success.
14383         * lib/openat.h: Revamp code so that function macros depend on
14384         __OPENAT_PREFIX only, not also on AT_FDCWD.
14385         (openat_ro): Remove.  Caller changed to use openat_permissive.
14386         (openat_permissive): Now a macro, if not a function.
14387         (openat_restore_fail, openat_save_fail): Now always functions,
14388         since mkdirat needs them even if __OPENAT_PREFIX is defined.
14389
14390         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
14391         and openat.c.
14392         * lib/mkdirat.c: Include openat-priv.h.
14393         Remove definitions of macros defined therein.
14394         * lib/openat.c: Likewise.
14395
14396         * lib/mkdirat.c (mkdirat): New file and function.
14397         * lib/openat.h (mkdirat): Declare.
14398
14399         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
14400
14401         * lib/openat.h (openat_permissive): Declare.
14402         (openat_ro): Define.
14403
14404         * lib/openat.c (EXPECTED_ERRNO): New macro.
14405         (openat_permissive): New function -- used in remove.c rewrite.
14406         (all functions): Set errno just before returning, only if there
14407         was an actual failure.
14408         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
14409
14410         Emulate openat-family functions using Linux's procfs, if possible.
14411         Idea and some code based on Ulrich Drepper's glibc changes.
14412
14413         * lib/openat.c: (BUILD_PROC_NAME): New macro.
14414         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
14415         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
14416         before falling back on save_cwd and restore_cwd.
14417         (fdopendir, fstatat, unlinkat): Likewise.
14418
14419         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
14420         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
14421
14422         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
14423         as second argument to va_arg.  Otherwise, some versions of gcc
14424         warn that `if this code is reached, the program will abort'.
14425
14426 2006-01-09  Jim Meyering  <jim@meyering.net>
14427
14428         Sync from coreutils.
14429         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
14430         Require openat-priv.h.
14431
14432 2006-01-09  Bruno Haible  <bruno@clisp.org>
14433
14434         * modules/strnlen (Include): Use strnlen.h.
14435
14436 2006-01-09  Bruno Haible  <bruno@clisp.org>
14437
14438         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
14439
14440 2006-01-09  Bruno Haible  <bruno@clisp.org>
14441
14442         * lib/sysexit_.h (EX_OK): New macro.
14443         Suggested by Martin Lambers <marlam@marlam.de>.
14444
14445 2006-01-09  Bruno Haible  <bruno@clisp.org>
14446
14447         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
14448         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
14449
14450 2006-01-09  Bruno Haible  <bruno@clisp.org>
14451
14452         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
14453         numbers.
14454
14455 2006-01-09  Bruno Haible  <bruno@clisp.org>
14456
14457         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
14458         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
14459         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
14460         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
14461
14462 2006-01-09  Bruno Haible  <bruno@clisp.org>
14463
14464         * build-aux/javacomp.sh.in: New file, moved from lib/.
14465         * modules/javacomp-script (Files): Update.
14466         (configure.ac): Add AC_CONFIG_FILES invocation.
14467         (EXTRA_DIST): Remove variable.
14468
14469         * build-aux/javaexec.sh.in: New file, moved from lib/.
14470         * modules/javaexec (Files): Update.
14471         (configure.ac): Add AC_CONFIG_FILES invocation.
14472         (EXTRA_DIST): Remove javaexec.sh.in.
14473
14474         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
14475         * modules/csharpcomp-script (Files): Update.
14476         (configure.ac): Add AC_CONFIG_FILES invocation.
14477         (EXTRA_DIST): Remove variable.
14478
14479         * build-aux/csharpexec.sh.in: New file, moved from lib/.
14480         * modules/csharpexec (Files): Update.
14481         (configure.ac): Add AC_CONFIG_FILES invocation.
14482         (EXTRA_DIST): Remove csharpexec.sh.in.
14483
14484 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
14485
14486         Sync from coreutils.
14487
14488         Add POSIX ACL support
14489         * lib/acl.h (copy_acl, set_acl): Add declarations.
14490         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
14491         systems other than Linux.
14492         (chmod_or_fchmod): New function: use fchmod when possible,
14493         and chmod otherwise.
14494         (file_has_acl): Add a POSIX ACL implementation, with a
14495         Linux-specific subcase.
14496         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
14497         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
14498         acls are unsupported.
14499         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
14500         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
14501         are unsupported.
14502
14503 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
14504
14505         Sync from coreutils.
14506         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
14507
14508 2006-01-07  Bruno Haible  <bruno@clisp.org>
14509
14510         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
14511         gl_EARLY.
14512
14513 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
14514
14515         * lib/strftime.c (tzname): Don't declare if it is already #defined.
14516         Problem reported for Mingw by Mark Junker.
14517
14518 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
14519
14520         * README: Gnulib normally doesn't generate a tarball.
14521
14522 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
14523
14524         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
14525         long int, not int, for nanosecond counts, so that people who are
14526         used to POSIX struct timespec won't be surprised.  Reported by Jim
14527         Meyering.
14528
14529 2005-12-28  Bruno Haible  <bruno@clisp.org>
14530
14531         * build-aux/config.rpath: Update from GNU gettext.
14532
14533 2005-12-16  Jim Meyering  <jim@meyering.net>
14534
14535         * modules/fprintftime: New module.
14536         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
14537
14538 2005-12-16  Jim Meyering  <jim@meyering.net>
14539
14540         * m4/fprintftime.m4: New file.
14541
14542 2005-12-16  Jim Meyering  <jim@meyering.net>
14543
14544         * lib/fprintftime.c, lib/fprintftime.h: New files.
14545
14546 2005-12-15  Simon Josefsson  <jas@extundo.com>
14547
14548         * modules/socklen (configure.ac): Fix M4 macro name, to align with
14549         new m4/socklen.m4.
14550
14551 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
14552
14553         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
14554         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
14555
14556 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
14557
14558         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
14559         * lib/argp-help.c (fill_in_uparams): Check if the constructed
14560         struct uparams is valid. Fall back to the default values if it is
14561         not.
14562
14563 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
14564
14565         * modules/argp (Files): Add argp-pin.c
14566         (Depends-on): dirname
14567         (lib_SOURCES): Add argp-pin.c
14568
14569 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
14570
14571         * m4/argp.m4:  Check if program_invocation_name and
14572         program_invocation_short_name are declared and define appropriate
14573         macros if they are not.
14574
14575 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
14576
14577         * lib/argp-help.c (__argp_base_name): New function
14578         (__argp_short_program_name): Rewrite using __argp_base_name
14579         * lib/argp-namefrob.h: Define program_invocation_name and
14580         program_invocation_short_name if requested
14581         (__argp_base_name): Add prototype
14582         * lib/argp-parse.c (argp_def): Use gettext wrappers
14583         (argp_default_parser): Use __argp_base_name
14584         * lib/argp-pin.c: New file. Defines program_invocation_name and
14585         program_invocation_short_name on systems that lack them.
14586
14587 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
14588
14589         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
14590         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
14591         porting problem reported by Georg Schwarz in
14592         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
14593
14594 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
14595
14596         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
14597         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
14598         porting problem reported by Georg Schwarz in
14599         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
14600
14601 2005-12-05  Bruno Haible  <bruno@clisp.org>
14602
14603         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
14604         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
14605         Reported by Mark Junker <mjscod@gmx.de>.
14606
14607 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
14608
14609         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
14610         Use implementation from Albert Chin, with some
14611         comments/corrections by Stepan Kasal and myself.
14612
14613 2005-12-02  Bruno Haible  <bruno@clisp.org>
14614
14615         * gnulib-tool (func_import): Accept GPLed build tool modules when
14616         --lgpl is given.
14617         * modules/csharpcomp-script: New file.
14618         * modules/csharpcomp: Depend on it.
14619         * modules/javacomp-script: New file.
14620         * modules/javacomp: Depend on it.
14621         Suggested by Simon Josefsson.
14622
14623 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
14624
14625         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
14626         statement, to work around an HP-UX 10.20 compiler bug reported by
14627         Peter O'Gorman.
14628
14629 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
14630
14631         * modules/savedir (Depends-on): Add openat.
14632
14633 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
14634
14635         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
14636         (uintmax_t) [defined uintmax_t]: Do not declare.
14637         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
14638         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
14639         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
14640         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
14641         sake of portability to weird hosts that C allows (though we don't
14642         know of any practical examples).
14643
14644         * lib/savedir.h (fdsavedir): New decl.
14645         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
14646         contains most of the former guts of savedir.
14647         (savedir): Use savedirstream.
14648         Include "openat.h".
14649
14650 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14651
14652         * modules/obstack (Files): Add m4/ulonglong.m4.
14653         Problem reported by Davide Angelocola.
14654
14655 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
14656
14657         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
14658         coreutils no longer futzes with rounding modes.
14659
14660 2005-11-14  Jim Meyering  <jim@meyering.net>
14661
14662         * lib/mkstemp-safer.c: Include <config.h>, required for possible
14663         replacement of mkstemp.
14664
14665 2005-11-10  Simon Josefsson  <jas@extundo.com>
14666
14667         * lib/readline.c: Remove EOL.
14668
14669 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
14670
14671         * modules/gethrxtime (Depends-on): Add gettime.
14672
14673 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
14674
14675         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
14676         or gettimeofday; no longer needed.
14677
14678 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
14679
14680         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
14681         time business.
14682         (gethrxtime) [! (HAVE_NANOUPTIME
14683         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
14684         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
14685         our own approximation.
14686
14687 2005-11-08  Eric Blake  <ebb9@byu.net>
14688
14689         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
14690
14691 2005-11-08  Eric Blake  <ebb9@byu.net>
14692
14693         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
14694
14695 2005-11-04  Bruno Haible  <bruno@clisp.org>
14696
14697         * gnulib-tool: Implement --update mode.
14698
14699 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
14700
14701         Fix porting problem reported by Theodoros V. Kalamatianos.
14702         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
14703         Don't assume that futimes failing means we must fail.
14704
14705 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
14706
14707         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
14708         variables to suggest the intended function of the PATH_MAX check.
14709
14710 2005-10-30  Kean Johnston  <jkj@sco.com>
14711
14712         Trivial changes to support SCO systems.
14713         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
14714         as PATH_MAX.
14715         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
14716         where __ptr is null when no I/O is pending.
14717
14718 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14719
14720         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
14721         leave errno alone.  Problem reported by Dmitry V. Levin.
14722
14723 2005-10-28  Simon Josefsson  <jas@extundo.com>
14724
14725         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
14726         Test more.
14727
14728         * tests/test-gc-md2.c, tests/test-md2.c: New files.
14729
14730         * modules/md2, modules/md2-tests: New files.
14731
14732 2005-10-28  Simon Josefsson  <jas@extundo.com>
14733
14734         * m4/inet_ntop.m4: More tests.
14735
14736         * m4/gc-md2.m4, md2.m4: New file.
14737
14738 2005-10-28  Simon Josefsson  <jas@extundo.com>
14739
14740         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
14741         "restrict" keywords, as per POSIX.  Protect the function
14742         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
14743         Don't use K&R prototypes.  Check the sprintf return values.
14744         Re-define EAFNOSUPPORT if not present.  Indent.
14745
14746         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
14747         suggested by Bruno Haible <bruno@clisp.org>.
14748
14749         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
14750
14751         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
14752
14753         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
14754         libgcrypt).
14755
14756         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
14757
14758         * lib/md2.h, lib/md2.c: New files.
14759
14760 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
14761
14762         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
14763         errno alone.  Problem reported by Frederic Jolliton.
14764
14765 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
14766
14767         * modules/verify (License): Change from GPL to LGPL.  This is a
14768         tiny module and there are apparently near-equivalents that are
14769         under the BSD license.
14770
14771 2005-10-24  Simon Josefsson  <jas@extundo.com>
14772
14773         * modules/sha1: Relicense to LGPL.
14774
14775 2005-10-24  Simon Josefsson  <jas@extundo.com>
14776
14777         * lib/md4.h: Shrink buffer size, now that we changed the type.
14778
14779 2005-10-23  Simon Josefsson  <jas@extundo.com>
14780
14781         * gnulib-tool (func_import): Fix --tests-base.
14782
14783 2005-10-22  Simon Josefsson  <jas@extundo.com>
14784
14785         * modules/arcfour (Depends-on): Need stdint.
14786
14787 2005-10-22  Simon Josefsson  <jas@extundo.com>
14788
14789         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
14790         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
14791
14792 2005-10-22  Simon Josefsson  <jas@extundo.com>
14793
14794         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
14795         suggested by Bruno Haible <bruno@clisp.org>.
14796
14797 2005-10-22  Simon Josefsson  <jas@extundo.com>
14798
14799         * lib/crc.h: Include stddef.h, for size_t.
14800
14801 2005-10-22  Simon Josefsson  <jas@extundo.com>
14802
14803         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
14804         arcfour_context struct (simplify test vector testing in GNU
14805         Shishi).
14806
14807 2005-10-21  Simon Josefsson  <jas@extundo.com>
14808
14809         * modules/des, modules/des-tests: New files.
14810
14811         * modules/gc-des, modules/gc-des-tests: New files.
14812
14813         * tests/test-des.c, tests/test-gc-des.c: New file.
14814
14815 2005-10-21  Simon Josefsson  <jas@extundo.com>
14816
14817         * modules/arctwo, modules/arctwo-tests: New files.
14818
14819         * tests/test-arctwo.c: New file.
14820
14821         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
14822
14823         * tests/test-gc-arctwo.c: New file.
14824
14825 2005-10-21  Simon Josefsson  <jas@extundo.com>
14826
14827         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
14828         Bruno Haible <bruno@clisp.org>.
14829
14830         * m4/gc-des.m4: New file.
14831
14832 2005-10-21  Simon Josefsson  <jas@extundo.com>
14833
14834         * m4/arctwo.m4: New file.
14835
14836         * m4/gc-arctwo.m4: New file.
14837
14838 2005-10-21  Simon Josefsson  <jas@extundo.com>
14839
14840         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
14841         block.
14842
14843 2005-10-21  Simon Josefsson  <jas@extundo.com>
14844
14845         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
14846         <bruno@clisp.org>.
14847
14848         * lib/hmac-sha1.c (hmac_sha1): Likewise.
14849
14850         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
14851         Bruno Haible <bruno@clisp.org>.
14852
14853         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
14854         <bruno@clisp.org>.
14855
14856 2005-10-21  Simon Josefsson  <jas@extundo.com>
14857
14858         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
14859
14860 2005-10-21  Simon Josefsson  <jas@extundo.com>
14861
14862         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
14863
14864 2005-10-21  Simon Josefsson  <jas@extundo.com>
14865
14866         * lib/des.h, lib/des.c: New files.
14867
14868         * lib/gc-gnulib.c: Support DES.c
14869
14870 2005-10-21  Simon Josefsson  <jas@extundo.com>
14871
14872         * lib/arctwo.h, lib/arctwo.c: New files.
14873
14874         * lib/gc-gnulib.c: Support ARCTWO.
14875
14876 2005-10-21  Simon Josefsson  <jas@extundo.com>
14877
14878         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
14879         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14880
14881 2005-10-21  Simon Josefsson  <jas@extundo.com>
14882
14883         * gnulib-tool (func_import, func_create_testdir): Define automake
14884         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
14885         Makefile.am snippet),
14886         suggested by Bruno Haible <bruno@clisp.org>.
14887
14888         * modules/gc (Makefile.am): Use it.
14889
14890 2005-10-21  Bruno Haible  <bruno@clisp.org>
14891
14892         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
14893         patch.
14894
14895 2005-10-19  Simon Josefsson  <jas@extundo.com>
14896
14897         * tests/test-gc-rijndael.c: New file.
14898
14899         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
14900
14901 2005-10-19  Simon Josefsson  <jas@extundo.com>
14902
14903         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
14904         interface too.
14905
14906 2005-10-19  Simon Josefsson  <jas@extundo.com>
14907
14908         * tests/test-gc-arcfour.c: New file.
14909
14910         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
14911
14912 2005-10-19  Simon Josefsson  <jas@extundo.com>
14913
14914         * modules/gc-md4, modules/gc-md4-tests: New file.
14915
14916         * tests/test-gc-md4.c: New file.
14917
14918 2005-10-19  Simon Josefsson  <jas@extundo.com>
14919
14920         * m4/gc-md4.m4: New file.
14921
14922 2005-10-19  Simon Josefsson  <jas@extundo.com>
14923
14924         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
14925         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
14926         <kasal@ucw.cz>.
14927
14928 2005-10-19  Simon Josefsson  <jas@extundo.com>
14929
14930         * m4/gc-arcfour.m4: New file.
14931
14932         * m4/gc-rijndael.m4: New file.
14933
14934 2005-10-19  Simon Josefsson  <jas@extundo.com>
14935
14936         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
14937
14938 2005-10-19  Simon Josefsson  <jas@extundo.com>
14939
14940         * lib/gc-gnulib.c: Support ARCFOUR.
14941
14942 2005-10-19  Simon Josefsson  <jas@extundo.com>
14943
14944         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
14945         support.
14946
14947         * lib/gc.h: Add ECB enum type.
14948
14949         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
14950
14951 2005-10-18  Simon Josefsson  <jas@extundo.com>
14952
14953         * tests/test-md5.c: New file.
14954
14955         * modules/md5-tests: New file.
14956
14957 2005-10-18  Simon Josefsson  <jas@extundo.com>
14958
14959         * tests/test-md4.c: New file.
14960
14961         * modules/md4, modules/md4-tests: New files.
14962
14963 2005-10-18  Simon Josefsson  <jas@extundo.com>
14964
14965         * m4/md4.m4: New file.
14966
14967 2005-10-18  Simon Josefsson  <jas@extundo.com>
14968
14969         * lib/md4.h, lib/md4.c: New files, based on md5.?.
14970
14971 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
14972
14973         * gnulib-tool (func_create_testdir): Omit the second check whether
14974         BUILT_SOURCES in nonempty.
14975
14976 2005-10-17  Simon Josefsson  <jas@extundo.com>
14977
14978         * tests/test-rijndael.c: New file.
14979
14980 2005-10-17  Simon Josefsson  <jas@extundo.com>
14981
14982         * modules/sha1: Depend on stdint instead of md5.
14983
14984         * modules/md5: Depend on stdint, remove uint32_t.
14985
14986 2005-10-17  Simon Josefsson  <jas@extundo.com>
14987
14988         * modules/gc-sha1-tests: New file.
14989
14990         * tests/test-gc-sha1.c: New file.
14991
14992 2005-10-17  Simon Josefsson  <jas@extundo.com>
14993
14994         * m4/md5.m4: Remove call to uint32_t.m4.
14995
14996 2005-10-17  Simon Josefsson  <jas@extundo.com>
14997
14998         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
14999
15000         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
15001         md5.h.
15002
15003         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
15004
15005         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
15006
15007 2005-10-17  Simon Josefsson  <jas@extundo.com>
15008
15009         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
15010
15011 2005-10-17  Simon Josefsson  <jas@extundo.com>
15012
15013         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
15014
15015 2005-10-17  Simon Josefsson  <jas@extundo.com>
15016
15017         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
15018
15019         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
15020
15021 2005-10-17  Bruno Haible  <bruno@clisp.org>
15022
15023         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
15024         that it can also be used in a test.
15025
15026 2005-10-16  Bruno Haible  <bruno@clisp.org>
15027
15028         * gnulib-tool (func_emit_tests_Makefile_am): Also define
15029         TESTS_ENVIRONMENT, so that individual tests can augment it.
15030
15031         * gnulib-tool (func_create_testdir): Use an intermediate target for
15032         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
15033         macros, like $(ALLOCA_H), which cannot be passed through the command
15034         line.
15035
15036 2005-10-15  Simon Josefsson  <jas@extundo.com>
15037
15038         * modules/rijndael-tests: New file.
15039
15040         * modules/rijndael: New file.
15041
15042 2005-10-15  Simon Josefsson  <jas@extundo.com>
15043
15044         * m4/rijndael.m4: New file.
15045
15046 2005-10-15  Simon Josefsson  <jas@extundo.com>
15047
15048         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
15049
15050         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
15051
15052 2005-10-14  Simon Josefsson  <jas@extundo.com>
15053
15054         * tests/test-arcfour.c: New file.
15055
15056         * modules/arcfour, modules/arcfour-tests: New files.
15057
15058 2005-10-14  Simon Josefsson  <jas@extundo.com>
15059
15060         * m4/arcfour.m4: New file.
15061
15062 2005-10-14  Simon Josefsson  <jas@extundo.com>
15063
15064         * lib/arcfour.h, lib/arcfour.c: New files.
15065
15066 2005-10-14  Roland McGrath  <roland@redhat.com>
15067
15068         Import from libc.  [BZ #1331]
15069         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
15070         macro argument.
15071         Reported by Matej Vela <vela@debian.org>.
15072
15073 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
15074
15075         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
15076         include <wchar.h>; no longer needed.
15077
15078 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
15079
15080         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
15081
15082 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
15083         and  Ulrich Drepper  <drepper@redhat.com>
15084
15085         Import from libc.
15086         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
15087         instead of inline stream orientation test and two separate
15088         function calls.  Pay no attention to USE_IN_LIBIO.
15089
15090 2005-10-13  Simon Josefsson  <jas@extundo.com>
15091
15092         * modules/gc-hmac-md5-tests: New file.
15093
15094         * tests/test-gc-hmac-sha1.c: New file.
15095
15096         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
15097
15098         * modules/gc-hmac-md5-tests: New file.
15099
15100         * tests/test-gc-md5.c: New file.
15101
15102         * modules/gc-md5-tests: New file.
15103
15104 2005-10-13  Simon Josefsson  <jas@extundo.com>
15105
15106         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
15107         Move memory allocation outside of loop.
15108
15109 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
15110
15111         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
15112         intermediate directory is in a read-only file system.  Problem
15113         reported by Eric Blake.
15114
15115 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
15116
15117         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
15118
15119 2005-10-12  Simon Josefsson  <jas@extundo.com>
15120
15121         * tests/test-hmac-sha1.c: New file.
15122
15123         * modules/hmac-sha1-tests: New file.
15124
15125         * modules/hmac-sha1: New file.
15126
15127 2005-10-12  Simon Josefsson  <jas@extundo.com>
15128
15129         * modules/gc-sha1: New file.
15130
15131 2005-10-12  Simon Josefsson  <jas@extundo.com>
15132
15133         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
15134
15135         * tests/test-gc-pbkdf2-sha1.c: New file.
15136
15137 2005-10-12  Simon Josefsson  <jas@extundo.com>
15138
15139         * modules/gc-md5, modules/gc-hmac-md5: New files.
15140
15141         * modules/gc (Files): Remove md5, memxor and hmac files.
15142
15143 2005-10-12  Simon Josefsson  <jas@extundo.com>
15144
15145         * m4/gc-pbkdf2-sha1.m4: New file.
15146
15147         * m4/gc-hmac-sha1.m4: New file.
15148
15149         * m4/gc-sha1: New file.
15150
15151         * m4/hmac-sha1.m4: New file.
15152
15153 2005-10-12  Simon Josefsson  <jas@extundo.com>
15154
15155         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
15156
15157         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
15158
15159 2005-10-12  Simon Josefsson  <jas@extundo.com>
15160
15161         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
15162         suggested by Bruno Haible <bruno@clisp.org>.
15163
15164 2005-10-12  Simon Josefsson  <jas@extundo.com>
15165
15166         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
15167
15168 2005-10-12  Simon Josefsson  <jas@extundo.com>
15169
15170         * lib/gc-pbkdf2-sha1.c: New file.
15171
15172         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
15173
15174 2005-10-12  Simon Josefsson  <jas@extundo.com>
15175
15176         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
15177
15178         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
15179
15180 2005-10-12  Simon Josefsson  <jas@extundo.com>
15181
15182         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
15183         GC_USE_HMAC_MD5, respectively.
15184
15185         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
15186         (gc_md5): Fix typo.
15187
15188         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
15189
15190         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
15191
15192         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
15193
15194 2005-10-12  Bruno Haible  <bruno@clisp.org>
15195
15196         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
15197         Reported by Stepan Kasal <kasal@ucw.cz>.
15198
15199 2005-10-11  Simon Josefsson  <jas@extundo.com>
15200
15201         * tests/test-crc.c: New file.
15202
15203         * modules/crc, modules/crc-tests: New files.
15204
15205 2005-10-11  Simon Josefsson  <jas@extundo.com>
15206
15207         * m4/crc.m4: New file.
15208
15209 2005-10-11  Simon Josefsson  <jas@extundo.com>
15210
15211         * lib/gc.h: Add gc_hash and gc_hash_buffer.
15212
15213         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
15214
15215         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
15216
15217 2005-10-11  Simon Josefsson  <jas@extundo.com>
15218
15219         * lib/crc.h, lib/crc.c: New files.
15220
15221         * lib/gc.h (gc_hash_buffer): Add doc.
15222
15223 2005-10-11  Bruno Haible  <bruno@clisp.org>
15224
15225         * modules/c-strcasestr: New file.
15226         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
15227
15228 2005-10-11  Bruno Haible  <bruno@clisp.org>
15229
15230         * modules/c-strcase: New file.
15231         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
15232
15233 2005-10-11  Bruno Haible  <bruno@clisp.org>
15234
15235         * lib/strcasecmp.c: Include limits.h.
15236         (strcasecmp): Avoid integer overflow on exotic platforms.
15237         * lib/strncasecmp.c: Include limits.h.
15238         (strncasecmp): Avoid integer overflow on exotic platforms.
15239         Reported by Paul Eggert.
15240
15241 2005-10-11  Bruno Haible  <bruno@clisp.org>
15242
15243         * lib/c-strcasestr.h: New file, from GNU gettext.
15244         * lib/c-strcasestr.c: New file, from GNU gettext.
15245
15246 2005-10-11  Bruno Haible  <bruno@clisp.org>
15247
15248         * lib/c-strcase.h: New file, from GNU gettext.
15249         * lib/c-strcasecmp.c: New file, from GNU gettext.
15250         * lib/c-strncasecmp.c: New file, from GNU gettext.
15251
15252 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
15253
15254         * modules/mempcpy (License): GPL -> LGPL.
15255         * modules/strchrnul (License): Likewise.
15256         * modules/sysexits (License): Likewise.
15257
15258 2005-10-08  Simon Josefsson  <jas@extundo.com>
15259
15260         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
15261
15262 2005-10-07  Simon Josefsson  <jas@extundo.com>
15263
15264         * m4/memxor.m4: Remove gl_C_RESTRICT call.
15265
15266 2005-10-06  Simon Josefsson  <jas@extundo.com>
15267
15268         * tests/test-hmac-md5.c: New file.
15269
15270         * modules/hmac-md5-tests: New file.
15271
15272         * modules/hmac-md5: New file.
15273
15274 2005-10-06  Simon Josefsson  <jas@extundo.com>
15275
15276         * m4/hmac-md5.m4: New file.
15277
15278         * m4/memxor.m4: Require gl_C_RESTRICT.
15279
15280 2005-10-06  Simon Josefsson  <jas@extundo.com>
15281
15282         * lib/memxor.c (memxor): Avoid casts and warnings.
15283
15284 2005-10-06  Simon Josefsson  <jas@extundo.com>
15285
15286         * lib/hmac-md5.c: New file.
15287
15288         * lib/hmac.h: New file.
15289
15290 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
15291
15292         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
15293         promotes to int, not unsigned int, to catch the AIX 5.3
15294         compiler bug.
15295
15296 2005-10-05  Simon Josefsson  <jas@extundo.com>
15297
15298         * modules/memxor: New file.
15299
15300         * modules/iconv (Files): Move config.rpath to havelib, it is used
15301         there.
15302
15303         * modules/havelib (Files): Add config.rpath.
15304
15305 2005-10-05  Simon Josefsson  <jas@extundo.com>
15306
15307         * m4/memxor.m4: New file.
15308
15309 2005-10-05  Simon Josefsson  <jas@extundo.com>
15310
15311         * lib/memxor.c (memxor): Fix compiler error.
15312
15313         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
15314         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
15315
15316         * lib/memxor.h, lib/memxor.c: New files.
15317
15318         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
15319         we assume all systems have it, suggested by Jim Meyering
15320         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
15321         any systems lack sys/socket.h; mingw32 is known to lack it, but we
15322         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
15323         same reasons.
15324
15325 2005-10-05  Simon Josefsson  <jas@extundo.com>
15326
15327         * config/srclist.txt: Add glibc bug 1423 for md5.h.
15328
15329 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
15330
15331         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
15332         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
15333         needed, since the source code now assumes these .h files.
15334
15335 2005-10-05  Derek Price  <derek@ximbiot.com>
15336
15337         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
15338
15339 2005-10-05  Bruno Haible  <bruno@clisp.org>
15340
15341         * modules/stdint (License): Change to LGPL.
15342
15343 2005-10-04  Simon Josefsson  <jas@extundo.com>
15344
15345         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
15346         D. Baushke" <mdb@gnu.org>.
15347
15348 2005-10-04  Bruno Haible  <bruno@clisp.org>
15349
15350         * lib/verify.h (verify_true): Provide alternative definition for C++.
15351
15352 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
15353
15354         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
15355         (SSIZE_MAX): New macro, if not already defined.
15356         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
15357         than 2 GiB.
15358
15359 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
15360
15361         Sync from coreutils.
15362         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
15363         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
15364         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
15365         ULLONG_MAX doesn't work with 2.7.2.1.
15366
15367 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
15368
15369         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
15370         From Ben Pfaff.
15371
15372         * modules/exclude (Depends-on): Depend on verify.
15373         * modules/strtoimax (Depends-on): Likewise.
15374         * modules/utimecmp (Depends-on): Likewise.
15375
15376 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
15377
15378         * lib/exclude.c: Include verify.h.
15379         (verify): Remove.  All callers changed to use verify.h's version.
15380         * lib/strtoimax.c: Likewise.
15381         * lib/utimecmp.c: Likewis.e
15382
15383         Sync from coreutils.
15384         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
15385         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
15386         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
15387         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
15388         bother returning ENOSYS if settimeofday or stime fails; just let
15389         them return whatever errno they want to return.
15390         * lib/utimens.c: Include unistd.h, for dup2.
15391         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
15392         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
15393
15394 2005-10-02  Jim Meyering  <jim@meyering.net>
15395
15396         Sync from coreutils.
15397         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
15398         from glibc-2.2.5 that fails for read-only files.
15399
15400 2005-10-02  Jim Meyering  <jim@meyering.net>
15401
15402         Sync from coreutils.
15403         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
15404         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
15405         `#if HAVE_CONFIG_H'.
15406         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
15407         Remove AT_FDCWD test.
15408         Do not consume the fd unless successful.
15409         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
15410         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
15411         block, so that we don't even try to compile it if settimeofday is
15412         available.  This works around a compilation failure on OSF1 V5.1,
15413         due to stime requiring a `long int*' while tv_sec is `int'.
15414
15415 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
15416
15417         Sync from coreutils.
15418         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
15419         against `yes', rather than just testing for nonempty.
15420
15421 2005-10-01  Simon Josefsson  <jas@extundo.com>
15422
15423         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
15424         and Darwin.
15425
15426         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
15427         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
15428         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
15429         freeaddrinfo and gai_strerror are declared by the POSIX headers.
15430         Check if struct addrinfo is declared.
15431
15432 2005-10-01  Simon Josefsson  <jas@extundo.com>
15433
15434         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
15435         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
15436         AI_* and EAI_* definitions.  Protect function declarations.
15437
15438 2005-10-01  Jim Meyering  <jim@meyering.net>
15439
15440         Sync from coreutils.
15441
15442         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
15443         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
15444         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
15445         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
15446         in the inet and nsl libraries.  Required on Solaris 5.7.
15447
15448 2005-10-01  Jim Meyering  <jim@meyering.net>
15449
15450         Sync from coreutils.
15451         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
15452         in the inet and nsl libraries.  Required on Solaris 5.7.
15453
15454 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
15455
15456         * lib/getdelim.c (getdelim): Remove unused variables.
15457
15458 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
15459
15460         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
15461         so that the code works even with ancient cpp.  Portability problem
15462         with GCC 2.7.2.1 reported by Thomas M.Ott.
15463
15464 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
15465
15466         * modules/regex (Depends-on): Add strcase.
15467
15468         * modules/gethostname (Licence): Change from GPL to LGPL, since
15469         gethostname.c is a trivial implementation of a standard library
15470         function.
15471         * modules/poll (License): Change from GPL to LGPL, since it's
15472         derived from LGPL code.
15473
15474 2005-09-27  Jim Meyering  <jim@meyering.net>
15475
15476         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
15477         HAVE_CONFIG_H.
15478
15479         * lib/intprops.h (signed_type_or_expr__): Define.
15480         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
15481         for unsigned types.
15482
15483 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
15484
15485         * lib/verify.h (verify_expr): Remove, replacing with:
15486         (verify_true): New macro that returns true instead of void.
15487         (verify_type__): Remove.
15488         (verify): Use verify_true rather than verify_type__.
15489
15490 2005-09-26  Bruno Haible  <bruno@clisp.org>
15491
15492         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
15493         is necessary.
15494         (lib_SOURCES): Remove mbchar.c.
15495         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
15496         (Files): Add m4/mbrtowc.m4.
15497         * modules/mbiter: Likewise.
15498         * modules/mbuiter: Likewise.
15499
15500 2005-09-26  Bruno Haible  <bruno@clisp.org>
15501
15502         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
15503         compile mbchar.c if they are not both present.
15504         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
15505         * m4/mbiter.m4 (gl_MBITER): Likewise.
15506         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
15507         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
15508         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
15509
15510 2005-09-25  Jim Meyering  <jim@meyering.net>
15511
15512         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
15513         also uses socklen_t.
15514
15515 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
15516
15517         * lib/utimens.c (ENOSYS): Define if not already defined.
15518         (futimens): Support having a null PATH if the file descriptor
15519         is nonnegative.
15520
15521         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
15522         Remove.
15523         (__attribute): Define to empty unless GCC 3.1 or later.
15524         This works around a core dump on OpenBSD 3.4, which has GCC
15525         2.95.3, which dumps core when given __attribute__(()).  It also
15526         simplifies other tests, since we really don't want to bother with
15527         worrying about which ancient version of GCC supported what.
15528         Original problem reported by Yoann Vandoorselaere, with part of
15529         the fix suggested by Derek Price.
15530
15531 2005-09-24  Jim Meyering  <jim@meyering.net>
15532
15533         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
15534         so we can once again use a positive bitfield width of 1 -- now we
15535         don't have to explain why we were using a bitfield width of 2.
15536
15537 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
15538
15539         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
15540         and similarly for the other external symbols.  Problem reported
15541         by James Gallager.
15542
15543         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
15544         bug reported by Jim Meyering.
15545
15546         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
15547         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
15548         not needed, since socklen is a prerequisite module.
15549
15550 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
15551
15552         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
15553         Problem reported by Eric Blake.
15554         (getaddrinfo): Initialize se so that it's not garbage.
15555         Redo internal storage allocation so that it doesn't make unportable
15556         assumptions about alignment.
15557         Fix a memory leak.
15558
15559         * lib/utimens.c (futimens): Use futimesat if available.
15560         Prefer it to futimes since it doesn't have the futimes bug.
15561
15562         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
15563         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
15564         Instead, declare a function that returns a pointer to an array,
15565         and use verify_type__ to declare the size of the array.
15566         Problem and germ of a solution reported by Bruno Haible.
15567         (verify_type__): Use 2, not 1, for bitfield size, to avoid
15568         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
15569
15570 2005-09-23  Jim Meyering  <jim@meyering.net>
15571
15572         Sync from coreutils.
15573         Correct build failure (socklen_t not defined) on at least
15574         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
15575         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
15576
15577 2005-09-23  Jim Meyering  <jim@meyering.net>
15578
15579         * modules/getaddrinfo (Depends-on): Add socklen.
15580
15581 2005-09-23  Bruno Haible  <bruno@clisp.org>
15582
15583         * tests/test-verify.c: New file.
15584
15585 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
15586
15587         Sync from coreutils.
15588
15589         * modules/argmatch (Depends-on): Add verify.
15590         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
15591         unistd-safer.
15592         * modules/save-cwd (Depends-on): Likewise.
15593
15594         * modules/openat (Files): Add lib/openat-die.c.
15595         (Depends-on): Remove error, exitfail.
15596         Add dirname.
15597
15598         * modules/verify: New file.
15599         * MODULES.html.sh (Diagnostics <assert.h>): New section,
15600         with "verify" module.
15601
15602 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
15603
15604         Sync from coreutils.
15605
15606         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
15607         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
15608         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
15609         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
15610         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
15611         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
15612         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
15613         Don't bother checking for string.h, stdlib.h, unistd.h.
15614         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
15615         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
15616         module's job.
15617         * m4/jm-macros.m4 (gl_MACROS): Likewise.
15618         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
15619
15620         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
15621         (gl_GETDATE): Use it.
15622
15623         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
15624
15625 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
15626
15627         Sync from coreutils.
15628
15629         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
15630         stat-time.h.
15631         * lib/argmatch.h: Include verify.h
15632         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
15633         (ARGMATCH_ASSERT): Remove; unused.
15634         * lib/canonicalize.c: Assume STDC_HEADERS.
15635         * lib/exclude.c: Include "strcase.h".
15636         * lib/regex_internal.h [!defined _LIBC]: Likewise.
15637         * lib/getusershell.c: Include stdio--.h rather than stdio.h
15638         and stdio-safer.h.
15639         (getusershell): Call fopen, not fopen_safer.
15640         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
15641         Do not include unistd-safer.h.
15642         (save_cwd): Don't call fd_safer; no longer needed
15643         now that we include fcntl--.h.
15644
15645         * lib/getdate.y (relative_time): New type.
15646         (RELATIVE_TIME_0): New constant.
15647         (parser_control): Use relative_time instead of doing it ourselves.
15648         (%union): Add new relative_time rel member.
15649         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
15650         Now typeless.
15651         (relunit, relunit_snumber): Now of type rel.
15652         (zone, rel, relunit, get_date): Adjust to above changes.
15653
15654         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
15655         Do not include unistd-safer.h.
15656         (getloadavg): Don't call fd_safer; no longer needed
15657         now that we include fcntl--.h.
15658
15659         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
15660         (make_dir_parents): Treat ENOSYS like EEXIST.
15661
15662         Improve quality of diagnostics on restore_cwd failure.
15663         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
15664         (make_dir_parents): Last arg is now int * (for errno), not bool *.
15665         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
15666         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
15667         each time through the loop.  Do not diagnose restore_cwd failure;
15668         that is the caller's job (and perhaps the caller does not care).
15669
15670         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
15671         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
15672         If the file already exists but is not a directory, don't bother
15673         to try to make its parents.
15674         Close potential file descriptor leak if we can't chdir("/") (!).
15675         Don't always return true if chdir($PWD) fails; return true only
15676         if the requested action was done successfully (except for the
15677         chdir($PWD)).
15678         Don't log final directory unless we actually made it.
15679         Refactor to avoid duplicate code to fix up permissions.
15680         Don't attempt to fix up parent permissions if chdir($PWD) fails.
15681
15682         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
15683         to make it a bit faster and (I hope) clearer.
15684         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
15685         Fix bug in formats like %2N.
15686
15687         * lib/verify.h: New file.
15688
15689 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
15690
15691         Sync from coreutils.
15692         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
15693
15694 2005-09-22  Jim Meyering  <jim@meyering.net>
15695
15696         Sync from coreutils.
15697
15698         * m4/lstat.m4 (gl_FUNC_LSTAT):
15699         Use AC_LIBSOURCES to require lstat.c and lstat.h.
15700         Remove obsolete comment.
15701         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
15702         * m4/xstrtod.m4: Likewise.
15703
15704         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
15705
15706 2005-09-22  Jim Meyering  <jim@meyering.net>
15707
15708         Sync from coreutils.
15709
15710         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
15711
15712         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
15713         the .tm_year member, since otherwise gcc-4.0 would now warn about
15714         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
15715
15716         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
15717         order to avoid an unsuppressible warning from gcc on 64-bit systems.
15718
15719         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
15720         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
15721         when run in a time zone for which daylight savings time is in effect
15722         for the starting date.
15723
15724         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
15725         stop us from restricting permissions of just-created absolute-named
15726         directories.
15727         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
15728         to restore initial working directory.
15729         * lib/mkdir-p.c (make_dir_parents): New parameter:
15730         different_working_dir, to tell caller if/when we change the working
15731         directory and are unable to return to the initial one.
15732         * lib/mkdir-p.h (make_dir_parents): Update prototype.
15733         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
15734         `return false'.  This fixes a bug introduced on 2004-07-30.
15735
15736         * lib/openat.c (fdopendir): Be sure to close the supplied
15737         file descriptor before returning.  This makes our replacement
15738         implementation a little closer to Solaris's, where fdopendir
15739         ties the file descriptor to the returned DIR* pointer.
15740         * lib/openat.c (unlinkat): New function.
15741         * lib/openat.h (unlinkat): Add prototype.
15742         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
15743         (openat_restore_fail): Rename from openat_restore_die.
15744         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
15745
15746         Provide an alternative to exiting immediately upon save_cwd or
15747         restore_cwd failure.  Now, an application can arrange e.g.,
15748         to perform a longjump in that case.
15749         * lib/openat.c: Include dirname.h.
15750         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
15751         (rpl_openat, fdopendir, fstatat): Call openat_save_die
15752         and openat_restore_die rather than calling error directly.
15753         Don't include "error.h" or "exitfail.h"; they're no longer needed.
15754
15755         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
15756         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
15757         define.
15758
15759         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
15760         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
15761                             int utc, int nanoseconds);
15762         Background:
15763         date should not have to allocate a megabyte of virtual memory to
15764         handle a format argument like +%1048575T.  When implemented with
15765         strftime, it must allocate such a buffer, use strftime to fill it
15766         in, print it, then free it.
15767         With fprintftime, it simply prints everything and exits.
15768         With no need for memory allocation, that's one fewer way to fail.
15769         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
15770         optional field width, not before, so we accept %9:z, not %:9z.
15771         (my_strftime): Be sure to use L_('x') for literals.
15772
15773         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
15774         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
15775         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
15776         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
15777         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
15778         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
15779         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
15780         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
15781         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
15782         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
15783         * lib/xgethostname.c, lib/xreadlink.c:
15784         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
15785
15786         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
15787         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
15788         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
15789         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
15790         and don't include <sys/file.h>).
15791
15792 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
15793
15794         Sync from coreutils.
15795
15796         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
15797         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
15798         [!LDAV_DONE]: Avoid unused variable warning.
15799
15800 2005-09-21  Bruno Haible  <bruno@clisp.org>
15801
15802         * lib/unicodeio.h (unicode_to_mb): New declaration.
15803
15804 2005-09-20  Derek Price  <derek@ximbiot.com>
15805
15806         * lib/getaddrinfo.c: Don't include <netdb.h> included from
15807         getaddrinfo.h.
15808
15809 2005-09-20  Bruno Haible  <bruno@clisp.org>
15810
15811         * gnulib-tool: Remove trailing slashes from the values specified for
15812         --source-base, --m4-base, --tests-base, --aux-dir.
15813         Suggested by Simon Josefsson <jas@extundo.com>.
15814
15815 2005-09-20  Bruno Haible  <bruno@clisp.org>
15816
15817         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
15818         func_modules_to_filelist, func_import, func_create_testdir): Make all
15819         sorting results locale-independent, so that gnulib-cache.m4 doesn't
15820         change when gnulib-tool is invoked in a different locale.
15821
15822 2005-09-19  Simon Josefsson  <jas@extundo.com>
15823
15824         * m4/socklen.m4: Fix typo.
15825
15826 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15827
15828         Use a consistent style for including <config.h>.
15829         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
15830         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
15831         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
15832         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
15833         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
15834         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
15835         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
15836         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
15837         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
15838         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
15839         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
15840         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
15841         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
15842         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
15843         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
15844         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
15845         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
15846         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
15847         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
15848         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
15849         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
15850         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
15851         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
15852         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
15853         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
15854         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
15855         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
15856         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
15857         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
15858         lib/xstrtoumax.c, lib/yesno.c:
15859         Standardize inclusion of config.h.
15860         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
15861         lib/inttostr.h:  Removed inclusion of config.h from header files.
15862         * lib/inttostr.c:  Adjusted in-tree users.
15863         * lib/timespec.h: Remove superfluous warning to include config.h.
15864         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
15865         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
15866         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
15867         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
15868         config.h with HAVE_CONFIG_H.
15869
15870 2005-09-19  Jim Meyering  <jim@meyering.net>
15871
15872         * modules/pathmax (License): Change to LGPL.
15873
15874 2005-09-19  Derek Price  <derek@ximbiot.com>
15875
15876         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
15877
15878 2005-09-19  Bruno Haible  <bruno@clisp.org>
15879
15880         * gnulib-tool (import): Provide default for --tests-base.
15881
15882 2005-09-19  Bruno Haible  <bruno@clisp.org>
15883
15884         * doc/quote.texi: New file, extracted from gnulib.texi.
15885         * doc/ctime.texi: New file, extracted from gnulib.texi.
15886         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
15887         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
15888         * doc/gnulib.texi: Include them.
15889
15890 2005-09-18  Bruno Haible  <bruno@clisp.org>
15891
15892         Portability fix.
15893         * gnulib-tool (func_readlink): New function.
15894         (func_ln_if_changed): Use it.
15895
15896 2005-09-18  Bruno Haible  <bruno@clisp.org>
15897
15898         * gnulib-tool: Support --with-tests also with --import.
15899         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
15900         (func_import): Use variables $testsbase and $inctests. Emit a
15901         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
15902         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
15903         SUBDIRS += $testsdir.
15904         (func_create_testdir): Update.
15905
15906 2005-09-18  Bruno Haible  <bruno@clisp.org>
15907
15908         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
15909         instead of $dry_run.
15910         (func_cp_if_changed, func_mv_if_changed): Remove functions.
15911         (func_ln_if_changed): Don't handle dry-run here.
15912         (func_import): In dry-run mode, detect more precisely which actions
15913         would be performed, and don't use "...ing" verbs.
15914
15915 2005-09-18  Bruno Haible  <bruno@clisp.org>
15916
15917         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
15918         (func_import): Use join on two temporary files instead of three nested
15919         loops, in order to determine which files are new or old.
15920
15921 2005-09-18  Bruno Haible  <bruno@clisp.org>
15922
15923         * gnulib-tool (func_import): Comment out code that spits out the
15924         new files with --dry-run.
15925
15926 2005-09-18  Bruno Haible  <bruno@clisp.org>
15927
15928         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
15929
15930 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
15931
15932         * lib/stat-time.h: New file.
15933         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
15934         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
15935         in a different way.
15936         (timespec_cmp): New function.
15937         * lib/utimecmp.c: Include stat-time.h.
15938         (SYSCALL_RESOLUTION): Depend on whether various struct stat
15939         members exist, not on the obsolescent ST_MTIM_NSEC.
15940         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
15941
15942 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
15943
15944         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
15945
15946 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
15947
15948         * MODULES.html.sh (File system functions): Add stat-time.
15949         * modules/stat-time: New file.
15950         * modules/timespec (Files): Remove m4/st_mtim.m4; this
15951         is now done in a different way, by the stat-time module.
15952         * modules/utimecmp (Depends-on): Add stat-time.
15953
15954 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
15955
15956         * m4/st_mtim.m4: Remove.  Superseded by...
15957         * m4/stat-time.m4: New file.
15958         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
15959         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
15960
15961 2005-09-15  Derek Price  <derek@ximbiot.com>
15962
15963         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
15964
15965 2005-09-15  Derek Price  <derek@ximbiot.com>
15966
15967         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
15968         * lib/regex_internal.c: Ditto, using this...
15969         (__GNUC_PREREQ): ...new macro.
15970         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
15971         using...
15972         (__GNUC_PREREQ): ...this new macro.
15973
15974         * lib/strstr.h: Include string.h. Define strstr as a macro here.
15975
15976 2005-09-15  Derek Price  <derek@ximbiot.com>
15977             Paul Eggert  <eggert@cs.ucla.edu>
15978
15979         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
15980         changes, consolidating in...
15981         * lib/regex_internal.h: ...this file.
15982
15983 2005-09-13  Jim Meyering  <jim@meyering.net>
15984
15985         * lib/canon-host.c: Filter through gnu indent and reword comments
15986         slightly.
15987         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
15988
15989 2005-09-13  Derek Price  <derek@ximbiot.com>
15990
15991         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
15992         failure.
15993         Reported by Jim Meyering  <jim@meyering.net>.
15994
15995 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
15996
15997         * lib/base64.c: Typo.
15998         (base64_encode): Put b64str in initialized data section.
15999
16000 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
16001
16002         Merge glibc and coreutils changes into gnulib, plus a few
16003         extra fixes.
16004         * lib/md5.c: Use #error rather than a string.
16005         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
16006         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
16007         (__attribute__): Define to empty for non recent-GCC.
16008         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
16009         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
16010         Renamed from their non-__ counterparts, with new macros replacing
16011         them if not _LIBC.  Add __THROW attribute.
16012         (rol): Remove.
16013         (struct md5_ctx): Align buffer if using GCC.
16014         * lib/sha1.h (struct sha1_ctx): Likewise.
16015         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
16016         The old name was backwards.
16017         (NOTSWAP): Remove; not used.
16018         (rol): New macro, moved here from md5.h.
16019         (sha1_process_block): Remove a FIXME that doesn't make sense.
16020
16021 2005-09-12  Derek Price  <derek@ximbiot.com>
16022
16023         Return usable errors from canon-host.
16024         * lib/canon-host.h: New file.
16025         * lib/canon-host.c (canon_host): Wrap...
16026         (canon_host_r): ...this new function, which now relies exclusively on
16027         getaddrinfo.
16028         (ch_strerror): New function.
16029         (last_cherror): New global.
16030         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
16031         interface.
16032         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
16033         void *.
16034         (freeaddrinfo): Free ai->ai_canonname when set.
16035
16036 2005-09-12  Derek Price  <derek@ximbiot.com>
16037
16038         Make canon-host require getaddrinfo.
16039         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
16040         AC_LIBSOURCE canon-host.h.  Call...
16041         (gl_PREREQ_CANON_HOST): ...this new function, which requires
16042         gl_GETADDRINFO.
16043         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
16044
16045 2005-09-12  Derek Price  <derek@ximbiot.com>
16046
16047         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
16048         LGPL.
16049         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
16050
16051 2005-09-12  Derek Price  <derek@ximbiot.com>
16052
16053         * lib/gai_strerror.c: Include config.h when available.  Include
16054         getaddrinfo.h before other headers to test interface.
16055         Reported by Larry Jones <lawrence.jones@ugs.com>.
16056
16057 2005-09-12  Derek Price  <derek@ximbiot.com>
16058             Paul Eggert  <eggert@cs.ucla.edu>
16059
16060         * modules/glob (Files): Add glob-libc.h.
16061
16062 2005-09-12  Derek Price  <derek@ximbiot.com>
16063             Paul Eggert  <eggert@cs.ucla.edu>
16064
16065         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
16066         glob_.h, glob-libc.h.
16067         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
16068
16069 2005-09-12  Derek Price  <derek@ximbiot.com>
16070             Paul Eggert  <eggert@cs.ucla.edu>
16071
16072         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
16073         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
16074         protecting things that should be done only in gnulib contexts.
16075         * lib/glob_.h: New file, containing only the glob things needed for
16076         gnulib.
16077         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
16078         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
16079         (glob, globfree, glob_pattern_p): Now defined simply in terms of
16080         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
16081         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
16082         and to respect the namespace rules better.
16083
16084 2005-09-08  Simon Josefsson  <jas@extundo.com>
16085
16086         * modules/socklen: New file.
16087
16088 2005-09-08  Simon Josefsson  <jas@extundo.com>
16089
16090         * m4/socklen.m4: New file.
16091
16092 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
16093
16094         * modules/utimens (Files): Add m4/utimbuf.m4, since
16095         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
16096         Reported by Sergey Poznyakoff.
16097
16098 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
16099
16100         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
16101         definitions, since that's the preferred style in glibc.
16102         Fix a minor spacing issue, and update copyright notice to match
16103         glibc's.
16104
16105 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
16106
16107         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
16108
16109 2005-09-06  Simon Josefsson  <jas@extundo.com>
16110
16111         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
16112         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
16113
16114 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
16115
16116         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
16117         warning.
16118
16119 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
16120
16121         * config/srclist.txt: Add glibc bug 1302.
16122
16123 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
16124
16125         Change bitset word type from unsigned int to unsigned long int,
16126         as this has better performance on typical 64-bit hosts.
16127         Port bitset code to hosts with unusual word sizes.
16128         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
16129         (build_collating_symbol):
16130         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
16131         argument is a bitset.  This is merely a style issue, but it makes
16132         it clearer that an entire array is expected.
16133         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
16134         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
16135         Port to the case where bitset_word is not the same as unsigned int.
16136         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
16137         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
16138         Likewise.
16139         * lib/regexec.c (check_dst_limits_calc_pos_1,
16140         check_subexp_matching_top):
16141         (build_trtable, group_nodes_into_DFAstates):
16142         Likewise.
16143         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
16144         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
16145         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
16146         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
16147         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
16148         * lib/regcomp.c (optimize_subexps, lower_subexp):
16149         Work even if bitset_word has holes in its bitwise representation.
16150         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
16151         * lib/regexec.c (check_dst_limits_calc_pos_1,
16152         check_subexp_matching_top):
16153         Likewise.
16154         * lib/regex_internal.c (re_string_reconstruct):
16155         Don't assume UCHAR_MAX == 255.
16156         * lib/regex_internal.h (bitset_set_all): Likewise.
16157         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
16158         All uses changed.
16159         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
16160         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
16161         All uses changed.
16162         (BITSET_WORD_MAX): New macro.
16163         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
16164         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
16165         (bitset_empty, bitset_copy):
16166         Prefer sizeof (bitset) to multiplying it out ourselves.
16167         (bitset_not_merge): Remove; unused.
16168         (bitset_contain): Return bool, not unsigned int with one bit on.
16169         All callers changed.
16170         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
16171         alignment than re_node_set; do this by defining a new internal
16172         type struct dests_alloc and using it to allocate memory.
16173
16174 2005-09-05  Bruno Haible  <bruno@clisp.org>
16175
16176         * gnulib-tool (func_import): Fix comparison in handling of symbolic
16177         links.
16178
16179 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
16180
16181         * modules/size_max (Makefile.am): Add size_max.h
16182
16183 2005-09-04  Derek Price  <derek@ximbiot.com>
16184
16185         * gnulib-tool (func_import): Fix reversed $symbolic logic.
16186
16187 2005-09-03  Simon Josefsson  <jas@extundo.com>
16188
16189         * gnulib-tool: Fix typo.
16190
16191 2005-09-03  Simon Josefsson  <jas@extundo.com>
16192
16193         * config/srclist.txt: Add glibc bug 1293.
16194
16195 2005-09-03  Derek Price  <derek@ximbiot.com>
16196
16197         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
16198         From Larry Jones <lawrence.jones@ugs.com>.
16199
16200 2005-09-02  Simon Josefsson  <jas@extundo.com>
16201
16202         * modules/socklen: New file.
16203
16204 2005-09-02  Simon Josefsson  <jas@extundo.com>
16205
16206         * modules/havelib: New module.
16207
16208         * modules/gettext, modules/iconv, modules/lock, modules/readline:
16209         Use havelib.
16210
16211 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
16212
16213         Check for arithmetic overflow when calculating sizes, to prevent
16214         some buffer-overflow issues.  These patches are conservative, in the
16215         sense that when I couldn't determine whether an overflow was possible,
16216         I inserted a run-time check.
16217         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
16218         macros.
16219         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
16220         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
16221         (re_xnrealloc, re_x2nrealloc): New inline functions.
16222         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
16223         parse_bracket_exp):
16224         (build_equiv_class, build_charclass): Check for arithmetic overflow
16225         in size expression calculations.
16226         * lib/regex_internal.c (re_string_realloc_buffers):
16227         (build_wcs_upper_buffer, re_node_set_add_intersect):
16228         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
16229         (re_dfa_add_node, register_state): Likewise.
16230         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
16231         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
16232         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
16233         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
16234
16235 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
16236
16237         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
16238         m4/ulonglong.m4.  Problem reported by Martin Lambers.
16239
16240 2005-09-02  Bruno Haible  <bruno@clisp.org>
16241
16242         Support for lib vs. lib64 distinction on biarch platforms.
16243         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
16244         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
16245         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
16246
16247 2005-09-02  Bruno Haible  <bruno@clisp.org>
16248
16249         * gnulib-tool (import): In the other first-use case, provide defaults
16250         as well.
16251
16252 2005-09-02  Bruno Haible  <bruno@clisp.org>
16253
16254         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
16255         patches not yet found in the latest gettext release.
16256
16257 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
16258
16259         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
16260         to avoid a collision with bits/local_lim.h in glibc.
16261         All uses changed.  Problem reported by Dmitry V. Levin in
16262         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
16263
16264         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
16265         bugs in int versus size_t comparisons.
16266         (re_string_context_at): Fix bug where the code assumed that
16267         Idx is signed.
16268
16269         Use bool where appropriate.
16270         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
16271         All callers changed.
16272         (calc_eclosure_iter): Likewise, for ROOT arg.
16273         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
16274         (build_charclass_op): Likewise, for NON_MATCH arg.
16275         * lib/regex_internal.c (re_string_allocate, re_string_construct):
16276         (re_string_construct_common): Likewise, for ICASE arg.
16277         * lib/regexec.c (re_search_2_stub, re_search_stub):
16278         Likewise, for RET_LEN arg.
16279         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
16280         (set_regs): Likewise, for FL_BACKTRACK arg.
16281         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
16282         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
16283         (calc_eclosure_iter, parse_bracket_exp):
16284         Use bool for internal variables that are booleans.
16285         * lib/regexec.c (re_search_internal, check_matching,
16286         proceed_next_node):
16287         (set_regs, build_sifted_states, sift_states_bkref):
16288         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
16289         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
16290         (find_collation_sequence_value):
16291         Likewise.
16292         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
16293         (re_node_set_compare):
16294         Return bool, not int. All callers changed.
16295         * lib/regexec.c (check_halt_node_context, check_dst_limits):
16296         (build_trtable, check_node_accept): Likewise.
16297         * lib/regex_internal.h: Include stdbool.h.
16298
16299         Fix bugs uncovered when converting to bool.
16300         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
16301         failure instead of charging ahead blindly.
16302         * lib/regex_internal.c (register_state): Likewise.
16303         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
16304         for freeing internal storage.
16305         (group_nodes_into_DFA_states): Use unsigned int, not int, for
16306         bitset pieces used as boolean, to avoid undefined behavior
16307         on hosts that do int overflow checking.
16308
16309 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
16310
16311         * config/srclist.txt: Add glibc bugs 1285-1287.
16312
16313 2005-09-01  Jim Meyering  <jim@meyering.net>
16314
16315         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
16316         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
16317         Require gl_STAT_MACROS, too.
16318
16319 2005-09-01  Bruno Haible  <bruno@clisp.org>
16320
16321         * gnulib-tool (import): In the first-use case, provide defaults.
16322
16323 2005-09-01  Bruno Haible  <bruno@clisp.org>
16324
16325         * gnulib-tool (func_import): Remove the .tmp files.
16326
16327 2005-09-01  Bruno Haible  <bruno@clisp.org>
16328
16329         * gnulib-tool (func_import): Fix handling of symbolic links.
16330
16331 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
16332
16333         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
16334         old glibc regex code mishandles strings longer than 2**31 bytes.
16335         This patch fixes this when the regex code is used in gnulib
16336         (i.e., outside glibc).
16337
16338         This patch should not affect the use of the regex code inside
16339         glibc.  No doubt this problem also needs to be handled for glibc
16340         as well, but the result will be an incompatible change to the
16341         glibc ABI, and the old ABI will have to be supported too.  That
16342         can be the the subject for another patch.
16343
16344         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
16345         governing whether the rest of this patch is active.  By default,
16346         the macro is disabled and the patch has no effect.
16347         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
16348         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
16349         (struct re_pattern_buffer, re_search, re_search_2, re_match):
16350         (re_match_2, re_set_registers): Use the new types.
16351         * lib/regex_internal.h (Idx, re_hashval_t): New types.
16352         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
16353         New macros.
16354         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
16355         (re_string_context_at, bin_tree_t, re_dfastate_t):
16356         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
16357         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
16358         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
16359         (re_string_char_size_at, re_string_wchar_at):
16360         (re_string_elem_size_at):
16361         Use the new types and macros to port to 64-bit hosts.
16362         Use unsigned types for internal values, so that the code
16363         mostly works even for arrays larger than SSIZE_MAX.
16364         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
16365         (search_duplicated_node, calc_eclosure_iter, fetch_number):
16366         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
16367         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
16368         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
16369         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
16370         (calc_inveclosure, parse_dup_op, build_range_exp):
16371         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
16372         (fetch_number, create_token_tree, mark_opt_subexp):
16373         Likewise.
16374         * lib/regex_internal.c (re_string_construct_common,
16375         create_ci_newstate):
16376         (create_cd_newstate, re_string_allocate, re_string_construct):
16377         (re_string_realloc_buffers, build_wcs_upper_buffer):
16378         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
16379         (re_string_reconstruct, re_string_peek_byte_case):
16380         (re_string_fetch_byte_case, re_string_context_at):
16381         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
16382         (re_node_set_init_copy, re_node_set_add_intersect):
16383         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
16384         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
16385         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
16386         (re_acquire_state, re_acquire_state_context, register_state):
16387         Likewise.
16388         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
16389         search_cur_bkref_entry):
16390         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
16391         (re_search_internal, re_search_2_stub, re_search_stub)
16392         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
16393         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
16394         (update_cur_sifted_state, check_dst_limits):
16395         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
16396         (check_subexp_limits, sift_states_bkref, merge_state_array):
16397         (check_subexp_matching_top, get_subexp, get_subexp_sub):
16398         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
16399         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
16400         (expand_bkref_cache, check_node_accept_bytes):
16401         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
16402         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
16403         (acquire_init_state_context, check_halt_node_context):
16404         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
16405         (sift_states_backward, clean_state_log_if_needed):
16406         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
16407         (find_recover_state, transit_state_sb, transit_state_mb):
16408         (transit_state_bkref, build_trtable, match_ctx_clean):
16409         Likewise.
16410         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
16411         to work around an assumption that REG_MISSING is negative.
16412
16413         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
16414         (seek_collating_symbol_entry) [defined _LIBC]:
16415         (lookup_collation_sequence_value) [defined _LIBC]:
16416         (build_range_exp, build_collating_symbol) [defined _LIBC]:
16417         Use prototypes rather than old-style function definitions.
16418         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
16419         (transit_state_sb) [0]:
16420         (find_collation_sequence_value) [defined _LIBC]: Likewise.
16421
16422         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
16423         rm_eo.
16424
16425         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
16426         (optimize_subexps, lower_subexp):
16427         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
16428         since the signed shift might overflow.  Use 1u<<31 instead.
16429         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
16430         Likewise.
16431         * lib/regexec.c (check_dst_limits_calc_pos_1,
16432         check_subexp_matching_top): Likewise.
16433
16434         * lib/regcomp.c (optimize_subexps, lower_subexp):
16435         Use CHAR_BIT rather than 8, for clarity.
16436         * lib/regexec.c (check_dst_limits_calc_pos_1):
16437         (check_subexp_matching_top): Likewise.
16438         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
16439         have to worry about portability issues when shifting it left.
16440         Remove no-longer-needed test for table_size > 0.
16441         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
16442         in a word, as the resulting behavior is undefined.
16443         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
16444         in one case, a <= should have been an <, and in another case the
16445         whole test was missing.
16446         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
16447         the standard name CHAR_BIT.
16448         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
16449         this is not true on one's complement and signed-magnitude hosts.
16450
16451         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
16452         next_last_offset.
16453         (struct re_dfa_t): Remove unused member states_alloc.
16454         * lib/regcomp.c (init_dfa): Don't initialize unused members.
16455
16456 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
16457
16458         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
16459         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
16460         and large-file glibc and in 32-bit large-file Solaris.
16461
16462 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
16463
16464         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
16465         lengths fit in regoff_t; this isn't true if regoff_t is the same
16466         width as size_t.
16467         * lib/regex.c (re_search_internal): 5th arg is LAST_START
16468         (= START + RANGE) instead of RANGE.  This avoids overflow
16469         problems when regoff_t is the same width as size_t.
16470         All callers changed.
16471         (re_search_2_stub): Check for overflow when adding the
16472         sizes of the two strings.
16473         (re_search_stub): Check for overflow when adding START
16474         to RANGE; if it occurs, substitute the extreme value.
16475
16476 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
16477
16478         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
16479
16480 2005-08-31  Jim Meyering  <jim@meyering.net>
16481
16482         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
16483         a pointer-to-const.
16484         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
16485         (register_state): Likewise.
16486         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
16487         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
16488         (group_nodes_into_DFAstates): Likewise.
16489
16490 2005-08-31  Jim Meyering  <jim@meyering.net>
16491
16492         * check-module: Add a FIXME comment.
16493
16494 2005-08-31  Eric Blake  <ebb9@byu.net>
16495
16496         * modules/unistd-safer (Files): Add unistd--.h.
16497         * modules/stdio-safer (Files): Add stdio--.h.
16498
16499 2005-08-31  Derek Price  <derek@ximbiot.com>
16500
16501         * lib/getdelim.c (getdelim): Return EOF on EOF.
16502         Reported by Larry Jones <lawrence.jones@ugs.com>.
16503
16504 2005-08-31  Bruno Haible  <bruno@clisp.org>
16505
16506         Avoid unnecessary diffs in the generated lib/Makefile.am.
16507         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
16508         the generated files.
16509         (func_import): Don't set cmd.
16510
16511 2005-08-31  Bruno Haible  <bruno@clisp.org>
16512
16513         * lib/strstr.c: Include <stddef.h>, for NULL.
16514         * lib/strcasestr.c: Likewise.
16515         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
16516
16517 2005-08-31  Bruno Haible  <bruno@clisp.org>
16518
16519         * gnulib-tool: New option --macro-prefix.
16520         (func_import): Use macro_prefix.
16521         (import): Handle option --macro-prefix.
16522
16523 2005-08-31  Bruno Haible  <bruno@clisp.org>
16524
16525         * gnulib-tool (import): Rename most ac_* variables to cached_*.
16526         Also use new variables cached_lgpl, cached_libtool.
16527
16528 2005-08-31  Bruno Haible  <bruno@clisp.org>
16529
16530         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
16531         always instantiating them.
16532
16533 2005-08-31  Bruno Haible  <bruno@clisp.org>
16534
16535         * gnulib-tool (func_import): Read the previous cached settings
16536         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
16537         earlier added by gnulib but are now dropped. Warn when a gnulib file
16538         overwrites a non-gnulib file.
16539
16540 2005-08-31  Bruno Haible  <bruno@clisp.org>
16541
16542         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
16543         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
16544         projects that don't keep autogenerated files in CVS. Put into
16545         actioncmd only the specified modules, not the transitive closure.
16546
16547 2005-08-31  Bruno Haible  <bruno@clisp.org>
16548
16549         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
16550         Create directories that shall be filled.
16551         (import): Don't look for gl_* macros in configure.ac. Recurse across
16552         all directories containing a gnulib-cache.m4 files, if meaningful.
16553
16554 2005-08-31  Bruno Haible  <bruno@clisp.org>
16555
16556         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
16557         (import): Set seen_libtool when we see gl_LIBTOOL.
16558
16559 2005-08-31  Bruno Haible  <bruno@clisp.org>
16560
16561         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
16562         declaration macro definitions from generated gnulib.m4.
16563
16564 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
16565
16566         * lib/iconvme.h: Add prototype for iconv_alloc.
16567
16568 2005-08-29  Simon Josefsson  <jas@extundo.com>
16569
16570         * lib/iconvme.c: Fix errno.
16571
16572 2005-08-29  Bruno Haible  <bruno@clisp.org>
16573
16574         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
16575         that it works when the directory contains spaces.
16576
16577 2005-08-29  Bruno Haible  <bruno@clisp.org>
16578
16579         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
16580
16581 2005-08-29  Bruno Haible  <bruno@clisp.org>
16582
16583         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
16584         Emit more advice.
16585
16586 2005-08-29  Bruno Haible  <bruno@clisp.org>
16587         and Stepan Kasal  <kasal@ucw.cz>
16588
16589         * check-module: If more parameters are given, check each of them
16590         separately; add more exceptions, as noted by Jim Meyering.
16591         (check_module): New procedure.
16592         (%exempt_header): Now contains all exceptions.
16593
16594 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
16595
16596         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
16597
16598 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
16599
16600         * lib/iconvme.c: Split iconv_string into iconv_alloc.
16601
16602 2005-08-28  Bruno Haible  <bruno@clisp.org>
16603
16604         * m4/gnulib-tool.m4: New file.
16605
16606 2005-08-27  Jim Meyering  <jim@meyering.net>
16607
16608         * modules/unistd-safer (Files): Add pipe-safer.c.
16609         * modules/fcntl-safer (Files): Add creat-safer.c.
16610
16611 2005-08-27  Jim Meyering  <jim@meyering.net>
16612
16613         * m4/stdlib-safer.m4: New file.  From coreutils.
16614         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
16615         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
16616         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
16617         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
16618         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
16619
16620 2005-08-27  Jim Meyering  <jim@meyering.net>
16621
16622         * lib/fopen-safer.c: Merge minor changes from coreutils.
16623         * lib/dup-safer.c: Likewise.
16624         * lib/fd-safer.c: Likewise.
16625
16626         Merge from coreutils.
16627         * lib/stdio--.h: New file.
16628         * lib/stdlib--.h: New file.
16629         * lib/mkstemp-safer.c: New file.
16630
16631         GNU tar needs these.
16632         * lib/pipe-safer.c: New file.
16633         * lib/creat-safer.c: New file.
16634         * lib/fcntl--.h (creat): Define to creat_safer.
16635         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
16636         * lib/unistd--.h (pipe): Define to pipe_safer.
16637         * lib/unistd-safer.h: Declare pipe_safer.
16638
16639 2005-08-26  Simon Josefsson  <jas@extundo.com>
16640
16641         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
16642         Haible <bruno@clisp.org>.
16643
16644 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
16645
16646         * lib/regex_internal.h: Remove all references to
16647         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
16648         or better.
16649         (bitset_not, bitset_merge, bitset_not_merge):
16650         (bitset_mask, re_string_allocate, re_string_construct):
16651         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
16652         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
16653         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
16654         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
16655         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
16656         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
16657         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
16658         (re_acquire_state_context):
16659         Remove unnecessary forward decls.
16660         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
16661         Put __attribute at function definition,
16662         now that the function decl has been removed.
16663         * lib/regex_internal.c (re_string_peek_byte_case):
16664         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
16665         Likewise.
16666
16667 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
16668
16669         * m4/regex.m4: Add AC_PREREQ(2.50).
16670         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
16671
16672 2005-08-25  Simon Josefsson  <jas@extundo.com>
16673
16674         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
16675         __fsetlocking.
16676
16677 2005-08-25  Simon Josefsson  <jas@extundo.com>
16678
16679         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
16680         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
16681         GLIBC specific code.
16682
16683 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
16684
16685         Make regex safe for g++.  This fixes one real bug (an "err"
16686         that should have been "*err").  g++ problem reported by
16687         Sam Steingold.
16688         * lib/regex_internal.h (re_calloc): New macro, consistent with
16689         re_malloc etc.  All callers of calloc changed to use re_calloc.
16690         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
16691         not int.  All callers changed.
16692         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
16693         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
16694         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
16695         (find_recover_state): Change "err" to "*err"; this fixes what
16696         appears to be a real bug.
16697         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
16698         versus int.
16699
16700 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
16701
16702         * modules/regex (Depends-on): Add malloc, since the code
16703         assumes that !malloc(0) means failure.
16704
16705 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
16706
16707         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
16708
16709         alloca modernization/simplification for regex.
16710         * lib/regex.c: Remove portability cruft for alloca.  This no longer
16711         needs to be at the start of the file, and can be moved into
16712         regex_internal.h and simplified.
16713         * lib/regex_internal.h: Include <alloca.h>.
16714         (__libc_use_alloca) [!defined _LIBC]: New macro.
16715         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
16716         now works outside glibc.
16717
16718 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
16719
16720         * config/srclist.txt: Add glibc bugs 1241, 1245.
16721
16722 2005-08-25  Jim Meyering  <jim@meyering.net>
16723
16724         * lib/open-safer.c: Include <config.h>.
16725         Otherwise, we'd lose LARGEFILE support in any file using
16726         e.g. "fcntl--.h"
16727
16728 2005-08-25  Bruno Haible  <bruno@clisp.org>
16729
16730         * m4/minmax.m4: Require autoconf 2.52.
16731         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
16732         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
16733         alternatives of translit over the alphabet.
16734         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
16735
16736 2005-08-24  Simon Josefsson  <jas@extundo.com>
16737
16738         * tests/test-getpass.c: New file.
16739
16740 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
16741
16742         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
16743         for GNU regex features.
16744
16745 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
16746
16747         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
16748         * lib/regex.h (regerror): Likewise.
16749
16750         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
16751         requires this.  (The code never needed it.)
16752
16753         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
16754         All uses of recently-renamed identifiers changed to use the new,
16755         POSIX-compliant names.  The code will build and run just fine
16756         without these changes, but it's better to eat our own dog food
16757         and use the standard-conforming names.
16758
16759         * lib/regex.h: Fix a multitude of POSIX name space violations.
16760         These changes have an effect only for programs that define
16761         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
16762         do not change anything for programs compiled in the normal way.
16763         Also, there is no effect on the ABI.
16764
16765         (_REGEX_SOURCE): New macro.
16766         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
16767         defined and _GNU_SOURCE is not; this fixes a name space violation.
16768
16769         Rename the following macros to obey POSIX requirements.
16770         The old names are still visible as macros if _REGEX_SOURCE is defined.
16771         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
16772         RE_BACKSLASH_ESCAPE_IN_LISTS.
16773         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
16774         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
16775         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
16776         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
16777         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
16778         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
16779         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
16780         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
16781         (REG_INTERVALS): renamed from RE_INTERVALS.
16782         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
16783         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
16784         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
16785         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
16786         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
16787         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
16788         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
16789         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
16790         RE_UNMATCHED_RIGHT_PAREN_ORD.
16791         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
16792         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
16793         (REG_DEBUG): renamed from RE_DEBUG.
16794         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
16795         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
16796         unusual, since we can't clash with the POSIX REG_ICASE.
16797         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
16798         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
16799         (REG_NO_SUB): renamed from RE_NO_SUB.
16800         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
16801         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
16802         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
16803         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
16804         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
16805         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
16806         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
16807         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
16808         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
16809         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
16810         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
16811         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
16812         RE_SYNTAX_POSIX_MINIMAL_BASIC.
16813         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
16814         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
16815         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
16816         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
16817         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
16818         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
16819         (REG_FIXED): Renamed from REGS_FIXED.
16820         (REG_NREGS): Renamed from RE_NREGS.
16821
16822         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
16823         of other REG_* macros, since POSIX says the user is allowed to
16824         #undef these macros selectively.
16825
16826         (reg_errcode_t): Update comment stating what other tables need
16827         to be consistent.
16828
16829         Rename the following enum values to obey POSIX requirements.
16830         The old names are still visible as macros.
16831         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
16832         is not defined, since GNU is supposed to be a superset of POSIX as
16833         much as possible, and since we want reg_errcode_t to be a signed
16834         type for implementation consistency.
16835         (_REG_NOERROR): Renamed from REG_NOERROR.
16836         (_REG_NOMATCH): Renamed from REG_NOMATCH.
16837         (_REG_BADPAT): Renamed from REG_BADPAT.
16838         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
16839         (_REG_ECTYPE): Renamed from REG_ECTYPE.
16840         (_REG_EESCAPE): Renamed from REG_EESCAPE.
16841         (_REG_ESUBREG): Renamed from REG_ESUBREG.
16842         (_REG_EBRACK): Renamed from REG_EBRACK.
16843         (_REG_EPAREN): Renamed from REG_EPAREN.
16844         (_REG_EBRACE): Renamed from REG_EBRACE.
16845         (_REG_BADBR): Renamed from REG_BADBR.
16846         (_REG_ERANGE): Renamed from REG_ERANGE.
16847         (_REG_ESPACE): Renamed from REG_ESPACE.
16848         (_REG_BADRPT): Renamed from REG_BADRPT.
16849         (_REG_EEND): Renamed from REG_EEND.
16850         (_REG_ESIZE): Renamed from REG_ESIZE.
16851         (_REG_ERPAREN): Renamed from REG_ERPAREN.
16852         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
16853         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
16854         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
16855         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
16856
16857         (_REG_RE_NAME, _REG_RM_NAME): New macros.
16858         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
16859         changed.  But support the old name if the new one is not defined
16860         and if _REGEX_SOURCE.
16861
16862         Change the following member names in struct re_pattern_buffer.
16863         The old names are still supported if !_REGEX_SOURCE.
16864         The new names are always supported, regardless of _REGEX_SOURCE.
16865         (re_buffer): Renamed from buffer.
16866         (re_allocated): Renamed from allocated.
16867         (re_used): Renamed from used.
16868         (re_syntax): Renamed from syntax.
16869         (re_fastmap): Renamed from fastmap.
16870         (re_translate): Renamed from translate.
16871         (re_can_be_null): Renamed from can_be_null.
16872         (re_regs_allocated): Renamed from regs_allocated.
16873         (re_fastmap_accurate): Renamed from fastmap_accurate.
16874         (re_no_sub): Renamed from no_sub.
16875         (re_not_bol): Renamed from not_bol.
16876         (re_not_eol): Renamed from not_eol.
16877         (re_newline_anchor): Renamed from newline_anchor.
16878
16879         Change the following member names in struct re_registers.
16880         The old names are still supported if !_REGEX_SOURCE.
16881         The new names are always supported, regardless of _REGEX_SOURCE.
16882         (rm_num_regs): Renamed from num_regs.
16883         (rm_start): Renamed from start.
16884         (rm_end): Renamed from end.
16885
16886         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
16887         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
16888         Prepend __ to parameter names.
16889
16890         Undo yesterday's changes.
16891
16892 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
16893
16894         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
16895         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
16896         lib/regex.c.
16897
16898 2005-08-24  Jim Meyering  <jim@meyering.net>
16899
16900         Sync from coreutils.
16901         * m4/fcntl-safer.m4: New file.
16902
16903         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
16904         and object files for this module.
16905
16906 2005-08-24  Jim Meyering  <jim@meyering.net>
16907
16908         Sync from coreutils.
16909         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
16910
16911 2005-08-24  Jim Meyering  <jim@meyering.net>
16912
16913         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
16914         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
16915
16916 2005-08-24  Jim Meyering  <jim@meyering.net>
16917
16918         * modules/fcntl-safer: New module.
16919         * modules/fts (Depends-on): Add fcntl-safer.
16920         * MODULES.html.sh (File descriptor based Input/Output):
16921         Add fcntl-safer.
16922
16923 2005-08-24  Bruno Haible  <bruno@clisp.org>
16924
16925         Support for unit test modules.
16926         * modules/README: Mention tests modules.
16927         * modules/TEMPLATE-TESTS: New file.
16928         * gnulib-tool: New options --extract-tests-module, --with-tests and
16929         --tests-base (unused for the moment).
16930         (testsbase, inctests): New variables.
16931         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
16932         (func_verify_module): Exclude TEMPLATE-TESTS.
16933         (func_verify_nontests_module, func_verify_tests_module): New functions.
16934         (func_get_dependencies): Add implicit dependency for tests modules.
16935         (func_get_tests_module): New function.
16936         (func_modules_transitive_closure): When --with-tests was specified,
16937         include the unit tests as well, unless explicitly avoided.
16938         (func_emit_lib_Makefile_am): Ignore the tests modules here.
16939         (func_emit_tests_Makefile_am): New function.
16940         (func_create_testdir): When --with-tests was specified, emit a
16941         tests/ directory.
16942         * MODULES.html.sh (Future developments): Update.
16943
16944 2005-08-24  Bruno Haible  <bruno@clisp.org>
16945
16946         * modules/tls-tests: New file.
16947         * tests/test-tls.c: New file, from GNU gettext.
16948
16949 2005-08-24  Bruno Haible  <bruno@clisp.org>
16950
16951         * modules/lock-tests: New file.
16952         * tests/test-lock.c: New file, from GNU gettext.
16953
16954 2005-08-24  Bruno Haible  <bruno@clisp.org>
16955
16956         * lib/lock.h: Add multiple inclusion guard.
16957         * lib/tls.h: Add multiple inclusion guard.
16958
16959 2005-08-24  Bruno Haible  <bruno@clisp.org>
16960
16961         * gnulib-tool: Add support for the --aux-dir option to
16962         --create-testdir, --create-megatestdir, --test, --megatest.
16963         (func_create_testdir, func_create_megatestdir): Optionally emit a
16964         AC_CONFIG_AUX_DIR directive.
16965         (create-testdir, create-megatestdir, test, megatest): Provide a
16966         default value for $auxdir.
16967
16968 2005-08-24  Bruno Haible  <bruno@clisp.org>
16969
16970         * gnulib-tool (import): Use compound statement instead of subshell
16971         where possible.
16972
16973 2005-08-24  Bruno Haible  <bruno@clisp.org>
16974
16975         * gnulib-tool (import): Change --aux-dir default to "build-aux".
16976
16977 2005-08-24  Bruno Haible  <bruno@clisp.org>
16978
16979         * gnulib-tool (func_version): Update.
16980
16981 2005-08-24  Bruno Haible  <bruno@clisp.org>
16982
16983         * gnulib-tool (func_import, func_create_testdir,
16984         func_create_megatestdir): Quote all autoconf macro arguments.
16985
16986 2005-08-24  Bruno Haible  <bruno@clisp.org>
16987
16988         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
16989         option --force, because --force causes the aclocal.m4 of each
16990         subdirectory to be newer than the corresponding config.h.in.
16991
16992 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
16993
16994         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
16995         All contents moved to gl_REGEX.
16996         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
16997         assume that it does.
16998
16999 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
17000
17001         * lib/regex.h (REG_NOSYS)
17002         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
17003         Define, since POSIX requires it as of 2001.
17004         (_REG_ENOSYS)
17005         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
17006         New private symbol, used to keep the enum signed in all cases.
17007         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
17008         Youngman in
17009         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
17010
17011         * lib/regex_internal.c (re_string_skip_chars, register_state):
17012         (calc_state_hash):
17013         Remove forward decls; no longer needed now that we use prototypes.
17014         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
17015         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
17016         (clean_state_log_if_needed): Likewise.
17017
17018 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
17019
17020         * config/srclist.txt: Add glibc bugs 1231-1233.
17021
17022 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
17023
17024         Fix problems reported by Sam Steingold in
17025         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
17026         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
17027         assumed that reg_errcode_t is a signed type, which is not
17028         necessarily true if _XOPEN_SOURCE is not defined.
17029         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
17030         since some compilers warn about it otherwise.
17031
17032 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
17033
17034         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
17035         (init_word_char, create_initial_state, duplicate_node_closure):
17036         (fetch_token, peek_token_bracket, build_range_exp):
17037         (build_collating_symbol): Remove forward decls; no longer needed
17038         now that we use prototypes.
17039
17040         * lib/regcomp.c:
17041         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
17042         (re_compile_fastmap_iter, regcomp, regerror, regfree):
17043         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
17044         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
17045         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
17046         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
17047         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
17048         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
17049         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
17050         (build_range_exp, build_collating_symbol, parse_bracket_exp):
17051         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
17052         (build_charclass, build_charclass_op, fetch_number, create_tree):
17053         (create_token_tree, mark_opt_subexp, duplicate_tree):
17054         Use prototypes rather than old-style definitions.
17055
17056         * lib/regex_internal.c:
17057         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
17058         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
17059         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
17060         (re_string_reconstruct, re_string_peek_byte_case):
17061         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
17062         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
17063         (re_node_set_init_copy, re_node_set_add_intersect):
17064         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
17065         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
17066         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
17067         (re_acquire_state, re_acquire_state_context, register_state):
17068         (create_ci_newstate, create_cd_newstate, free_state):
17069         Likewise.
17070         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
17071         re_search_2):
17072         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
17073         (re_search_internal, prune_impossible_nodes):
17074         (acquire_init_state_context, check_matching, static):
17075         (check_halt_node_context, check_halt_state_context, proceed_next_node):
17076         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
17077         (update_regs, sift_states_backward, build_sifted_states):
17078         (clean_state_log_if_needed, merge_state_array):
17079         (update_cur_sifted_state, add_epsilon_src_nodes):
17080         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
17081         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
17082         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
17083         (find_recover_state, check_subexp_matching_top, transit_state_mb):
17084         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
17085         (check_arrival, check_arrival_add_next_nodes):
17086         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
17087         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
17088         (check_node_accept_bytes, check_node_accept, extend_buffers):
17089         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
17090         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
17091         (sift_ctx_init):
17092         Likewise.
17093
17094         * lib/regex_internal.h:
17095         (re_string_allocate, re_string_construct, re_string_reconstruct):
17096         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
17097         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
17098         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
17099         (re_string_context_at, re_string_peek_byte_case):
17100         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
17101         is defined, since we now use prototypes always.
17102
17103         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
17104         C89 or better.  All uses removed.
17105
17106 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
17107
17108         * config/srclist.txt: Add glibc bugs 1220-1227.
17109
17110 2005-08-20  Jim Meyering  <jim@meyering.net>
17111
17112         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
17113         of unused local, dfa.
17114
17115 2005-08-20  Bruno Haible  <bruno@clisp.org>
17116
17117         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
17118
17119 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17120
17121         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
17122         (re_node_set_insert_last, re_dfa_add_node):
17123         Rename local variables to avoid GCC shadowing warnings.
17124
17125 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17126
17127         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
17128         [defined lint]: Suppress bogus uninitialized-variable warnings.
17129
17130         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
17131         and let the caller return REG_ESPACE if out of space.  This
17132         removes an uninitialied-variable warning with GCC 4.0.1, and also
17133         avoids taking the address of a local variable.  All callers
17134         changed.
17135
17136 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17137
17138         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
17139         $LIBCSRC/posix/regexec.c.
17140         Add glibc bug 1217 for regcomp.c.
17141
17142 2005-08-19  Jim Meyering  <jim@meyering.net>
17143
17144         * lib/regexec.c (proceed_next_node): Redo local variables to
17145         avoid GCC shadowing warnings.
17146
17147 2005-08-18  Bruno Haible  <bruno@clisp.org>
17148
17149         * lib/strstr.c (strstr): Fix return value in multibyte case.
17150         * lib/strcasestr.c (strcasestr): Likewise.
17151
17152 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
17153
17154         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
17155
17156 2005-08-17  Jim Meyering  <jim@meyering.net>
17157
17158         Make the %s format (seconds since the epoch) work for a negative
17159         number and when used with a zero-padded field width, e.g. %015s.
17160
17161         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
17162         label so that it precedes the code to set `digits'.  Otherwise,
17163         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
17164         print `00-22'.  Now, it prints `-0022', as it should.
17165
17166 2005-08-17  Bruno Haible  <bruno@clisp.org>
17167
17168         * modules/strstr (Files): Add m4/mbrtowc.m4.
17169         (Depends-on): Add mbuiter.
17170
17171 2005-08-17  Bruno Haible  <bruno@clisp.org>
17172
17173         * modules/strcasestr: New file.
17174         * MODULES.html.sh (String handling, based on ANSI C 89): Add
17175         strcasestr.
17176
17177 2005-08-17  Bruno Haible  <bruno@clisp.org>
17178
17179         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
17180
17181 2005-08-17  Bruno Haible  <bruno@clisp.org>
17182
17183         * modules/mbuiter: New file.
17184         * MODULES.html.sh (Extended multibyte and wide character utilities):
17185         Add mbuiter.
17186
17187 2005-08-17  Bruno Haible  <bruno@clisp.org>
17188
17189         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
17190         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
17191
17192 2005-08-17  Bruno Haible  <bruno@clisp.org>
17193
17194         * m4/strcasestr.m4: New file.
17195
17196 2005-08-17  Bruno Haible  <bruno@clisp.org>
17197
17198         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
17199         * lib/strstr.c: Completely rewritten, with multibyte locale support.
17200
17201 2005-08-17  Bruno Haible  <bruno@clisp.org>
17202
17203         * lib/strcasestr.h: New file.
17204         * lib/strcasestr.c: New file.
17205
17206 2005-08-17  Bruno Haible  <bruno@clisp.org>
17207
17208         * lib/strcasecmp.c: Use mbuiter.h.
17209
17210 2005-08-17  Bruno Haible  <bruno@clisp.org>
17211
17212         * lib/mbuiter.h: New file.
17213
17214 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
17215
17216         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
17217         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
17218         and gl_GETOPT are both invoked via different paths (as happens
17219         with GNU tar CVS because it uses both argp and getopt), the former
17220         wins.
17221
17222 2005-08-16  Bruno Haible  <bruno@clisp.org>
17223
17224         * modules/tls: New file.
17225         * MODULES.html.sh (Multithreading): Add tls.
17226
17227 2005-08-16  Bruno Haible  <bruno@clisp.org>
17228
17229         * modules/strnlen1: New file.
17230         * MODULES.html.sh (String handling): Add strnlen1.
17231
17232 2005-08-16  Bruno Haible  <bruno@clisp.org>
17233
17234         * modules/strcase (Files): Add m4/mbrtowc.m4.
17235         (Depends-on): Add strnlen1, mbchar.
17236
17237 2005-08-16  Bruno Haible  <bruno@clisp.org>
17238
17239         * modules/mbiter: New file.
17240         * MODULES.html.sh (Extended multibyte and wide character utilities):
17241         Add mbiter.
17242
17243 2005-08-16  Bruno Haible  <bruno@clisp.org>
17244
17245         * modules/mbfile: New file.
17246         * MODULES.html.sh (Extended multibyte and wide character utilities):
17247         Add mbfile.
17248
17249 2005-08-16  Bruno Haible  <bruno@clisp.org>
17250
17251         * modules/mbchar: New file.
17252         * MODULES.html.sh (Extended multibyte and wide character utilities):
17253         New section.
17254
17255 2005-08-16  Bruno Haible  <bruno@clisp.org>
17256
17257         * m4/tls.m4: New file, from GNU gettext.
17258
17259 2005-08-16  Bruno Haible  <bruno@clisp.org>
17260
17261         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
17262         always.
17263         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
17264
17265 2005-08-16  Bruno Haible  <bruno@clisp.org>
17266
17267         * m4/mbiter.m4: New file.
17268
17269 2005-08-16  Bruno Haible  <bruno@clisp.org>
17270
17271         * m4/mbfile.m4: New file.
17272
17273 2005-08-16  Bruno Haible  <bruno@clisp.org>
17274
17275         * m4/mbchar.m4: New file.
17276
17277 2005-08-16  Bruno Haible  <bruno@clisp.org>
17278
17279         * lib/tls.h: New file, from GNU gettext.
17280         * lib/tls.c: New file, from GNU gettext.
17281
17282 2005-08-16  Bruno Haible  <bruno@clisp.org>
17283
17284         * lib/strnlen1.h: New file.
17285         * lib/strnlen1.c: New file.
17286
17287 2005-08-16  Bruno Haible  <bruno@clisp.org>
17288
17289         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
17290         (mbi_init): Update.
17291         (mbi_avail, mbi_advance): Let the iteration end before the terminating
17292         NUL byte, not after it.
17293
17294 2005-08-16  Bruno Haible  <bruno@clisp.org>
17295
17296         * lib/strcase.h (strcasecmp): Add note in comments.
17297         * lib/strncasecmp.c: Use code from strcasecmp.c.
17298         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
17299         (strcasecmp): Work correctly in multibyte locales.
17300
17301 2005-08-16  Bruno Haible  <bruno@clisp.org>
17302
17303         * lib/mbiter.h: New file.
17304
17305 2005-08-16  Bruno Haible  <bruno@clisp.org>
17306
17307         * lib/mbfile.h: New file.
17308
17309 2005-08-16  Bruno Haible  <bruno@clisp.org>
17310
17311         * lib/mbchar.h: New file.
17312         * lib/mbchar.c: New file.
17313
17314 2005-08-16  Bruno Haible  <bruno@clisp.org>
17315
17316         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
17317         the valid ones. Makes the comparison operations transitive:
17318         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
17319         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
17320
17321 2005-08-15  Simon Josefsson  <jas@extundo.com>
17322
17323         * modules/ssize_t (License): Change to 'unlimited'.
17324
17325         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
17326
17327 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
17328
17329         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
17330         Add comments for each pending glibc patch.
17331
17332 2005-08-15  Bruno Haible  <bruno@clisp.org>
17333
17334         * lib/regex.h (__restrict_arr): Don't define to __restrict if
17335         __cplusplus is defined.
17336
17337 2005-08-14  Jim Meyering  <jim@meyering.net>
17338
17339         Sync from coreutils.
17340
17341         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
17342         Use the hash-table-based cycle-detection code not just when
17343         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
17344         Reported by James Youngman in
17345         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
17346         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
17347         FTS_TIGHT_CYCLE_CHECK.
17348         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
17349         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
17350         once again.
17351         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
17352         * lib/fts.c (fd_safer): Remove decl.
17353         Include fcntl--.h rather than unistd-safer.h
17354         (fts_safe_changedir): Don't call fd_safer; no longer needed
17355         now that we include fcntl--.h.
17356
17357 2005-08-12  Simon Josefsson  <jas@extundo.com>
17358
17359         * modules/getndelim2: Use ssize_t module.
17360         * modules/getnline: Likewise.
17361         * modules/safe-read: Likewise.
17362         * modules/xreadlink: Likewise.
17363
17364         * modules/ssize_t: New file.
17365
17366 2005-08-12  Simon Josefsson  <jas@extundo.com>
17367
17368         * m4/readline.m4: Look for termcap, curses or ncurses if required.
17369
17370 2005-08-12  Simon Josefsson  <jas@extundo.com>
17371
17372         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17373         ssize_t.
17374
17375 2005-08-12  Simon Josefsson  <jas@extundo.com>
17376
17377         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
17378         readline, getdelim and check_version.
17379         (Support for systems lacking ISO C 99: Sizes of integer types):
17380         Add size_max.
17381
17382 2005-08-12  Bruno Haible  <bruno@clisp.org>
17383
17384         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
17385
17386 2005-08-11  Simon Josefsson  <jas@extundo.com>
17387
17388         * modules/readline: New file.
17389
17390         * modules/strnlen (Files): Add strnlen.h.
17391
17392 2005-08-11  Simon Josefsson  <jas@extundo.com>
17393
17394         * m4/readline.m4: New file.
17395
17396 2005-08-11  Simon Josefsson  <jas@extundo.com>
17397
17398         * lib/readline.h, readline.c: New file.
17399
17400 2005-08-11  Simon Josefsson  <jas@extundo.com>
17401
17402         * doc/gnulib.texi (Initial import, Finishing touches): Mention
17403         gl_AVOID.
17404
17405 2005-08-11  Bruno Haible  <bruno@clisp.org>
17406
17407         * lib/strnlen.h (strnlen): Change parameter name to match comment.
17408
17409 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
17410
17411         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
17412
17413 2005-08-10  Simon Josefsson  <jas@extundo.com>
17414
17415         * tests/test-iconvme.c: New file.
17416
17417 2005-08-10  Simon Josefsson  <jas@extundo.com>
17418
17419         * m4/strnlen.m4: New file.
17420
17421         * m4/strndup.m4: Don't check for strnlen declaration, done in
17422         strnlen.m4.
17423
17424 2005-08-10  Simon Josefsson  <jas@extundo.com>
17425
17426         * lib/strndup.c: Use strnlen.h.
17427
17428         * lib/strnlen.h: New file.
17429
17430 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
17431
17432         * README: Typos.
17433
17434 2005-08-02  Simon Josefsson  <jas@extundo.com>
17435
17436         * modules/readline: New file.
17437
17438 2005-08-02  Simon Josefsson  <jas@extundo.com>
17439
17440         * modules/getdelim: New file.
17441
17442         * modules/getline: Rewrite, don't use getndelim2.
17443
17444 2005-08-02  Simon Josefsson  <jas@extundo.com>
17445
17446         * m4/getline.m4: Separate out getdelim stuff into separate module.
17447
17448         * m4/getdelim.m4: New file.
17449
17450 2005-08-02  Simon Josefsson  <jas@extundo.com>
17451
17452         * lib/getline.h, getline.c: Rewrite.
17453
17454         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
17455
17456 2005-07-31  Bruno Haible  <bruno@clisp.org>
17457
17458         * lib/lock.h (gl_lock_initializer): New macro.
17459         (gl_lock_define_initialized): Use it.
17460         (gl_rwlock_initializer): New macro.
17461         (gl_rwlock_define_initialized): Use it.
17462         (gl_recursive_lock_initializer): New macro.
17463         (gl_recursive_lock_define_initialized): Use it.
17464
17465 2005-07-30  Karl Berry  <karl@gnu.org>
17466
17467         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
17468         Report from Ben Pfaff, regarding getopt.
17469
17470 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
17471
17472         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
17473         normal way.
17474         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
17475         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
17476         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
17477         (gl_GETOPT): Use the new macros.  Most of the implementation
17478         is moved to the new macros.  This is for programs like Emacs
17479         that don't want all the functionality of gl_GETOPT.
17480
17481 2005-07-26  Bruno Haible  <bruno@clisp.org>
17482
17483         * m4/lock.m4: Update from GNU gettext.
17484
17485 2005-07-26  Bruno Haible  <bruno@clisp.org>
17486
17487         * lib/lock.h: Update from GNU gettext.
17488         * lib/lock.c: Update from GNU gettext.
17489
17490 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
17491
17492         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
17493         obsolescent AC_TRY_RUN.  Include the default includes files, for
17494         'exit'.
17495
17496 2005-07-24  Bruno Haible  <bruno@clisp.org>
17497
17498         * modules/visibility: New file.
17499         * MODULES.html.sh (Misc): Add visibility.
17500
17501 2005-07-24  Bruno Haible  <bruno@clisp.org>
17502
17503         * m4/visibility.m4: New file.
17504
17505 2005-07-24  Bruno Haible  <bruno@clisp.org>
17506
17507         * doc/visibility.texi: New file.
17508
17509 2005-07-22  Bruno Haible  <bruno@clisp.org>
17510
17511         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
17512         $(ALLOCA_H), redundant through BUILT_SOURCES.
17513         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
17514         redundant through BUILT_SOURCES.
17515         * modules/byteswap (Makefile.am): Remove explicit dependency on
17516         $(BYTESWAP_H), redundant through BUILT_SOURCES.
17517         * modules/fnmatch (Makefile.am): Remove explicit dependency on
17518         $(FNMATCH_H), redundant through BUILT_SOURCES.
17519         * modules/getopt (Makefile.am): Remove explicit dependency on
17520         $(GETOPT_H), redundant through BUILT_SOURCES.
17521         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
17522         redundant through BUILT_SOURCES.
17523         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
17524         redundant through BUILT_SOURCES.
17525         * modules/stdbool (Makefile.am): Remove explicit dependency on
17526         $(STDBOOL_H), redundant through BUILT_SOURCES.
17527         * modules/stdint (Makefile.am): Remove explicit dependency on
17528         $(STDINT_H), redundant through BUILT_SOURCES.
17529         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
17530         Remove explicit dependency on $(SYSEXITS_H).
17531         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
17532
17533 2005-07-18  Simon Josefsson  <jas@extundo.com>
17534
17535         * lib/check-version.c (check_version): Accept identical versions too.
17536
17537 2005-07-18  Bruno Haible  <bruno@clisp.org>
17538
17539         * modules/lock: New file.
17540         * MODULES.html.sh (Multithreading): New section.
17541
17542 2005-07-18  Bruno Haible  <bruno@clisp.org>
17543
17544         * m4/lock.m4: New file, from GNU gettext.
17545
17546 2005-07-18  Bruno Haible  <bruno@clisp.org>
17547
17548         * lib/lock.h: New file, from GNU gettext.
17549         * lib/lock.c: New file, from GNU gettext.
17550
17551 2005-07-18  Bruno Haible  <bruno@clisp.org>
17552
17553         * lib/lock.h (gl_once_t): New type.
17554         (gl_once_define, gl_once): New macros.
17555         * lib/lock.c (fresh_once): New variable.
17556         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
17557         functions.
17558
17559 2005-07-16  Simon Josefsson  <jas@extundo.com>
17560
17561         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
17562         workaround, suggested by Bruno.
17563
17564 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
17565
17566         * modules/xalloc (Depends-on): Add xalloc-die.
17567         * modules/xvasprintf (Depends-on): Add xalloc-die.
17568
17569 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
17570
17571         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
17572         with a minor change.
17573
17574 2005-07-15  Bruno Haible  <bruno@clisp.org>
17575
17576         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
17577         When using lib/poll.c, define poll as rpl_poll.
17578
17579 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
17580
17581         * modules/argp (Depends-on): Remove unlocked-io.
17582
17583 2005-07-14  Derek Price  <derek@ximbiot.com>
17584
17585         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
17586         for glob symlink bug.
17587
17588 2005-07-14  Bruno Haible  <bruno@clisp.org>
17589
17590         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
17591         Instead, test for *_unlocked function declarations directly.
17592
17593 2005-07-11  Simon Josefsson  <jas@extundo.com>
17594
17595         * modules/size_max: New file.
17596
17597         * modules/xsize: Depend on size_max module for size_max.m4.
17598
17599 2005-07-11  Simon Josefsson  <jas@extundo.com>
17600
17601         * lib/size_max.h: New file.
17602
17603 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
17604
17605         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
17606         copyright symbol and the year.
17607         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
17608         (version_etc_va): Use parameterized copyright notice.
17609         Reword to conform to the current GNU coding standards.
17610
17611 2005-07-11  Karl Berry  <karl@gnu.org>
17612
17613         * doc/gnulib.texi (Quoting): new node.
17614         (Initial import): more info, from Patrice.
17615
17616 2005-07-11  Bruno Haible  <bruno@clisp.org>
17617
17618         * gnulib-tool (func_usage): Document option --avoid.
17619         (Command line options): Handle --avoid.
17620         (func_acceptable): New function.
17621         (func_modules_transitive_closure): Use it.
17622
17623 2005-07-11  Bruno Haible  <bruno@clisp.org>
17624
17625         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
17626         Reported by Jim Meyering.
17627
17628 2005-07-10  Bruno Haible  <bruno@clisp.org>
17629
17630         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
17631         Needed when size_t is smaller than 'unsigned int'.
17632         Reported by Paul Eggert.
17633
17634 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
17635
17636         * modules/argp (Depends-on): Add unlocked-io
17637
17638 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
17639
17640         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
17641         block of defines.
17642
17643 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
17644
17645         * config/srclist.txt: Comment out regcomp.c, since we have a porting
17646         fix now.
17647
17648 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
17649         and Paul Eggert  <eggert@cs.ucla.edu>
17650
17651         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
17652         in wint_t, not wchar_t.  Remove now-unnecessary cast.
17653
17654 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
17655
17656         * modules/regex (Files): Add lib/regex_internal.c,
17657         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
17658         (Depends-on): Add extensions.
17659         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
17660
17661 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
17662
17663         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
17664         pathconf.
17665         * m4/same.m4 (gl_SAME): Likewise.
17666         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
17667
17668         * m4/regex.m4: Adjust to new libc regex implementation.
17669         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
17670         all the .c and .h parts of (the new) regex.
17671         Quote the m4 stuff better.
17672         Check for RE_ICASE bug of old gnulib.
17673         Check for REG_STARTEND of recent libc.
17674         Rename local variables from jm_* to gl_*.
17675         Quote operand of "test -f".
17676         Say "recent enough" version of libc, not "version 2".
17677         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
17678         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
17679         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
17680         Remove check for btowc, isascii.
17681         Require AM_LANGINFO_CODESET.
17682
17683 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
17684
17685         * lib/regex.c, regex.h: Sync from libc.
17686         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
17687         * lib/regexec.c:
17688         New files, synced from libc, except that regex_internal.h
17689         currently has a small porting fix.
17690
17691 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
17692
17693         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
17694         regex_internal.c, regexec.c.
17695         Add regex_internal.h too, but as a comment, since the libc version
17696         is currently broken in gnulib mode.
17697
17698 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
17699
17700         Support programs like Emacs that use gnulib but not gettext.
17701         * MODULES.html.sh (Internationalization functions): Add gettext-h.
17702         * modules/gettext-h: New file.
17703         * modules/gettext (Files): Remove lib/gettext.h.
17704         (Depends-on): Add gettext-h.
17705         (Makefile.am): Remove lib_SOURCES.
17706         * modules/argmatch, modules/c-stack, modules/closeout:
17707         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
17708         * modules/execute, modules/file-type, modules/getaddrinfo:
17709         * modules/getopt, modules/human, modules/javacomp:
17710         * modules/javaexec, modules/mkdir-p, modules/obstack:
17711         * modules/openat, modules/pagealign_alloc, modules/pipe:
17712         * modules/quotearg, modules/regex, modules/rpmatch:
17713         * modules/unicodeio, modules/userspec, modules/version-etc:
17714         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
17715         * modules/xsetenv:
17716         Depend on gettext-h, not gettext.
17717
17718 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
17719
17720         * gnulib-tool (func_import): Add support for 'public domain' license.
17721         * modules/alloca, modules/atexit, modules/memmove:
17722         Now public domain, not GPL.
17723         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
17724         * modules/realloc, modules/strerror, modules/strtod:
17725         Now LGPL, not GPL.
17726
17727 2005-07-05  Bruno Haible  <bruno@clisp.org>
17728
17729         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
17730         autoconf CVS. Needed for mingw.
17731
17732 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
17733
17734         Remove the dependency of the strftime module on the tzset module.
17735         * modules/strftime (Depends-on): Remove dependency on tzset.
17736
17737 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
17738
17739         Remove the dependency of the strftime module on the tzset module.
17740         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
17741         gl_FUNC_TZSET_CLOBBER.
17742
17743 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
17744
17745         Remove the dependency of the strftime module on the tzset module.
17746         * lib/strftime.c (my_strftime)
17747         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
17748         Copy the input structure, to work around some of the bug with
17749         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
17750         Solaris releases, you should also use the tzset module, but we won't
17751         require it as a dependency any more since we don't want LGPLed code
17752         to depend on GPLed code.
17753
17754 2005-07-02  Jim Meyering  <jim@meyering.net>
17755
17756         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
17757         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
17758         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
17759         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
17760
17761 2005-07-02  Jim Meyering  <jim@meyering.net>
17762
17763         * lib/backupfile.c (backup_args): Change a `0' to NULL.
17764
17765 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
17766
17767         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
17768         declares only 'struct timespec;' (!).
17769
17770 2005-07-01  Jim Meyering  <jim@meyering.net>
17771
17772         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
17773         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
17774         * lib/save-cwd.c, tempname.c:
17775         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
17776         and don't include <sys/file.h>).
17777
17778 2005-06-29  Jim Meyering  <jim@meyering.net>
17779
17780         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
17781         type name.  Use the variable name instead.
17782         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
17783         Likewise.
17784
17785 2005-06-28  Simon Josefsson  <jas@extundo.com>
17786
17787         * modules/check-version (Files): Add check-version.m4.
17788
17789 2005-06-28  Simon Josefsson  <jas@extundo.com>
17790
17791         * m4/check-version.m4: New file, suggested by Jim Meyering
17792         <jim@meyering.net>.
17793
17794 2005-06-28  Simon Josefsson  <jas@extundo.com>
17795
17796         * lib/check-version.h, lib/check-version.c: New files.
17797
17798 2005-06-28  Simon Josefsson  <jas@extundo.com>
17799
17800         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
17801         collision with global variable.  Better indentation.  Don't
17802         increment buffer pointer beyond buffer end.  Based on comments
17803         from Paul Eggert <eggert@cs.ucla.edu>.
17804
17805         * lib/base64.h: Indent.
17806
17807 2005-06-28  Simon Josefsson  <jas@extundo.com>
17808
17809         * doc/gnulib.texi (Library version handling): New section.
17810
17811 2005-06-28  Jim Meyering  <jim@meyering.net>
17812
17813         * check-module (find_included_lib_files): Hard-code another
17814         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
17815         but modules/fts-lgpl (correctly) does not list those files.
17816
17817         * modules/canonicalize (Files): Add lib/pathmax.h.
17818
17819 2005-06-25  Simon Josefsson  <jas@extundo.com>
17820
17821         * modules/check-version: New file.
17822
17823 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
17824
17825         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
17826         initializer of struct addrinfo, as an indication that we don't
17827         care how many members the structure has.
17828
17829 2005-06-24  Derek Price  <derek@ximbiot.com>
17830         and Bruno Haible  <bruno@clisp.org>
17831
17832         Remove stat module & update lstat.
17833         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
17834         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
17835         * m4/stat.m4: Remove this file.
17836
17837 2005-06-24  Derek Price  <derek@ximbiot.com>
17838         and Bruno Haible  <bruno@clisp.org>
17839
17840         Remove stat module & update lstat.
17841         * lib/stat.c: Remove this file...
17842         (slash_aware_lstat): ...moving this content and its support...
17843         * lib/lstat.c (rpl_lstat): ...into here.
17844         * lib/lstat.h: New file.
17845
17846 2005-06-24  Derek Price  <derek@ximbiot.com>
17847         and Bruno Haible  <bruno@clisp.org>
17848
17849         Remove stat module & update lstat.
17850         * config/srclist.txt (libc sources): Remove stat.
17851
17852 2005-06-24  Derek Price  <derek@ximbiot.com>
17853         and Bruno Haible  <bruno@clisp.org>
17854
17855         Remove stat module & update lstat.
17856         * MODULES.html.sh (stat): Remove.
17857         * MODULES.html: Regenerated.
17858         * modules/lstat (Description): Correct function name.
17859         (Files): Add "lstat.h".
17860         (Depends-on): Remove stat, add xalloc, stat-macros.
17861         * modules/stat: Remove this file.
17862         (Include): Add "lstat.h", remove <sys/stat.h>.
17863
17864 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
17865
17866         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
17867         (ranged_convert): Don't save conversion in a temporary struct.
17868         This causes a warning with GCC 4.0.0, and anyway in the typical
17869         case it's not worth the extra 100 bytes or so of code.
17870         (ranged_convert, __mktime_internal): When calling a function via a
17871         pointer P, use P () rather than (*P) (), as we now assume C89 or
17872         better.
17873
17874 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17875
17876         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
17877         "who -r" failed to give output.  Problem reported by Tim Waugh.
17878
17879         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
17880         (xcalloc): Use it to avoid needless tests.
17881         Problem reported by Jim Meyering.
17882
17883 2005-06-20  Derek Price  <derek@ximbiot.com>
17884
17885         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
17886         unnecessary for Autoconfs > 2.59c.
17887
17888 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17889
17890         * lib/argp.h (__option_is_short): Check upper limit of
17891         __key. Isprint() requires its argument to have the value
17892         of an unsigned char or EOF.
17893
17894 2005-06-16  Jim Meyering  <jim@meyering.net>
17895
17896         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
17897         when either N or S is zero.
17898
17899 2005-06-16  Derek Price  <derek@ximbiot.com>
17900
17901         * m4/bison.m4: Declare YACC & YFLAGS precious.
17902
17903 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
17904
17905         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
17906         multibyte string or pattern, fall back on unibyte matching.
17907         Problem reported by James Youngman.
17908
17909 2005-06-08  Bruno Haible  <bruno@clisp.org>
17910
17911         * modules/csharpcomp: New file.
17912         * MODULES.html.sh (C#): Add csharpcomp.
17913
17914 2005-06-08  Bruno Haible  <bruno@clisp.org>
17915
17916         * m4/csharpcomp.m4: New file, from GNU gettext.
17917
17918 2005-06-08  Bruno Haible  <bruno@clisp.org>
17919
17920         * lib/csharpcomp.h: New file, from GNU gettext.
17921         * lib/csharpcomp.c: New file, from GNU gettext.
17922         * lib/csharpcomp.sh.in: New file, from GNU gettext.
17923
17924 2005-06-08  Bruno Haible  <bruno@clisp.org>
17925
17926         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
17927         warning on mingw.
17928
17929 2005-06-07  Derek Price  <derek@ximbiot.com>
17930
17931         Sync from CVS.
17932         * lib/glob_.h: Indent nested #ifdef.
17933
17934 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
17935
17936         Sync from coreutils.
17937         Use "file name" when talking about file names, instead of "filename"
17938         or "path", as per the GNU coding standards.
17939         * lib/mkdir-p.c: Renamed from makepath.c.
17940         (make_dir_parents): Renamed from make_path.  All callers changed.
17941         * lib/mkdir-p.h: Likewise.  All includers changed.
17942         * lib/filenamecat.c: Renamed from path-concat.c.
17943         (file_name_concat): Renamed from path_concat.  All callers changed.
17944         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
17945         * lib/filenamecat.h: Likewise.  All includers changed.
17946         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
17947         in comments or local variable names.
17948         * lib/basename.c: Likewise.
17949         * lib/canonicalize.c, canonicalize.h: Likewise.
17950         * lib/dirname.c, dirname.h: Likewise.
17951         * lib/euidaccess.c: Likewise.
17952         * lib/exclude.c: Likewise
17953         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
17954         * lib/fsusage.c, fsuage.h: Likewise.
17955         * lib/fts.c, fts_.h: Likewise.
17956         * lib/getcwd.c: Likewise.
17957         * lib/getloadavg.c: Likewise.
17958         * lib/mkstemp.c: Likewise.
17959         * lib/mountlist.c, mountlist.h: Likewise.
17960         * lib/openat.c, openat.h: Likewise.
17961         * lib/readlink-stub.c: Likewise.
17962         * lib/readutmp.c, readutmp.h: Likewise.
17963         * lib/rename.c: Likewise.
17964         * lib/rmdir.c: Likewise.
17965         * lib/same.c: Likewise.
17966         * lib/savedir.c: Likewise.
17967         * lib/stripslash.c: Likewise.
17968         * lib/tempname.c: Likewise.
17969         * lib/xreadlink.c: Likewise.
17970         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
17971         All uses changed.
17972         * lib/exclude.h: Likewise.
17973
17974         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
17975         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
17976         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
17977         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
17978         * lib/pathmax.h: Include <limits.h> unconditionally, since other
17979         files have been getting away with it for years (MORE/BSD 4.3
17980         is extinct now).
17981         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
17982         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
17983
17984         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
17985         Define to 256, not 255, as per modern POSIX.
17986
17987 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
17988
17989         Sync from coreutils.
17990         Use "file name" when talking about file names, instead of "filename"
17991         or "path", as per the GNU coding standards.
17992         * MODULES.html.sh: mkdir-p renamed from makepath.
17993         filenamecat renamed from path-concat.
17994         * modules/filenamecat: Renamed from modules/path-concat.
17995         (Files): filenamecat.h and filenamecat.c renamed from
17996         path-concat.h and path-concat.c.
17997         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
17998         (Include): filenamecat.h, not path-concat.h.
17999         * modules/mkdir-p: Renamed from modules/makepath.
18000         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
18001         makepath.c.
18002         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
18003         (Include): mkdir-p.h, not makepath.h.
18004
18005 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
18006
18007         Sync from coreutils.
18008         * m4/mkdir-p.m4: Renamed from makepath.m4.
18009         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
18010         Rename files from makepath.c to mkdir-p.c, and from
18011         makepath.h to mkdir-p.h.
18012         * m4/filenamecat.m4: Renamed from path-concat.m4.
18013         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
18014         Rename files from path-concat.c to filenamecat.c,
18015         and from path-concat.h to filenamecat.h.
18016         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
18017         "file name" in local variables or comments.
18018         * m4/rename.m4: Likewise.
18019
18020 2005-06-01  Bruno Haible  <bruno@clisp.org>
18021
18022         * modules/csharpexec: New file.
18023         * MODULES.html.sh (C#): New section.
18024
18025 2005-06-01  Bruno Haible  <bruno@clisp.org>
18026
18027         * m4/csharp.m4: New file, from GNU gettext.
18028         * m4/csharpexec.m4: New file, from GNU gettext.
18029
18030 2005-06-01  Bruno Haible  <bruno@clisp.org>
18031
18032         * lib/csharpexec.h: New file, from GNU gettext.
18033         * lib/csharpexec.c: New file, from GNU gettext.
18034         * lib/csharpexec.sh.in: New file, from GNU gettext.
18035
18036 2005-05-31  Derek Price  <derek@ximbiot.com>
18037             Paul Eggert  <eggert@cs.ucla.edu>
18038
18039         Sync from cvs.
18040         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
18041
18042 2005-05-31  Derek Price  <derek@ximbiot.com>
18043             Paul Eggert  <eggert@cs.ucla.edu>
18044
18045         Sync from cvs.
18046         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
18047
18048 2005-05-29  Derek Price  <derek@ximbiot.com>
18049
18050         * config/srclist.txt (glob_.h, glob.c): Add these files.
18051
18052 2005-05-29  Derek Price  <derek@ximbiot.com>
18053
18054         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
18055         * modules/glob: New file.
18056         * modules/getlogin_r: Add link to POSIX spec in description.
18057
18058 2005-05-29  Derek Price  <derek@ximbiot.com>
18059             Paul Eggert  <eggert@cs.ucla.edu>
18060
18061         * m4/glob.m4: New file.
18062
18063 2005-05-29  Derek Price  <derek@ximbiot.com>
18064             Paul Eggert  <eggert@cs.ucla.edu>
18065
18066         * lib/glob_.h, lib/glob.c: New files.
18067
18068 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
18069
18070         * modules/fts (Files): Remove m4/inttypes-pri.m4.
18071         * modules/fts-lgpl (Depends-on): Remove gettext.
18072
18073 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
18074
18075         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
18076         and don't require gt_INTTYPES_PRI.
18077
18078 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
18079
18080         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
18081
18082         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
18083         the configuration hassle isn't worth it.
18084         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
18085         (LONGEST_MODIFIER, PRIuMAX): Remove.
18086
18087 2005-05-27  Bruno Haible  <bruno@clisp.org>
18088
18089         * lib/getlogin_r.h: Remove second include of <stddef.h>.
18090
18091 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
18092
18093         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
18094         _POSIX_PTHREAD_SEMANTICS for Solaris.
18095
18096 2005-05-25  Derek Price  <derek@ximbiot.com>
18097
18098         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
18099
18100 2005-05-25  Derek Price  <derek@ximbiot.com>
18101             Paul Eggert  <eggert@cs.ucla.edu>
18102
18103         * modules/getlogin_r, m4/getlogin_r.m4: New files.
18104         * lib/getlogin_r.c, getlogin_r.h: New files.
18105
18106 2005-05-25  Bruno Haible  <bruno@clisp.org>
18107             Derek Price  <derek@ximbiot.com>
18108
18109         * lib/getlogin_r.h: Simplify API documentation.
18110
18111 2005-05-23  Derek Price  <derek@ximbiot.com>
18112
18113         * modules/minmax (Files): Add m4/minmax.m4.
18114         (configure.ac): Add gl_MINMAX.
18115
18116 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
18117
18118         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
18119         so that unistd-safer.h (GPL'ed code) need not be included.
18120
18121 2005-05-22  Bruno Haible  <bruno@clisp.org>
18122
18123         * m4/minmax.m4: New file.
18124         Based on a patch by Derek Price <derek@ximbiot.com>.
18125
18126 2005-05-22  Bruno Haible  <bruno@clisp.org>
18127
18128         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
18129         (INT64_MIN): Fix definition.
18130         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
18131
18132         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
18133         NEED_SIGNED_INT_TYPES.
18134
18135         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
18136         HAVE_SYSTEM_INTTYPES.
18137
18138 2005-05-22  Bruno Haible  <bruno@clisp.org>
18139
18140         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
18141         Also include <sys/param.h> if it defines MIN, MAX.
18142         Based on a patch by Derek Price <derek@ximbiot.com>.
18143
18144 2005-05-21  Jim Meyering  <jim@meyering.net>
18145
18146         * modules/fts (Files): Add m4/inttypes-pri.m4.
18147         (Depends-on): Add lstat and remove gettext.  Alphabetize.
18148
18149 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
18150
18151         New fts module.
18152         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
18153         (setup_dir, free_dir): New functions.
18154         (enter_dir, leave_dir): Define trivial
18155         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
18156         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
18157         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
18158         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
18159         Move to fts-cycle.c.
18160         (fts_open): Use setup_dir.
18161         (fts_close): Use free_dir.
18162         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
18163         This adds a label and some gotos, but the alternatives were messier.
18164         Check for memory allocation failure when entering a dir.
18165         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
18166         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
18167         (FTS): New member fts_cycle, that is a union that contains the
18168         old active_dir_ht and cycle_state.  All uses changed to mention
18169         fts_cycle.ht and fts_cycle.state.
18170         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
18171         fts.c, with the following changes:
18172         (setup_dir, free_dir): New functions.
18173         (enter_dir): Now returns bool.  Return true if successful, false
18174         if memory exhausted.  All callers changed.
18175         Do not bother partly cleaning up on
18176         memory allocation failure; that is free_dir's job.
18177         However, free ad if hash_insert fails, to avoid memory leak.
18178         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
18179         fts->fts_options to see which union member to use.
18180
18181 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
18182
18183         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
18184         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
18185
18186 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
18187
18188         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
18189
18190 2005-05-20  Jim Meyering  <jim@meyering.net>
18191
18192         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
18193         Now a macro, to pacify GCC.
18194
18195 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
18196
18197         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
18198         of -1.
18199
18200 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
18201
18202         * lib/chown.c (rpl_chown): Return -1 on failure.
18203
18204 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
18205
18206         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
18207         Don't check for stddef.h.
18208         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
18209         don't use its results.
18210         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
18211         since we include them unconditionally.  Don't require
18212         AM_STDBOOL_H, since stdbool is a prerequisite.
18213         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
18214         since we assume C89 or better.
18215         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
18216         as we don't use their results.
18217         Don't check for fchdir, memmove, memset, strrchr, as we use
18218         them unconditionally.
18219         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
18220         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
18221
18222 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
18223
18224         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
18225         Include <stddef.h> unconditionally, since we assume C89 now.
18226         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
18227         * lib/fts.c: Include fts_.h first, to check interface.
18228         Do not include intprops.h; no longer needed.
18229         Include cycle-check.h and hash.h, since fts_.h no longer does.
18230         Remove unnecessary casts of closedir to void.
18231         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
18232         decide whether to decrement nlinks.
18233         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
18234         (FTS): Use struct hash_table * instead of Hash_table, so that
18235         we no longer need to include hash.h here.
18236
18237 2005-05-18  Jim Meyering  <jim@meyering.net>
18238
18239         * modules/dirfd (License): Change to LGPL.  Most of the code
18240         is already in the public domain.
18241
18242 2005-05-18  Jim Meyering  <jim@meyering.net>
18243
18244         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
18245         Reported by Yoann Vandoorselaere.
18246
18247 2005-05-17  Jim Meyering  <jim@meyering.net>
18248
18249         * m4/fts.m4: New file, from coreutils.
18250
18251 2005-05-17  Jim Meyering  <jim@meyering.net>
18252
18253         * lib/fts.c, lib/fts_.h: New files, from coreutils.
18254
18255 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
18256
18257         Sync from coreutils.
18258         * m4/unlinkdir.m4: New file.
18259
18260 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
18261
18262         Sync from coreutils.
18263         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
18264         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
18265         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
18266         White space changes only.
18267         * lib/makepath.c (make_path): Port to hosts where leading "//" is
18268         special.
18269         * lib/yesno.c: Include getline.h, not ctype.h.
18270         (yesno): Don't remove leading white space; POSIX doesn't allow it.
18271         Use getline to remove arbitrary restriction on response length.
18272
18273 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
18274
18275         * config/srclist-update: Spell out "Street" in FSF postal
18276         mail address; this is the style the FSF seems to prefer.
18277
18278         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
18279         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
18280         this updates FSF postal mail address.
18281
18282         Sync from coreutils.
18283         * modules/unlinkdir: New file.
18284         * modules/yesno (Depends-on): Add getline.
18285         * MODULES.html.sh (File system functions): Add unlinkdir.
18286
18287 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
18288
18289         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
18290         lib/strsep.h:
18291         Change the initial comment to refer to GPL, not LGPL.
18292         gnulib-tool will change it to LGPL as needed.
18293
18294         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
18295         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
18296         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
18297         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
18298         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
18299         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
18300         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
18301         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
18302         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
18303         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
18304         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
18305         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
18306         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
18307         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
18308         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
18309         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
18310         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
18311         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
18312         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
18313         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
18314         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
18315         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
18316         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
18317         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
18318         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
18319         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
18320         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
18321         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
18322         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
18323         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
18324         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
18325         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
18326         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
18327         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
18328         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
18329         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
18330         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
18331         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
18332         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
18333         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
18334         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
18335         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
18336         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
18337         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
18338         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
18339         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
18340         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
18341         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
18342         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
18343         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
18344         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
18345         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
18346         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
18347         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
18348         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
18349         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
18350         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
18351         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
18352         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
18353         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
18354         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
18355         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
18356         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
18357         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
18358         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
18359         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
18360         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
18361         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
18362         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
18363         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
18364         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
18365         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
18366         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
18367         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
18368         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
18369         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
18370         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
18371         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
18372         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
18373         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
18374         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
18375         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
18376         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
18377         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
18378         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
18379         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
18380         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
18381         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
18382         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
18383         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
18384         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
18385         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
18386         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
18387         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
18388         lib/yesno.c, lib/yesno.h:
18389         Update FSF postal mail address.
18390
18391 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
18392
18393         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
18394         tests/test-memmem.c, tests/test-stpncpy.c:
18395         Update FSF postal mail address.
18396
18397 2005-05-13  Bruno Haible  <bruno@clisp.org>
18398
18399         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
18400         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
18401         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
18402         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
18403         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
18404         Add support for 64-bit integers in the MSVC compiler.
18405
18406 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18407
18408         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
18409
18410 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
18411
18412         * gnulib-tool (func_import): Sort and uniquify recommended includes.
18413
18414 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
18415
18416         * doc/getdate.texi (General date syntax): Don't say that date
18417         date --iso-8601=ns generates acceptable dates; it doesn't yet.
18418         Problem reported by Nic Ferrier.
18419
18420 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
18421
18422         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
18423         specified in ai_socktype. Fix invalid ai_protocol
18424         check. ai_protocol is usually set to 0 or depending on
18425         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
18426         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
18427         ai_socktype / ai_protocol in the returned addrinfo structure.
18428
18429 2005-05-10  Simon Josefsson  <jas@extundo.com>
18430
18431         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
18432         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
18433
18434 2005-05-10  Karl Berry  <karl@gnu.org>
18435
18436         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
18437         (from http://www.gnu.org/licenses).
18438         * doc/COPYING.LIB: also rename to COPYING.LESSER.
18439         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
18440         fdl.texi suffices.
18441
18442 2005-05-10  Karl Berry  <karl@gnu.org>
18443
18444         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
18445         (COPYING.DOC): remove.
18446
18447         * config/srclist-update: new FSF address.
18448
18449 2005-05-10  Derek Price  <derek@ximbiot.com>
18450
18451         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
18452         possible.
18453
18454 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
18455             Bruno Haible  <bruno@clisp.org>
18456
18457         * modules/inet_ntop: New file.
18458         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18459         inet_ntop.
18460
18461 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
18462             Bruno Haible  <bruno@clisp.org>
18463
18464         * m4/inet_ntop.m4: New file.
18465
18466 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
18467             Bruno Haible  <bruno@clisp.org>
18468
18469         * lib/inet_ntop.h: New file.
18470         * lib/inet_ntop.c: New file, from glibc with modifications.
18471
18472 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
18473
18474         * modules/time_r (License): Change to LGPL.
18475         * modules/extensions (License): Change to LGPL.  Actually,
18476         the license is more permissive than that, but currently gnulib-tool
18477         doesn't know how to handle more-permissive licenses.
18478
18479         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
18480         Problem reported by Dave Love.
18481
18482 2005-05-08  Jim Meyering  <jim@meyering.net>
18483
18484         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
18485         blank.
18486
18487 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
18488
18489         * modules/argmatch (Depends-on): Add stdbool.
18490         * modules/backupfile (Depends-on): Likewise.
18491         * modules/chdir-long (Depends-on): Likewise.
18492         * modules/closeout (Depends-on): Likewise.
18493         * modules/cycle-check (Depends-on): Likewise.
18494         * modules/dirname (Depends-on): Likewise.
18495         * modules/fnmatch (Depends-on): Likewise.
18496         * modules/fsusage (Depends-on): Likewise.
18497         * modules/fwriteerror (Depends-on): Likewise.
18498         * modules/getcwd (Depends-on): Likewise.
18499         * modules/getloadavg (Depends-on): Likewise.
18500         * modules/hard-locale (Depends-on): Likewise.
18501         * modules/makepath (Depends-on): Likewise.
18502         * modules/mountlist (Depends-on): Likewise.
18503         * modules/nanosleep (Depends-on): Likewise.
18504         * modules/posixtm (Depends-on): Likewise.
18505         * modules/quotearg (Depends-on): Likewise.
18506         * modules/readtokens (Depends-on): Likewise.
18507         * modules/readtokens0 (Depends-on): Likewise.
18508         * modules/readutmp (Depends-on): Likewise.
18509         * modules/save-cwd (Depends-on): Likewise.
18510         * modules/strftime (Depends-on): Likewise.
18511         * modules/userspec (Depends-on): Likewise.
18512         * modules/utimecmp (Depends-on): Likewise.
18513         * modules/xgetcwd (Depends-on): Likewise.
18514         * modules/xnanosleep (Depends-on): Likewise.
18515         * modules/xstrtod (Depends-on): Likewise.
18516         * modules/yesno (Depends-on): Likewise.
18517
18518 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
18519
18520         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
18521         needless checks.
18522
18523 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
18524
18525         Merge from coreutils.  Among other things,
18526         add bulletproofing for cases where stdin, stdout, or stderr are closed.
18527         * lib/fd-safer.c: New file.
18528         * lib/fcntl-safer.h, open-safer.c: Remove.
18529         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
18530         * lib/dup-safer.c: Include unistd-safer.h first.
18531         Don't include errno.h.
18532         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
18533         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
18534         * lib/file-type.c: Rely on file-type.h change.
18535         * lib/getloadavg.c: Include unistd-safer.h.
18536         (getloadavg): Use safer open.
18537         * lib/getusershell.c: Include "stdio-safer.h".
18538         (getusershell): Use safer fopen.
18539         * lib/long-options.c (long_options): Use NULL rather than 0.
18540         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
18541         'free'.
18542         * lib/modechange.c: Likewise.
18543         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
18544         (MODE_DONE): New constant.
18545         (struct mode_change): Remove 'next' member.
18546         (make_node_op_equals): New function; like the old one of the
18547         same name, except it allocates an array.
18548         (mode_compile, mode_create_from_ref): Use it.
18549         (mode_compile): Allocate result as an array, not a linked list.
18550         Parse octal string ourself, so that we catch mistakes like "+0".
18551         (mode_adjust): Arg is an array, not a linked list.
18552         * lib/modechange.c: Include stat-macros.h, xalloc.h.
18553         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
18554         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
18555         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
18556         Remove.  This is now stat-macros.h's job.
18557         (talloc): Remove.  All callers replaced by xalloc, so that
18558         our invokers don't have to worry about reporting memory failures.
18559         (make_node_op_equals): Remove.
18560         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
18561         New constants.
18562         (struct mode_change): Moved here from modechange.h.
18563         (mode_append_entry): Remove.
18564         (mode_compile): Remove MASKED_OPS arg, since it encouraged
18565         apps to have incorrect behavior.  Use simpler algorithm for head
18566         and tail.  Don't futz with umask; that's now the job of mode_adjust.
18567         Detect more invalid usages rather than having somewhat-random behavior.
18568         Don't insert an "a=" action, as that leads to incorrect behavior.
18569         (mode_compile, mode_create_from_ref): Return NULL on error instead
18570         of an enum, since now there's only one way to have an error.  All
18571         callers changed.
18572         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
18573         at the correct time.  Simplify calculation of "+u" and its ilk.
18574         Don't mishandle "+X".
18575         (mode_free): Remove "register" and localize decls.
18576         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
18577         (struct mode_change): Move to modechange.c; callers don't
18578         need to see this stuff.
18579         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
18580         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
18581         (mode_change, mode_adjust): Reflect the new signatures noted above.
18582         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
18583         that might redefine system include files.
18584         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
18585         (my_usleep): Use NULL rather than (void *) 0.
18586         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
18587         Use siginterrupt to specify that system calls should be interrupted.
18588         (rpl_nanosleep): Move initialization of suspended closer to call of
18589         my_usleep.
18590         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
18591         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
18592         (desirable_utmp_entry): New function.
18593         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
18594         using x2nrealloc, to simplify logic.
18595         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
18596         size calculation.  Do not assume utmp file is a regular file.
18597         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
18598         (READ_UTMP_CHECK_PIDS): New constant.
18599         * lib/save-cwd.c: Include unistd-safer.h.
18600         (save_cwd): Use fd_safer.
18601         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
18602         [!_LIBC] Include "stat-macros.h" instead.
18603         * lib/unistd-safer.h (fd_safer): New decl.
18604
18605 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
18606
18607         * modules/getloadavg (Depends-on): Add unistd-safer.
18608         * modules/getusershell (Depends-on): Add stdio-safer.
18609         * modules/lstat (Depends-on): Remove xalloc.
18610         * modules/mkstemp (Depends-on): Add stat-macros.
18611         * modules/modechange (Depends-on): Remove xstrtol.
18612         Add stat-macros, xalloc.
18613         * modules/save-cwd (Depends-on): Add unistd-safer.
18614         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
18615         * modules/unistd-safer (Files): Add lib/fd-safer.c
18616         (Makefile.am): Remove lib_SOURCES.
18617
18618         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
18619         Remove fcntl-safer; unistd-safer supersedes it.
18620
18621 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
18622
18623         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
18624         AC_HEADER_STAT.
18625         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
18626         (gl_PREREQ_CHOWN): Remove.
18627         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
18628         it.  Don't require AC_HEADER_STAT.
18629         (gl_PREREQ_LSTAT): Remove.
18630         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
18631         Don't require AC_HEADER_STAT.
18632         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
18633         (gl_PREREQ_RMDIR): Remove.
18634         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
18635         mention stat-macros.h or AC_HEADER_STAT, since we'll make
18636         the stat-macros module a prerequisite.
18637         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
18638         * m4/filemode.m4 (gl_FILEMODE): Likewise.
18639         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
18640         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
18641         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
18642         variable names.
18643         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
18644         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
18645         variable prefixes.
18646         * m4/fcntl-safer.m4: Remove.
18647         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
18648         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
18649         Invoke gl_PREREQ_FD_SAFER.
18650         (gl_PREREQ_FD_SAFER): New macro.
18651         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
18652         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
18653         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
18654         Remove duplicate call to AC_LIBOBJ(readutmp).
18655         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
18656
18657         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
18658         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
18659
18660 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
18661
18662         * MODULES.html.sh (Misc): Add byteswap.
18663
18664 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
18665
18666         * modules/getcwd (Depends-on): Add extensions.
18667         * modules/openat (Depends-on): Likewise.
18668
18669 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
18670
18671         * modules/byteswap: New file.
18672
18673 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
18674
18675         * m4/byteswap.m4: New file.
18676
18677 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
18678
18679         * lib/byteswap_.h: New file.
18680
18681 2005-04-25  Karl Berry  <karl@gnu.org>
18682
18683         * m4/gettext.m4: Update from GNU gettext 0.14.4.
18684
18685 2005-04-25  Albert Chin  <china@thewrittenword.com>
18686
18687         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
18688         Toolkit C bug.
18689
18690 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
18691
18692         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
18693         (func_ln_if_changed) Remove forcibly for no error message
18694         in case file does not exist.
18695
18696 2005-04-19  Simon Josefsson  <jas@extundo.com>
18697
18698         * gnulib-tool (Options): Make --symlink mean --symbolic.
18699
18700 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
18701
18702         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
18703
18704 2005-04-16  Simon Josefsson  <jas@extundo.com>
18705
18706         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
18707
18708 2005-04-15  Simon Josefsson  <jas@extundo.com>
18709
18710         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
18711
18712 2005-04-15  Simon Josefsson  <jas@extundo.com>
18713
18714         * gnulib-tool: Rename --symlink to --symbolic.
18715
18716 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
18717
18718         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
18719         symbolic links to files instead of copying/moving.  Add --aux-dir,
18720         specifying directory relative --dir where auxiliary build tools
18721         are placed.
18722
18723 2005-04-14  Bruno Haible  <bruno@clisp.org>
18724
18725         * modules/allocsa (License): Change to LGPL.
18726         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
18727
18728 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
18729
18730         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
18731         that "UTC +1 second" continues to work.  Problem reported
18732         by Dmitry V. Levin.
18733         (relunit_snumber): New rule.
18734         (relunit): Use it.
18735
18736 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
18737
18738         * lib/getdate.y (universal_time_zone_table): New constant.
18739         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
18740         universal_time_zone_table.
18741         (lookup_zone): Prefer universal_time_zone_table to
18742         local_time_zone_table, so that "GMT" time stamps are allowed in
18743         London during the summer.  Problem reported by Ian Abbott.
18744
18745 2005-04-12  Jim Meyering  <jim@meyering.net>
18746
18747         * lib/human.c (humblock): Set *options even when returning due to
18748         xstrtoumax conversion failure.  Thanks to a used-uninitialized
18749         warning from gcc-4.
18750
18751 2005-04-09  Jim Meyering  <jim@meyering.net>
18752
18753         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
18754         -Wuninitialized: initialize tm0.tm_year.
18755
18756 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
18757
18758         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
18759         count, since there's no maximum.  All uses changed.
18760         Add member dsts_seen.
18761         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
18762         not being INT_MAX.
18763         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
18764         Use pc_rels_seen to decide whther a date is absolute.
18765
18766         * lib/getdate.y (number): Don't overwrite year.
18767         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
18768         check.
18769
18770 2005-04-02  Simon Josefsson  <jas@extundo.com>
18771
18772         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
18773         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
18774
18775 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
18776
18777         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
18778         where no absolute path name can be longer than PATH_MAX.
18779
18780 2005-03-27  Jim Meyering  <jim@meyering.net>
18781
18782         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
18783
18784 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
18785
18786         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
18787         "one's complement" -> "ones' complement" in comment, as per Knuth.
18788         "value of type" -> "type or expression" in comment.
18789         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
18790
18791 2005-03-26  Jim Meyering  <jim@meyering.net>
18792
18793         Comment nits.
18794         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
18795         Correct typos: s/or/of/.
18796
18797 2005-03-26  Jim Meyering  <jim@meyering.net>
18798
18799         * modules/check-include-files: Move to ../ and rename to...
18800         * check-module: ...this.
18801
18802 2005-03-25  Jim Meyering  <jim@meyering.net>
18803
18804         * modules/xvasprintf (Files): Add xalloc.h.
18805
18806 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
18807
18808         * modules/gettext (Files): config/config.rpath ->
18809         build-aux/config.rpath
18810         * modules/iconv (Files): Likewise.
18811         Problem reported by Oskar Liljeblad.
18812
18813 2005-03-23  Jim Meyering  <jim@meyering.net>
18814
18815         * modules/check-include-files: New script to check for
18816         missing dependencies, multiple includes, etc.
18817
18818         * modules/c-strtold (Depends-on): Add xalloc.
18819         * modules/c-strtod (Depends-on): Add xalloc.
18820         * modules/hash (Depends-on): Add xalloc.
18821         (Files): Remove lib/xalloc.h.
18822
18823         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
18824         * modules/userspec (Files): Add lib/inttostr.h.
18825
18826 2005-03-23  Jim Meyering  <jim@meyering.net>
18827
18828         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
18829
18830 2005-03-22  Jim Meyering  <jim@meyering.net>
18831
18832         * modules/stat-macros: New module.
18833         * modules/canonicalize, modules/euidaccess, modules/file-type,
18834         * modules/filemode, modules/lchown, modules/makepath,
18835         * modules/rmdir, modules/stat: Depend on new stat-macros module
18836         rather than listing lib/stat-macros.h manually.
18837         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
18838
18839 2005-03-22  Jim Meyering  <jim@meyering.net>
18840
18841         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
18842
18843 2005-03-22  Bruno Haible  <bruno@clisp.org>
18844
18845         * config/srclist.txt: Replace target directory 'config' with
18846         'build-aux'.
18847         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
18848         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
18849         ../build-aux/.
18850
18851 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
18852
18853         * modules/chdir-long (Depends-on): Add mempcpy.
18854
18855         * modules/acl, modules/backupfile, modules/c-strtod,
18856         modules/c-strtold, modules/canon-host, modules/canonicalize,
18857         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
18858         modules/exclude, modules/exitfail, modules/file-type,
18859         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
18860         modules/getdate, modules/getline, modules/getpagesize,
18861         modules/getpass, modules/getugroups, modules/group-member,
18862         modules/hard-locale, modules/hash, modules/human, modules/idcache,
18863         modules/inttostr, modules/long-options, modules/makepath,
18864         modules/md5, modules/memcasecmp, modules/memcoll,
18865         modules/modechange, modules/mountlist, modules/path-concat,
18866         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
18867         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
18868         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
18869         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
18870         modules/strftime, modules/strndup, modules/strverscmp,
18871         modules/timespec, modules/unlocked-io, modules/userspec,
18872         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
18873         modules/yesno:
18874         Remove lib_SOURCES line from Makefile.am section, as this is now
18875         done automatically by the corresponding Autoconf macro.
18876
18877 2005-03-21  Jim Meyering  <jim@meyering.net>
18878
18879         Changes imported from coreutils.
18880
18881         * lib/cycle-check.c: Don't include xalloc.h.
18882
18883         * lib/path-concat.c: Don't include assert.h.
18884         (path_concat): Remove assertion that would have triggered
18885         for ABASE starting with more than one slash.
18886         Reported by Andreas Schwab.
18887
18888         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
18889         properly when ABASE is an absolute file name.
18890         Correct the description of this function.
18891         Include <assert.h>.
18892         Add an assertion and a test driver.
18893         This fixes a bug introduced on 2004-07-02.
18894         Andreas Schwab reported the resulting failure of cp --parents:
18895         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
18896
18897 2005-03-21  Jim Meyering  <jim@meyering.net>
18898
18899         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
18900         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
18901
18902 2005-03-21  Jim Meyering  <jim@meyering.net>
18903         and  Paul Eggert  <eggert@cs.ucla.edu>
18904
18905         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
18906         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
18907         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
18908         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
18909         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
18910         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
18911         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
18912         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
18913         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
18914         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
18915         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
18916         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
18917         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
18918         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
18919         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
18920         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
18921         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
18922         for these modules.
18923
18924 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
18925
18926         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
18927         (which shouldn't happen), generate nothing instead of returning 0
18928         immediately, so that nstrftime (NULL, ...) doesn't return 0.
18929
18930 2005-03-16  Bruno Haible  <bruno@clisp.org>
18931
18932         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
18933         HAVE_LONGLONG_64BIT.
18934
18935 2005-03-16  Bruno Haible  <bruno@clisp.org>
18936
18937         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
18938         HAVE_LONGLONG_64BIT.
18939
18940 2005-03-16  Bruno Haible  <bruno@clisp.org>
18941
18942         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
18943         HAVE_LONGLONG_64BIT.
18944
18945 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
18946
18947         * lib/strftime.c (my_strftime): Prepend space to format so that we can
18948         reliably distinguish strftime failure from empty output on POSIX
18949         hosts.
18950
18951 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
18952
18953         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
18954         (iconv_string): Don't guess a size-zero buffer, as that might cause
18955         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
18956         result would be 'too large', where 'too large' is (heuristically)
18957         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
18958         overflow concerns.  This will prevent some unwanted malloc failures
18959         when the inputs are very large.
18960
18961 2005-03-15  Karl Berry  <karl@gnu.org>
18962
18963         * config/srclist.txt (config.rpath): from gettext.
18964         * config/config.rpath: update.
18965
18966 2005-03-15  Bruno Haible  <bruno@clisp.org>
18967
18968         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
18969         to 'negate'.
18970
18971         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
18972         variable.
18973
18974         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
18975         results.
18976
18977 2005-03-14  Simon Josefsson  <jas@extundo.com>
18978
18979         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
18980         <fx@gnu.org>.
18981
18982 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
18983
18984         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
18985         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
18986         intprops.h.
18987         * lib/strtol.c: Likewise.
18988
18989 2005-03-14  Jim Meyering  <jim@meyering.net>
18990
18991         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
18992         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
18993         to be nonzero so that we (and caller) can detect the difference
18994         between a valid zero-length expansion and an error return, even
18995         when the underlying strftime fails before writing anything into
18996         that location.
18997
18998 2005-03-14  Bruno Haible  <bruno@clisp.org>
18999
19000         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
19001         Update from GNU gettext 0.14.3.
19002
19003 2005-03-10  Jim Meyering  <jim@meyering.net>
19004
19005         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
19006
19007 2005-03-10  Jim Meyering  <jim@meyering.net>
19008
19009         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
19010         so that this module works on systems without fchdir.
19011
19012 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
19013
19014         Factor int-properties macros into a single file, except for
19015         glibc-related files.
19016         * lib/intprops.h: New file.
19017         * lib/getloadavg.c: Include it instead of limits.h.
19018         (INT_STRLEN_BOUND): Remove.
19019         * lib/human.c: Include intprops.h.
19020         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
19021         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
19022         302/1000.
19023         * lib/inttostr.h: Include intprops.h instead of limits.h.
19024         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
19025         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
19026         for consistency with intprops.h.
19027         (time_t_is_integer, twos_complement_arithmetic): Use them.
19028         * lib/sig2str.h: Include <signal.h>, intprops.h.
19029         (INT_STRLEN_BOUND): Remove.
19030         * lib/strftime.c (TYPE_SIGNED): Remove.
19031         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
19032         * lib/strtol.c: Adjust comments to match intprops.h.
19033         * lib/userspec.c: Include intprops.h.
19034         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
19035         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
19036         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
19037         instead of rolling our own expressions.
19038         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
19039
19040         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
19041         instead of int.
19042         (my_strftime): Do not mishandle years close to INT_MAX, by doing
19043         the right thing even if adding 1900 would overflow.  Similarly
19044         for tm_mon + 1 and tm_yday + 1.
19045         Make %Y always equivalent to %C%y, and similarly for %G and %g.
19046         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
19047         (DO_SIGNED_NUMBER): New macro.
19048         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
19049
19050 2005-03-07  Bruno Haible  <bruno@clisp.org>
19051
19052         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
19053
19054 2005-03-07  Bruno Haible  <bruno@clisp.org>
19055
19056         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
19057
19058 2005-03-04  Derek R. Price  <derek@ximbiot.com>
19059
19060         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
19061         (func_import): Only replace files via --import when they have actually
19062         changed.
19063
19064 2005-03-03  Derek R. Price  <derek@ximbiot.com>
19065
19066         * m4/mmap-anon.m4: New file.
19067         * m4/pagealign_alloc.m4: New file.
19068
19069 2005-03-03  Derek R. Price  <derek@ximbiot.com>
19070             Bruno Haible  <bruno@clisp.org>
19071
19072         * modules/pagealign_alloc: New file.
19073         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
19074
19075 2005-03-03  Derek R. Price  <derek@ximbiot.com>
19076             Bruno Haible  <bruno@clisp.org>
19077
19078         * lib/pagealign_alloc.h: New file.
19079         * lib/pagealign_alloc.c: New file.
19080
19081 2005-03-03  Bruno Haible  <bruno@clisp.org>
19082
19083         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
19084         Use an all-permissive copyright notice, recommended by RMS.
19085
19086 2005-03-02  Bruno Haible  <bruno@clisp.org>
19087
19088         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
19089         of AIX, the replacement has to be done only after <string.h> is
19090         included, therefore not in config.h. stpncpy.h does the replacement,
19091         and stpncpy.c uses it.
19092
19093 2005-03-02  Bruno Haible  <bruno@clisp.org>
19094
19095         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
19096         stpncpy.c uses it.
19097
19098 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
19099
19100         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
19101         The workaround isn't strictly needed for POSIX conformance, and
19102         it's too much of a pain to configure and maintain.  We'll ask
19103         people to fix their kernels instead.
19104         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
19105         (NANOSLEEP_BUG_WORKAROUND): Remove.
19106         (xnanosleep): Remove the workaround.
19107
19108 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
19109
19110         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
19111         Reported by Derek Price.
19112         (Include): Add "timespec.h".
19113
19114         * modules/xnanosleep (Depends-on): Remove gethrxtime.
19115
19116 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
19117
19118         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
19119         to detect nanosleep bug.
19120
19121 2005-03-01  Bruno Haible  <bruno@clisp.org>
19122
19123         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
19124
19125 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
19126
19127         * modules/gethrxtime: New file.
19128         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
19129         (Depends-on): Add gethrxtime.
19130         (configure.ac): Add gl_XNANOSLEEP.
19131         (Makefile.am): Remove lib_SOURCES line.
19132
19133 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
19134
19135         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
19136         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
19137
19138 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
19139
19140         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
19141         * lib/timespec.h (gettime): Return void, since it always
19142         succeeds now.  All uses changed.
19143         * lib/gettime.c (gettime) Likewise.
19144         [HAVE_NANOTIME]: Prefer nanotime.
19145         Assume gettimeofday succeeds, as POSIX requires.
19146         Assime time () succeeds, since other code already does.
19147         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
19148         (timespec_subtract): Remove.
19149         (NANOSLEEP_BUG_WORKAROUND): New constant.
19150         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
19151         things considerably.  Use it only on GNU/Linux hosts, since the
19152         workaround shouldn't be needed elsewhere.
19153
19154 2005-02-24  Bruno Haible  <bruno@clisp.org>
19155
19156         * modules/gettext (Files): Add m4/glibc2.m4.
19157
19158 2005-02-24  Bruno Haible  <bruno@clisp.org>
19159
19160         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
19161         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
19162         * m4/progtest.m4:
19163         Update from GNU gettext 0.14.2.
19164         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
19165
19166 2005-02-24  Bruno Haible  <bruno@clisp.org>
19167
19168         * lib/localcharset.c: Update from GNU gettext 0.14.2.
19169         * lib/config.charset: Update from GNU gettext 0.14.2.
19170
19171 2005-02-24  Bruno Haible  <bruno@clisp.org>
19172
19173         * lib/gettext.h: Update from GNU gettext 0.14.2.
19174
19175 2005-02-23  Simon Josefsson  <jas@extundo.com>
19176
19177         * m4/iconvme.m4: New file.
19178
19179 2005-02-23  Jim Meyering  <jim@meyering.net>
19180
19181         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
19182         change.
19183         Thanks to Bruno Haible for catching it.
19184
19185 2005-02-22  Simon Josefsson  <jas@extundo.com>
19186
19187         * modules/iconvme: New file.
19188
19189         * MODULES.html.sh: Add iconvme.
19190
19191 2005-02-22  Simon Josefsson  <jas@extundo.com>
19192
19193         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
19194
19195 2005-02-22  Simon Josefsson  <jas@extundo.com>
19196
19197         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
19198
19199 2005-02-22  Jim Meyering  <jim@meyering.net>
19200
19201         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
19202         s/ifndef/ifdef/.
19203
19204 2005-02-20  Neil Conway  <neilc@samurai.com>
19205
19206         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
19207         returned by OSX/Darwin if the specified buffer is not large
19208         enough for the hostname.
19209
19210 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19211
19212         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
19213         pass it to _help, otherwise the latter coredumps trying to
19214         dereference state.root_argp.
19215
19216 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
19217
19218         * modules/chdir-long (Depends-on): Add memrchr.
19219         * modules/memrchr (Files): Add lib/memrchr.h.
19220         (Include): "memrchr.h".
19221
19222 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
19223
19224         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
19225
19226 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
19227
19228         * lib/memrchr.h: New file.
19229         * lib/chdir-long.c: Include it.
19230         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
19231         Don't bother including stddef.h.
19232
19233 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
19234
19235         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
19236         inclusion.
19237         Include <sys/types.h>, for dev_t.
19238         (ME_DUMMY, ME_REMOTE): Move from here....
19239         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
19240         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
19241         Dmitry V. Levin.
19242         Include mountlist.h first, to test the interface.
19243
19244 2005-01-29  Bruno Haible  <bruno@clisp.org>
19245
19246         * lib/progname.c (program_name): Initialize.
19247         Needed when linking statically on MacOS X.
19248
19249 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
19250
19251         Sync from coreutils.
19252         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
19253         (Depends-on): Add c-strtod.
19254         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
19255
19256 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
19257
19258         Sync from coreutils.
19259         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
19260
19261         Remove files that are specific to coreutils.
19262         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
19263
19264 2005-01-28  Bruno Haible  <bruno@clisp.org>
19265
19266         * modules/javacomp: New file.
19267         * MODULES.html.sh (Java): Add javacomp.
19268
19269 2005-01-28  Bruno Haible  <bruno@clisp.org>
19270
19271         * m4/javacomp.m4: New file, from GNU gettext.
19272
19273 2005-01-28  Bruno Haible  <bruno@clisp.org>
19274
19275         * lib/javacomp.sh.in: New file, from GNU gettext.
19276         * lib/javacomp.h: New file, from GNU gettext.
19277         * lib/javacomp.c: New file, from GNU gettext.
19278
19279 2005-01-26  Simon Josefsson  <jas@extundo.com>
19280
19281         * lib/gai_strerror.c: Use GPL in header.
19282
19283 2005-01-26  Bruno Haible  <bruno@clisp.org>
19284
19285         * modules/javaexec: New file.
19286         * MODULES.html.sh (Java): Add javaexec.
19287
19288 2005-01-26  Bruno Haible  <bruno@clisp.org>
19289
19290         * m4/javaexec.m4: New file, from GNU gettext.
19291
19292 2005-01-26  Bruno Haible  <bruno@clisp.org>
19293
19294         * lib/javaexec.sh.in: New file, from GNU gettext.
19295         * lib/javaexec.h: New file, from GNU gettext.
19296         * lib/javaexec.c: New file, from GNU gettext.
19297
19298 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19299
19300         * modules/lchown (Depends-on): Remove lchown.h
19301
19302 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19303
19304         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
19305         must be defined if the header file was not found, in order
19306         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
19307
19308 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19309
19310         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
19311         initializers for struct pentry_state.
19312         (__argp_error): Check return value of __asprintf
19313         (__argp_failure): Translate error message
19314
19315         * lib/argp-parse.c: Removed braces around the expansion of N_()
19316
19317 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
19318
19319         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
19320         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
19321         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
19322         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
19323         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
19324         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
19325         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
19326         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
19327         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
19328         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
19329         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
19330         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
19331         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
19332         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
19333         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
19334         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
19335         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
19336         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
19337         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
19338         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
19339         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
19340         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
19341         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
19342         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
19343         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
19344         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
19345         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
19346         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
19347         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
19348         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
19349         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
19350         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
19351         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
19352         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
19353         xstrtol.m4, xstrtoumax.m4, yesno.m4:
19354         Use an all-permissive copyright notice, recommended by RMS.
19355
19356 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
19357
19358         * modules/chdir-long (Depends-on): Remove mempcpy.
19359
19360 2005-01-21  Jim Meyering  <jim@meyering.net>
19361
19362         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
19363         same value as for Solaris 9.
19364
19365         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
19366         component length.  This included changing the parameter to be
19367         of type `char *' rather than `char const *'.
19368         * lib/chdir-long.h (chdir_long): Update prototype.
19369
19370         * lib/openat.c (fdopendir, fstatat): New functions.
19371         * lib/openat.h: Include headers required for use of DIR and struct
19372         stat.
19373         [AT_SYMLINK_NOFOLLOW]: Define.
19374         (fdopendir, fstatat): Add prototypes.
19375
19376 2005-01-21  Bruno Haible  <bruno@clisp.org>
19377
19378         * modules/classpath: New file.
19379         * MODULES.html.sh (Java): Add classpath.
19380
19381 2005-01-21  Bruno Haible  <bruno@clisp.org>
19382
19383         * lib/classpath.h: New file, from GNU gettext.
19384         * lib/classpath.c: New file, from GNU gettext.
19385
19386 2005-01-20  Simon Josefsson  <jas@extundo.com>
19387
19388         * modules/version-etc-fsf: New file.
19389
19390 2005-01-20  Simon Josefsson  <jas@extundo.com>
19391
19392         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
19393         * lib/version-etc.c: Remove version_etc_copyright.
19394         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
19395         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
19396
19397 2005-01-20  Simon Josefsson  <jas@extundo.com>
19398
19399         * lib/base64.h (isbase64): Add.
19400
19401         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
19402         using a unsigned prototype, don't inline.
19403         (base64_decode): Use it.
19404
19405 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
19406
19407         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
19408         it.
19409
19410 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
19411
19412         * lib/save-cwd.c (save_cwd): Remove code to support the case
19413         where fchdir is missing or flaky.
19414
19415 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
19416
19417         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
19418
19419 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
19420
19421         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
19422         AC_LIBSOURCES now does this.
19423         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
19424         with new ullong_max module.
19425
19426 2005-01-19  Bruno Haible  <bruno@clisp.org>
19427
19428         * modules/sh-quote: New file.
19429         * MODULES.html.sh (Executing programs): Add sh-quote.
19430
19431 2005-01-19  Bruno Haible  <bruno@clisp.org>
19432
19433         * lib/sh-quote.h: New file, from GNU gettext.
19434         * lib/sh-quote.c: New file, from GNU gettext.
19435
19436 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
19437
19438         Merge from coreutils.
19439         * m4/ullong_max.m4: New file.
19440         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
19441         (gl_MACROS): Assume localeconv exists.
19442
19443 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
19444
19445         Merge changes from coreutils, as described below in several
19446         changelogs dated today.
19447
19448         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
19449         (O_DIRECTORY): Remove; not needed here, since "." must be
19450         a directory.  All uses removed.
19451         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
19452         universal on Suns, and we also need to test for IRIX.
19453         Revamp code to use 'if' rather than '#if'.
19454         Avoid unnecessary comparison of cwd->desc to 0.
19455
19456         * lib/utimens.c (futimens): Robustify the previous patch, by checking
19457         for known valid error numbers rather than observed invalid ones.
19458
19459 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
19460
19461         * modules/ullong_max: New file.
19462
19463         * modules/chdir-long, modules/openat: New files.
19464         * modules/save-cwd (Depends-on): Depend on chdir-long.
19465         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
19466
19467 2005-01-18  Jim Meyering  <jim@meyering.net>
19468
19469         Merge from coreutils.
19470         * m4/chdir-long.m4, m4/openat.m4: New files.
19471         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
19472         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
19473         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
19474         is sane and DOES follow symlinks.  Besides, testing 20 different
19475         systems found no broken chown implementations.
19476         Prompted by a change in rsync's copy of this macro.
19477         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
19478
19479         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
19480
19481         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
19482         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
19483         NULL-means-set-to-current-time semantics.
19484         Remove temporary file immediately, rather than waiting
19485         for configure's at-exit trap code to do it.
19486
19487 2005-01-18  Jim Meyering  <jim@meyering.net>
19488
19489         * lib/version-etc.c (version_etc_copyright): Update copyright date.
19490
19491         * lib/utimens.c (futimens): Account for the fact that futimes
19492         can also fail with errno == ENOSYS or errno == ENOENT.
19493         Patch from Dmitry V. Levin.
19494
19495         Change the name of the robust chdir function from chdir to chdir_long.
19496         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
19497         (restore_cwd): Use chdir_long, not chdir.
19498         * lib/chdir-long.c: Renamed from chdir.c.
19499         * lib/chdir-long.h: Renamed from chdir.h.
19500         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
19501         Hurd.
19502
19503 2005-01-18  Bruno Haible  <bruno@clisp.org>
19504
19505         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
19506         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
19507         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
19508         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
19509         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
19510         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
19511         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
19512         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
19513         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
19514         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
19515         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
19516         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
19517         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
19518         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
19519         Use an all-permissive copyright notice, recommended by RMS.
19520
19521 2005-01-18  Bob Proulx  <bob@proulx.com>
19522
19523         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
19524         simplify offsetof() macro construct to avoid compile failure with
19525         native HP-UX 11.0 ANSI C compiler.
19526
19527 2005-01-17  Bruno Haible  <bruno@clisp.org>
19528
19529         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
19530         redundant because stpncpy.m4 takes care of it.
19531
19532 2005-01-17  Bruno Haible  <bruno@clisp.org>
19533
19534         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
19535
19536 2005-01-17  Bruno Haible  <bruno@clisp.org>
19537
19538         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
19539         used.
19540
19541 2005-01-17  Bruno Haible  <bruno@clisp.org>
19542
19543         * lib/fwriteerror.h (fwriteerror): Change specification to include
19544         fclose.
19545         * lib/fwriteerror.c: Include <stdbool.h>.
19546         (fwriteerror): At the end, close the file stream. Record whether
19547         stdout was already closed.
19548
19549 2005-01-17  Bruno Haible  <bruno@clisp.org>
19550
19551         * lib/execute.c (environ): Declare if needed.
19552         * lib/pipe.c (environ): Likewise.
19553         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
19554
19555 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19556
19557         * modules/argp: Depend on vsnprintf
19558
19559 2005-01-10  Jim Meyering  <jim@meyering.net>
19560
19561         * modules/closeout (Depends-on): Add atexit.
19562
19563 2005-01-06  Bruno Haible  <bruno@clisp.org>
19564
19565         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
19566
19567 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
19568
19569         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
19570         definitions to be after all include files, to avoid collisions.
19571         Problem reported by Bob Proulx.
19572
19573 2005-01-04  Jim Meyering  <jim@meyering.net>
19574
19575         Changes imported from coreutils.
19576         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
19577         as the mkstemp template, use a temporary directory and an
19578         8.3-friendly template to avoid trouble on systems like DJGPP.
19579         Reported by Juan M. Guerrero via Stepan Kasal.
19580         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
19581         close. Remove the temporary directory right away, rather than waiting
19582         for configure's at-exit trap code to do it.
19583         Suggestion from Stepan Kasal.
19584
19585 2005-01-01  Simon Josefsson  <jas@extundo.com>
19586
19587         * gnulib-tool: Print #include directives when --import'ing.
19588
19589 2004-12-28  Simon Josefsson  <jas@extundo.com>
19590
19591         * tests/test-base64.c: Include required header files.  Remove
19592         unused variables.
19593
19594 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
19595
19596         * modules/error (Depends-on): Remove gettext.
19597
19598 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
19599
19600         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
19601         not needed.  This removes a dependency on the gettext module.
19602         [defined _LIBC]: Do not include <libintl.h>; not needed.
19603
19604 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
19605
19606         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
19607         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
19608
19609 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
19610
19611         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
19612         HAVE_DECL_STRTOLD.
19613
19614 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
19615
19616         * modules/getdate (Depends-on): Remove alloca-opt.
19617
19618 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
19619
19620         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
19621
19622 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
19623
19624         * lib/argp-parse.c: Include <stddef.h>.
19625         (alignof, alignto): New macros.
19626         (parser_init): Don't assume that void * is aligned sufficiently
19627         for struct option.
19628
19629         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
19630         need to extend the stack.
19631         (YYINITDEPTH): New macro, so that the initial stack isn't overly
19632         large.
19633
19634 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19635
19636         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
19637
19638 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
19639
19640         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
19641         (2004-10-24) change.  Apparently this was a false alarm.
19642
19643         * modules/getdate: Depend on alloca-opt, not alloca.
19644
19645 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
19646
19647         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
19648         Remove now-obsolete comment about AIX.
19649         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
19650         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
19651         (YYMAXDEPTH): New macro.
19652
19653 2004-12-18  Simon Josefsson  <jas@extundo.com>
19654
19655         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
19656
19657 2004-12-18  Bruno Haible  <bruno@clisp.org>
19658
19659         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
19660
19661 2004-12-18  Bruno Haible  <bruno@clisp.org>
19662
19663         * lib/fatal-signal.c (fatal_signals): Make non-const.
19664         (init_fatal_signals): New function.
19665         (uninstall_handlers, install_handlers): Ignore signals that were set to
19666         SIG_IGN.
19667         (at_fatal_signal): Call init_fatal_signals.
19668         (init_fatal_signal_set): Likewise. Ignore signals that were set to
19669         SIG_IGN.
19670         Reported by Paul Eggert.
19671
19672 2004-12-18  Bruno Haible  <bruno@clisp.org>
19673
19674         * doc/alloca.texi: New file.
19675         * doc/alloca-opt.texi: New file.
19676
19677 2004-12-17  Jim Meyering  <jim@meyering.net>
19678
19679         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
19680         Otherwise, install-sh could exit with improper exit status when
19681         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
19682
19683 2004-12-16  Simon Josefsson  <jas@extundo.com>
19684
19685         * tests/test-base64.c: Add license.
19686
19687 2004-12-15  Stepan Kasal  <address@hidden>
19688
19689         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
19690
19691 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
19692
19693         * modules/getcwd (Files): Add m4/d-ino.m4.
19694         Suggested by Mark D. Baushke.
19695
19696 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
19697
19698         * lib/getdate.y (textint): New member "negative".
19699         (time_zone_hhmm): New function.
19700         Expect 14 shift-reduce conflicts, not 13.
19701         (o_colon_minutes): New rule.
19702         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
19703         (yylex): Set the "negative" member of signed numbers.
19704
19705 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
19706
19707         * doc/getdate.texi (Time of day items, Time zone items):
19708         Describe new formats +00:00, UTC+00:00.
19709
19710 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
19711
19712         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
19713         spurious "-l"s.  Problem reported by Stepan Kasal.
19714
19715 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
19716
19717         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
19718         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
19719
19720 2004-12-04  Simon Josefsson  <jas@extundo.com>
19721
19722         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
19723         Vandoorselaere <yoann@prelude-ids.org>.
19724
19725 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
19726
19727         Changes imported from coreutils.
19728         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
19729         exist.
19730         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
19731
19732 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
19733
19734         Changes imported from coreutils.
19735         * lib/hard-locale.c: Assume <locale.h> exists.
19736         Include "strdup.h".
19737         (GLIBC_VERSION): New macro.
19738         (hard_locale): Assume setlocale exists.
19739         Rewrite to avoid #ifdef.
19740         Use strdup rather than malloc + strcpy.
19741         * lib/human.c: Assume <locale.h> exists.
19742         (human_readable): Assume localeconv exists.
19743
19744 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
19745
19746         * modules/hard-locale (Depends-on): Add strdup.
19747
19748 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
19749
19750         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
19751         convert T2, not T.  (Imported from libc.)
19752
19753 2004-11-30  Simon Josefsson  <jas@extundo.com>
19754
19755         * modules/restrict (License): Change to LGPL.
19756
19757 2004-11-30  Simon Josefsson  <jas@extundo.com>
19758
19759         * m4/restrict.m4: Add copyright and copying conditions.
19760
19761 2004-11-30  Simon Josefsson  <jas@extundo.com>
19762
19763         * m4/base64.m4: New file.
19764
19765 2004-11-30  Simon Josefsson  <jas@extundo.com>
19766
19767         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
19768         base64.
19769
19770         * tests/test-base64.c: New file.
19771
19772         * modules/base64: New file.
19773
19774 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
19775
19776         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
19777         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
19778
19779         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
19780
19781 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
19782
19783         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
19784         (__getcwd.c): Don't restore errno; glibc doesn't.
19785         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
19786         first, falling back to our code only if its results look suspicious.
19787         Ensure that the resulting buffer is only as large as necessary.
19788
19789         * lib/readutmp.c: Include readutmp.h first.
19790         Include <errno.h>, since readutmp.h no longer does that.
19791         * lib/readutmp.h: Don't include <errno.h>,
19792         <sys/param.h>, <time.h>; not needed to establish interface.
19793         (errno): Remove decl.
19794         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
19795         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
19796         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
19797
19798 2004-11-28  Simon Josefsson  <jas@extundo.com>
19799
19800         * lib/base64.h, base64.c: New file.
19801
19802 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
19803
19804         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
19805
19806 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
19807
19808         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
19809         (Depends-on): Remove pathmax, same.  Add mempcpy.
19810         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
19811         (Makefile.am): Append getcwd.h to lib_SOURCES.
19812         (Include): Add getcwd.h.
19813         (Maintainer): Change from Jim Meyering to "all, glibc",
19814         since getdate now uses intended-for-glibc code.
19815         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
19816         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
19817
19818 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
19819
19820         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
19821         HP's ANSI C compiler.
19822         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
19823         Declaring int functions causes warnings on some modern systems and
19824         shouldn't be needed to compile on ancient ones.
19825         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
19826         defined.
19827
19828         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
19829         with the following changes.
19830         (__set_errno): Parenthesize properly.
19831         Include <stdbool.h>.
19832         (MIN, MAX, MATCHING_INO): New macros.
19833         (__getcwd): Define with prototype, not K&R form.
19834         Use heuristics to allocate default buffer on stack if possible.
19835         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
19836         behavior, and to avoid the PATH_MAX limit when computing
19837         ../../../../...
19838         Use MATCHING_INO to compare inode number to file.
19839         Check for arithmetic overflow in size calculations.
19840         Fix bug in reallocation of dot array that caused getcwd to fail
19841         on directories nested deeper than 75.
19842         Be more careful about saving errno on error.
19843         Do not use realloc; use only free+malloc, as this is a bit
19844         more flexible and avoids a needless copy operation.
19845         Do not inspect st_dev and st_ino for symbolic links; POSIX
19846         doesn't specify the latter.
19847         Check for closedir errors.
19848         Avoid needless casts.
19849         Use "#ifdef weak_alias" around weak_alias, to be like other
19850         glibc code.
19851         The following changes to getcwd.c have effect only when used in
19852         gnulib; they have no effect inside glibc proper.
19853         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
19854         as alloca isn't used.
19855         (alloca, __alloca): Likewise.
19856         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
19857         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
19858         unconditionally, as gnulib assumes C89 or better.
19859         Do not include <sys/param.h>.
19860         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
19861         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
19862         better.
19863         (NULL) [!defined NULL]: Remove; we assume C89 or better.
19864         Include <dirent.h> in a way that is compatible with modern Autoconf.
19865         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
19866         New macros, if not already defined.
19867         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
19868         Use "_LIBC", not "defined _LIBC", for consistency.
19869         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
19870         a mempcpy module.
19871         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
19872         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
19873         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
19874         credit only to Jim Meyering and adjust the copyright dates.
19875         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
19876         <stdlib.h>, <unistd.h>, "pathmax.h".
19877         Instead, include "xgetcwd.h" (first) and "getcwd.h".
19878         (INITIAL_BUFFER_SIZE): Remove.
19879         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
19880
19881 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
19882
19883         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
19884         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
19885         Use the _ONCE methods, for efficiency.
19886         Check for fcntl.h.  In test program, include <errno.h>
19887         and <fcntl.h> if available.  Remove old K&R cruft from
19888         test program.  Check for common errors in GNU/Linux,
19889         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
19890         don't do AC_LIBOBJ, as that's getcwd.m4's job.
19891         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
19892         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
19893         name accordingly.
19894         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
19895         accommodate new getcwd.c.
19896         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
19897         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
19898         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
19899         that's all we need now.
19900
19901 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19902
19903         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
19904         argp-parse.c depends on getopt internals, that means we should
19905         always use our getopt, to be on the safe side.
19906         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
19907         order not to spoil the result of an eventual previous invocation
19908         of gl_GETOPT_SUBSTITUTE.
19909
19910 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19911
19912         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
19913         redefinition warnings. To avoid them, include the defines
19914         in `#if !defined __need_getopt ... #endif'. The only place
19915         where __getopt_argv_const is used is in definitions
19916         of getopt_long and getopt_long_only below, which are as well
19917         protected by `#ifndef __need_getopt'.
19918         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
19919         __need_getopt after including <stdio.h> and <unistd.h> These
19920         headers might have defined it.
19921
19922 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
19923
19924         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
19925
19926 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
19927
19928         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
19929         (futimens): New function, which uses futimes if available.
19930         (futimens, utimens): Support timespec==NULL, with same semantics
19931         as utime and utimens.
19932         * lib/utimens.h (futimens): New decl.
19933
19934 2004-11-23  Jim Meyering  <jim@meyering.net>
19935
19936         * lib/getopt_.h: Remove trailing blanks.
19937
19938 2004-11-23  Jim Meyering  <jim@meyering.net>
19939
19940         * lib/__fpending.c: Add comment.
19941
19942 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
19943
19944         * modules/canonicalize (Depends-on): Add xreadlink.
19945         Problem reported by James Youngman.
19946
19947 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
19948
19949         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
19950         New macros.
19951         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
19952         optopt): Use them instead of invoking ## directly; otherwise, the
19953         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
19954
19955 2004-11-19  Bruno Haible  <bruno@clisp.org>
19956
19957         * lib/strtok_r.c: Move comments from here...
19958         * lib/strtok_r.h: ... to here.
19959
19960 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
19961
19962         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
19963         implementations that mishandle size_t overflow.
19964
19965 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
19966
19967         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
19968         might fail.  Problem reported by Yoann Vandoorselaere.
19969         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
19970         implementations that mishandle size_t overflow.
19971
19972 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
19973
19974         * modules/canon-host (Depends-on): Add strdup.
19975
19976 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
19977
19978         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
19979
19980 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
19981
19982         * lib/canon-host.c: Include "strdup.h".
19983         (canon_host): Use getaddrinfo if available, so that IPv6 works.
19984         Use strdup instead of malloc/strcpy to duplicate strings.
19985
19986         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
19987         (human_space_before_unit): New constant.
19988         * lib/human.c (human_readable): Support it.
19989
19990         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
19991         (xgetcwd): Set errno correctly when failing.
19992         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
19993         the failure is actually due to a PATH_MAX problem.
19994
19995         Further getopt changes to make it more likely that glibc will
19996         buy the changes back.
19997         * lib/getopt.c (POSIXLY_CORRECT): New constant.
19998         (getopt): Use it, so to preserve glibc semantic
19999         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
20000         when compiling for libc.
20001         * lib/getopt_.h (__getopt_argv_const): Bring it back.
20002         (getopt_long, getopt_long_only): Use it.
20003
20004         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
20005         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
20006         (getopt): Argv is now char * const *, as per standard.
20007         (_getopt_internal_r, _getopt_internal): Argv is now char **,
20008         not char *__getopt_argv_const *.
20009         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
20010         _getopt_long_only_r): Likewise.
20011         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
20012         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
20013         _getopt_long_r, _getopt_long_only_r): Likewise.
20014         * lib/getopt_.h (__getopt_argv_const): Remove.
20015         (getopt): Argv is now char * const *, as per standard.
20016
20017         * lib/getdate.y (tORDINAL): New token.
20018         (day, relunit): Allow it for relative times.
20019         (relative_time_table): Use tORDINAL for ordinals.
20020
20021 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
20022
20023         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
20024         Document that "second" isn't allowed as an ordinal number.
20025
20026 2004-11-16  Jim Meyering  <jim@meyering.net>
20027
20028         * modules/closeout (Depends-on): Add fpending.
20029
20030 2004-11-15  Jim Meyering  <jim@meyering.net>
20031
20032         * lib/closeout.c: Include "__fpending.h" once again.
20033         Include <stdbool.h>.
20034         (close_stdout): Don't fail just because stdout was closed initially,
20035         since some programs don't write to stdout in the normal course of
20036         operation (other than --version and --help), and we don't want this
20037         function to make e.g. `touch file >&-' fail.
20038         But do fail if it was closed and someone has tried to write to it.
20039         E.g., `printf foo >&-' must fail.
20040
20041 2004-11-13  Jim Meyering  <jim@meyering.net>
20042
20043         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
20044
20045 2004-11-12  Simon Josefsson  <jas@extundo.com>
20046
20047         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
20048         small doc fix is still pending.
20049
20050 2004-11-11  Simon Josefsson  <jas@extundo.com>
20051
20052         * modules/strtok_r: New file.
20053
20054         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
20055         strtok_r.
20056
20057 2004-11-11  Simon Josefsson  <jas@extundo.com>
20058
20059         * m4/strtok_r.m4: New file.
20060
20061         * m4/getopt.m4: Replace opterr.
20062
20063 2004-11-11  Simon Josefsson  <jas@extundo.com>
20064
20065         * lib/strtok_r.h, strtok_r.c: New file.
20066
20067 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
20068
20069         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
20070         of replacing opterr, getopt, etc.  This should handle the
20071         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
20072
20073 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
20074
20075         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
20076         we can stop lying to compilers about the constness of argv when we
20077         are compiled outside glibc.
20078         (getopt, getopt_long, getopt_long_only): Use it.
20079         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
20080         _getopt_internal, getopt): Likewise.
20081         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
20082         _getopt_long_only_r): Likewise.
20083         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
20084         _getopt_long_r, _getopt_long_only_r): Likewise.
20085
20086         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
20087         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
20088         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
20089         the other external symbols.
20090         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
20091         declaration, since the above renaming now works around collisions.
20092
20093 2004-11-11  Jim Meyering  <jim@meyering.net>
20094
20095         * lib/linebreak.c: Remove trailing blanks.
20096         * lib/alloca_.h: Likewise.
20097         * lib/acosl.c: Likewise.
20098         * lib/euidaccess.c: Likewise.
20099         * lib/allocsa.h: Likewise.
20100
20101 2004-11-10  Simon Josefsson  <jas@extundo.com>
20102
20103         * m4/getaddrinfo.m4: New file.
20104
20105 2004-11-10  Simon Josefsson  <jas@extundo.com>
20106
20107         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
20108
20109 2004-11-10  Simon Josefsson  <jas@extundo.com>
20110
20111         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
20112         getaddrinfo.
20113
20114         * modules/getaddrinfo: New file.
20115
20116 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
20117
20118         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
20119
20120 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
20121
20122         * lib/mktime.c (SHR): New macro, which is a portable
20123         substitute for >> that should work even on Crays.
20124         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
20125         Problem reported by Mark D. Baushke in
20126         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
20127         * lib/getdate.y (SHR): Likewise.
20128         (tm_diff): Use it.
20129         * lib/strftime.c (SHR): Likewise.
20130         (tm_diff): Use it.
20131         * lib/quotearg.c (struct quoting_options): Use unsigned int for
20132         quote_these_too, so that right shifts are well defined.  All uses
20133         changed.
20134
20135 2004-11-10  Jim Meyering  <jim@meyering.net>
20136
20137         Ensure that no close failure goes unreported.
20138         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
20139         return early when it seems there's nothing to flush.
20140         Don't include __fpending.h.
20141
20142 2004-11-10  Jim Meyering  <jim@meyering.net>
20143
20144         * modules/closeout (Depends-on): Remove fpending.
20145
20146 2004-11-10  Jim Meyering  <jim@meyering.net>
20147
20148         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
20149
20150 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
20151
20152         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
20153         gl_FUNC_STRFTIME.
20154         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
20155         and AC_REQUIRE when possible, to avoid duplicate checks.
20156         Check for <wchar.h>.
20157
20158 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
20159
20160         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
20161
20162 2004-11-09  Bruno Haible  <bruno@clisp.org>
20163
20164         * m4/sockpfaf.m4: New file.
20165
20166 2004-11-05  Bruno Haible  <bruno@clisp.org>
20167
20168         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
20169         Reported by Mark D. Baushke <mdb@cvshome.org>.
20170
20171 2004-11-04  Bruno Haible  <bruno@clisp.org>
20172
20173         2004-09-11  Bruno Haible  <bruno@clisp.org>
20174                 * allocsa.valgrind: New file.
20175         2004-02-06  Bruno Haible  <bruno@clisp.org>
20176                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
20177                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
20178                 Reported by Christopher Seip <chris.seip@hp.com>.
20179
20180 2004-11-04  Bruno Haible  <bruno@clisp.org>
20181
20182         * modules/allocsa (Files): Add lib/allocsa.valgrind.
20183         (Makefile.am): Distribute it.
20184
20185 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
20186
20187         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
20188         with errno == ERANGE if the buffer is too small.
20189         Problem reported by Mark D. Baushke.
20190
20191 2004-11-03  Albert Chin  <china@thewrittenword.com>
20192             Paul Eggert  <eggert@cs.ucla.edu>
20193
20194         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
20195         equivalent, substitute $ac_type for equivalent type rather than
20196         blindly using uint32_t *always* which won't work if uint32_t is not
20197         available.  Define _UINT32_T to work around typedef of uint32_t if
20198         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
20199         2.5.1.
20200
20201 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
20202
20203         * m4/jm-macros.m4: Sync from coreutils.
20204         (gl_MACROS): Check for mbrlen, for pathchk.
20205         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
20206
20207 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
20208
20209         * lib/xreadlink.c (MAXSIZE): New macro.
20210         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
20211         size does not exceed MAXSIZE.  Avoid cast.
20212         As suggested by Mark D. Baushke in
20213         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
20214         if readlink fails with buffer size just under MAXSIZE, try again
20215         with MAXSIZE.
20216
20217 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
20218
20219         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
20220
20221 2004-11-02  Derek R. Price  <derek@ximbiot.com>
20222         and  Paul Eggert  <eggert@cs.ucla.edu>
20223
20224         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
20225         (get_date): Overparenthesize to avoid GCC warning.
20226
20227 2004-11-02  Bruno Haible  <bruno@clisp.org>
20228
20229         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
20230         returns void.
20231
20232 2004-11-02  Bruno Haible  <bruno@clisp.org>
20233
20234         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
20235         function returns void.
20236
20237 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
20238
20239         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
20240         fflush_unlocked, flockfile, funlockfile, funlockfile,
20241         fputs_unlocked, putc_unlocked.
20242
20243 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
20244
20245         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
20246         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
20247         already declared.
20248
20249 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
20250
20251         * modules/getdate (Files): Add doc/getdate.texi.
20252         (Depends-on): Add setenv, xalloc.
20253
20254 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
20255
20256         * lib/getdate.y: Add support for TZ="foo" within a date string.
20257         Fix some bugs near time_t boundaries.  Reject dates with
20258         out-of-range components, e.g., "Sept 31".
20259         Include <stdlib.h>, "setenv.h", "xalloc.h".
20260         (ISDIGIT_LOCALE): Remove; unused.
20261         Note that the TZ and time functions used here are not reentrant.
20262         (mktime_ok, get_tz): New functions.
20263         (TZBUFSIZE): New constant.
20264         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
20265         This requires that we sometimes generate our own TZ="XXX..." setting.
20266
20267 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
20268
20269         * doc/getdate.texi: New file, from coreutils with modifications for
20270         the new TZ parsing.
20271
20272 2004-10-27  Derek R. Price  <derek@ximbiot.com>
20273
20274         * lib/mktime.c (not_equal_tm): Remove redundant check.
20275
20276 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
20277
20278         * modules/regex (lib_SOURCES): Add regex.c.
20279         Reported by James Youngman in
20280         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
20281
20282 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
20283
20284         * lib/getdate.y: Use Bison 1.875 features, and some minor
20285         code cleanups.  This change does not affect semantics.
20286         Don't include <stdlib.h>; no longer needed.
20287         Don't include unlocked-io.h; only the "#if TEST" code uses
20288         stdio, and performance isn't crucial there.
20289         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
20290         Bison 1.875 features as described below.
20291         All uses of "PC." replaced by "pc->".
20292         (YYSTYPE): Add a forward declaration.
20293         (yylex, yyerror): Use full prototypes in forward decls.
20294         Use "%pure-parser" rather than obsolescent "%pure_parser".
20295         Use %parse-param and %lex-param instead of obsolescent
20296         YYPARSE_PARAM and YYLEX_PARAM.
20297         (meridian_table, month_and_day_table, time_units_table,
20298         relative_time_table, time_zone_table, military_table,
20299         lookup_zone, lookup_word, get_date):
20300         Use NULL instead of 0 where appropriate.
20301         (to_hour): Avoid abort (), to avoid a dependency on
20302         stdlib.h.
20303         (yyerror, yylex): Now accepts parser_control * arg.
20304         (main) [TEST]: Use '\0' rather than 0 for char.
20305
20306 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
20307
20308         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
20309
20310 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
20311
20312         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
20313         It's now the caller's responsibility to handle the case where
20314         !HAVE_GETPAGESIZE && !defined getpagesize.
20315
20316         * lib/mktime.c (leapyear): Arg is long int, not int.
20317
20318 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
20319
20320         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
20321
20322 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
20323
20324         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
20325         missing.  Problem reported by James Youngman.
20326
20327 2004-10-16  Simon Josefsson  <jas@extundo.com>
20328
20329         * gnulib-tool: Fix comments.  Fix parse problem.
20330         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
20331
20332 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
20333
20334         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
20335         implementation of getopt_long.  Problem reported by Alexander Taler in:
20336         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
20337
20338 2004-10-15  Bruno Haible  <bruno@clisp.org>
20339
20340         * gnulib-tool: Untabify. Initialize supplied_libname.
20341         (func_usage): More homogenous output.
20342         (func_modules_transitive_closure, func_modules_to_filelist,
20343         func_emit_lib_Makefile_am): New functions.
20344         (func_import): New function, extracted from big case statement. Use
20345         func_get_license, func_modules_transitive_closure,
20346         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
20347         opt_lgpl. Don't use test -a, as it's not portable.
20348         (func_create_testdir): Use func_modules_transitive_closure,
20349         func_modules_to_filelist, func_emit_lib_Makefile_am.
20350
20351 2004-10-15  Bruno Haible  <bruno@clisp.org>
20352
20353         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
20354
20355 2004-10-15  Bruno Haible  <bruno@clisp.org>
20356
20357         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
20358         the portions belonging to each module.
20359         Suggested by Derek Robert Price <derek@ximbiot.com>.
20360
20361 2004-10-12  Simon Josefsson  <jas@extundo.com>
20362
20363         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
20364         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
20365         to real functions.
20366
20367 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
20368
20369         * modules/vsnprintf: New file.
20370
20371 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
20372
20373         * m4/vsnprintf.m4: New file.
20374
20375 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
20376
20377         * lib/vsnprintf.h: New file.
20378         * lib/vsnprintf.c: New file.
20379
20380 2004-10-11  Bruno Haible  <bruno@clisp.org>
20381
20382         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
20383         vsnprintf.
20384
20385 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
20386
20387         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
20388
20389 2004-10-07  Bruno Haible  <bruno@clisp.org>
20390
20391         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
20392         fits into the provided buffer.
20393
20394 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
20395
20396         * lib/diacrit.c, diacrit.h: Add GPL notice.
20397
20398         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
20399         notice.
20400         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
20401         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
20402         This avoids a potential constant-folding bug.
20403
20404 2004-10-05  Bruno Haible  <bruno@clisp.org>
20405
20406         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
20407         for the declaration of strsep.
20408
20409 2004-10-05  Bruno Haible  <bruno@clisp.org>
20410
20411         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
20412
20413 2004-10-04  Simon Josefsson  <jas@extundo.com>
20414
20415         * modules/memmem: New file.
20416         * tests/test-memmem.c: New file.
20417         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
20418
20419 2004-10-04  Simon Josefsson  <jas@extundo.com>
20420
20421         * m4/memmem.m4: New file.
20422
20423 2004-10-04  Simon Josefsson  <jas@extundo.com>
20424
20425         * lib/memmem.h: New file.
20426         * lib/memmem.c: New file, taken from glibc.
20427
20428 2004-10-04  Simon Josefsson  <jas@extundo.com>
20429
20430         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
20431         '#ifdef USE_UNLOCKED_IO'.
20432
20433 2004-10-04  Simon Josefsson  <jas@extundo.com>
20434
20435         * config/srclist.txt: Add memmem from glibc.
20436
20437 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
20438
20439         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
20440
20441         * modules/argmatch, modules/argp, modules/closeout, modules/error,
20442         modules/exclude, modules/getdate, modules/getline,
20443         modules/getndelim2, modules/getpass, modules/getpass-gnu,
20444         modules/getusershell, modules/linebuffer, modules/md5,
20445         modules/mountlist, modules/posixtm, modules/readtokens,
20446         modules/readutmp, modules/regex, modules/sha1,
20447         modules/version-etc, modules/yesno:
20448         Remove dependency on unlocked-io.
20449
20450 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
20451
20452         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
20453
20454         * m4/unlocked-io.m4: Add copyright notice.
20455         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
20456
20457 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
20458
20459         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
20460         * lib/xmalloc.c (xmemdup): Likewise.
20461         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
20462         XFREE): Remove these long-obsolescent macros.
20463         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
20464         * lib/xstrdup.c: Remove.
20465
20466         * lib/regex.c (re_comp): Cast gettext return value to char *,
20467         Problem reported by Martin Neitzel via Mark D. Baushke.
20468
20469 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
20470
20471         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
20472         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
20473         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
20474         regex.c, sha1.c, version-etc.c, yesno.c:
20475         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
20476         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
20477         the includer's responsibility.
20478
20479         Sync from coreutils.
20480
20481         * lib/modechange.c (mode_compile): Don't decrement a pointer that
20482         points to the start of a string, as the C Standard says the
20483         resulting behavior is undefined.
20484
20485         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
20486         simple -> simple_backups, numbered_existing ->
20487         numbered_existing_backups, numbered -> numbered_backups
20488         to avoid shadowing problems.  All uses changed.
20489         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
20490         * lib/backupfile.c (check_extension, numbered_backup):
20491         Rename locals to avoid shadowing 'basename'.
20492         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
20493         once.
20494
20495         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
20496         * lib/.cvsignore: Add getopt.h.
20497
20498 2004-10-04  Bruno Haible  <bruno@clisp.org>
20499
20500         * modules/README: New file.
20501         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
20502         not a module.
20503
20504 2004-10-02  Jim Meyering  <jim@meyering.net>
20505
20506         * lib/dirfd.h, getpagesize.h: Add copyright notice.
20507
20508 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
20509
20510         * modules/strsep: New file.
20511
20512 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
20513
20514         * m4/strsep.m4: New file.
20515
20516 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
20517
20518         * lib/strsep.h: New file.
20519         * lib/strsep.c: New file.
20520
20521 2004-10-01  Simon Josefsson  <jas@extundo.com>
20522
20523         * lib/snprintf.c (snprintf): Handle size==0.
20524
20525 2004-10-01  Simon Josefsson  <jas@extundo.com>
20526             Bruno Haible  <bruno@clisp.org>
20527
20528         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
20529         (snprintf): Declare 'args'.
20530
20531 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
20532
20533         * lib/snprintf.c: Remove comments as to why each header is needed.
20534
20535 2004-10-01  Bruno Haible  <bruno@clisp.org>
20536
20537         * MODULES.html.sh: Add strsep.
20538
20539 2004-09-30  Simon Josefsson  <jas@extundo.com>
20540
20541         * modules/snprintf: New file.
20542
20543 2004-09-30  Simon Josefsson  <jas@extundo.com>
20544
20545         * m4/snprintf.m4: New file.
20546
20547 2004-09-30  Simon Josefsson  <jas@extundo.com>
20548
20549         * lib/snprintf.h, lib/snprintf.c: New files.
20550
20551 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20552
20553         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
20554         (hol_entry_help): Never translate an empty string.
20555         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
20556         * lib/argp.h (OPTION_NO_TRANS): New option.
20557
20558 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
20559
20560         * modules/argp (Maintainer): Replace Simon Josefsson
20561         by Sergey Poznyakoff.
20562
20563 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
20564
20565         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
20566         changes merged back into glibc.
20567
20568 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
20569
20570         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
20571
20572 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
20573
20574         * lib/xvasprintf.c: Include xalloc.h.
20575         (xvasprintf): Use xalloc_die, not xmalloc_die.
20576
20577 2004-09-29  Bruno Haible  <bruno@clisp.org>
20578
20579         * modules/alloca-opt: New file, derived from modules/alloca.
20580         * modules/allocsa: Depend on alloca-opt instead of alloca.
20581         * modules/setenv: Likewise.
20582         * modules/vasnprintf: Likewise.
20583         * MODULES.html.sh: Add alloca-opt.
20584
20585 2004-09-28  Simon Josefsson  <jas@extundo.com>
20586
20587         * gnulib-tool: New parameter --lgpl, to asseert that modules are
20588         LGPL, and to replace license template from GPL to LGPL.
20589
20590 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
20591
20592         * modules/dummy: Change license to LGPL.
20593
20594 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
20595
20596         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
20597
20598 2004-09-24  Simon Josefsson  <jas@extundo.com>
20599
20600         * modules/minmax (License): Change from GPL to LGPL.
20601
20602 2004-09-23  Simon Josefsson  <jas@extundo.com>
20603
20604         * gnulib-tool (--import): Typo.
20605
20606 2004-09-23  Simon Josefsson  <jas@extundo.com>
20607
20608         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
20609
20610 2004-09-22  Bruno Haible  <bruno@clisp.org>
20611
20612         * modules/*: Add 'License' field.
20613         * gnulib-tool: Accept --extract-license option.
20614         (func_get_license): New function.
20615
20616 2004-09-21  Bruno Haible  <bruno@clisp.org>
20617
20618         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
20619         Reported by Simon Josefsson.
20620
20621 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
20622
20623         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
20624         gl_AC_TYPE_LONG_LONG.
20625
20626 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
20627
20628         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
20629
20630 2004-09-18  Simon Josefsson  <jas@extundo.com>
20631         and  Paul Eggert  <eggert@cs.ucla.edu>
20632
20633         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
20634         calls with autoreconf.  Define GL_LIB.
20635
20636 2004-09-14  Karl Berry  <karl@gnu.org>
20637
20638         * config/srclist.txt: unsync setenv.c, sigh.
20639
20640 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
20641
20642         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
20643         Problem reported by Bruno Haible in:
20644         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
20645
20646 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
20647
20648         * config/srclist.txt: Comment out argp-pvh.c.
20649
20650 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
20651
20652         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
20653         in case some system header has #define'd it.  Problem reported by
20654         Soeren D. Schulze in
20655         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
20656
20657 2004-09-09  Karl Berry  <karl@gnu.org>
20658
20659         * regex.[ch]: delete from the root.  These were supposed to be
20660                 synced with emacs cvs, but this has not happened for about
20661                 a year, and anyway nothing else uses emacs regex.[ch].
20662                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
20663                 lib/regex[.ch] is untouched.
20664
20665 2004-09-09  Bruno Haible  <bruno@clisp.org>
20666
20667         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
20668
20669 2004-09-09  Bruno Haible  <bruno@clisp.org>
20670
20671         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
20672         modifications.
20673         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
20674
20675 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
20676
20677         * modules/xvasprintf: New file.
20678         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
20679
20680 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
20681
20682         * lib/xvasprintf.h: New file.
20683         * lib/xvasprintf.c: New file.
20684         * lib/xasprintf.c: New file.
20685
20686 2004-09-08  Bruno Haible  <bruno@clisp.org>
20687
20688         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
20689
20690 2004-09-08  Bruno Haible  <bruno@clisp.org>
20691
20692         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
20693         length is > INT_MAX.
20694         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
20695         more.
20696
20697 2004-09-08  Bruno Haible  <bruno@clisp.org>
20698
20699         * lib/stdint_.h: New file, taken from GNU clisp.
20700
20701 2004-09-08  Bruno Haible  <bruno@clisp.org>
20702             Oskar Liljeblad  <oskar@osk.mine.nu>
20703
20704         * modules/stdint: New file.
20705         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
20706
20707 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
20708
20709         Import from coreutils.
20710         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
20711         strings on unbounded length.  alloca's performance benefits aren't
20712         that important here.
20713         (V_STRDUP): Remove.
20714         (parse_with_separator): New function, with most of the internals
20715         of the old parse_user_spec.  Allow user to omit both user and group,
20716         for compatibility with FreeBSD.
20717         Clone only the user name, not the entire spec.
20718         Do not set *uid, *gid unless entirely successful.
20719         Avoid memory leak in some failing cases.
20720         Fix regression for USER.GROUP reported by Dmitry V. Levin in
20721         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
20722         (parse_user_spec): Rewrite to use parse_with_separator.
20723
20724 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
20725
20726         * modules/userspec: Don't depend on alloca.
20727
20728 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
20729
20730         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
20731
20732 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
20733
20734         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
20735         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
20736         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
20737
20738 2004-08-16  Simon Josefsson  <jas@extundo.com>
20739
20740         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
20741         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
20742         Add --dry-run for --import.
20743         Let user provided command line parameters override configure.ac
20744         settings.
20745
20746 2004-08-12  Simon Josefsson  <jas@extundo.com>
20747
20748         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
20749         as discussed with Paul Eggert in threads rooted at
20750         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
20751         and
20752         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
20753         Before, the test was empty, and relied on ELIDE_CODE in source
20754         code.)
20755         (gl_PREREQ_GETOPT): New macro.
20756         (gl_GETOPT): Use them.
20757
20758 2004-08-12  Simon Josefsson  <jas@extundo.com>
20759
20760         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
20761         * lib/getopt_.h: Renamed from getopt.h.
20762
20763 2004-08-12  Simon Josefsson  <jas@extundo.com>
20764
20765         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
20766         Change default library name from libfoo to libgnu.
20767         Now, if you have a configure.ac that says:
20768                 gl_SOURCE_BASE(gl)
20769                 gl_M4_BASE(gl/m4)
20770                 gl_MODULES(error getopt etcetera)
20771                 gl_INIT
20772         you can import all you need by running:
20773                 ../gnulib/gnulib-tool --import
20774
20775         * modules/getopt (Files): Rename getopt.h to getopt_.h.
20776         (Makefile.am): Rewrite, use logic from argz.
20777         (Include): Use <getopt.h> instead of "getopt.h".
20778
20779 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
20780
20781         * modules/argp (Files): Add m4/unlocked-io.m4.
20782         (Depends-on): Add extensions.
20783
20784 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
20785
20786         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
20787         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
20788         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
20789         Check for program_invocation_name, program_invocation_short_name,
20790         flockfile, funlockfile, features.h, _getopt_long_only_r.
20791
20792 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
20793
20794         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
20795         its complicated substitute.
20796         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
20797         and program_invocation_name.
20798         (__argp_basename) [!_LIBC]: Remove; the only use was
20799         replaced by its body.
20800         (__argp_short_program_name): Change condition from
20801         !defined __argp_short_program_name to
20802         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
20803         to match argp-namefrob.h.
20804         (__argp_failure): Don't assume strerror_r returns char *.
20805         * lib/argp-parse.c (N_): Define unconditionally.
20806         (argp_default_options): Fill out initializers with 0 to avoid
20807         gcc warnings.
20808
20809 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
20810
20811         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
20812         getopt1.c.
20813
20814 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
20815
20816         Merge from coreutils.
20817
20818         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
20819
20820         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
20821         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
20822
20823 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
20824
20825         Merge from coreutils.
20826
20827         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
20828         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
20829         for Reliant Unix 5.43.
20830
20831         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
20832         (union fooround): Use uintmax_t, not long int.
20833         The rest is a merge from libc:
20834         [defined _LIBC]: Include <shlib-compat.h>.
20835         (_obstack) [defined _LIBC]: Remove after 2.3.4.
20836
20837         * lib/settime.c (settime): Recode to avoid warning with
20838         Sun Forte C 6U2.
20839
20840         * lib/strverscmp.c: Convert to UTF-8.
20841
20842 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
20843
20844         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
20845         m4/uintmax_t.m4.
20846
20847 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
20848
20849         * modules/xalloc-die: New file.
20850         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
20851
20852         * modules/md5 (Files): Add m4/uint32_t.m4.
20853         * modules/sha1: Renamed from modules/sha.
20854         (Files):
20855         Rename lib/sha.h to lib/sha1.h.
20856         Rename lib/sha.c to lib/sha1.c.
20857         Rename m4/sha.m4 to m4/sha1.m4.
20858         (lib_SOURCES): Likewise.
20859         (configure.ac): Rename gl_SHA to gl_SHA1.
20860         (Include): sha.h -> sha1.h.
20861
20862 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
20863
20864         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
20865         * m4/sha1.m4: Renamed from sha.m4.
20866         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
20867
20868 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
20869
20870         * lib/obstack.h (obstack_empty_p):
20871         Don't assume that chunk->contents is suitably aligned.
20872         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
20873         Likewise. Problem reported by Benno in
20874         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
20875
20876         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
20877         readable.  This could be improved further but it'd take some work.
20878
20879 2004-08-08  Simon Josefsson  <jas@extundo.com>
20880
20881         * modules/xgethostname (Depends-on): Remove exit and error (not
20882         used).
20883
20884         * modules/getpass-gnu: Add getpass.h.
20885         (Depends-on): Add stdbool.
20886         * modules/getpass: Add getpass.h.
20887
20888 2004-08-08  Simon Josefsson  <jas@extundo.com>
20889
20890         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
20891         Check getpass declaration.
20892
20893 2004-08-08  Simon Josefsson  <jas@extundo.com>
20894
20895         * lib/xgethostname.c: Don't include error.h (not used).
20896
20897         * lib/getpass.h: Add.
20898         * lib/getpass.c: Include getpass.h first.
20899
20900 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
20901
20902         * lib/xalloc-die.c: New file.
20903         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
20904         All uses removed.
20905         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
20906         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
20907         xalloc-die.c.
20908         (_, N_, xalloc_die): Move to xalloc-die.c.
20909         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
20910         so that we needn't mess with xalloc_msg_memory_exhausted.
20911
20912         * lib/sha1.h: Renamed from sha.h.
20913         (SHA1_H): Renamed from _SHA_H.
20914         (sha1_ctx): Renamed from sha_ctx.
20915         (sha1_init_ctx): Renamed from sha_init_ctx.
20916         (sha1_process_block): Renamed from sha_process_block.
20917         (sha1_process_bytes): Renamed from sha_process_bytes.
20918         (sha1_finish_ctx): Renamed from sha_finish_ctx.
20919         (sha1_read_ctx): Renamed from sha_read_ctx.
20920         (sha1_stream): Renamed from sha_stream.
20921         (sha1_buffer): Renamed from sha_buffer.
20922         * lib/sha1.c: Likewise; renamed from sha.c.
20923         Do not include <sys/types.h>.
20924         Include <stddef.h> rather than <stdlib.h>.
20925
20926 2004-08-08  Bruno Haible  <bruno@clisp.org>
20927
20928         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
20929         FILESYSTEM_PREFIX_LEN.
20930         * lib/progreloc.c: Likewise.
20931         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
20932
20933 2004-08-06  Simon Josefsson  <jas@extundo.com>
20934
20935         * modules/progname (Depends-on): Don't depend on stdbool.
20936
20937 2004-08-06  Simon Josefsson  <jas@extundo.com>
20938
20939         * modules/getsubopt: New file.
20940         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
20941         getsubopt.
20942
20943 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
20944
20945         More merge from coreutils.
20946
20947         * m4/utimens.m4, m4/utimecmp.m4: New files.
20948         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
20949         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
20950         prereq.m4, sha.m4: Import changes from coreutils.
20951
20952 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
20953
20954         More merge from coreutils.
20955         * modules/raise, modules/readtokens0, modules/utimens:
20956         * modules/utimecmp, module/xnanosleep: New files.
20957         * modules/strftime: Add lib/strftime.h.
20958         Change include from <time.h> to "strftime.h".
20959         * modules/yesno: Add lib/yesno.h.
20960         * modules/backupfile: Remove lib/addext.c.
20961         * modules/euidaccess: Add stat-macros.h.
20962         * modules/canonicalize, modules/euidaccess,
20963         modules/filemode, modules/lchown, modules/makepath,
20964         modules/rmdir, modules/stat: Likewise.
20965
20966 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
20967
20968         Merge from tar.
20969         * lib/argp-help.c (make_hol, hol_append): Don't assume that
20970         SIZE_MAX is a valid preprocessor constant.
20971         (__argp_basename): Change from "#ifndef _LIBC"
20972         to "#ifndef __argp_short_program_name", so that
20973         we don't compile these functions for tar.
20974
20975         More merges from coreutils.
20976         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
20977         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
20978         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
20979         * lib/addext.c: Remove; no longer needed.
20980         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
20981         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
20982         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
20983         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
20984         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
20985         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
20986         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
20987         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
20988         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
20989         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
20990         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
20991         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
20992         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
20993         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
20994         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
20995         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
20996         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
20997         Import changes from coreutils.
20998
20999 2004-08-05  Simon Josefsson  <jas@extundo.com>
21000
21001         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
21002
21003 2004-08-05  Simon Josefsson  <jas@extundo.com>
21004
21005         * m4/getsubopt.m4: New file.
21006
21007 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
21008
21009         Merge from coreutils.
21010
21011         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
21012         * m4/getcwd-path-max.m4: New files.
21013
21014         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
21015         FILESYSTEM_PREFIX_LEN ->
21016         FILE_SYSTEM_PREFIX_LEN.
21017         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
21018         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
21019         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
21020         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
21021
21022         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
21023         prerequisite modules now handle the DOS stuff.
21024         Don't check for unistd.h.
21025
21026 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
21027
21028         Merge from coreutils.
21029
21030         * lib/.gdb-history: Remove; this doesn't belong here.
21031
21032         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
21033         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
21034         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
21035         * lib/getcwd.c: New files.
21036
21037         * lib/dirname.h: Include <stdbool.h>.
21038         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
21039         for consistency with POSIX terminology.  All uses changed.
21040         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
21041         (strip_trailing_slashes): Use bool for booleans.
21042         * lib/stripslash.c (strip_trailing_slashes): Likewise.
21043
21044         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
21045         sometimes returns a positive errno value even when it succeeds.
21046         (print_errno_message) [!LIBC]: Fall back on strerror if
21047         __strerror_r fails.
21048
21049         * lib/path-concat.c (mempcpy): Don't define if a system header defines
21050         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
21051         (longest_relative_suffix): New function.
21052         (path_concat): Use it.  Assume first argument is not NULL.
21053         Port to DOS.  Omit redundant separators.
21054         Report an error instead of returning NULL.
21055         Use mempcpy instead of memcpy.
21056         (xpath_concat): Remove: not declared or used.
21057
21058         * lib/same.h: Include <stdbool.h>
21059         (same_name): Return bool, not int.
21060         * lib/same.c (same_name): Likewise.
21061         (errno): Don't declare; we assume C89 or better now.
21062
21063         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
21064         if not already defined.
21065
21066         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
21067         * lib/dup-safer.c (errno): Likewise.
21068
21069 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
21070
21071         Merge from coreutils.
21072         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
21073         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
21074         * modules/path-concat: Don't depend on strdup.
21075
21076 2004-08-03  Simon Josefsson  <jas@extundo.com>
21077
21078         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
21079         * lib/progname.h: Don't include stdbool.h.
21080
21081 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
21082
21083         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
21084         * MODULES.html.sh (func_all_modules): Remove fatal.
21085
21086 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
21087
21088         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
21089
21090 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
21091
21092         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
21093         working.
21094
21095 2004-08-02  Simon Josefsson  <jas@extundo.com>
21096
21097         * lib/getsubopt.h: New file, with comments from Bruno Haible.
21098         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
21099         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
21100
21101 2004-08-01  Simon Josefsson  <jas@extundo.com>
21102
21103         * lib/xgetdomainname.c: Include stdlib.h, for free().
21104
21105 2004-07-19  Bruno Haible  <bruno@clisp.org>
21106
21107         * MODULES.html.sh (func_all_modules): Add dummy.
21108
21109 2004-07-16  Simon Josefsson  <jas@extundo.com>
21110
21111         * modules/dummy: New file.
21112
21113 2004-07-16  Simon Josefsson  <jas@extundo.com>
21114
21115         * lib/dummy.c: New file.
21116
21117 2004-07-16  Bruno Haible  <bruno@clisp.org>
21118
21119         * lib/backupfile.h: Add extern "C" for C++.
21120         * lib/closeout.h: Likewise.
21121         * lib/copy-file.h: Likewise.
21122         * lib/findprog.h: Likewise.
21123         * lib/full-write.h: Likewise.
21124         * lib/pathname.h: Likewise.
21125         * lib/progname.h: Likewise.
21126         * lib/stpcpy.h: Likewise.
21127         * lib/stpncpy.h: Likewise.
21128         * lib/strcase.h: Likewise.
21129         * lib/strstr.h: Likewise.
21130         * lib/xalloc.h: Likewise.
21131
21132         * lib/mbswidth.h: Add extern "C" for C++.
21133         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
21134
21135 2004-07-13  Robert Millan  <robertmh@gnu.org>
21136
21137         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
21138
21139 2004-07-09  Simon Josefsson  <jas@extundo.com>
21140
21141         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
21142         failed without this.)
21143
21144 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
21145
21146         * modules/chown (Files): Add lib/fchown-stub.c, since
21147         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
21148
21149 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
21150
21151         * lib/fchown-stub.c: New file.
21152
21153 2004-06-24  Jim Meyering  <jim@meyering.net>
21154
21155         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
21156
21157 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
21158
21159         * modules/argz: Omit "#include".
21160
21161         * MODULES.html.sh (func_all_modules): Add calloc, to match
21162         2004-06-01 addition of calloc module.
21163
21164 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
21165
21166         * m4/argz.m4: New file, which is autoupdated from libtool.
21167
21168 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
21169
21170         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
21171         libtool.
21172
21173 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
21174
21175         * config/srclist-update: Don't insist on "USA." before the
21176         close-comment, as libtool omits the period and puts the */ on a
21177         separate line.
21178         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
21179         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
21180
21181 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
21182
21183         * modules/argz: New file.
21184         * MODULES.html.sh (func_all_modules): Add argz.
21185
21186 2004-06-12  Jim Meyering  <jim@meyering.net>
21187         and  Paul Eggert  <eggert@cs.ucla.edu>
21188
21189         * modules/hash (Files): Add lib/xalloc.h.
21190         * modules/pipe (Depends-on): Add wait-process.
21191         * modules/stat (Depends-on): Add xalloc.
21192         * modules/userspec (Files): Add lib/userspec.h.
21193         * modules/xstrto
21194
21195         Upgrade from gettext-0.13.
21196         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
21197         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
21198         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
21199
21200 2004-06-10  Jim Meyering  <jim@meyering.net>
21201
21202         * lib/calloc.c: New file.
21203
21204 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
21205
21206         * lib/getdate.y (yylex): Allow space between sign and number.
21207         Problem reported by Dan Jacobson.
21208
21209 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
21210
21211         Merge from coreutils CVS.
21212
21213         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
21214         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
21215         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
21216         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
21217         xstrtol.m4: Fix copyright date and/or serial number.
21218
21219         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
21220         See if we need an fchown replacement.
21221         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
21222         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
21223         and use the replacement function if we detect either defect.
21224
21225         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
21226         gl_UTIMECMP.
21227
21228 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
21229         and  Jim Meyering  <jim@meyering.net>
21230
21231         Merge from coreutils CVS.
21232
21233         * lib/stat-macros.h: New file, with contents from file-type.h
21234         and coreutils' system.h.
21235         * lib/file-type.c: Include "stat-macros.h".
21236         * lib/file-type.h (file_type): Move all macro definitions to new file,
21237         stat-macros.h.
21238
21239         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
21240         Wrap old code with this conditional.
21241         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
21242         function that does not dereference symlinks.
21243         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
21244
21245         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
21246         dependency problems.
21247         (xreadlink): Accept new arg SIZE, for efficiency.
21248         All decls and uses changed.
21249         * lib/xreadlink.h: Include <stddef.h>, for size_t.
21250
21251         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
21252         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
21253
21254         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
21255         sysexits.h.
21256
21257 2004-06-01  Jim Meyering  <jim@meyering.net>
21258
21259         * m4/calloc.m4: New file.
21260
21261 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
21262
21263         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
21264         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
21265         Also, fix a typo in a diagnostic.
21266
21267 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
21268
21269         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
21270         or AC_FUNC_REALLOC.
21271
21272 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
21273
21274         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
21275         macros to be defined.
21276         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
21277         the allocator returns NULL because the requested size is zero.
21278
21279 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
21280
21281         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
21282         var.  Add comment explaining why libc still defines it.  This
21283         merges the following patch from glibc:
21284         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
21285
21286 2004-05-20  Andreas Schwab  <schwab@suse.de>
21287
21288         * m4/free.m4: Replace free if it not known to work, not the other
21289         way round.
21290
21291 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
21292
21293         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
21294         present in glibc since revision 1.1 of this file.
21295         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
21296         obstack_alignment_mask, obstack_alloc, obstack_base,
21297         obstack_blank, obstack_blank_fast, obstack_chunk_size,
21298         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
21299         obstack_grow0, obstack_init, obstack_int_grow,
21300         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
21301         obstack_next_free, obstack_object_size, obstack_ptr_grow,
21302         obstack_ptr_grow_fast, obstack_room): Remove declarations of
21303         nonexistent functions.
21304
21305 2004-05-18  Karl Berry  <karl@gnu.org>
21306
21307         * config/srclist.txt: break link for vasnprintf.c.
21308
21309 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
21310
21311         Port obstack to the AS/400, where pointers are 16 bytes wide and
21312         you cannot cast an integer to a valid pointer.  This patch is
21313         currently waiting to be integrated into glibc; see
21314         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
21315
21316         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
21317         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
21318         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
21319         (struct obstack): temp member is now a union of a pointer and
21320         an integer, instead of an integer.  All integer uses changed.
21321         This does not affect the physical layout of struct obstack,
21322         except on hosts (like the AS/400) where the size or alignment of
21323         void * is greater than that of ptrdiff_t.
21324         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
21325         __STDC__)]: Store temporary in pointer member of union, not
21326         integer member.
21327         * lib/obstack.c: Include <stddef.h>, for offsetof.
21328         (struct fooalign): Remove; it doesn't need a name.
21329         (union fooround): Change double to long double, and add void *.
21330         (DEFAULT_ALIGNMENT): Use offsetof to compute.
21331         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
21332         not a macro.  Hence the values are always int; so remove all
21333         casts-to-int in uses.
21334
21335 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
21336
21337         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
21338         we can get this patch merged into glibc.
21339
21340 2004-05-17  Derek R. Price  <derek@ximbiot.com>
21341             Paul Eggert  <eggert@cs.ucla.edu>
21342
21343         * m4/argp: Depend on alloca.
21344
21345 2004-05-17  Derek R. Price  <derek@ximbiot.com>
21346             Paul Eggert  <eggert@cs.ucla.edu>
21347
21348         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
21349         freecoding.
21350
21351 2004-05-17  Bruno Haible  <bruno@clisp.org>
21352
21353         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
21354         precision that consists of a '.' followed by an empty digit string.
21355         Patch by Tor Lillqvist <tml@iki.fi>.
21356
21357 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
21358
21359         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
21360         for backward compatibility with older code.  We need our own
21361         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
21362         it under some other name, and our alloca.h will define it.
21363
21364 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
21365             Derek Price  <derek@ximbiot.com>
21366
21367         * lib/alloca.c: Include <alloca.h>, to get our interface.
21368         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
21369         include <alloca.h> first.  Use C89 prototype for alloca; this
21370         requires including <stddef.h> for size_t.  Use extern "C" if C++.
21371         Use #elif for simplicity, since we can assume C89 now.
21372         Don't try to source the system alloca.h since it will not be found
21373         and to prevent recursively including its replacement.
21374         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
21375         * lib/regex.c: Likewise.
21376
21377 2004-05-16  Derek Price  <derek@ximbiot.com>
21378             Paul Eggert  <eggert@cs.ucla.edu>
21379
21380         getline cleanup.  This changes the getndelim2 API: both order of
21381         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
21382         no delimiter).
21383
21384         * lib/getline.c: Don't include stddef.h or stdio.h, since our
21385         interface does that.
21386         (getline): Always use getdelim, so that we don't have two
21387         copies of this code.
21388         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
21389         if available.
21390         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
21391         (GETNDELIM2_MAXIMUM): New macro.
21392         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
21393         instead of the old practice of delim2==0.  All callers changed.
21394         Return -1 on overflow, instead of returning junk.
21395         Do not set *linesize unless allocation succeeds.
21396         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
21397         that we include sys/types.h.
21398         * lib/getnline.h: Likewise.
21399         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
21400         (getndelim2): Reorder arguments.
21401         * lib/getnline.c (getnline, getndelim):
21402         Don't discard the NMAX argument.
21403         (getnline): Invoke getndelim, to avoid code duplication.
21404         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
21405         of (size_t) -1 by callers of the getnline family.
21406
21407 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
21408
21409         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
21410         Check for gettimeofday.
21411         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
21412         Check for settimeofday, stime.
21413
21414 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
21415
21416         * lib/nanosleep.c (suspended): Change its type from int to
21417         sig_atomic_t volatile.
21418         (first_call): Make it private to rpl_nanosleep, and have it
21419         be zero initially as that's a bit faster.
21420         (my_usleep): Round up fractional times instead of truncating them,
21421         as this is the usual meaning for 'sleep'.
21422
21423         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
21424         doesn't work.
21425         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
21426         (ENOSYS): Define if not defined.
21427         (settime): Fall back on stime if it exists and settimeofday fails.
21428         But don't bother with fallbacks if a method fails with errno == EPERM.
21429
21430 2004-05-11  Jim Meyering  <jim@meyering.net>
21431
21432         Prior to this change, the save_cwd caller required read access to the
21433         current directory on most systems (ones with the fchdir function).
21434
21435         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
21436         fails, try write-only, and finally, resort to using xgetcwd.
21437
21438 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
21439
21440         * lib/obstack.c, obstack.h: Import changes from libc.
21441
21442 2004-04-28  Bruno Haible  <bruno@clisp.org>
21443
21444         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
21445         also implicitly appends .exe to executables.
21446         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
21447         accepts Windows pathnames.
21448         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
21449         Treat Cygwin like Windows, since it now accepts Windows pathnames.
21450         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
21451         Treat Cygwin like Windows, since it now accepts Windows pathnames.
21452         Reported by Derek Robert Price <derek@ximbiot.com>.
21453
21454 2004-04-21  Karl Berry  <karl@gnu.org>
21455
21456         * config/srclist.txt (localcharset.c): break sync.
21457
21458 2004-04-20  Paul Eggert  <eggert@twinsun.com>
21459
21460         * m4/host-os.m4: Add a copyright notice.
21461
21462 2004-04-20  Jim Meyering  <jim@meyering.net>
21463
21464         Change UTILS_ to gl_ in AC_DEFINE'd names.
21465         Change utils_- and jm_-prefixed variables, too.
21466         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
21467         UTILS_FUNC_MKDIR_TRAILING_SLASH.
21468         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
21469
21470         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
21471         Don't emit trailing blanks.
21472         Also rename jm_-prefixed variables to have gl_ prefix.
21473
21474         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
21475         Also rename jm_-prefixed variables to have gl_ prefix.
21476
21477         * m4/jm-macros.m4: Reflect the renamings.
21478         * m4/prereq.m4: Likewise.
21479
21480 2004-04-20  Jim Meyering  <jim@meyering.net>
21481
21482         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
21483         memory.
21484
21485 2004-04-20  Jim Meyering  <jim@meyering.net>
21486             Bruno Haible  <bruno@clisp.org>
21487
21488         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
21489         memory when realloc fails.
21490
21491 2004-04-19  Jim Meyering  <jim@meyering.net>
21492
21493         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
21494         now that readutmp.c may call `free (0)'.
21495
21496 2004-04-19  Bruno Haible  <bruno@clisp.org>
21497
21498         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
21499         * m4/inttypes_h.m4: Likewise.
21500         * m4/stdint_h.m4: Likewise.
21501         * m4/intmax_t.m4: Likewise.
21502         * m4/uintmax_t.m4: Likewise.
21503
21504 2004-04-18  Jim Meyering  <jim@meyering.net>
21505
21506         * m4/prereq.m4: Don't forbid jm_ prefix.
21507
21508         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
21509         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
21510         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
21511         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
21512         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
21513         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
21514         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
21515         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
21516         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
21517         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
21518         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
21519         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
21520         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
21521         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
21522         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
21523         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
21524         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
21525         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
21526         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
21527
21528 2004-04-18  Jim Meyering  <jim@meyering.net>
21529
21530         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
21531         failure, don't leak memory and do call END_UTMP_ENT.
21532
21533 2004-04-16  Jim Meyering  <jim@meyering.net>
21534
21535         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
21536         coreutils' stat program.
21537         (gl_PREREQ): Don't require jm_PREREQ_STAT.
21538
21539 2004-04-11  Paul Eggert  <eggert@twinsun.com>
21540
21541         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
21542         C89.
21543         (CHAR_BIT): Remove, since we assume C89.
21544         Include <stdint.h> if available, as per current Autoconf CVS advice.
21545
21546 2004-03-31  Jim Meyering  <jim@meyering.net>
21547
21548         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
21549         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
21550         * m4/xalloc.m4: Likewise.
21551
21552 2004-03-30  Paul Eggert  <eggert@twinsun.com>
21553
21554         Merge from coreutils.
21555
21556         * m4/inttostr.m4: New file.
21557         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
21558         Require AM_STDBOOL_H and gl_TIMESPEC instead.
21559         Require gl_CLOCK_TIME.
21560         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
21561
21562 2004-03-30  Paul Eggert  <eggert@twinsun.com>
21563
21564         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
21565         not bool, to be more consistent with Unix conventions.
21566         Suggested by Bruno Haible.
21567
21568         Merge from coreutils.
21569
21570         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
21571         * lib/umaxtostr.c: New files.
21572
21573         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
21574         the usual <time.h> dance.
21575         (get_date): Change signature to support fractional time stamps.
21576         All callers changed.
21577         * lib/getdate.y: Include "getdate.h" first, as we can now
21578         assume C89 and don't need to worry about 'const'.
21579         Similarly, include "unlocked-io.h" near start, not in middle.
21580         Include <limits.h>.
21581         (textint.value): Use long int rather than int.
21582         (textint.digits): Use size_t rather than int.
21583         (BILLION, LOG10_BILLION): New constants.
21584         (parser_control): New member rel_ns.  Members day_ordinal,
21585         time_zone, month, day, hour, minutes, rel_year, rel_month,
21586         rel_day, rel_hour, rel_minutes, rel_seconds
21587         are now long int, not int.  Member seconds is now struct timespec,
21588         not int.  New member timespec_seen.  Members dates_seen, days_seen,
21589         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
21590         not int.
21591         (%union.intval): Now long int, not int.
21592         New member timespec.
21593         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
21594         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
21595         (spec): Now is a timespec or an item list.
21596         (timespec, items): New nonterminals.
21597         (time, rel, relunit, number, get_date):
21598         Add support for fractional seconds.
21599         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
21600         (gmtime, localtime, mktime): Remove decls; not needed with C89.
21601         (to_hour): First arg is now long int, not int.
21602         (to_year): Returns long int, not int.
21603         Don't treat year -70 like 70.
21604         (tm_diff): Returns long int, not int.
21605         (lookup_word): Use bool instead of int when appropriate.
21606         (yylex): Use size_t for count, not int.
21607         Detect overflow when parsing large integer constants.
21608         Add support for fractions.
21609         (get_date): Make pointers 'const' if possible.
21610         Use more-portable code to detect integer overflow.
21611         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
21612         Don't use ctime; it's not reliable if the year has >4 digits.
21613
21614         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
21615         This is for compatibility with BSD.
21616
21617         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
21618         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
21619         From coreutils' system.h.
21620
21621         * lib/userspec.c: Don't include "posixver.h".
21622         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
21623         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
21624         compatible extension.  Simplify code by removing a boolean int
21625         that was always nonzero if a string was nonnull.
21626
21627 2004-03-30  Jim Meyering  <jim@meyering.net>
21628
21629         Merge from coreutils.
21630
21631         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
21632         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
21633         on some systems one must include <grp.h> before it.
21634         Reported by Christian Krackowizer.
21635
21636 2004-03-30  Jim Meyering  <jim@meyering.net>
21637
21638         Merge from coreutils.
21639
21640         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
21641
21642         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
21643         an empty input stream.
21644
21645         * lib/readtokens.c: Include <stdbool.h>.
21646         (readtoken): Use `size_t' rather than int/long.
21647         All callers adjusted.
21648         Use `bool' rather than `int' where appropriate.
21649         Use memset rather than an explicit loop.
21650         Use x2nrealloc rather than xrealloc.
21651         Allow the use of `\0' as a delimiter.
21652         (readtokens): Likewise.
21653         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
21654
21655 2004-03-30  Jim Meyering  <jim@meyering.net>
21656
21657         * m4/realloc.m4: Remove file, since now it does no more than
21658         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
21659         the `configure.ac' section of module/realloc.
21660         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
21661
21662 2004-03-30  Bruno Haible  <bruno@clisp.org>
21663
21664         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
21665         nonnull.
21666
21667 2004-03-29  Paul Eggert  <eggert@twinsun.com>
21668
21669         Merge changes to getloadavg.c from coreutils and Emacs.
21670
21671         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
21672         Define to an expression, not to the empty string.
21673         Include cloexec.h and xalloc.h.
21674         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
21675         Use set_cloexec_flag rather than rolling our own.
21676         * lib/cloexec.c, lib/cloexec.h: New files.
21677
21678 2004-03-29  Paul Eggert  <eggert@twinsun.com>
21679
21680         * m4/cloexec.m4: New file.
21681
21682 2004-03-18  Paul Eggert  <eggert@twinsun.com>
21683
21684         * lib/getopt.h: Sync with libc CVS.
21685
21686 2004-03-18  Paul Eggert  <eggert@twinsun.com>
21687             Bruno Haible  <bruno@clisp.org>
21688
21689         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
21690         mbswidth.
21691
21692 2004-03-18  Paul Eggert  <eggert@twinsun.com>
21693             Bruno Haible  <bruno@clisp.org>
21694
21695         * lib/mbswidth.h: Include <wchar.h> only if
21696         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
21697         <wchar.h>.
21698         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
21699
21700 2004-03-09  Paul Eggert  <eggert@twinsun.com>
21701
21702         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
21703         Sync with libc CVS.
21704         * lib/getopt_int.h: New file, also synced from libc.
21705
21706 2004-03-09  Paul Eggert  <eggert@twinsun.com>
21707
21708         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
21709         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
21710         Bring back getopt.c, getopt.h, getopt1.c.
21711
21712 2004-03-07  Paul Eggert  <eggert@twinsun.com>
21713
21714         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
21715         All uses changed.  Check for sa_sigaction member; this fixes
21716         a bug first reported by Jason Andrade in
21717         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
21718
21719 2004-03-07  Paul Eggert  <eggert@twinsun.com>
21720
21721         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
21722         '#if' expressions.  Unlike the code it replaces, it does not
21723         depend on (defined _SC_PAGESIZE).  However, it does depend on
21724         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
21725         first reported by Jason Andrade in
21726         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
21727
21728 2004-02-25  Simon Josefsson  <jas@extundo.com>
21729
21730         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
21731
21732 2004-02-25  Simon Josefsson  <jas@extundo.com>
21733
21734         * lib/strdup.h: New file.
21735         * lib/strdup.c: Include it.
21736         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
21737         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
21738
21739 2004-02-23  Karl Berry  <karl@gnu.org>
21740
21741         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
21742         (from fencepost.gnu.org:/gd/gnuorg).
21743
21744 2004-02-23  Karl Berry  <karl@gnu.org>
21745
21746         * config/srclistvars.sh (GNUORG) [karl]: redefine.
21747         * config/srclist.txt: add maintain/standards documents.
21748
21749 2004-02-18  Bruno Haible  <bruno@clisp.org>
21750
21751         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
21752         Reported by Derek Robert Price <derek@ximbiot.com>.
21753
21754 2004-02-16  Karl Berry  <karl@gnu.org>
21755
21756         * config/mkinstalldirs, install-sh: update from automake.
21757
21758 2004-02-06  Karl Berry  <karl@gnu.org>
21759
21760         * m4/po.m4: update from gettext 0.14.1.
21761
21762 2004-02-06  Karl Berry  <karl@gnu.org>
21763
21764         * lib/config.charset: update from gettext 0.14.1.
21765
21766 2004-02-05  Paul Eggert  <eggert@twinsun.com>
21767
21768         Add comments and code, prompted by suggestions from Bruno Haible
21769         for sh-quote.
21770         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
21771         describing the enum quoting_style values.
21772         * lib/quotearg.c (quotearg_alloc): New function.
21773         (quotearg_buffer_restyled): Treat lone { and } as special.
21774         Treat = as special.  Work around bug with older shells
21775         that "see" a '\' that is really the 2nd byte of a multibyte char.
21776         Quote empty string with shell_quoting_style.
21777
21778 2004-02-03  Bruno Haible  <bruno@clisp.org>
21779
21780         * m4/pipe.m4: New file, from GNU gettext.
21781
21782 2004-02-03  Bruno Haible  <bruno@clisp.org>
21783
21784         * lib/pipe.h: New file, from GNU gettext.
21785         * lib/pipe.c: New file, from GNU gettext.
21786
21787 2004-01-27  Bruno Haible  <bruno@clisp.org>
21788
21789         * m4/execute.m4: New file, from GNU gettext.
21790
21791 2004-01-27  Bruno Haible  <bruno@clisp.org>
21792
21793         * lib/execute.h: New file, from GNU gettext.
21794         * lib/execute.c: New file, from GNU gettext.
21795         * lib/w32spawn.h: New file, from GNU gettext.
21796
21797 2004-01-24  Paul Eggert  <eggert@twinsun.com>
21798
21799         Merge from diffutils.
21800
21801         * lib/file-type.c (file_type): Add typed memory objects.
21802         * lib/file-type.h (S_TYPEISTMO): New macro.
21803
21804         * lib/c-stack.h (c_stack_action): Remove argv argument.
21805         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
21806         (die): Don't calculate message unless segv_action returns.
21807         (get_stack_location, min_address_from_argv, max_address_from_argv,
21808         volatile stack_base, volatile_stack_size): Remove.
21809         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
21810         that every segmentation violation is a stack overflow.  (Ouch!)
21811         See Debian bug 136249 (still outstanding) for more info about why
21812         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
21813
21814 2004-01-24  Paul Eggert  <eggert@twinsun.com>
21815
21816         Exit-status fix from coreutils.
21817
21818         Use exit_failure consistently in place of EXIT_FAILURE,
21819         so that program exit statuses are consistent on failure.
21820
21821         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
21822         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
21823         * lib/argmatch.h: Comment fix to match the above.
21824         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
21825         Now a macro referring to exit_failure, instead of a separate
21826         variable.  Include "exitfail.h" to get it.
21827         * lib/xstrtol.h: Include "exitfail.h".
21828         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
21829
21830         * lib/long-options.c (parse_long_options): Use prototype
21831         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
21832         for clarity.
21833
21834 2004-01-21  Jim Meyering  <jim@meyering.net>
21835
21836         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
21837         so as not to conflict with a different-sized __mktime_internal
21838         function in GNU libc.
21839         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
21840         Problem building statically-linked `ls' reported by Michael Brunnbauer.
21841
21842 2004-01-20  Karl Berry  <karl@gnu.org>
21843
21844         * config/config.guess: update from config.
21845
21846         * config/srclistvars.sh: GNUWWWLICENSES for karl.
21847
21848 2004-01-20  Bruno Haible  <bruno@clisp.org>
21849
21850         Safer stack allocation.
21851         * lib/setenv.c: Include allocsa.h.
21852         (alloca): Remove fallback definition.
21853         (freea): Remove macro.
21854         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
21855         instead of freea.
21856
21857 2004-01-20  Bruno Haible  <bruno@clisp.org>
21858
21859         * m4/eealloc.m4: New file, from GNU gettext.
21860
21861 2004-01-20  Bruno Haible  <bruno@clisp.org>
21862
21863         * m4/allocsa.m4: New file, from GNU gettext.
21864
21865 2004-01-20  Bruno Haible  <bruno@clisp.org>
21866
21867         * lib/xallocsa.h: New file, from GNU gettext.
21868         * lib/xallocsa.c: New file, from GNU gettext.
21869
21870 2004-01-20  Bruno Haible  <bruno@clisp.org>
21871
21872         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
21873
21874 2004-01-20  Bruno Haible  <bruno@clisp.org>
21875
21876         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
21877         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
21878         specially.
21879
21880 2004-01-20  Bruno Haible  <bruno@clisp.org>
21881
21882         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
21883         patch.
21884
21885 2004-01-20  Bruno Haible  <bruno@clisp.org>
21886
21887         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
21888
21889 2004-01-20  Bruno Haible  <bruno@clisp.org>
21890
21891         * lib/eealloc.h: New file.
21892
21893 2004-01-20  Bruno Haible  <bruno@clisp.org>
21894
21895         * lib/binary-io.h: Avoid warnings on Cygwin.
21896
21897 2004-01-20  Bruno Haible  <bruno@clisp.org>
21898
21899         * lib/allocsa.h: New file, from GNU gettext.
21900         * lib/allocsa.c: New file, from GNU gettext.
21901
21902 2004-01-18  Karl Berry  <karl@gnu.org>
21903
21904         * doc/gpl.texi, doc/lgpl.texi: new files.
21905
21906 2004-01-18  Karl Berry  <karl@gnu.org>
21907
21908         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
21909         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
21910
21911 2004-01-15  Paul Eggert  <eggert@twinsun.com>
21912
21913         Merge from coreutils.
21914
21915         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
21916         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
21917         (gl_DEFAULT_POSIX2_VERSION): Move
21918         the documentation from 'configure' into 'config.hin',
21919         so that 'configure --help' isn't burdened by it and
21920         we don't have to worry about its formatting there.
21921         Reword the documentation so that it's more succinct
21922         and can be run together into a single paragraph.
21923         * m4/same.m4 (gl_SAME): Check for pathconf.
21924
21925 2004-01-15  Paul Eggert  <eggert@twinsun.com>
21926
21927         Merge from coreutils.
21928
21929         * lib/posixver.c: Include posixver.h.
21930
21931         * lib/same.c: Include <stdbool.h>, <limits.h>.
21932         (_POSIX_NAME_MAX): Define if not defined.
21933         (MIN): New macro.
21934         (same_name): If file names are silently truncated, report
21935         that the file names are the same if they are the same after
21936         the silent truncation.
21937
21938         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
21939         conversion function.
21940         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
21941         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
21942         longer needed.
21943
21944 2004-01-15  Jim Meyering  <jim@meyering.net>
21945
21946         Merge from coreutils.
21947
21948         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
21949         if no library is required.
21950         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
21951         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
21952         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
21953         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
21954         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
21955         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
21956         value, $ac_cv_search_crypt, if it's "none required".
21957         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
21958         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
21959         not gl_FUNC_GETLOADAVG.
21960         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
21961         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
21962
21963 2004-01-15  Jim Meyering  <jim@meyering.net>
21964
21965         Merge from coreutils.
21966
21967         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
21968         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
21969         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
21970
21971         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
21972         optional configure-time default.
21973
21974         * lib/version-etc.c (version_etc_copyright): Update copyright date.
21975
21976         * lib/xreadlink.c (xreadlink): Correct outdated comment.
21977
21978 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
21979
21980         Merge from coreutils.
21981
21982         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
21983         value, $ac_cv_search_nanosleep, if it's "none required".
21984
21985 2004-01-14  Paul Eggert  <eggert@twinsun.com>
21986
21987         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
21988         with like-named macro in fnmatch.c.
21989         (EXT): Use an internal constant instead.
21990
21991         Merge fnmatch patches from glibc.
21992         * lib/fnmatch.c (mbsinit): Remove define.
21993         Add libc_hidden_ver (__fnmatch, fnmatch).
21994         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
21995         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
21996
21997 2004-01-14  Karl Berry  <karl@gnu.org>
21998
21999         * config/install-sh: update from automake.
22000
22001 2004-01-13  Karl Berry  <karl@gnu.org>
22002
22003         * config/install-sh: update from automake.
22004
22005 2004-01-09  Karl Berry  <karl@gnu.org>
22006
22007         * config/install-sh: update from automake.
22008
22009 2004-01-05  Karl Berry  <karl@gnu.org>
22010
22011         * config/config.{sub,guess}: update from config.
22012
22013 2003-12-31  Karl Berry  <karl@gnu.org>
22014
22015         * config/depcomp: update from automake.
22016
22017 2003-12-14  Karl Berry  <karl@gnu.org>
22018
22019         * lib/config.charset: update from gettext-runtime.
22020
22021 2003-12-03  Paul Eggert  <eggert@twinsun.com>
22022
22023         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
22024         Bug reported by Alfred M. Szmidt.
22025
22026 2003-12-03  Bruno Haible  <bruno@clisp.org>
22027
22028         * m4/gettext.m4: Upgrade from gettext-0.13.
22029         * m4/po.m4: Upgrade from gettext-0.13.
22030         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
22031         * m4/intmax.m4: New file, from gettext-0.13.
22032         * m4/printf-posix.m4: New file, from gettext-0.13.
22033
22034 2003-11-29  Karl Berry  <karl@gnu.org>
22035
22036         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
22037
22038 2003-11-25  Paul Eggert  <eggert@twinsun.com>
22039             Bruno Haible  <bruno@clisp.org>
22040
22041         * lib/printf-parse.h: Don't include sys/types.h.
22042         (ARG_NONE): New macro.
22043         (char_directive): Change type of *arg_index fields to size_t.
22044         * lib/printf-parse.c: Don't include sys/types.h.
22045         (SSIZE_MAX): Remove macro.
22046         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
22047         Remove unnecessary overflow check.
22048         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
22049         fields.
22050
22051 2003-11-25  Bruno Haible  <bruno@clisp.org>
22052
22053         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
22054
22055 2003-11-25  Bruno Haible  <bruno@clisp.org>
22056
22057         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
22058         gt_TYPE_SSIZE_T.
22059
22060 2003-11-24  Paul Eggert  <eggert@twinsun.com>
22061
22062         * modules/alloca: Remove dependency on xalloc.
22063
22064 2003-11-24  Paul Eggert  <eggert@twinsun.com>
22065
22066         * lib/alloca.c: Remove dependency on xalloc module.
22067         (xalloc_die): Remove.
22068         (memory_full) [!defined emacs]: New macro.
22069         [!defined emacs]: Don't include xalloc.h.
22070         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
22071         address arithmetic overflows.  Change datatypes a bit to avoid
22072         unnecessary casts.
22073
22074 2003-11-22  Jim Meyering  <jim@meyering.net>
22075
22076         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
22077         s/size/size_t/.
22078
22079 2003-11-21  Karl Berry  <karl@gnu.org>
22080
22081         * config/config.{sub,guess}: update from config.
22082
22083 2003-11-18  Karl Berry  <karl@gnu.org>
22084
22085         * config/config.{sub,guess}: update from config.
22086
22087         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
22088
22089 2003-11-17  Paul Eggert  <eggert@twinsun.com>
22090
22091         * README: Mention that S+T cannot overflow if S is the size of
22092         an existing object and T is sufficiently small.
22093
22094 2003-11-17  Jim Meyering  <jim@meyering.net>
22095
22096         On systems without utime and without a utimes function capable of
22097         dealing with a NULL struct utimbuf* argument, this utime replacement
22098         could -- in unusual circumstances -- leak a file descriptor.
22099         * lib/utime.c: Include <unistd.h> and <errno.h>.
22100         (utime_null): Be sure to close `fd' and to preserve errno.
22101         Reported by Geoff Collyer via Arnold Robbins.
22102
22103 2003-11-17  Bruno Haible  <bruno@clisp.org>
22104
22105         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
22106         (Depends-on): Add xsize.
22107
22108 2003-11-17  Bruno Haible  <bruno@clisp.org>
22109
22110         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
22111
22112 2003-11-17  Bruno Haible  <bruno@clisp.org>
22113
22114         * lib/vasnprintf.c (alloca): Remove fallback definition.
22115         (freea): Remove definition.
22116         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
22117         Reported by Paul Eggert.
22118
22119 2003-11-16  Paul Eggert  <eggert@twinsun.com>
22120             Bruno Haible  <bruno@clisp.org>
22121
22122         Protect against address arithmetic overflow.
22123         * lib/printf-args.h: Include stddef.h.
22124         (arguments): Change type of field 'count' to size_t.
22125         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
22126         'unsigned int' where appropriate.
22127         * lib/printf-parse.h: Include sys/types.h.
22128         (char_directive): Change type of *arg_index fields to ssize_t.
22129         (char_directives): Change type of fields 'count', max_*_length to
22130         size_t.
22131         * lib/printf-parse.c: Include sys/types.h and xsize.h.
22132         (SSIZE_MAX): Define fallback value.
22133         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
22134         instead of 'int' where appropriate. Check a_allocated, d_allocated
22135         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
22136         * lib/vasnprintf.c: Include xsize.h.
22137         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
22138         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
22139         overflow. Avoid wraparound when converting a width or precision from
22140         decimal to binary.
22141
22142 2003-11-16  Bruno Haible  <bruno@clisp.org>
22143
22144         Update from GNU gettext.
22145         * lib/printf-parse.c: Generalize to it can be compiled for wide
22146         strings.
22147         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
22148         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
22149         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
22150         SNPRINTF): New macros.
22151         Don't include <alloca.h> if the file is used inside libintl.
22152         (local_wcslen): New function, for Solaris 2.5.1.
22153         (VASNPRINTF): Use it instead of wcslen.
22154
22155 2003-11-16  Bruno Haible  <bruno@clisp.org>
22156
22157         * lib/xsize.h (xmax): New function.
22158         (xsum, xsum3, xsum4): Declare as "pure" functions.
22159
22160 2003-11-12  Paul Eggert  <eggert@twinsun.com>
22161
22162         * modules/xalloc (Files): Undo latest change, since xalloc.h
22163         no longer needs SIZE_MAX or PTRDIFF_MAX.
22164
22165 2003-11-12  Paul Eggert  <eggert@twinsun.com>
22166
22167         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
22168         gl_PTRDIFF_MAX.
22169
22170 2003-11-12  Paul Eggert  <eggert@twinsun.com>
22171
22172         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
22173         "return", to pacify some unknown compiler.  Problem reported
22174         by Joerg Schilling.
22175
22176 2003-11-12  Paul Eggert  <eggert@twinsun.com>
22177
22178         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
22179         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
22180         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
22181         heuristic is just as accurate as far as we know, and it removes a
22182         dependency on size_max.m4 and ptrdiff_max.m4.
22183
22184 2003-11-11  Bruno Haible  <bruno@clisp.org>
22185
22186         * modules/xsize (Files): Add m4/size_max.m4.
22187         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
22188
22189 2003-11-11  Bruno Haible  <bruno@clisp.org>
22190
22191         * m4/size_max.m4: New file.
22192         * m4/ptrdiff_max.m4: New file.
22193         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
22194         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
22195         (gl_XALLOC): Invoke it.
22196
22197 2003-11-11  Bruno Haible  <bruno@clisp.org>
22198
22199         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
22200         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
22201         defined.
22202
22203 2003-11-10  Paul Eggert  <eggert@twinsun.com>
22204
22205         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
22206         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
22207         rejected some allocations of exactly SIZE_MAX - 2 bytes.
22208         From Bruno Haible.
22209         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
22210         not (size_t) -1, since it's defined here.
22211
22212 2003-11-09  Karl Berry  <karl@gnu.org>
22213
22214         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
22215
22216 2003-11-06  Paul Eggert  <eggert@twinsun.com>
22217
22218         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
22219         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
22220         Reject sizes of exactly SIZE_MAX bytes.
22221         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
22222         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
22223
22224 2003-11-05  Bruno Haible  <bruno@clisp.org>
22225
22226         * lib/xsize.h: Include limits.h, to avoid a possible collision with
22227         SIZE_MAX defined in <limits.h> on Solaris.
22228
22229 2003-11-04  Jim Meyering  <jim@meyering.net>
22230
22231         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
22232         variable names, rather than @VAR@.
22233         * modules/poll: Likewise.
22234
22235 2003-11-04  Bruno Haible  <bruno@clisp.org>
22236
22237         * modules/xsize: New file.
22238         * modules/linebreak: Depend on xsize.
22239         * MODULES.html.sh (func_all_modules): Add xsize.
22240
22241 2003-11-04  Bruno Haible  <bruno@clisp.org>
22242
22243         * m4/xsize.m4: New file.
22244
22245 2003-11-04  Bruno Haible  <bruno@clisp.org>
22246
22247         * lib/xsize.h: New file.
22248         * lib/linebreak.c: Include xsize.h.
22249         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
22250         argument for overflow.
22251         Suggested by Paul Eggert.
22252
22253 2003-11-03  Karl Berry  <karl@gnu.org>
22254
22255         * config/config.{guess,sub}: update from config.
22256
22257 2003-11-03  Jim Meyering  <jim@meyering.net>
22258
22259         * modules/userspec (lib_SOURCES): Add userspec.h.
22260         (Include): Add "userspec.h".
22261         Improve description.
22262
22263 2003-11-03  Jim Meyering  <jim@meyering.net>
22264
22265         * lib/userspec.c: Include "userspec.h".
22266         * lib/userspec.h: New file.
22267
22268 2003-11-03  Bruno Haible  <bruno@clisp.org>
22269
22270         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
22271
22272 2003-11-03  Bruno Haible  <bruno@clisp.org>
22273
22274         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
22275         available, to avoid (extremely rare) race condition.
22276         Suggested by Paul Eggert.
22277
22278 2003-11-02  Karl Berry  <karl@gnu.org>
22279
22280         * config/srclist.txt (vasprintf.c): sync broken, sigh.
22281
22282 2003-10-31  Paul Eggert  <eggert@twinsun.com>
22283
22284         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
22285         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
22286         (read_filesystem_list): Set and use me_type_malloced.
22287         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
22288         whatever the type happens to be), for brevity and consistency.
22289         Check for size calculation overflow on Alphas running OSF/1.
22290
22291 2003-10-31  Jim Meyering  <jim@meyering.net>
22292
22293         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
22294
22295         * lib/linebuffer.c: Include <string.h> for declaration of memset.
22296
22297 2003-10-30  Paul Eggert  <eggert@twinsun.com>
22298             Bruno Haible  <bruno@clisp.org>
22299
22300         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
22301         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
22302
22303 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
22304
22305         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
22306         netbsd*-gnu*.  Suggested by Robert Millan.
22307
22308 2003-10-29  Paul Eggert  <eggert@twinsun.com>
22309
22310         * modules/group-member: Depend on stdbool.
22311
22312 2003-10-29  Paul Eggert  <eggert@twinsun.com>
22313
22314         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
22315
22316 2003-10-29  Paul Eggert  <eggert@twinsun.com>
22317
22318         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
22319         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
22320         after the 'gnu' in these cases.  This fixes some bugs in the
22321         previous change, and is based on suggestions by Robert Millan.
22322
22323 2003-10-29  Paul Eggert  <eggert@twinsun.com>
22324
22325         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
22326         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
22327         no longer needed.
22328         * lib/quotearg.c (quotearg_n_options): Use it.
22329         * lib/group-member.c: Include <stdbool.h>.
22330         (free_group_info): Arg is now const *; don't free arg.
22331         (get_group_info): Now returns bool and accepts struct group_info *,
22332         rather than returning a malloc'ed struct group_info *.
22333         All uses changed.  Check for overflow in internal size calculation.
22334
22335         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
22336         rather than xmalloc/xrealloc.
22337         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
22338         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
22339         conformance bug: the old code used a pointer after freeing the
22340         storage that it addressed.
22341         * lib/hash.c (hash_initialize): Simplify the code by using
22342         xalloc_oversized rather than doing it by hand.
22343         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
22344         the buffer preserved.  Use free and xmalloc instead.
22345         * lib/quotearg.c (quotearg_n_options): Likewise.
22346         Use a simpler test for size overflow.  Don't use xalloc_oversized
22347         because unsigned int might be wider than size_t (!); this suggests
22348         that we should switch from unsigned int to size_t for slot numbers.
22349
22350 2003-10-28  Paul Eggert  <eggert@twinsun.com>
22351
22352         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
22353         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
22354         NetBSD kernels.  Requested by Richard Stallman.
22355
22356 2003-10-27  Paul Eggert  <eggert@twinsun.com>
22357
22358         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
22359         to allocate the returned structure.  Do not allocate a subarray,
22360         as x2nrealloc will do that.
22361         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
22362         instead of xnrealloc.
22363         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
22364
22365 2003-10-27  Bruno Haible  <bruno@clisp.org>
22366
22367         * lib/stdbool_.h: Better support for BeOS.
22368
22369 2003-10-26  Paul Eggert  <eggert@twinsun.com>
22370
22371         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
22372         now uses inline.
22373
22374 2003-10-26  Paul Eggert  <eggert@twinsun.com>
22375
22376         * lib/xalloc.h (xalloc_oversized): New static inline function, for
22377         callers that want to do their own size-overflow checking.  Include
22378         <stdbool.h>, since xalloc_oversized returns bool.
22379         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
22380         to use xalloc_oversized.
22381
22382         Add two functions x2realloc, x2nrealloc, for programs that grow
22383         arrays dynamically by doubling their sizes.
22384         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
22385         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
22386         New functions.
22387
22388         Port to C99 semantics for 'inline' of external functions.
22389         Bug reported by Bruno Haible.
22390         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
22391         with the old contents of xnmalloc.
22392         (xnmalloc, xmalloc): Use it.
22393         (xnrealloc_inline): New static inline function,
22394         with the old contents of xnrealloc.
22395         (xnrealloc, xrealloc): Use it.
22396
22397         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
22398         that.
22399
22400 2003-10-26  Karl Berry  <karl@gnu.org>
22401
22402         * config/srclist.txt (COPYING.DOC): no longer available from
22403         /gd/gnuorg; don't know where the ultimate source is.
22404
22405 2003-10-25  Paul Eggert  <eggert@twinsun.com>
22406
22407         Fix several address-calculation bugs in the hash modules,
22408         plus some minor code cleanup.
22409
22410         * lib/hash.h: Include <stdbool.h>, for bool.
22411         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
22412         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
22413         hash_get_n_entries, hash_get_max_bucket_length,
22414         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
22415         hash_rehash): Use size_t rather than unsigned.
22416         * lib/hash.c (struct hash_table, hash_get_n_buckets,
22417         hash_get_n_buckets_used, hash_get_n_entries,
22418         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
22419         hash_get_entries, hash_do_for_each, hash_string, is_prime,
22420         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
22421         Likewise.
22422         (SIZE_MAX): Define if not defined.
22423         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
22424         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
22425         hash_print):
22426         Use const * when possible.
22427         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
22428         (check_tuning): Fix bug: if tuning parameters were very close to
22429         0 or 1, rounding errors could have caused subscript violations.
22430         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
22431         (hash_initialize): Add 'fail:' label
22432         to free table and return NULL, and use it to simplify code.
22433         Use calloc rather than clearing the storage ourself.
22434         (hash_initialize, hash_rehash): Check for arithmetic overflow in
22435         buffer size calculations.
22436         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
22437         Include <stddef.h>, for size_t.
22438         * lib/hash-pjw.c (hash_pjw): Likewise.
22439         Switch to method described by Bruno Haible.
22440         Include <limits.h>, for CHAR_BIT.
22441         (SIZE_BITS): New macro.
22442
22443 2003-10-23  Paul Eggert  <eggert@twinsun.com>
22444
22445         * m4/getline.m4 (AM_FUNC_GETLINE):
22446         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
22447         hosts.  Problem reported by Derek Robert Price in
22448         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
22449         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
22450         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
22451
22452 2003-10-21  Paul Eggert  <eggert@twinsun.com>
22453
22454         * lib/getndelim2.c (getndelim2): When size calculation overflows,
22455         ceiling the allocation at NMAX bytes rather than silently
22456         discarding input bytes before NMAX is reached.  This makes
22457         a difference only if NMAX exceeds SIZE_MAX / 2.
22458
22459         * lib/obstack.c: Merge from glibc.
22460         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
22461         Add libc_hidden_def (_obstack_newchunk).
22462         (_obstack_free) [! defined _LIBC]: Remove.
22463         [defined _LIBC]: Make a strong alias from obstack_free, rather than
22464         a clone of the function body.
22465         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
22466         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
22467
22468         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
22469         glibc.
22470         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
22471         arg to memcpy.
22472
22473         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
22474         (obstack_ptr_grow_fast, obstack_int_grow_fast):
22475         Don't use lvalue casts, as GCC plans to remove support for them
22476         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
22477         was also present in the non-GCC version, indicating that this
22478         code had always been buggy and had never been widely used.
22479         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
22480         Use the fast variant of each macro, rather than copying the
22481         definiens of the fast variant; that way, we'll be more likely to
22482         catch future bugs in the fast variants.
22483
22484 2003-10-20  Bruno Haible  <bruno@clisp.org>
22485
22486         * modules/wait-process: New file.
22487         * MODULES.html.sh (func_all_modules): Add wait-process.
22488
22489 2003-10-20  Bruno Haible  <bruno@clisp.org>
22490
22491         * m4/wait-process.m4: New file.
22492
22493 2003-10-20  Bruno Haible  <bruno@clisp.org>
22494
22495         * lib/wait-process.h: New file, from GNU gettext.
22496         * lib/wait-process.c: New file, from GNU gettext.
22497
22498 2003-10-19  Jim Meyering  <jim@meyering.net>
22499
22500         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
22501         HPUX 10.20.
22502
22503 2003-10-18  Karl Berry  <karl@gnu.org>
22504
22505         * config/config.guess: update from config.
22506
22507 2003-10-16  Paul Eggert  <eggert@twinsun.com>
22508
22509         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
22510         (getgroups): First arg is int, not size_t.
22511         Don't let 'free' mangle errno.
22512
22513 2003-10-16  Paul Eggert  <eggert@twinsun.com>
22514
22515         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
22516
22517 2003-10-16  Karl Berry  <karl@gnu.org>
22518
22519         * config/config.{guess,sub}: update from config.
22520
22521 2003-10-16  Jim Meyering  <jim@meyering.net>
22522
22523         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
22524         memcpy.
22525
22526 2003-10-15  Paul Eggert  <eggert@twinsun.com>
22527
22528         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
22529         (SIZE_MAX): Remove.
22530         (new_exclude, add_exclude_file): Initial size no longer needs to
22531         be a power of 2.
22532         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
22533         our own address arithmetic overflow checking.
22534
22535         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
22536         (fnmatch): Do not alloca more than 2000 wide characters;
22537         instead, use malloc for large buffers.
22538         Check for address arithmetic overflow, and return -1
22539         with errno set to ENOMEM in that case.
22540         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
22541         (NEW_PATTERN): Do not alloca more than 8000 bytes;
22542         instead, return -1.  Check for address arithmetic overflow.
22543
22544 2003-10-14  Paul Eggert  <eggert@twinsun.com>
22545
22546         Handle invalid suffixes and overflow independently, so that
22547         callers can treat them independently as needed.  Fix some bugs in
22548         suffix handling, e.g., "100k@" was not diagnosed as an invalid
22549         suffix for a human-readable blocksize.  The major caller-visible
22550         change is the addition of a new
22551         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
22552         that both overflow and suffix chars were found.
22553
22554         * lib/human.c (humblock): Don't check separately for invalid suffix
22555         char; that is xstrtoumax's job (now that its bug is fixed).
22556         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
22557         INTMAX_MAX]: New macros.
22558         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
22559         TYPE_MAXIMUM): New macros.
22560         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
22561         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
22562         if overflow occurs, as it's what __strtol does and it's more useful
22563         in practice.
22564         (__xstrtol): If __strtol reports some error other than ERANGE,
22565         reflect it to the caller as LONGINT_INVALID.  If it reports
22566         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
22567         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
22568         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
22569         value.
22570         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
22571         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
22572         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
22573         [defined UINTMAX_MAX]: New macros.
22574
22575 2003-10-14  Bruno Haible  <bruno@clisp.org>
22576
22577         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
22578
22579 2003-10-14  Bruno Haible  <bruno@clisp.org>
22580
22581         * m4/sig_atomic_t: New file, from GNU gettext.
22582         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
22583
22584 2003-10-14  Bruno Haible  <bruno@clisp.org>
22585
22586         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
22587         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
22588         Also use volatile where needed.
22589
22590 2003-10-12  Paul Eggert  <eggert@twinsun.com>
22591
22592         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
22593         Change maintainer from Bruno Haible to 'all'.
22594
22595 2003-10-12  Paul Eggert  <eggert@twinsun.com>
22596
22597         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
22598
22599 2003-10-12  Paul Eggert  <eggert@twinsun.com>
22600
22601         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
22602         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
22603         and define in terms of the other primitives.
22604         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
22605         (SIZE_MAX): Define if not already defined.
22606         (array_size_overflow): New function.
22607         (xalloc_die): Abort instead of exiting if 'error' returns.
22608         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
22609         (xmalloc, xrealloc): Use them.
22610         (xcalloc): Check for address arithmetic overflow.
22611         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
22612         a bit faster than strcpy.
22613
22614 2003-10-10  Simon Josefsson  <jas@extundo.com>
22615
22616         * modules/argp (Depends-on): Add restrict and strcase.
22617
22618 2003-10-10  Simon Josefsson  <jas@extundo.com>
22619
22620         * m4/argp.m4: Add AC_C_INLINE.
22621
22622 2003-10-08  Paul Eggert  <eggert@twinsun.com>
22623
22624         Merge getpass from libc, plus a few fixes.
22625
22626         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
22627         Include <stdbool.h>.
22628         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
22629         __fsetlocking to empty.
22630         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
22631         do include <bits/libc-lock.h>.
22632         Do not include <fcntl.h>; not needed.
22633         [_LIBC]: Include <wchar.h>.
22634         (NOTCANCEL_MODE): New macro.
22635         (flockfile, funlockfile) [_LIBC]: New macros.
22636         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
22637         [!_LIBC]: New macros.
22638         (call_fclose): New function.
22639         (getpass): Use it.  Save tty stream separately; this simplifies the
22640         code and makes it more reliable if stdin happens to equal stdout.
22641         Invoke __fsetlocking on tty.
22642         Handle thread cancellation if needed.
22643         Namespace cleanup (use __tcgetattr, __getline).
22644         Use bool for Booleans.
22645         [USE_IN_LIBIO]: Handle wide streams.
22646         [!_LIBC]: Unconditionally do the fseek, since we don't know what
22647         stream might go where.
22648
22649         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
22650         doesn't have to include <stdio.h> before us.
22651         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
22652         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
22653         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
22654         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
22655         if not declared, so that we can use getpass.c code from libc without
22656         rewriting it.
22657         (flockfile, ftrylockfile, funlockfile): New macros.
22658
22659 2003-10-08  Paul Eggert  <eggert@twinsun.com>
22660
22661         * modules/getpass: Depend on stdbool.
22662
22663 2003-10-08  Paul Eggert  <eggert@twinsun.com>
22664
22665         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
22666
22667 2003-10-07  Karl Berry  <karl@gnu.org>
22668
22669         * config/config.{guess,sub}: update from config.
22670
22671 2003-10-06  Jim Meyering  <jim@meyering.net>
22672             Bruno Haible  <bruno@clisp.org>
22673
22674         This lets translators provide better translations for the
22675         "Written by ..." part of --version output.
22676         * lib/version-etc.h: Include stdarg.h.
22677         (version_etc_copyright): Declare as readonly.
22678         (version_etc): Make this function variadic with a NULL-terminated list
22679         of author name strings.
22680         (version_etc_va): New declaration.
22681         * lib/version-etc.c: Include stdarg.h, stdlib.h.
22682         (version_etc_copyright): Declare as readonly.
22683         (version_etc_va): New function. Provide a different translatable string
22684         for each possible number of authors < 10. Abbreviate when there are 10
22685         authors or more.
22686         (version_etc): Make this function variadic. Call version_etc_va.
22687         Suggestion from Gary V. Vaughan.
22688
22689         * lib/long-options.h (parse_long_options): Change prototype: the
22690         authors string is moved to the end and becomes variadic.
22691         * lib/long-options.c: Include stdarg.h.
22692         (parse_long_options): Make this function variadic, too.
22693         Call version_etc_va, not version_etc.
22694
22695 2003-10-06  Bruno Haible  <bruno@clisp.org>
22696
22697         * modules/version-etc-2: Remove file.
22698         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
22699
22700 2003-10-06  Bruno Haible  <bruno@clisp.org>
22701
22702         * modules/fatal-signal: New file.
22703         * MODULES.html.sh (func_all_modules): Add fatal-signal.
22704
22705 2003-10-06  Bruno Haible  <bruno@clisp.org>
22706
22707         * m4/fatal-signal.m4: New file.
22708         * m4/signalblocking.m4: New file, from GNU gettext.
22709
22710 2003-10-06  Bruno Haible  <bruno@clisp.org>
22711
22712         * lib/version-etc-2.h: Remove file.
22713         * lib/version-etc-2.c: Remove file.
22714
22715 2003-10-06  Bruno Haible  <bruno@clisp.org>
22716
22717         * lib/fatal-signal.h: New file, from GNU gettext.
22718         * lib/fatal-signal.c: New file, from GNU gettext.
22719
22720 2003-10-05  Paul Eggert  <eggert@twinsun.com>
22721
22722         * README: Rework advice for preventing empty .o files.
22723         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
22724         not <sys/types.h>.
22725
22726 2003-10-04  Karl Berry  <karl@gnu.org>
22727
22728         * lib/argp*: update from libc.
22729
22730 2003-10-04  Karl Berry  <karl@gnu.org>
22731
22732         * config/config.{guess,sub}: update from config.
22733
22734 2003-10-02  Bruno Haible  <bruno@clisp.org>
22735
22736         * modules/lchown (Include): Add lchown.h.
22737         * modules/time_r (Include): Use "..." syntax.
22738         * modules/xgetdomainname (Include): Add xgetdomainname.h.
22739
22740 2003-10-01  Simon Josefsson  <jas@extundo.com>
22741
22742         * MODULES.html.sh (func_all_modules): Move gethostname from section
22743         'based on' to section 'lacking' POSIX:2001.
22744
22745 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
22746
22747         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
22748         to output mode on the same stream.
22749
22750 2003-09-29  Paul Eggert  <eggert@twinsun.com>
22751
22752         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
22753         Fix arg typo in previous patch.
22754
22755 2003-09-28  Jim Meyering  <jim@meyering.net>
22756
22757         * lib/error.c: Correct cpp indentation.
22758
22759 2003-09-27  Paul Eggert  <eggert@twinsun.com>
22760
22761         * modules/free: New file.
22762
22763 2003-09-27  Paul Eggert  <eggert@twinsun.com>
22764
22765         * m4/free.m4: New file.
22766
22767 2003-09-27  Paul Eggert  <eggert@twinsun.com>
22768
22769         * lib/minmax.h (MIN, MAX)
22770         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
22771         Omit the special code that used __typeof__, since we worry that
22772         it could be more trouble than it's worth.  See:
22773         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
22774         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
22775
22776         * lib/free.c: New file.
22777
22778 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
22779
22780         Trivial fixes to Makefile.am parts of module listings.
22781         * modules/strstr: Append strstr.h to lib_SOURCES.
22782         * modules/strcase: Likewise, for strcase.h.
22783
22784 2003-09-27  Karl Berry  <karl@gnu.org>
22785
22786         * config/mkinstalldirs: update from automake.
22787
22788 2003-09-26  Paul Eggert  <eggert@twinsun.com>
22789
22790         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
22791         (error_tail): Do not loop, reallocating temporary buffer, since
22792         the output cannot contain more wide characters than the input
22793         contains bytes, the size must be big enough already.  This avoids
22794         one potential size overflow calculation.  Check for size overflow
22795         when calculating temporary buffer size.  Free temporary buffer
22796         when done, if it was allocated with malloc; this plugs a memory
22797         leak.  Remove casts from void * to pointers, that are no longer
22798         needed now that we're assuming C89 or better.
22799
22800         Merge error changes from glibc.
22801
22802         * lib/error.c, error.h: Update copyright notice header to match glibc.
22803         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
22804         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
22805         Disable cancellation while printing error.
22806         * lib/error.h: Prepend __ to parameter names.
22807
22808 2003-09-26  Jim Meyering  <jim@meyering.net>
22809
22810         * lib/error.c (error_tail): Move some declarations
22811         into inner scope where the local variables are used.
22812
22813 2003-09-26  Bruno Haible  <bruno@clisp.org>
22814
22815         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
22816         stpncpy().
22817         Don't define stpncpy through config.h; it's now done through stpncpy.h.
22818
22819 2003-09-26  Bruno Haible  <bruno@clisp.org>
22820
22821         * lib/stpncpy.h (gnu_stpncpy): New declaration.
22822         (stpncpy): Define as alias for gnu_stpncpy.
22823         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
22824
22825 2003-09-25  Simon Josefsson  <jas@extundo.com>
22826
22827         * lib/xgetdomainname.h: New file.
22828         * lib/xgetdomainname.c: New file.
22829
22830 2003-09-25  Simon Josefsson  <jas@extundo.com>
22831             Bruno Haible  <bruno@clisp.org>
22832
22833         * modules/getdomainname: New file.
22834         * modules/xgetdomainname: New file.
22835         * MODULES.html.sh (func_all_modules): Add getdomainname,
22836         xgetdomainname.
22837
22838 2003-09-25  Simon Josefsson  <jas@extundo.com>
22839             Bruno Haible  <bruno@clisp.org>
22840
22841         * m4/getdomainname.m4: New file.
22842
22843 2003-09-25  Simon Josefsson  <jas@extundo.com>
22844             Bruno Haible  <bruno@clisp.org>
22845
22846         * lib/getdomainname.h: New file.
22847         * lib/getdomainname.c: New file.
22848
22849 2003-09-25  Karl Berry  <karl@gnu.org>
22850
22851         * lib/argp-fmtstream.c, argp-help.c: update from libc.
22852
22853 2003-09-25  Karl Berry  <karl@gnu.org>
22854
22855         * config/install-sh: update from automake.
22856
22857 2003-09-25  Bruno Haible  <bruno@clisp.org>
22858
22859         * modules/version-etc-2: New file, from modules/version-etc with
22860         modifications.
22861         * MODULES.html.sh (func_all_modules): Add version-etc-2.
22862
22863 2003-09-25  Bruno Haible  <bruno@clisp.org>
22864
22865         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
22866         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
22867
22868 2003-09-24  Simon Josefsson  <jas@extundo.com>
22869
22870         * modules/xgethostname: Add xgethostname.h.
22871
22872 2003-09-24  Paul Eggert  <eggert@twinsun.com>
22873
22874         * lib/linebuffer.c (freebuffer): Don't free the argument, just
22875         the buffer associated with the argument.  Bug reported by
22876         Simon Josefsson.
22877
22878 2003-09-24  Paul Eggert  <eggert@twinsun.com>
22879
22880         * README: Document assumptions that 'int' is at least 32 bits
22881         wide, that integer arithmetic is 2's complement without overflow,
22882         that there are no holes in integer values, that adding sizes of
22883         two nonoverlapping objects can't overflow, and that all-bits-zero
22884         yields scalar zero.  Fix spelling and capitalization typos.
22885
22886 2003-09-19  Karl Berry  <karl@gnu.org>
22887
22888         * lib/argp.h: update from libc.
22889
22890 2003-09-17  Paul Eggert  <eggert@twinsun.com>
22891
22892         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
22893         to avoid spurious warnings like "AC_RUN_IFELSE was called before
22894         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
22895
22896 2003-09-17  Paul Eggert  <eggert@twinsun.com>
22897
22898         * gnulib-tool: Use "test -h", not "test -L", for portability
22899         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
22900         (tags_regexp): Remove, since \| doesn't conform to POSIX.
22901         (sed_extract_prog): Issue s commands one-by-one, rather than
22902         using \| in one s command.
22903
22904 2003-09-16  Paul Eggert  <eggert@twinsun.com>
22905
22906         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
22907         input error, instead of returning NULL the next time we are called
22908         (and therefore losing track of errno).
22909
22910 2003-09-16  Bruno Haible  <bruno@clisp.org>
22911
22912         * gnulib-tool (func_create_testdir): Warn about duplicated
22913         dependencies.
22914
22915 2003-09-15  Paul Eggert  <eggert@twinsun.com>
22916
22917         * modules/argmatch, modules/fatal, modules/obstack,
22918         modules/xalloc, modules/xgethostname: Sort dependencies by
22919         importance, not alphabetically.
22920
22921 2003-09-15  Paul Eggert  <eggert@twinsun.com>
22922
22923         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
22924         fails, so that the caller gets the proper errno.
22925
22926         * lib/readutmp.c (read_utmp): Likewise.
22927         Check for fstat error.  Close stream and free storage
22928         when failing.
22929
22930 2003-09-14  Karl Berry  <karl@gnu.org>
22931
22932         * config/srclist.txt (strdup.c): disable for c89 changes.
22933
22934 2003-09-14  Jim Meyering  <jim@meyering.net>
22935
22936         * lib/getloadavg.c: Correct cpp indentation.
22937         * lib/strdup.c: Likewise.
22938         * lib/vasnprintf.c: Likewise.
22939
22940 2003-09-14  Bruno Haible  <bruno@clisp.org>
22941
22942         * modules/fwriteerror: New file.
22943         * MODULES.html.sh (func_all_modules): Add fwriteerror.
22944
22945 2003-09-14  Bruno Haible  <bruno@clisp.org>
22946
22947         * lib/fwriteerror.h: New file.
22948         * lib/fwriteerror.c: New file.
22949
22950 2003-09-12  Paul Eggert  <eggert@twinsun.com>
22951
22952         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
22953         modules/xgethostname, modules/xalloc: Depend on exit.
22954
22955 2003-09-12  Paul Eggert  <eggert@twinsun.com>
22956
22957         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
22958
22959         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
22960         and AC_MINIX, too, so that their extensions are available.
22961
22962         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
22963         This macro has been superseded by gl_BACKUPFILE.
22964
22965         More patches to assume C89 or better.
22966
22967         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
22968
22969         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
22970         unconditionally.
22971         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
22972         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
22973         Include <string.h>, <stdlib.h> unconditionally.
22974         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
22975         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
22976         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
22977         headers or for string.h.
22978         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
22979         or strtoul.
22980
22981         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
22982         headers.
22983         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
22984         * m4/userspec.m4 (gl_USERSPEC): Likewise.
22985         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
22986         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
22987         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
22988         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
22989         memcpy, memset.
22990         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
22991         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
22992         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
22993         strtol.
22994         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
22995         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
22996         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
22997         strtoul.
22998
22999 2003-09-12  Paul Eggert  <eggert@twinsun.com>
23000
23001         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
23002         * lib/obstack.c [!defined _LIBC]: Likewise.
23003         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
23004         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
23005         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
23006
23007         More changes to assume C89 or better.
23008
23009         * lib/error.c (error_tail): Assume vprintf.
23010
23011         * lib/argmatch.c (getenv): Remove decl.
23012         * lib/progreloc.c (get_full_program_name): Define via prototype.
23013         * lib/setenv.c (clearenv): Likewise.
23014         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
23015         needed.
23016         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
23017         (malloc, memcpy): Remove decls.
23018         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
23019         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
23020         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
23021         (memcpy): Remove macro.
23022         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
23023         (__P): Remove.  All uses removed.
23024         (PTR): Remove.  All uses changed to void *.
23025         (CHAR_BIT, NULL): Remove.
23026         (spaces, zeros, memset_space, memset_zero)
23027         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
23028         Remove.
23029         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
23030         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
23031         Define with prototype.
23032         Remove now-unnecessary prototype decl.
23033         (extra_args_spec): Assume ANSI C.  All uses changed.
23034         (extra_args_spec_iso): Remove.
23035         (my_strftime, emacs_strftimeu): Define via prototype.
23036         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
23037         unconditionally.
23038         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
23039         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
23040         (strtoul, strtol): Remove decls.
23041         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
23042         LONG_MAX): Remove.
23043         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
23044         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
23045         (LOCALE_PARAM_PROTO): New macro.
23046         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
23047         (INTERNAL (strtol), strtol): Define with a prototype.
23048         (PARAMS): Remove.  All uses removed.
23049         * lib/tempname.c: Include <string.h> unconditionally.
23050         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
23051         * lib/xgethostname.c (main): Define with a prototype.
23052         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
23053         Include <stdlib.h> unconditionally.
23054         (calloc, malloc, realloc, free): Remove decls.
23055         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
23056         Include <stdlib.h> unconditionally.  Sort include file names.
23057         (strtod): Remove.
23058         (xstrtod): Define with a prototype.
23059         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
23060         (strtol, strtoul): Remove decls.
23061
23062 2003-09-11  Paul Eggert  <eggert@twinsun.com>
23063
23064         More patches to assume C89 or better.
23065         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
23066         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
23067         string.h, memchr, STDC_HEADERS.
23068
23069 2003-09-11  Paul Eggert  <eggert@twinsun.com>
23070
23071         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
23072         Include <stdlib.h>, <string.h> unconditionally.
23073         Remove now-unnecessary cast to char *.
23074         * lib/strnlen.c: Include <string.h> unconditionally.
23075         * lib/yesno.c (yesno): Define with a prototype.
23076
23077 2003-09-11  Bruno Haible  <bruno@clisp.org>
23078
23079         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
23080
23081 2003-09-10  Jim Meyering  <jim@meyering.net>
23082
23083         * lib/error.c: Correct indentation of cpp directives.
23084
23085 2003-09-10  Bruno Haible  <bruno@clisp.org>
23086
23087         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
23088         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
23089         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
23090         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
23091         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
23092         <stdlib.h> and <string.h> checks.
23093         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
23094         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
23095
23096 2003-09-10  Bruno Haible  <bruno@clisp.org>
23097
23098         * lib/strcspn.c: Include <string.h> unconditionally.
23099         * lib/strpbrk.c: Include <string.h> unconditionally.
23100         * lib/strstr.c: Include <string.h> unconditionally.
23101         * lib/unicodeio.c: Include <string.h> unconditionally.
23102         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
23103         * lib/unsetenv.c: Likewise.
23104         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
23105         * lib/yesno.c: Include <stdlib.h> unconditionally.
23106         (rpmatch): Add prototype.
23107
23108 2003-09-09  Paul Eggert  <eggert@twinsun.com>
23109
23110         More patches to assume C89 or better.
23111         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
23112         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
23113         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
23114         or for string.h.
23115         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
23116         stdlib.h.
23117         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
23118         C headers.
23119         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
23120         string.h.
23121         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
23122         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
23123         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
23124         or for string.h.
23125         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
23126         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
23127         C headers.
23128         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
23129         memcpy.
23130         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
23131         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
23132         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
23133         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
23134         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
23135         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
23136         string.h, free.
23137         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
23138         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
23139         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
23140         C headers, or for string.h.
23141         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
23142         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
23143         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
23144         headers, memory.h, stdlib.h, string.h, strings.h.
23145         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
23146         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
23147         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
23148         strchr.
23149         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
23150         headers, memory.h, string.h.
23151         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
23152         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
23153         free.
23154         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
23155         headers.
23156         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
23157         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
23158         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
23159         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
23160         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
23161
23162 2003-09-09  Paul Eggert  <eggert@twinsun.com>
23163
23164         More K&R removal.
23165
23166         * lib/acosl.c (main): Use a prototype.
23167         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
23168         tanl.c: Likewise.
23169
23170         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
23171
23172         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
23173         (getopt, etopt_long, getopt_long_only, _getopt_internal)
23174         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
23175         with a prototype.
23176         * lib/getopt.c (const): Remove macro.
23177         Include <string.h> unconditionally.
23178         (my_index): Remove; all uses changed to strchr.
23179         (strlen): Remove decl.
23180         (exchange): Remove forward decl; no longer needed.
23181         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
23182         Define with prototype.
23183         * lib/getopt1.c (const): Remove macro.
23184         (getopt_long, getopt_long_only, main): Define with prototype.
23185
23186         * lib/getugroups.c: Include <string.h> unconditionally.
23187
23188         * lib/getusershell.c: Include <stdlib.h> unconditionally.
23189         (getusershell, setusershell, endusershell, readname, main):
23190         Define with prototypes.
23191
23192         * lib/group-member.c: Include group-member.h first.
23193         Include <stdlib.h> unconditionally.
23194
23195         * lib/hard-locale.c: Include hard-locale.h first.
23196         Include <stdlib.h>, <string.h> unconditionally.
23197
23198         * lib/hash.c (free, malloc): Remove decls.
23199         Include <stdlib.h> unconditionally.
23200
23201         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
23202         (getenv): Do not declare.
23203
23204         * lib/idcache.c: Include <string.h> unconditionally.
23205
23206         * lib/long-options.c: Include long-options.h first, to test interface.
23207         Include <stdlib.h> unconditionally.
23208
23209         * lib/makepath.c: Include makepath.h first, to test interface.
23210         Include <stdlib.h> and <string.h> unconditionally.
23211
23212         * lib/linebuffer.c: Include <stdlib.h>.
23213         (free): Remove decl.
23214
23215         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
23216         stddef.h. rpl_malloc returns void *, not char *.
23217         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
23218         prototype.
23219
23220         * lib/md5.h: Include <limits.h> unconditionally.
23221         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
23222         (__P): Remove; all uses removed.
23223         * lib/md5.c: Include "md5.h" first.
23224         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
23225         md5_buffer, md5_process_bytes, md5_process_block):
23226         Define with prototypes.
23227         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
23228         * lib/sha.c: Include "sha.h" first.
23229         Include <stdlib.h>, <string.h> unconditionally.
23230
23231         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
23232         * lib/memcmp.c (__ptr_t): Likewise.
23233         * lib/memrchr.c (__ptr_t): Likewise.
23234         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
23235         Include <string.h> unconditionally.
23236         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
23237         * lib/memchr.c: Include <stdlib.h> unconditionally.
23238         * lib/memchr.c (LONG_MAX): Remove.
23239         * lib/memrchr.c (LONG_MAX): Likewise.
23240         * lib/memchr.c (__memchr): Define via a prototype.
23241         * lib/memrchr.c (__memrchr): Likewise.
23242         * lib/memcmp.c (__P): Remove, and remove all uses.
23243         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
23244         Remove forward decls; no longer needed.
23245         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
23246         Use types required by C89 in prototype.
23247
23248         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
23249         * lib/savedir.c: Likewise.
23250         * lib/mkdir.c (free): Remove decl.
23251         * lib/rmdir.c (rmdir): Define with a prototype.
23252         * lib/savedir.c: Include savedir.h first, to test interface.
23253
23254         * lib/mktime.c (STDC_HEADERS): Remove.
23255         Include <stdlib.h>, <string.h> unconditionally.
23256
23257         * lib/modechange.c: Include <stdlib.h> unconditionally.
23258         (malloc): Remove decl.
23259
23260         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
23261         (free): Remove decl.
23262
23263         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
23264         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
23265         (This type really should be intptr_t, but that's a C99ism.)
23266         (_obstack_memcpy): Remove: all uses changed to memcpy.
23267         Include <string.h> unconditionally.
23268         (struct obstack): Assume __STDC__ for types of members
23269         chunkfun, freefun, extra_arg.
23270         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
23271         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
23272         obstack_begin, obstack_specify_allocation,
23273         obstack_specify_allocation_with_arg, obstack_chunkfun,
23274         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
23275         Remove unprototyped decls and the macros that use them.
23276         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
23277         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
23278         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
23279         (defined __STDC__ && __STDC__)]:
23280         Remove nonprototyped code.
23281         Include <stdlib.h> unconditionally.
23282         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
23283         _obstack_allocated_p, _obstack_free, obstack_free,
23284         _obstack_memory_used, print_and_abort):
23285         Define using prototypes.
23286         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
23287         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
23288         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
23289         obstack_next_free, obstack_object_size, obstack_room) [0]:
23290         Remove unused, unprototyped code.
23291
23292         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
23293
23294         * lib/physmem.c (physmem_total, physmem_available, main): Define
23295         with prototypes.
23296
23297         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
23298         (main): Define with a prototype.
23299
23300         * lib/posixver.c (getenv): Remove decl.
23301
23302         * lib/putenv.c (malloc): Returns void *, not char *.
23303         Include <string.h> unconditionally.
23304         (strchr, memcpy, NULL): Do not define.
23305
23306         * lib/readtokens.c: Include readtokens.h first, to test interface.
23307         Include <stdlib.h>, <string.h> unconditionally.
23308         (init_tokenbuffer): Define with a prototype.
23309
23310         * lib/regex.c (PARAMS): Remove.  All uses removed.
23311         All uses of _RE_ARGS removed, too.
23312         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
23313         unconditionally.
23314         (bzero): Assume memset exists.
23315         (memcmp, memcpy, NULL): Remove.
23316         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
23317         char, or assignments to local vars of type signed char.
23318         (init_syntax_once, PREFIX(extract_number_and_incr),
23319         PREFIX(print_partial_compiled_pattern),
23320         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
23321         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
23322         PREFIX(regex_grow_registers), PREFIX(regex_compile),
23323         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
23324         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
23325         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
23326         wcs_compile_range, byte_compile_range, truncate_wchar,
23327         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
23328         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
23329         count_mbs_length, wcs_re_match_2_internal,
23330         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
23331         PREFIX(alt_match_null_string_p),
23332         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
23333         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
23334         regfree, PREFIX(extract_number)): Define with prototype.  Remove
23335         now-unnecessary declaration, if any.
23336         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
23337         regcomp, regexec):
23338         Remove now-unnecessary casts among pointer types.
23339         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
23340
23341         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
23342         (free): Remove decl.
23343
23344         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
23345
23346         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
23347         (free): Remove decl.
23348
23349         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
23350         * lib/xgetcwd.c: Likewise.
23351
23352         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
23353         (free): Remove decl.
23354
23355         * lib/strchrnul.c (strchrnul): Define with a prototype.
23356         Fix bug: c_in was not converted to char before searching.
23357
23358         The following changes are not K&R related:
23359
23360         * lib/group-member.h: Include <sys/types.h>, so that this file is
23361         self-contained.
23362         * lib/makepath.h: Likewise.
23363
23364         * lib/getusershell.c (readname, default_index, line_size, readname):
23365         Use size_t, not int, for sizes.
23366         (readname): If the size overflows, report an error instead of
23367         looping forever.
23368
23369 2003-09-09  Paul Eggert  <eggert@twinsun.com>
23370
23371         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
23372         libc.
23373
23374 2003-09-09  Paul Eggert  <eggert@twinsun.com>
23375
23376         * README: New section: portability guidelines.
23377
23378 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
23379
23380         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
23381         C89 spec.
23382
23383 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
23384
23385         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
23386
23387 2003-09-08  Paul Eggert  <eggert@twinsun.com>
23388
23389         Assume C89 or better; remove K&R cruft.
23390         A few of these changes were first proposed by Derek Robert Price
23391         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
23392
23393         * lib/addext.c: Include <string.h> unconditionally.
23394         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
23395         Don't declare getenv or malloc.
23396
23397         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
23398         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
23399         (NULL): Remove.
23400         (find_stack_direction, alloca): Use prototypes.
23401
23402         * lib/atexit.c (atexit): Define using a prototype.
23403
23404         * lib/basename.c, dirname.c, stripslash.c:
23405         Include <string.h> unconditionally.
23406
23407         * lib/bcopy.c: Include <stddef.h>.
23408         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
23409
23410         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
23411
23412         * lib/error.h (error, error_at_line, error_print_progname)
23413         [! (defined (__STDC__) && __STDC__)]: Remove decls.
23414         * lib/error.c: Include error.h first, to check interface.
23415         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
23416         (VA_START): Remove; all uses changeed to va_start.
23417         (exit, strerror): Remove decls.
23418         (error_print_progname): Prototype uncondionally.
23419         Don't include <errno.h>; no longer needed.
23420         (private_strerror): Remove.
23421         (error_tail): Always define.
23422         (error, error_at_line): Assume C89 or better; always use prototypes.
23423         * lib/fatal.c: Include "fatal.h" first, to test interface.
23424         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
23425         (VA_START): Remove; all uses changed to va_start.
23426         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
23427         this case.
23428         (exit): Remove decl.
23429         (fatal): Prototype unconditionally.  Assume va_start works.
23430         Abort at end, to pacify gcc.
23431
23432         * lib/euidaccess.c (main): Define with a prototype.
23433
23434         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
23435
23436         * lib/exitfail.c: Include <stdlib.h> unconditionally.
23437
23438         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
23439         prototypes.
23440         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
23441         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
23442         (getenv): Remove decl.
23443         (fnmatch): Define using a prototype.
23444         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
23445         (FCT): Define using a prototype.
23446
23447         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
23448
23449         * lib/gethostname.c: Include <stddef.h>.
23450         (gethostname): Define with prototype.  Length is size_t, not int.
23451
23452 2003-09-08  Paul Eggert  <eggert@twinsun.com>
23453
23454         Assume C89 or better; remove K&R cruft.
23455         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
23456         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
23457         string.h, getenv, malloc.
23458         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
23459         headers.
23460         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
23461         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
23462         do not check for strerror.
23463         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
23464         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
23465         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
23466         do not check for doprnt or vprintf.
23467         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
23468         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
23469
23470 2003-09-08  Paul Eggert  <eggert@twinsun.com>
23471
23472         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
23473         getversion.c should have been removed then, but was accidentally
23474         preserved.
23475
23476         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
23477         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
23478
23479 2003-09-08  Karl Berry  <karl@gnu.org>
23480
23481         * config/config.sub, config.guess, srclistvars.sh: update from savannah
23482                 config, forget about prep.
23483
23484         * config/depcomp, missing: update from automake.
23485
23486 2003-09-07  Paul Eggert  <eggert@twinsun.com>
23487
23488         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
23489         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
23490
23491 2003-09-07  Paul Eggert  <eggert@twinsun.com>
23492
23493         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
23494         copy_tm_result.  Bug reported by Simon Josefsson in
23495         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
23496
23497 2003-09-06  Paul Eggert  <eggert@twinsun.com>
23498
23499         * m4/time_r.m4: New file.
23500         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
23501         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
23502         is. Check for timegm declaration.
23503         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
23504         Do not check for gmtime_r.
23505         Replace mktime if __mktime_internal does not exist and if mktime
23506         hasn't been replaced already.
23507
23508 2003-09-06  Paul Eggert  <eggert@twinsun.com>
23509
23510         * lib/time_r.c, lib/time_r.h: New files.
23511
23512         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
23513         __localtime_r.
23514         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
23515         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
23516
23517         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
23518         __gmtime_r.
23519         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
23520         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
23521         Include <time_r.h>.
23522
23523         * lib/timegm.c: Switch to glibc implementation, with the following
23524         changes:
23525         [defined HAVE_CONFIG_H]: Include <config.h>.
23526         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
23527         (__mktime_internal) [!defined _LIBC]: New decl.
23528         (__gmtime_r) [!defined _LIBC]: New macro and function.
23529         (timegm): Use a prototype, since gnulib assumes C89.
23530         Do not bother declaring tmp to be const, as it's not really usefu.
23531         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
23532         (timegm): Declare only if HAVE_DECL_TIMEGM.
23533
23534 2003-09-06  Paul Eggert  <eggert@twinsun.com>
23535
23536         * MODULES.html.sh (func_all_modules): Add time_r.
23537         * modules/time_r: New file.
23538         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
23539         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
23540
23541 2003-09-03  Paul Eggert  <eggert@twinsun.com>
23542
23543         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
23544         Bug reported by Lute Kamstra in
23545         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
23546
23547         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
23548         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
23549         course with correspondingly smaller numbers for tomorrow and
23550         yesterday.  From Tadayoshi Funaba.  Originally installed into
23551         sh-utils on 1999-08-07, but the patch got lost (I guess during the
23552         coreutils merge?).
23553
23554 2003-08-31  Simon Josefsson  <jas@extundo.com>
23555
23556         * modules/timegm: New file.
23557         * MODULES.html.sh (func_all_modules): Add timegm.
23558
23559 2003-08-31  Simon Josefsson  <jas@extundo.com>
23560
23561         * m4/timegm.m4: New file.
23562
23563 2003-08-31  Simon Josefsson  <jas@extundo.com>
23564
23565         * lib/timegm.h: New file.
23566         * lib/timegm.c: New file.  Based on
23567         wget-1.8.2/src/http.c:mktime_from_utc.
23568
23569 2003-08-31  Karl Berry  <karl@gnu.org>
23570
23571         * lib/argp.h: update from libc.
23572
23573 2003-08-28  Bruno Haible  <bruno@clisp.org>
23574
23575         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
23576         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
23577         followed by '#define fnmatch fnmatch_posix' gives an error.
23578
23579 2003-08-28  Bruno Haible  <bruno@clisp.org>
23580
23581         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
23582         warning on QNX, which defines O_BINARY to 000000.
23583
23584 2003-08-27  Jim Meyering  <jim@meyering.net>
23585
23586         * m4/mkstemp.m4: Require that the system mkstemp be able to create
23587         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
23588         would fail after 32.  Reported by Danny Levinson.  Details here:
23589         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
23590
23591 2003-08-24  Bruno Haible  <bruno@clisp.org>
23592
23593         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
23594         MSVC7 <stdio.h> is included later.
23595
23596 2003-08-22  Simon Josefsson  <jas@extundo.com>
23597
23598         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
23599
23600 2003-08-20  Karl Berry  <karl@gnu.org>
23601
23602         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
23603
23604 2003-08-20  Bruno Haible  <bruno@clisp.org>
23605
23606         * modules/progname: New file.
23607         * MODULES.html.sh (func_all_modules): Add progname.
23608
23609 2003-08-20  Bruno Haible  <bruno@clisp.org>
23610
23611         * lib/progname.h: New file, from GNU gettext.
23612         * lib/progname.c: New file, from GNU gettext.
23613         * lib/progreloc.c: New file, from GNU gettext.
23614
23615 2003-08-19  Jim Meyering  <jim@meyering.net>
23616
23617         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
23618         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
23619
23620 2003-08-19  Bruno Haible  <bruno@clisp.org>
23621
23622         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
23623         more.
23624
23625 2003-08-19  Bruno Haible  <bruno@clisp.org>
23626
23627         * lib/xstrdup.c: Assume <string.h> exists.
23628
23629 2003-08-18  Paul Eggert  <eggert@twinsun.com>
23630
23631         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
23632         in makefile rules.
23633
23634 2003-08-18  Jim Meyering  <jim@meyering.net>
23635
23636         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
23637         * m4/lib-ld.m4: Likewise.
23638
23639 2003-08-18  Jim Meyering  <jim@meyering.net>
23640
23641         * lib/setenv.h: Indent nested cpp directive.
23642         * lib/vasnprintf.c: Remove trailing blanks.
23643
23644 2003-08-17  Simon Josefsson  <jas@extundo.com>
23645
23646         * modules/xstrndup: New file.
23647         * MODULES.html.sh (func_all_modules): Add xstrndup.
23648
23649 2003-08-17  Simon Josefsson  <jas@extundo.com>
23650
23651         * modules/argp: Fix autoconf macro name. Add more dependencies.
23652
23653 2003-08-17  Simon Josefsson  <jas@extundo.com>
23654
23655         * m4/xstrndup.m4: New file.
23656
23657 2003-08-17  Simon Josefsson  <jas@extundo.com>
23658
23659         * m4/argp.m4: New file.
23660
23661 2003-08-17  Simon Josefsson  <jas@extundo.com>
23662             Bruno Haible  <bruno@clisp.org>
23663
23664         * lib/xstrndup.h: New file.
23665         * lib/xstrndup.c: New file.
23666
23667 2003-08-17  Bruno Haible  <bruno@clisp.org>
23668
23669         * modules/strndup (Files, Include): Add lib/strndup.h.
23670
23671 2003-08-17  Bruno Haible  <bruno@clisp.org>
23672
23673         * modules/euidaccess (Files): Add lib/euidaccess.h.
23674
23675 2003-08-17  Bruno Haible  <bruno@clisp.org>
23676
23677         * lib/strndup.h: New file.
23678
23679 2003-08-17  Bruno Haible  <bruno@clisp.org>
23680
23681         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
23682         like AC_GNU_SOURCE.
23683         * modules/extensions (configure.ac): Comment out the invocation of
23684         gl_USE_SYSTEM_EXTENSIONS.
23685
23686 2003-08-16  Paul Eggert  <eggert@twinsun.com>
23687
23688         Merges from coreutils, etc.
23689         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
23690         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
23691         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
23692         fixing a typo.
23693         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
23694         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
23695
23696 2003-08-16  Paul Eggert  <eggert@twinsun.com>
23697
23698         Document merge from coreutils.
23699         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
23700         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
23701         * modules/utime: Add m4/utimes-null.m4.
23702
23703 2003-08-16  Paul Eggert  <eggert@twinsun.com>
23704
23705         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
23706         space, undoing this 2003-08-12 change:
23707         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
23708
23709 2003-08-16  Paul Eggert  <eggert@twinsun.com>
23710
23711         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
23712         strtoul.c from libc, undoing this 2003-08-12 change:
23713         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
23714
23715 2003-08-16  Jim Meyering  <jim@meyering.net>
23716
23717         Merges from coreutils.
23718         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
23719         prefix.  Adjust cache variables similarly.  Create 500 rather than
23720         just 300 files, to exercise bug on Darwin6.5, too.
23721         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
23722         $missing_dir.
23723         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
23724         AM_SYS_POSIX_TERMIOS.
23725         Reported by mkc@mathdogs.com.
23726         Also change use of $am_cv_sys_posix_termios
23727         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
23728         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
23729         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
23730         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
23731         in /proc/mounts until it finds one with matching device number.  This
23732         is unnecessary when the FILE argument *is* a mount point.  No stat call
23733         is necessary in that case.  So, disable the statvfs-testing code on
23734         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
23735         as RedHat bug# 84846.
23736         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
23737         to 1MB, so as not to render systems with no stack size limit (e.g.,
23738         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
23739         Include <unistd.h>.  On some systems,
23740         it is required for the definition of _SC_PAGESIZE.
23741
23742 2003-08-16  Jim Meyering  <jim@meyering.net>
23743
23744         Merge from coreutils.
23745         * lib/xstrtoimax.c: #else #if -> #elif.
23746         * lib/xstrtoumax.c: Likewise.
23747
23748 2003-08-16  Jim Meyering  <jim@meyering.net>
23749
23750         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
23751         * m4/utimes.m4: Removed.
23752         * m4/utimes-null.m4: Renamed from utimes.m4.
23753
23754         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
23755         to 1MB, so as not to render systems with no stack size limit (e.g.,
23756         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
23757         Include <unistd.h>.  On some systems,
23758         it is required for the definition of _SC_PAGESIZE.
23759
23760 2003-08-16  Jim Meyering  <jim@meyering.net>
23761         and Paul Eggert  <eggert@cs.ucla.edu>
23762
23763         Merges from coreutils, etc.
23764
23765         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
23766         using the latest version from cvs.  This avoids problems with #line
23767         directives using a vendor (Sun) compiler.
23768         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
23769         Don't set GETGROUPS_LIB here; now it's
23770         done via getgroups.m4's wrapper function.
23771         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
23772         rather than just in sh-util/configure.in, so that the
23773         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
23774         same.
23775         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
23776         AC_FUNC_GETLOADAVG where to find getloadavg.c.
23777         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
23778         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
23779         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
23780         Remove code that is now done by the newly-required macros.
23781         Append $(EXEEXT) to DF_PROG.
23782         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
23783         Do not invoke or require the following here,
23784         since prereq.m4 or some gnulib .m4 now does this for us:
23785         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
23786         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
23787         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
23788         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
23789         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
23790         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
23791         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
23792         AC_FUNC_OBSTACK.
23793         Do not replace the following functions, as this is now the job
23794         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
23795         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
23796         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
23797         atexit getpass, strdup, getpagesize.
23798         Replace 'raise'.
23799         Do not check for the following functions, as this is now the job
23800         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
23801         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
23802         setregid.
23803         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
23804         Check for sys/sysctl.h.
23805         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
23806         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
23807         of checking for ssize_t ourselves.
23808
23809         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
23810         Require every macro that gnulib/modules/* suggests for us.
23811         (jm_PREREQ_ADDEXT): New macro.
23812         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
23813         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
23814
23815         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
23816         (gl_PHYSMEM): Use it.
23817         Also check for `table' function.
23818         Check for new headers and functions.
23819         Add check for sys/sysmp.h.
23820         With suggestions from Kaveh Ghazi.
23821         Ignore headers that are present but cannot be compiled.  This
23822         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
23823         C 5.4.
23824
23825 2003-08-15  Paul Eggert  <eggert@twinsun.com>
23826
23827         Document merge from coreutils.
23828         * modules/userspec: Depend on posixver.
23829         * modules/strftime: Depend on tzset.
23830
23831 2003-08-15  Paul Eggert  <eggert@twinsun.com>
23832
23833         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
23834         rather than tab, after '#' in shell-script copyright notices.
23835         Suggested by Bruno Haible.
23836
23837 2003-08-15  Paul Eggert  <eggert@twinsun.com>
23838
23839         * config/srclist-update: Use three spaces, rather than tab, after '#'
23840         in shell-script copyright notices.  Suggested by Bruno Haible.
23841         Remove unnecessary parenthesization in regular expression.
23842
23843 2003-08-15  Jim Meyering  <jim@meyering.net>
23844
23845         Merge from coreutils.
23846         * lib/xgethostname.c: Include <stdlib.h>.
23847         (xghostname): Don't exit for anything other than memory-related
23848         failure; just return NULL.
23849         * lib/userspec.c: Include "posixver.h".
23850         (parse_user_spec): Accept `.' as a separator only
23851         in pre-POSIX-200112 mode.
23852         * lib/strtoimax.c: Use #elif rather than #else #if.
23853         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
23854         Remove function, now that we can rely on a working tzset function.
23855         [!_LIBC]: Ensure that the required autoconf test has been run.
23856         [!defined _NL_CURRENT && HAVE_STRFTIME]:
23857         Use underlying_strftime for %r.
23858         * lib/sha.c: Merge in some clean-up and optimization changes from
23859         glibc.
23860         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
23861         Ensure that it is a multiple of 64.
23862         Rearrange loop exit tests so as to avoid performing an
23863         additional fread after encountering an error or EOF.
23864         * lib/realloc.c: Update copyright date.
23865
23866 2003-08-15  Jim Meyering  <jim@meyering.net>
23867         and Paul Eggert  <eggert@twinsun.com>
23868
23869         Merge from coreutils.
23870         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
23871         member but strut utmpx does not.  Needed for AIX 4.3.3.
23872         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
23873
23874 2003-08-15  Jim Meyering  <jim@meyering.net>
23875         and Paul Eggert  <eggert@cs.ucla.edu>
23876
23877         Merges from coreutils, etc.
23878         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
23879         Require gl_FUNC_TZSET_CLOBBER.
23880         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
23881         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
23882         members.
23883
23884 2003-08-14  Paul Eggert  <eggert@twinsun.com>
23885
23886         Help the merge from coreutils.
23887         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
23888         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
23889         * m4/tzset.m4: Use it too.
23890
23891 2003-08-14  Paul Eggert  <eggert@twinsun.com>
23892
23893         * modules/tzset: New file.
23894
23895 2003-08-14  Jim Meyering  <jim@meyering.net>
23896
23897         Merges from coreutils.
23898         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
23899         variable names, rather than @FNMATCH_H@.
23900         * modules/alloca: Likewise for $(ALLOCA_H).
23901
23902         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
23903         the three copies of the literal target, `fnmatch.h'.
23904         * modules/alloca (alloca.h): Likewise.
23905
23906 2003-08-14  Jim Meyering  <jim@meyering.net>
23907
23908         Merge from coreutils.
23909         * m4/tzset.m4: New file.
23910         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
23911         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
23912         otherwise, AIX 5.1 systems would end up using the latter.
23913         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
23914         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
23915         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
23916         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
23917
23918 2003-08-14  Jim Meyering  <jim@meyering.net>
23919
23920         Merge from coreutils.
23921         * lib/obstack.h: Whitespace changes.
23922         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
23923         and xcalloc return values.
23924         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
23925         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
23926         hang on OSF/1 5.1 for DIR on both local and remote file systems.
23927         Reported by (and fix confirmed by) Nelson H. F. Beebe.
23928         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
23929         error from mntctl.
23930         Use mntctl's return value to drive the entry-processing loop, since
23931         we can't rely on the value of the vmt_length member in the last
23932         entry.  On some systems doing so could result in exhausting
23933         virtual memory.  Based in part on a patch from Mike Jetzer.
23934
23935 2003-08-14  Jim Meyering  <jim@meyering.net>
23936         and Paul Eggert  <eggert@twinsun.com>
23937
23938         Merges from coreutils, plus other fixes.
23939         * lib/physmem.c: Merge in portability changes from gcc/libiberty
23940         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
23941         for credits and details.  Thanks to Kaveh Ghazi for helping
23942         to keep these files in sync.
23943         (ARRAY_SIZE): Define it.
23944         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
23945         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
23946         (memcasecmp): Don't assume size_t fits in unsigned int.
23947         Remove casts and duplicate code.
23948         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
23949         (memcpy): Remove definition.
23950         Merge in some clean-up and optimization changes from glibc.
23951         [BLOCKSIZE]: Move definition to top of file.
23952         Ensure that it is a multiple of 64.
23953         Rearrange loop exit tests so as to avoid performing an
23954         additional fread after encountering an error or EOF.
23955         * lib/md5.h (md5_uintptr): Define.
23956         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
23957         return to the initial working directory.  Preserve errno
23958         for caller.
23959         * lib/idcache.c: Include "xalloc.h".
23960         (xmalloc, xrealloc): Remove decls.
23961         (getuser): Remove casts no longer required in C89.
23962         * lib/human.c: Include stdio.h, for sprintf.
23963         * lib/group-member.c: Include "xalloc.h".
23964         (xmalloc, xrealloc): Remove decls.
23965         (get_group_info): Remove casts no longer required in C89.
23966         * lib/getusershell.c (readname): Remove casts no longer required in
23967         C89.
23968         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
23969         * lib/getline.c: Whitespace fix, from coreutils.
23970
23971 2003-08-13  Paul Eggert  <eggert@twinsun.com>
23972
23973         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
23974         Check for isascii.
23975
23976         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
23977         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
23978         Undo previous (whitespace-only) change.
23979
23980 2003-08-13  Paul Eggert  <eggert@twinsun.com>
23981
23982         * lib/exclude.c: Include <ctype.h>
23983         (IN_CTYPE_DOMAIN): New macro.
23984         (is_space): New fn.
23985         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
23986         and empty lines.
23987
23988         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
23989         Undo previous (whitespace-only) change.
23990
23991 2003-08-13  Paul Eggert  <eggert@twinsun.com>
23992
23993         * config/srclist-update: Change update back to the old behavior,
23994         leaving whitespace alone.  Use one 'sed' command rather than a
23995         pipeline.
23996         (fixlicense): Now a variable, not a function.
23997         (remove_trailing_blanks): Remove.
23998         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
23999         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
24000         Undo previous (whitespace-only) change.
24001
24002 2003-08-12  Paul Eggert  <eggert@twinsun.com>
24003
24004         Merge from coreutils.
24005         * modules/euidaccess: Add lib_SOURCES, include for new
24006         file euidaccess.h
24007
24008 2003-08-12  Paul Eggert  <eggert@twinsun.com>
24009
24010         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
24011         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
24012         Normalize leading white space and remove trailing white space.
24013
24014         Merge from coreutils
24015         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
24016
24017         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
24018         0.12.1.  These files are now being upgraded automatically by
24019         ../config/srclist-update.
24020
24021 2003-08-12  Paul Eggert  <eggert@twinsun.com>
24022
24023         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
24024         Normalize leading white space and remove trailing white space.
24025         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
24026         notice, as per ../config/srclist-update.
24027
24028         Merge from coreutils.
24029         * lib/euidaccess.h: New file.
24030         * lib/euidaccess.c: Include it.
24031         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
24032         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
24033         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
24034
24035 2003-08-12  Paul Eggert  <eggert@twinsun.com>
24036
24037         * config/srclist-update: Add copyright notice.
24038         (remove_id_lines, remove_trailing_blanks): New constants.
24039         (fixfile): Use them to normalize spacing a bit in copied files.
24040         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
24041         Normalize leading white space and remove trailing white space.
24042
24043         * config/texinfo.tex: Sync with texinfo.
24044
24045         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
24046         strtoul.c from libc, to merge coreutils whitespace changes.
24047
24048         * config/srclist.txt: Get the following m4 files from gettext:
24049         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
24050         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
24051         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
24052         wint_t.m4.
24053
24054 2003-08-12  Karl Berry  <karl@gnu.org>
24055
24056         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
24057         been made.
24058
24059 2003-08-11  Paul Eggert  <eggert@twinsun.com>
24060
24061         * modules/gnu-source, m4/gnu-source.m4:
24062         Remove; we're assuming Autoconf 2.54 or later now.
24063         Suggested by Bruno Haible.
24064         * MODULES.html.sh (func_all_modules): Remove gnu-source.
24065
24066 2003-08-11  Bruno Haible  <bruno@clisp.org>
24067
24068         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
24069
24070 2003-08-11  Bruno Haible  <bruno@clisp.org>
24071
24072         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
24073         (vasnprintf): Use it instead of wcslen.
24074
24075 2003-08-11  Bruno Haible  <bruno@clisp.org>
24076
24077         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
24078         value to ensure that _Bool promotes to int. Use #define for _Bool when
24079         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
24080
24081 2003-08-10  Karl Berry  <karl@gnu.org>
24082
24083         * lib/regex.h: update from libc (whitespace fix).
24084
24085 2003-08-09  Paul Eggert  <eggert@twinsun.com>
24086
24087         Merge some files from coreutils.  These changes were
24088         originally made by Jim Meyering.
24089         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
24090         many older Unixes require this.
24091         * lib/alloca.c (alloca): Remove cast to argument of free;
24092         no longer needed in C89.
24093         * lib/alloca_.h, regex.h: Fix white space to match
24094         what GNU indent does.
24095
24096 2003-08-09  Paul Eggert  <eggert@twinsun.com>
24097
24098         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
24099         apparently Emacs's Unicode mode got confused before my 2003-08-05
24100         checkin.
24101
24102 2003-08-08  Paul Eggert  <eggert@twinsun.com>
24103
24104         * m4/extensions.m4: New file.
24105         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
24106         Require gl_USE_SYSTEM_EXTENSIONS.
24107         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
24108         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
24109
24110 2003-08-08  Paul Eggert  <eggert@twinsun.com>
24111
24112         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
24113         * modules/extensions, modules/gnu-source: New files.
24114         * modules/timespec, modules/unlocked-io: Depend on extensions.
24115
24116 2003-08-07  Paul Eggert  <eggert@twinsun.com>
24117
24118         * modules/restrict: New file.
24119         * MODULES.html.sh (func_all_modules): Add restrict.
24120         * modules/regex: Depend on restrict.
24121
24122 2003-08-07  Paul Eggert  <eggert@twinsun.com>
24123
24124         * m4/restrict.m4: New file.
24125         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
24126
24127 2003-08-07  Bruno Haible  <bruno@clisp.org>
24128
24129         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
24130         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
24131
24132 2003-08-07  Bruno Haible  <bruno@clisp.org>
24133
24134         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
24135         makes the module 'getndelim2' compatible with the module 'getline'.
24136
24137 2003-08-05  Paul Eggert  <eggert@twinsun.com>
24138
24139         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
24140         byte with "\201" to avoid glitches when editing that source file
24141         with multi-gnome-terminal.
24142
24143 2003-08-05  Paul Eggert  <eggert@twinsun.com>
24144
24145         * lib/bumpalloc.h: Remove.
24146
24147 2003-08-05  Paul Eggert  <eggert@twinsun.com>
24148
24149         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
24150         * modules/bumpalloc: Remove.
24151
24152 2003-08-04  Paul Eggert  <eggert@twinsun.com>
24153
24154         * lib/getloadavg.c: Change copyright notice and spacing to conform to
24155         GNU coding style.
24156
24157         Merge from coreutils.
24158         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
24159         1. From glibc.
24160         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
24161         from Karl Berry, implemented by Jim Meyering.
24162         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
24163         from Dmitry V. Levin.
24164         Remove anachronistic cast of xrealloc.
24165         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
24166         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
24167         type. Otherwise, it wouldn't compile with at least /bin/cc on
24168         ymp-cray-unicos9.0.2.X.
24169         Combine two mostly-identical uses of alloca into one.
24170         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
24171
24172 2003-08-04  Dave Love  <d.love@dl.ac.uk>
24173
24174         [From Emacs.]
24175
24176         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
24177         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
24178         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
24179         obsolete NLIST_NAME_UNION.
24180         [__GNU__]: Undef BSD and FSCALE.
24181         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
24182
24183 2003-08-03  Paul Eggert  <eggert@twinsun.com>
24184
24185         * lib/stdbool_.h (_Bool): Make it signed char, instead of
24186         an enum type, so that it's guaranteed to promote to int.  See:
24187         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
24188
24189 2003-08-03  Karl Berry  <karl@gnu.org>
24190
24191         * config/depcomp: update from automake.
24192
24193 2003-07-31  Paul Eggert  <eggert@twinsun.com>
24194
24195         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
24196         (strerror): Don't assume that a printable int fits in 14 bytes.
24197
24198 2003-07-31  Bruno Haible  <bruno@clisp.org>
24199
24200         * modules/getpass-gnu: New file.
24201         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
24202
24203 2003-07-31  Bruno Haible  <bruno@clisp.org>
24204
24205         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
24206
24207 2003-07-24  Karl Berry  <karl@gnu.org>
24208
24209         * config/missing: update from automake.
24210
24211 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
24212             Bruno Haible  <bruno@clisp.org>
24213
24214         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
24215         * lib/getline.c (getline, getdelim): Likewise.
24216         Remove _GNU_SOURCE define; now it's defined in config.h through
24217         m4/getline.m4.
24218
24219 2003-07-23  Karl Berry  <karl@gnu.org>
24220
24221         * config/config.sub: update from prep.
24222
24223 2003-07-22  Paul Eggert  <eggert@twinsun.com>
24224
24225         * modules/xalloc (Depends-on): Add exitfail.
24226         * modules/xmemcoll: Likewise.
24227
24228 2003-07-22  Paul Eggert  <eggert@twinsun.com>
24229
24230         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
24231         over-parenthesization in macros.
24232
24233         Sync with coreutils.
24234
24235         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
24236         required by C99.
24237
24238         Use `exit_failure' for xalloc and xmemcoll instead of their own
24239         private exit-failure variables.
24240         * lib/xalloc.h (xalloc_exit_failure): Remove.
24241         * lib/xmalloc.c: Likewise.  Include exitfail.h.
24242         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
24243         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
24244         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
24245         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
24246
24247 2003-07-20  Jim Meyering  <jim@meyering.net>
24248
24249         * modules/closeout (Depends-on): Add exitfail.
24250         Suggestion from Bruno Haible.
24251
24252 2003-07-19  Karl Berry  <karl@gnu.org>
24253
24254         * config/config.sub: update from prep.
24255
24256 2003-07-18  Paul Eggert  <eggert@twinsun.com>
24257
24258         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
24259         Remove.
24260         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
24261         to test that it can stand by itself.  Include "exitfail.h".
24262         Clients should set exit_failure instead.
24263         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
24264
24265 2003-07-18  Bruno Haible  <bruno@clisp.org>
24266
24267         * modules/getndelim2: New file.
24268         * modules/getline: Share files with module getndelim2.
24269         * modules/getnline: Depend on getndelim2 instead of sharing files with
24270         it. Add getnline.c to lib_SOURCES.
24271         * MODULES.html.sh (func_all_modules): Add getndelim2.
24272
24273 2003-07-18  Bruno Haible  <bruno@clisp.org>
24274
24275         * m4/getndelim2.m4: New file.
24276         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
24277         invoke gl_PREREQ_GETNDELIM2.
24278         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
24279         gl_PREREQ_GETNDELIM2.
24280         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
24281         gl_GETNDELIM2.
24282
24283 2003-07-18  Bruno Haible  <bruno@clisp.org>
24284
24285         * lib/getndelim2.h: New file.
24286         * lib/getndelim2.c: Make into a module of its own. Include config.h,
24287         getndelim2.h.
24288         (getndelim2): Make non-static. Change return type to ssize_t.
24289         * lib/getline.h: Change argument names.
24290         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
24291         * lib/getnline.c: Include getndelim2.h.
24292
24293 2003-07-18  Andreas Schwab  <schwab@suse.de>
24294
24295         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
24296
24297 2003-07-17  Karl Berry  <karl@gnu.org>
24298
24299         * config/config.sub: update from prep.
24300
24301 2003-07-17  Bruno Haible  <bruno@clisp.org>
24302
24303         * modules/getnline: New file.
24304         * modules/getline: Add lib/getndelim2.c to source file list.
24305         * MODULES.html.sh (func_all_modules): Add getnline.
24306
24307 2003-07-17  Bruno Haible  <bruno@clisp.org>
24308
24309         * m4/getnline.m4: New file.
24310
24311 2003-07-17  Bruno Haible  <bruno@clisp.org>
24312
24313         * m4/Makefile.am.in: Remove file.
24314         * m4/Makefile.am: Remove file.
24315         * m4/Makefile.in: Remove file.
24316
24317 2003-07-17  Bruno Haible  <bruno@clisp.org>
24318
24319         * lib/getnline.h: New file.
24320         * lib/getnline.c: New file.
24321         * lib/getndelim2.c: New file, extracted from getline.c.
24322         (getndelim2): Renamed from getdelim2, with added nmax argument.
24323         * lib/getline.c: Include getndelim2.c.
24324         (getdelim2): Moved out to getndelim2.c.
24325         (getline, getdelim): Update.
24326
24327 2003-07-17  Bruno Haible  <bruno@clisp.org>
24328
24329         * lib/Makefile.am: Remove file.
24330         * lib/Makefile.in: Remove file.
24331
24332 2003-07-17  Bruno Haible  <bruno@clisp.org>
24333
24334         * configure.in: Remove file.
24335         * Makefile.in: Remove file.
24336
24337 2003-07-17  Bruno Haible  <bruno@clisp.org>
24338
24339         * MODULES.html.sh: Put the </BODY> right before </HTML>.
24340
24341 2003-07-16  Karl Berry  <karl@gnu.org>
24342
24343         * config/srclist-update: was running fixlicense twice, which caused
24344                 texinfo.tex to be nullified for some reason.  Simplify,
24345                 $gplsrc is no longer needed as far as I can see?
24346
24347 2003-07-16  Jim Meyering  <jim@meyering.net>
24348
24349         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
24350
24351 2003-07-15  Paul Eggert  <eggert@twinsun.com>
24352
24353         * config/srclist.txt: Get the following files from gettext-runtime/intl
24354         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
24355         ref-del.sin.  From Bruno Haible.
24356         * config/srclist-update (fixfile): Change grep pattern again, since the
24357         previous fix didn't work (there was another trailing $).  Use
24358         '[$]' to escape the $s.
24359
24360 2003-07-15  Karl Berry  <karl@gnu.org>
24361
24362         * lib/vasnprintf.c: update from gettext.
24363
24364 2003-07-15  Karl Berry  <karl@gnu.org>
24365
24366         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
24367         gets expanded when surrounded by '$'.
24368
24369 2003-07-15  Jim Meyering  <jim@meyering.net>
24370
24371         * modules/save-cwd: Don't depend on error.  From Derek Price.
24372
24373 2003-07-15  Jim Meyering  <jim@meyering.net>
24374
24375         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
24376
24377 2003-07-14  Simon Josefsson  <jas@extundo.com>
24378
24379         * modules/mempcpy: New file.
24380         * MODULES.html.sh (func_all_modules): Add mempcpy.
24381
24382 2003-07-14  Simon Josefsson  <jas@extundo.com>
24383
24384         * m4/mempcpy.m4: New file.
24385
24386 2003-07-14  Simon Josefsson  <jas@extundo.com>
24387
24388         * lib/mempcpy.h: New file.
24389         * lib/mempcpy.c: New file.
24390
24391 2003-07-14  Paul Eggert  <eggert@twinsun.com>
24392
24393         * modules/getdate, modules/posixtm: Depend on mktime.
24394
24395 2003-07-14  Paul Eggert  <eggert@twinsun.com>
24396
24397         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
24398         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
24399         unicodeio.c, unicodeio.h, unlocked-io.h:
24400         Switch from LGPL to GPL.
24401
24402 2003-07-14  Paul Eggert  <eggert@twinsun.com>
24403
24404         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
24405         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
24406         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
24407         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
24408         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
24409         updated automatically by ../config/srclist-update.  This changes
24410         their license from LPGL to GPL.
24411
24412 2003-07-14  Paul Eggert  <eggert@twinsun.com>
24413
24414         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
24415         assumed to refer to the root of the most recent stable gettext version.
24416         * config/srclistvars.sh: Add defaults for eggert.
24417         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
24418         Match "This program" as well as "The program".  This is needed
24419         for gettext.
24420
24421 2003-07-14  Jim Meyering  <jim@meyering.net>
24422
24423         Don't emit diagnostics.  Let callers do that.
24424         * lib/save-cwd.c: Don't include "error.h".
24425         (save_cwd): Don't call error.  Ensure that errno is valid
24426         when returning nonzero.
24427
24428         * lib/save-cwd.h (restore_cwd): Update prototype.
24429         * lib/save-cwd.c (restore_cwd): Remove two parameters.
24430         Simplify.  Don't call error upon failure.  Let callers do that.
24431         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
24432         when auditing is enabled.  But don't bother updating the #if.
24433
24434 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
24435
24436         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
24437         it breaks C++ compilation.
24438         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
24439
24440 2003-07-10  Simon Josefsson  <jas@extundo.com>
24441
24442         * modules/strchrnul (Makefile.am): Add strchrnul.h.
24443
24444 2003-07-10  Jim Meyering  <jim@meyering.net>
24445
24446         * m4/clock_time.m4: Remove trailing blank.
24447         * m4/intmax_t.m4: Likewise.
24448
24449 2003-07-10  Jim Meyering  <jim@meyering.net>
24450
24451         * lib/vasnprintf.c: Remove trailing blanks.
24452         Make cpp indentation consistent.
24453
24454 2003-07-09  Paul Eggert  <eggert@twinsun.com>
24455
24456         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
24457         posixver.c, strftime.c, strnlen.c, strverscmp.c:
24458         Switch from LGPL to GPL.
24459
24460 2003-07-09  Paul Eggert  <eggert@twinsun.com>
24461
24462         * config/srclist.txt: Sort sublists.  Add
24463         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
24464         that differ from gnulib for one reason or another; we'd like this list
24465         to be smaller but for now let's document what we have.
24466
24467 2003-07-08  Paul Eggert  <eggert@twinsun.com>
24468
24469         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
24470         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
24471         and sweeter "eval x=$x".
24472         * config/srclist.txt: Get lib/argp* from glibc.
24473
24474 2003-07-07  Paul Eggert  <eggert@twinsun.com>
24475
24476         * lib/mktime.c: Fix some boundary cases and remove need for floating
24477         point.
24478
24479         Issue a compile-time diagnostic if time_t is floating point, or if
24480         two's complement arithmetic is not in effect, or if arithmetic
24481         right shift does not propagate the sign.  These assumptions were
24482         all in the original code but they weren't checked.
24483
24484         (TIME_T_MIDPOINT, verify): New macros.
24485         (__isleap): Remove; it has integer overflow problems.
24486         (leapyear): New function, without those problems.
24487         (ydhms_tm_diff): Remove; splitting into two parts.
24488         (ydhms_diff): New function, containing the arithmetic part of
24489         the old ydhms_tm_diff function.  Issue a compile-time
24490         diagnostic if we are not using C99 integer division.
24491         Avoid casts when possible.
24492         (guess_time_tm): New function, containing the checking part of
24493         the old ydhms_tm_diff function.  Return the new value, rather than
24494         the difference between it and the old.  Accept a new argument T
24495         so that *T specifies the old value.  Check for overflow in the result.
24496
24497         (__mktime_internal): Use a time_t offset, not a long int offset.
24498         This undoes the 2003-06-04 change, which is no longer needed now
24499         that we have better overflow checking.
24500         (localtime_offset): Likewise.
24501
24502         (__mktime_internal): Avoid harmful overflow on hosts where time_t
24503         and long are 64-bit but int is only 32-bit.
24504         (ydhms_diff): Use long int to store year1 and yday1.
24505         Issue a compile-time diagnostic if long int is not wide enough.
24506
24507         (__mktime_internal): Use long int to store adjusted year and yday.
24508         Use plain C rather than preprocessor commands, if that doesn't
24509         affect efficiency.
24510         Check for overflow (and try to repair) after each probe
24511         rather than checking only at the very end.  This avoids some bugs
24512         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
24513         does not equal GMT offset at maximum time).
24514         Use integer to check for overflow rather than floating point; this
24515         is more portable to non-IEEE hosts, and is a tad faster.
24516         When we detect that we are oscillating between two values,
24517         don't check whether tm_isdst has the requested value, since
24518         we already know the answer.  When tm_isdst has the wrong value,
24519         use a different heuristic to find the right one, based on the
24520         extreme values actually observed in practice in tz2003a,
24521         rather than the (overly optimistic) "previous 3 calendar quarters".
24522
24523         (not_equal_tm, print_tm, check_result): Use "const T" rather than
24524         "T const" to accommodate glibc style.
24525         (check_result): Use less-confusing report format.  "long" -> "long int.
24526         (main): Likewise.
24527         Don't loop if the iteration overflows time_t.
24528         Allow a negative step in the iteration.
24529
24530 2003-07-06  Karl Berry  <karl@gnu.org>
24531
24532         * config/depcomp: update from automake.
24533         * config/config.sub: update from prep.
24534
24535 2003-07-03  Karl Berry  <karl@gnu.org>
24536
24537         * config/config.guess: update from prep.
24538
24539 2003-07-01  Paul Eggert  <eggert@twinsun.com>
24540
24541         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
24542         xreadlink.c now includes it unconditionally.
24543
24544 2003-07-01  Paul Eggert  <eggert@twinsun.com>
24545
24546         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
24547         having it depend on HAVE_SYS_TYPES_H.
24548
24549 2003-07-01  Bruno Haible  <bruno@clisp.org>
24550
24551         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
24552         <sys/types.h> should be sufficient.
24553         Reported by Paul Eggert.
24554
24555 2003-06-26  Karl Berry  <karl@gnu.org>
24556
24557         * config/depcomp: update from automake.
24558
24559 2003-06-26  Bruno Haible  <bruno@clisp.org>
24560
24561         * modules/human: Depend on module stdbool.
24562
24563 2003-06-25  Bruno Haible  <bruno@clisp.org>
24564
24565         * modules/readlink: New file.
24566         * modules/xreadlink: Depend on it.
24567         * MODULES.html.sh (func_all_modules): Add readlink.
24568
24569 2003-06-25  Bruno Haible  <bruno@clisp.org>
24570
24571         * m4/readlink.m4: New file.
24572
24573 2003-06-25  Bruno Haible  <bruno@clisp.org>
24574
24575         * lib/readlink.c: New file.
24576
24577 2003-06-22  Karl Berry  <karl@gnu.org>
24578
24579         * config/srclist.txt: update mkinstalldirs from automake.
24580         * config/mkinstalldirs: update.
24581
24582 2003-06-22  Bruno Haible  <bruno@clisp.org>
24583
24584         Portability to mingw32.
24585         * m4/ssize_t.m4: New file, from GNU gettext.
24586         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
24587         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
24588
24589 2003-06-22  Bruno Haible  <bruno@clisp.org>
24590
24591         * modules/safe-read: Add m4/ssize_t.m4.
24592         * modules/xreadlink: Add m4/ssize_t.m4.
24593
24594 2003-06-20  Bruno Haible  <bruno@clisp.org>
24595
24596         Assume C89, so PARAMS isn't needed.
24597         * lib/unicodeio.h (PARAMS): Remove.
24598         * lib/unicodeio.c: Don't use PARAMS.
24599
24600 2003-06-18  Karl Berry  <karl@gnu.org>
24601
24602         * config/config.{guess,sub}: update from prep.
24603
24604 2003-06-18  Jim Meyering  <jim@meyering.net>
24605
24606         Merge changes from coreutils.
24607         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
24608         Remove explicit declarations of xmalloc and realloc.
24609         Include xalloc.h.
24610         (read_utmp): Remove anachronistic cast of xmalloc.
24611
24612 2003-06-17  Paul Eggert  <eggert@twinsun.com>
24613
24614         Assume C89, so PARAMS isn't needed.
24615         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
24616         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
24617         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
24618         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
24619         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
24620         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
24621         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
24622         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
24623         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
24624         lib/xstrtod.h, lib/xstrtol.h: Likewise.
24625         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
24626         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
24627         no longer needed. Anyway, config.h should always be included before any
24628         other file.
24629
24630 2003-06-11  Simon Josefsson  <jas@extundo.com>
24631
24632         * modules/sysexits: New file.
24633         * MODULES.html.sh (func_all_modules): Add sysexits.
24634
24635 2003-06-11  Simon Josefsson  <jas@extundo.com>
24636
24637         * lib/sysexit_.h: New file.
24638
24639 2003-06-11  Derek Price  <derek@ximbiot.com>
24640
24641         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
24642         necessary.
24643
24644 2003-06-11  Bruno Haible  <bruno@clisp.org>
24645
24646         * m4/sysexits.m4: New file.
24647
24648 2003-06-10  Simon Josefsson  <jas@extundo.com>
24649
24650         * lib/argp.h: New file, from glibc.
24651         * lib/argp-ba.c: New file, from glibc.
24652         * lib/argp-eexst.c: New file, from glibc.
24653         * lib/argp-fmtstream.c: New file, from glibc.
24654         * lib/argp-fmtstream.h: New file, from glibc.
24655         * lib/argp-fs-xinl.c: New file, from glibc.
24656         * lib/argp-help.c: New file, from glibc.
24657         * lib/argp-namefrob.h: New file, from glibc.
24658         * lib/argp-parse.c: New file, from glibc.
24659         * lib/argp-pv.c: New file, from glibc.
24660         * lib/argp-pvh.c: New file, from glibc.
24661         * lib/argp-xinl.c: New file, from glibc.
24662
24663 2003-06-10  Simon Josefsson  <jas@extundo.com>
24664
24665         * modules/strchrnul: New file.
24666
24667 2003-06-10  Simon Josefsson  <jas@extundo.com>
24668
24669         * modules/argp: New file.
24670
24671 2003-06-10  Simon Josefsson  <jas@extundo.com>
24672
24673         * m4/strchrnul.m4: New file.
24674
24675 2003-06-10  Simon Josefsson  <jas@extundo.com>
24676
24677         * lib/strchrnul.h: New file.
24678         * lib/strchrnul.c: New file.
24679
24680 2003-06-10  Bruno Haible  <bruno@clisp.org>
24681
24682         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
24683
24684 2003-06-07  Karl Berry  <karl@gnu.org>
24685
24686         * config/config.{guess,sub}: update from prep.
24687
24688 2003-06-07  Jim Meyering  <jim@meyering.net>
24689
24690         * modules/strtod: Use $(...) notation, not @...@ for
24691         AC_REPLACE'd variables.
24692         * modules/localcharset: Likewise.
24693
24694 2003-06-07  Jim Meyering  <jim@meyering.net>
24695
24696         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
24697         in place of my name in the copyright comment.
24698         Remove definition and uses of __P.
24699
24700         From coreutils.
24701         * lib/stat.c: Don't declare xmalloc explicitly.
24702         Instead, include "xalloc.h".
24703         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
24704         xrealloc, and xcalloc return values.
24705         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
24706         Improve comment.
24707         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
24708
24709 2003-06-07  Bruno Haible  <bruno@clisp.org>
24710
24711         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
24712         avoid AC_CONFIG_LINKS.
24713         * modules/fnmatch (Makefile.am): Use explicit creation rule for
24714         fnmatch.h, to avoid AC_CONFIG_LINKS.
24715         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
24716
24717 2003-06-07  Bruno Haible  <bruno@clisp.org>
24718
24719         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
24720         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
24721         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
24722         directory.
24723         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
24724         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
24725         directory.
24726
24727 2003-06-06  Jim Meyering  <jim@meyering.net>
24728
24729         Merge from coreutils.
24730         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
24731         Consolidate declarations and initializations of *_base* locals.
24732
24733         Merge from coreutils.
24734         This avoids a core dump on systems without GNU putenv,
24735         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
24736         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
24737         (unsetenv): New static function, from GNU libc.
24738         (rpl_putenv): Use it.
24739
24740         * lib/modechange.c: Remove trailing blanks.
24741
24742         Merge from coreutils.
24743         * lib/fsusage.c: Remove declaration of statfs.
24744         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
24745
24746         * lib/posixtm.c: Include <stdbool.h> unconditionally.
24747
24748 2003-06-06  Jim Meyering  <jim@meyering.net>
24749
24750         * lib/stdbool_.h: Renamed from stdbool.h.in.
24751
24752 2003-06-06  Jim Meyering  <jim@meyering.net>
24753             Bruno Haible  <bruno@clisp.org>
24754
24755         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
24756         Adjust Makefile.am snippet not to redirect directly to target.
24757         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
24758
24759 2003-06-05  Paul Eggert  <eggert@twinsun.com>
24760
24761         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
24762         mismatch, look in future quarters as well as past.  This fixes a
24763         bug when processing fall-backwards gaps immediately after a long
24764         period of daylight-saving time.
24765
24766         * lib/mktime.c: Assume freestanding C89 or better.
24767         (HAVE_LIMITS_H): Remove.  Assume it's 1.
24768         (__P): Remove; not used.
24769         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
24770         (mktime, not_equal_tm, print_tm, check_result,
24771         main): Use prototypes.  Use const * where appropriate.
24772         (main): Fix typo in testing code that uncovered by above changes.
24773         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
24774
24775 2003-06-04  Paul Eggert  <eggert@twinsun.com>
24776
24777         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
24778         locale.h, localeconv.  This merges changes from coreutils.
24779
24780         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
24781         It can be removed after the next Autoconf is released.
24782         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
24783         needed.
24784
24785 2003-06-04  Paul Eggert  <eggert@twinsun.com>
24786
24787         * lib/mktime.c: Fix Debian bug 177940
24788         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
24789         (localtime_offset): Now long int, not time_t, because we want it
24790         to be guaranteed to be signed.  All uses changed.
24791         (__mktime_internal): If overflow would occur when adding offset,
24792         don't add it.
24793
24794         Merge 'human' changes from coreutils.  Rewrite to support
24795         locale-specific notations like thousands separators.
24796         * lib/human.c: Simplify authorship notice.
24797         Include human.h immediately after config.h.
24798         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
24799         <limits.h>: Do not include, since human.h does.
24800         (SIZE_MAX, UINTMAX_MAX): New macros.
24801         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
24802         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
24803         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
24804         (power_letter): Renamed from suffixes.
24805         (generate_suffix_backwards): Remove.
24806         (adjust_value): Now takes int style (because of human.h changes)
24807         and long double value (for greater precision on some platforms).
24808         (group_number): New function.
24809         (human_readable): Use it.  Use integer options, not enum.
24810         Put the options before the sizes in the arg list.
24811         Support all the new options.
24812         The old human_readable function has been removed;
24813         use inttostr.h instead.
24814         (human_readable, default_block_size, humblock):
24815         Use uintmax_t, not int, for block sizes.
24816         (human_readable_inexact, block_size_types): Remove.
24817         (block_size_opts): New constant.
24818         (human_options): Renamed from human_block_size, with new signature
24819         that allows block sizes up to UINTMAX_MAX.  All callers changed.
24820         * lib/human.h: Add copyright and authorship notice.
24821         Include <limits.h> and <stdbool.h> unconditionally.
24822         (PARAMS): Remove.  All uses removed.
24823         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
24824         (enum human_inexact_style): Remove tag; now a nameless enum.
24825         (human_floor, human_ceiling, human_round_to_even): Now have
24826         values 2, 0, 1 rather than -1, 1, 0.
24827         (human_group_digits, human_suppress_point_zero, human_autoscale,
24828         human_base_1024, human_SI, human_B): New constants.
24829         (human_readable_inexact, human_block_size): Remove.
24830         (human_readable): Size args are now uintmax_t, not int.
24831         (human_options): New decl.
24832
24833         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
24834         unnecessary now that we assume C89 or better.  This change
24835         imported from coreutils.
24836
24837         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
24838         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
24839         in the 2003-05-30 sync from glibc.
24840
24841         .h files should stand alone, but we shouldn't include <sys/types.h>
24842         if we can get away with just <stddef.h>.
24843
24844         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
24845         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
24846         rather than <sys/types.h>, as we merely need size_t.
24847         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
24848         to get size_t.
24849         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
24850         Include <stdio.h>, to get FILE.
24851         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
24852         memcasecmp.h has included <stddef.h> and all we need is size_t.
24853         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
24854         our interface, instead of including <sys/types.h>
24855
24856 2003-06-04  Paul Eggert  <eggert@twinsun.com>
24857
24858         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
24859         now, as glibc mktime is buggy on non-glibc systems.
24860
24861 2003-06-03  Karl Berry  <karl@gnu.org>
24862
24863         * config/config.sub: update from prep.
24864
24865 2003-06-02  Paul Eggert  <eggert@twinsun.com>
24866
24867         [from coreutils]
24868         Fix some minor time-related bugs with POSIX time arguments.
24869         Some valid time stamps were being rejected (notably -1, and
24870         time stamps before 1900 on 64-bit hosts).  And some invalid
24871         time stamps were being accepted, e.g. September 31.
24872
24873         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
24874         that we can return (time_t) -1 successfully.
24875         * lib/posixtm.c: Likewise.
24876         [HAVE_STDBOOL_H]: Include <stdbool.h>.
24877         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
24878         (t): Remove static var.
24879         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
24880         of static var.  All uses changed.
24881         (year): Do not reject years before 1900; they can occur with
24882         64-bit time_t.
24883         (posix_time_parse): Do not check for out-of-range components;
24884         that is now the caller's responsibility, since our checks were
24885         only approximations.
24886         (posixtime): Use mktime to check for out-of-range components,
24887         since it knows them exactly.
24888         If mktime returns (time_t) -1, check whether an error actually occurred
24889         by invoking localtime on -1.
24890         (main) [TEST_POSIXTIME]: Check for input data errors, and report
24891         posixtime failures better.
24892         Improve the test data (in comments only).
24893
24894 2003-06-02  Karl Berry  <karl@gnu.org>
24895
24896         * config/mkinstalldirs (version): new variable.
24897         (--version): new option.
24898         (usage): improve message.
24899
24900 2003-05-30  Karl Berry  <karl@gnu.org>
24901
24902         * lib/mktime.c: update from libc.
24903
24904 2003-05-30  Bruno Haible  <bruno@clisp.org>
24905
24906         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
24907         * config/config.rpath: Upgrade to gettext-0.12.1.
24908
24909 2003-05-30  Bruno Haible  <bruno@clisp.org>
24910
24911         * m4/gettext.m4: Upgrade to gettext-0.12.1.
24912         * m4/nls.m4: New file, from gettext-0.12.1.
24913         * m4/po.m4: New file, from gettext-0.12.1.
24914         * m4/progtest.m4: Upgrade to gettext-0.12.1.
24915
24916 2003-05-30  Bruno Haible  <bruno@clisp.org>
24917
24918         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
24919         * lib/localcharset.h: Likewise.
24920         * lib/localcharset.c: Likewise.
24921
24922 2003-05-29  Karl Berry  <karl@gnu.org>
24923
24924         * config/config.rpath: update from gettext.
24925
24926 2003-05-28  Paul Eggert  <eggert@twinsun.com>
24927
24928         Assume the headers required for C89 freestanding compilers.
24929         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
24930         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
24931         * m4/human.m4 (gl_HUMAN): Likewise.
24932         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
24933         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
24934         * m4/userspec.m4 (gl_USERSPEC): Likewise.
24935         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
24936         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
24937         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
24938
24939 2003-05-28  Paul Eggert  <eggert@twinsun.com>
24940
24941         Assume the headers required for C89 freestanding compilers.
24942         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
24943         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
24944         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
24945         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
24946         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
24947         define, since <limits.h> is guaranteed to do that.
24948         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
24949         * lib/exclude.c: Include <stdbool.h> unconditionally.
24950         * lib/tempname.c: Include <stddef.h> unconditionally.
24951         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
24952         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
24953         <stddef.h> does that.
24954         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
24955         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
24956         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
24957         needed.
24958         * lib/xstrtol.c: Likewise.
24959         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
24960         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
24961
24962         * lib/addext.c (addext): Use assignment rather than cast, to avoid
24963         warnings on some platforms.
24964
24965         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
24966         arbitrarily.
24967
24968 2003-05-26  Jim Meyering  <jim@meyering.net>
24969
24970         Merge in a change from coreutils:
24971         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
24972         that is guaranteed to be `no'.  Use `no_such_member' to indicate
24973         that condition, rather than `-1' which is slightly misleading.
24974         Change the name of the cache variable to have the gl_ prefix.
24975         Prompted by a patch from Richard Dawe for DJGPP.
24976
24977 2003-05-24  Karl Berry  <karl@gnu.org>
24978
24979         * config/config.guess: update from prep.
24980
24981 2003-05-22  Karl Berry  <karl@gnu.org>
24982
24983         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
24984
24985 2003-05-20  Karl Berry  <karl@gnu.org>
24986
24987         * config/config.guess: update from prep.
24988
24989 2003-05-18  Karl Berry  <karl@gnu.org>
24990
24991         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
24992         might actually be set by the user.
24993
24994         * config/depcomp, install-sh, mdate-sh: update from automake.
24995
24996 2003-05-17  Bruno Haible  <bruno@clisp.org>
24997
24998         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
24999         invalid expansion for AC_EGREP_CPP.
25000         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
25001         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
25002         Suggested by Akim Demaille <akim@epita.fr> in
25003         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
25004
25005 2003-05-12  Jim Meyering  <jim@meyering.net>
25006
25007         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
25008         the space-padded-by-default conversion specifiers, %e, %k, %l.
25009
25010 2003-05-12  Bruno Haible  <bruno@clisp.org>
25011
25012         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
25013         the string is longer than 4 KB.
25014
25015 2003-05-11  Karl Berry  <karl@gnu.org>
25016
25017         * config/config.{guess,sub}: update from prep.
25018
25019 2003-05-09  Bruno Haible  <bruno@clisp.org>
25020
25021         * modules/error: Add m4/strerror_r.m4 to file list.
25022
25023 2003-05-03  Bruno Haible  <bruno@clisp.org>
25024
25025         Upgrade to Unicode-4.0.
25026         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
25027         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
25028         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
25029         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
25030         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
25031         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
25032         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
25033         Change width of U+E0100..U+E01EF from 1 to 0.
25034
25035 2003-04-25  Jim Meyering  <jim@meyering.net>
25036
25037         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
25038         of type size_t, not int.
25039
25040 2003-04-25  Bruno Haible  <bruno@clisp.org>
25041
25042         * lib/copy-file.c: Include <stddef.h>, for size_t.
25043
25044 2003-04-21  Paul Eggert  <eggert@twinsun.com>
25045
25046         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
25047         code which expansion is under static control.  Patch imported from
25048         Akim Demaille's patch to Bison; see
25049         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
25050
25051 2003-04-14  Bruno Haible  <bruno@clisp.org>
25052
25053         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
25054
25055 2003-04-11  Jim Meyering  <jim@meyering.net>
25056
25057         Merge changes from Coreutils.
25058
25059         2003-03-22  Jim Meyering  <jim@meyering.net>
25060
25061         * lib/strftime.c (widen): Cast alloca return value to proper type.
25062
25063         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
25064
25065         From GNU libc.
25066         * lib/strftime.c (my_strftime): Handle very large width
25067         specifications for numeric values correctly.  Improve checks for
25068         overflow.
25069
25070         2003-01-19  Jim Meyering  <jim@meyering.net>
25071
25072         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
25073         definitions.
25074         (nl_get_alt_digit) [! defined my_strftime]: Define.
25075         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
25076         _nl_get_alt_digit and _nl_get_walt_digit.
25077
25078         * lib/strftime.c (my_strftime): Merge in locale-related changes from
25079         libc. These changes have no effect outside of _LIBC.
25080
25081 2003-04-10  Bruno Haible  <bruno@clisp.org>
25082
25083         * modules/findprog: New file.
25084         * MODULES.html.sh (func_all_modules): Add it.
25085
25086 2003-04-10  Bruno Haible  <bruno@clisp.org>
25087
25088         * m4/findprog.m4: New file.
25089         * m4/eaccess.m4: New file.
25090
25091 2003-04-10  Bruno Haible  <bruno@clisp.org>
25092
25093         * lib/findprog.h: New file, from GNU gettext.
25094         * lib/findprog.c: New file, from GNU gettext.
25095
25096 2003-04-05  Jim Meyering  <jim@meyering.net>
25097
25098         Merge changes from Coreutils.
25099
25100         * lib/exclude.h (PARAMS): Remove definition and uses.
25101         * lib/exclude.c: Remove uses of `PARAMS'.
25102
25103         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
25104         Add test-cases for DOS filenames. Declare program_name.
25105         (main): Set up program_name.  Patch by Rich Dawe.
25106
25107         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
25108         error from mntctl.
25109         Use mntctl's return value to drive the entry-processing loop, since
25110         we can't rely on the value of the vmt_length member in the last
25111         entry.  On some systems doing so could result in exhausting
25112         virtual memory.  Based in part on a patch from Mike Jetzer.
25113
25114 2003-04-04  Bruno Haible  <bruno@clisp.org>
25115
25116         * modules/linebreak: New file.
25117         * MODULES.html.sh (func_all_modules): Add it.
25118
25119 2003-04-04  Bruno Haible  <bruno@clisp.org>
25120
25121         * m4/linebreak.m4: New file.
25122
25123 2003-04-04  Bruno Haible  <bruno@clisp.org>
25124
25125         * lib/linebreak.h: New file, from GNU gettext.
25126         * lib/linebreak.c: New file, from GNU gettext with slight
25127         modifications.
25128         * lib/lbrkprop.h: New file, from GNU gettext.
25129
25130 2003-04-03  Bruno Haible  <bruno@clisp.org>
25131
25132         * modules/utf8-ucs4: New file.
25133         * modules/utf16-ucs4: New file.
25134         * modules/ucs4-utf8: New file.
25135         * modules/ucs4-utf16: New file.
25136         * MODULES.html.sh (func_all_modules): Add them.
25137
25138 2003-04-03  Bruno Haible  <bruno@clisp.org>
25139
25140         * m4/utf-ucs4.m4: New file.
25141         * m4/ucs4-utf.m4: New file.
25142
25143 2003-04-03  Bruno Haible  <bruno@clisp.org>
25144
25145         * lib/utf8-ucs4.h: New file, from GNU gettext.
25146         * lib/utf16-ucs4.h: New file, from GNU gettext.
25147         * lib/ucs4-utf8.h: New file, from GNU gettext.
25148         * lib/ucs4-utf16.h: New file, from GNU gettext.
25149
25150 2003-04-02  Bruno Haible  <bruno@clisp.org>
25151
25152         * modules/binary-io: New file.
25153         * MODULES.html.sh (func_all_modules): Add it.
25154
25155 2003-04-02  Bruno Haible  <bruno@clisp.org>
25156
25157         * lib/binary-io.h: New file, from GNU gettext.
25158
25159 2003-04-01  Bruno Haible  <bruno@clisp.org>
25160
25161         * modules/pathname: New file.
25162         * MODULES.html.sh (func_all_modules): Add it.
25163
25164 2003-04-01  Bruno Haible  <bruno@clisp.org>
25165
25166         * lib/pathname.h: New file, from GNU gettext.
25167         * lib/concatpath.c: New file, from GNU gettext.
25168
25169 2003-03-30  Bruno Haible  <bruno@clisp.org>
25170
25171         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
25172
25173 2003-03-30  Bruno Haible  <bruno@clisp.org>
25174
25175         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
25176         function chown() doesn't exist.
25177
25178 2003-03-28  Bruno Haible  <bruno@clisp.org>
25179
25180         * modules/copy-file: New file.
25181         * MODULES.html.sh (func_all_modules): Add it.
25182
25183 2003-03-28  Bruno Haible  <bruno@clisp.org>
25184
25185         * m4/copy-file.m4: New file.
25186
25187 2003-03-28  Bruno Haible  <bruno@clisp.org>
25188
25189         * lib/copy-file.h: New file, from GNU gettext.
25190         * lib/copy-file.c: New file, from GNU gettext.
25191
25192 2003-03-18  Jim Meyering  <jim@meyering.net>
25193
25194         * lib/quote.c (quote_n): Fix typo in comment.
25195
25196 2003-03-18  Bruno Haible  <bruno@clisp.org>
25197
25198         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
25199         checking.
25200         * m4/onceonly_2_57.m4: Likewise.
25201
25202 2003-03-17  Bruno Haible  <bruno@clisp.org>
25203
25204         * m4/onceonly.m4: Require autoconf 2.54 or newer.
25205         (m4_quote): Remove macro.
25206         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
25207
25208 2003-03-14  Jim Meyering  <jim@meyering.net>
25209
25210         Merge changes from Coreutils.
25211         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
25212         to be const, in order to avoid warnings.
25213         (obstack_room): Likewise.
25214         (obstack_empty_p): Likewise.
25215
25216 2003-03-14  Bruno Haible  <bruno@clisp.org>
25217
25218         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
25219         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
25220
25221 2003-03-13  Paul Eggert  <eggert@twinsun.com>
25222
25223         Merge changes from Bison.
25224         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
25225         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
25226         when compiling Bison 1.875's `bitset bset = obstack_alloc
25227         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
25228         * lib/hash.c: Include <stdbool.h> unconditionally.
25229
25230 2003-03-13  Paul Eggert  <eggert@twinsun.com>
25231
25232         * m4/onceonly.m4 (m4_quote): New macro.
25233         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
25234         Quote AC_FOREACH variable-expansions properly.
25235
25236 2003-03-13  Paul Eggert  <eggert@twinsun.com>
25237
25238         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
25239
25240 2003-03-09  Paul Eggert  <eggert@twinsun.com>
25241
25242         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
25243         Reported by Bruce Becker; see:
25244         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
25245
25246 2003-03-03  Paul Eggert  <eggert@twinsun.com>
25247             Bruno Haible  <bruno@clisp.org>
25248
25249         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
25250         Reported by John Hughes, see
25251         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
25252
25253 2003-02-20  Bruno Haible  <bruno@clisp.org>
25254
25255         * MODULES.html.sh (func_all_modules): Add poll.
25256
25257 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
25258
25259         * modules/poll: New file.
25260
25261 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
25262
25263         * lib/poll_.h: New file.
25264         * lib/poll.c: New file.
25265
25266 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
25267
25268         * m4/poll.m4: New file.
25269
25270 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
25271
25272         * modules/mathl: New file.
25273
25274 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
25275
25276         * lib/mathl.h: New file.
25277         * lib/acosl.c: New file.
25278         * lib/asinl.c: New file.
25279         * lib/atanl.c: New file.
25280         * lib/ceill.c: New file.
25281         * lib/cosl.c: New file.
25282         * lib/expl.c: New file.
25283         * lib/floorl.c: New file.
25284         * lib/frexpl.c: New file.
25285         * lib/ldexpl.c: New file.
25286         * lib/logl.c: New file.
25287         * lib/sincosl.c: New file.
25288         * lib/sinl.c: New file.
25289         * lib/sqrtl.c: New file.
25290         * lib/tanl.c: New file.
25291         * lib/trigl.c: New file.
25292         * lib/trigl.h: New file.
25293
25294 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
25295
25296         * m4/mathl.m4: New file.
25297
25298 2003-02-18  Bruno Haible  <bruno@clisp.org>
25299
25300         * MODULES.html.sh (func_all_modules): Add mathl.
25301
25302 2003-02-17  Bruno Haible  <bruno@clisp.org>
25303
25304         * modules/mkdtemp: New module.
25305         * MODULES.html.sh (func_all_modules): Add it.
25306
25307 2003-02-17  Bruno Haible  <bruno@clisp.org>
25308
25309         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
25310
25311 2003-02-17  Bruno Haible  <bruno@clisp.org>
25312
25313         * lib/mkdtemp.h: New file, from GNU gettext.
25314         * lib/mkdtemp.c: New file, from GNU gettext.
25315
25316 2003-02-02  Jim Meyering  <jim@meyering.net>
25317
25318         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
25319         e.g. glibc-2.2.93.
25320
25321 2003-01-31  Bruno Haible  <bruno@clisp.org>
25322
25323         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
25324         'rpl_rename'.
25325         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
25326         'rpl_strnlen'.
25327         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
25328         'rpl_strtod'.
25329         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
25330         'rpl_utime'.
25331
25332 2003-01-31  Bruno Haible  <bruno@clisp.org>
25333
25334         * lib/rename.c: #undef rename before defining rpl_rename.
25335         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
25336
25337 2003-01-30  Bruno Haible  <bruno@clisp.org>
25338
25339         * modules/vasnprintf, modules/vasprintf: New modules.
25340         * MODULES.html.sh (func_all_modules): Add them.
25341
25342 2003-01-30  Bruno Haible  <bruno@clisp.org>
25343
25344         * m4/signed.m4: New file, from GNU gettext.
25345         * m4/longdouble.m4: New file, from GNU gettext.
25346         * m4/wchar_t.m4: New file, from GNU gettext.
25347         * m4/wint_t.m4: New file, from GNU gettext.
25348         * m4/vasnprintf.m4: New file.
25349         * m4/vasprintf.m4: New file.
25350
25351 2003-01-30  Bruno Haible  <bruno@clisp.org>
25352
25353         * lib/printf-args.h: New file, from GNU gettext.
25354         * lib/printf-args.c: New file, from GNU gettext.
25355         * lib/printf-parse.h: New file, from GNU gettext.
25356         * lib/printf-parse.c: New file, from GNU gettext.
25357         * lib/vasnprintf.h: New file, from GNU gettext.
25358         * lib/vasnprintf.c: New file, from GNU gettext.
25359         * lib/asnprintf.c: New file, from GNU gettext.
25360         * lib/vasprintf.h: New file, from GNU gettext with modifications.
25361         * lib/vasprintf.c: New file, from GNU gettext.
25362         * lib/asprintf.c: New file, from GNU gettext.
25363
25364 2003-01-29  Bruno Haible  <bruno@clisp.org>
25365
25366         * modules/stpncpy: New module.
25367         * MODULES.html.sh (func_all_modules): Add it.
25368
25369 2003-01-29  Bruno Haible  <bruno@clisp.org>
25370
25371         * m4/stpncpy.m4: New file.
25372
25373 2003-01-29  Bruno Haible  <bruno@clisp.org>
25374
25375         * lib/stpncpy.h: New file, from GNU gettext with modifications.
25376         * lib/stpncpy.c: New file, from GNU gettext with modifications.
25377
25378 2003-01-28  Bruno Haible  <bruno@clisp.org>
25379
25380         * modules/c-ctype: New module.
25381         * MODULES.html.sh (func_all_modules): Add it.
25382
25383 2003-01-28  Bruno Haible  <bruno@clisp.org>
25384
25385         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
25386         Paul Eggert.
25387         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
25388         Paul Eggert.
25389
25390 2003-01-27  Bruno Haible  <bruno@clisp.org>
25391
25392         * modules/xsetenv: New module.
25393         * MODULES.html.sh (func_all_modules): Add it.
25394
25395 2003-01-27  Bruno Haible  <bruno@clisp.org>
25396
25397         * lib/xsetenv.h: New file, from GNU gettext.
25398         * lib/xsetenv.c: New file, from GNU gettext.
25399
25400 2003-01-23  Jim Meyering  <jim@meyering.net>
25401
25402         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
25403         from working on systems without dirfd (at least Irix and OSF1/Tru64).
25404
25405 2003-01-23  Bruno Haible  <bruno@clisp.org>
25406
25407         * modules/minmax: New module.
25408         * MODULES.html.sh (func_all_modules): Add it.
25409
25410 2003-01-23  Bruno Haible  <bruno@clisp.org>
25411
25412         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
25413         Eggert.
25414
25415 2003-01-22  Bruno Haible  <bruno@clisp.org>
25416
25417         * modules/exit: New module.
25418         * MODULES.html.sh (func_all_modules): Add it.
25419
25420 2003-01-22  Bruno Haible  <bruno@clisp.org>
25421
25422         * lib/exit.h: New file, from GNU gettext.
25423
25424 2003-01-19  Bruno Haible  <bruno@clisp.org>
25425
25426         * gnulib-tool: Recognize option --extract-maintainer.
25427         (func_get_maintainer): New function.
25428         * modules/*: Add Maintainer entry.
25429
25430 2003-01-16  Jim Meyering  <jim@meyering.net>
25431
25432         * m4/regex.m4: The `regex' struct is both input and output.
25433         Initialize it before each use.  Patch by Tim Waugh.
25434
25435 2003-01-16  Bruno Haible  <bruno@clisp.org>
25436
25437         * MODULES.html.sh: Add a table of contents. Add the module name as
25438         leftmost column. Add hyperlinks.
25439
25440 2003-01-15  Bruno Haible  <bruno@clisp.org>
25441
25442         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
25443
25444 2003-01-15  Bruno Haible  <bruno@clisp.org>
25445
25446         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
25447         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
25448         suffix.
25449
25450 2003-01-15  Bruno Haible  <bruno@clisp.org>
25451
25452         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
25453
25454 2003-01-15  Bruno Haible  <bruno@clisp.org>
25455
25456         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
25457         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
25458
25459 2003-01-14  Jim Meyering  <jim@meyering.net>
25460
25461         * lib/same.c (same_name): Tweak a comment.
25462
25463 2003-01-14  Bruno Haible  <bruno@clisp.org>
25464
25465         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
25466         when a string comparison is sufficient.
25467
25468 2003-01-14  Bruno Haible  <bruno@clisp.org>
25469
25470         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
25471         'unsigned int'.
25472
25473 2003-01-14  Bruno Haible  <bruno@clisp.org>
25474
25475         * lib/hash-pjw.c: Add comment about low quality of this function.
25476
25477 2003-01-13  Bruno Haible  <bruno@clisp.org>
25478
25479         * modules/stpcpy: Distribute lib/stpcpy.h.
25480         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
25481
25482 2003-01-13  Bruno Haible  <bruno@clisp.org>
25483
25484         * modules/*: Add a description.
25485         * modules/strpbrk: Fix Makefile.am snippet.
25486         * modules/strtoimax: Fix dependencies.
25487         * modules/strtoumax: Likewise.
25488
25489 2003-01-13  Bruno Haible  <bruno@clisp.org>
25490
25491         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
25492         * modules/alloca (Makefile.am): All object files depend on alloca.h.
25493         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
25494
25495 2003-01-13  Bruno Haible  <bruno@clisp.org>
25496
25497         * gnulib-tool (func_create_testdir): Store config/* files in the main
25498         directory.
25499         * config.rpath: Move to ...
25500         * config/config.rpath: ... here.
25501         * modules/gettext: Contains config/config.rpath, not config.rpath.
25502         * modules/iconv: Likewise.
25503
25504 2003-01-12  Paul Eggert  <eggert@twinsun.com>
25505
25506         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
25507         to avoid collisions with libcurses and libreadline.
25508
25509         * m4/getstr.m4: Remove.
25510         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
25511
25512 2003-01-12  Paul Eggert  <eggert@twinsun.com>
25513
25514         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
25515         to avoid collisions with libcurses and libreadline.
25516
25517         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
25518         * lib/getstr.h, getstr.c: Remove.
25519         * lib/getline.c: Include "getline.h", to check interface.
25520         Move body of old getstr.c here: this defines MIN_CHUNK and
25521         declares getdelim2, which is renamed from getstr.
25522         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
25523
25524         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
25525         All uses changed.
25526         * lib/linebuffer.h: Likewise.
25527         (readline): Remove backward-compatibility macro.
25528
25529 2003-01-12  Paul Eggert  <eggert@twinsun.com>
25530
25531         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
25532         to avoid collisions with libcurses and libreadline.
25533         * getstr: Remove.
25534         * MODULES.html.sh: Remove getstr.
25535         * modules/getline: Depend on unlocked-io, not getstr.
25536
25537 2003-01-12  Jim Meyering  <jim@meyering.net>
25538
25539         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
25540
25541 2003-01-10  Bruno Haible  <bruno@clisp.org>
25542
25543         * modules/alloca: Change Makefile.am requirements. Simplify Include
25544         requirements. Add lib/alloca_.h to file list.
25545
25546 2003-01-10  Bruno Haible  <bruno@clisp.org>
25547
25548         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
25549
25550 2003-01-10  Bruno Haible  <bruno@clisp.org>
25551
25552         * lib/alloca_.h: New file.
25553         * lib/getdate.y: Unconditionally include alloca.h.
25554         * lib/makepath.c: Likewise.
25555         * lib/setenv.c: Likewise.
25556         * lib/userspec.c: Likewise.
25557
25558 2003-01-09  Karl Berry  <karl@gnu.org>
25559
25560         * MODULES.html.sh: include `dirname $0` in PATH, to find
25561         gnulib-tool.
25562
25563 2003-01-09  Bruno Haible  <bruno@clisp.org>
25564
25565         * modules/stdbool: Change configure.ac, Makefile.am requirements.
25566         Simplify Include requirements. Add lib/stdbool.h.in to file list.
25567
25568 2003-01-09  Bruno Haible  <bruno@clisp.org>
25569
25570         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
25571
25572 2003-01-09  Bruno Haible  <bruno@clisp.org>
25573
25574         * lib/stdbool.h.in: New file.
25575
25576 2003-01-09  Bruno Haible  <bruno@clisp.org>
25577
25578         * gnulib-tool (func_all_modules): Ignore files ending in ~.
25579         * MODULES.html.sh: Likewise.
25580
25581 2003-01-08  Jim Meyering  <jim@meyering.net>
25582
25583         * lib/full-write.c: Undefine and define-away `const' after inclusion
25584         of errno.h, not before.  Suggestion from Bruno Haible.
25585
25586 2003-01-08  Bruno Haible  <bruno@clisp.org>
25587
25588         * modules/full-read: Depend on full-write.
25589
25590 2003-01-08  Bruno Haible  <bruno@clisp.org>
25591
25592         * lib/safe-read.c: Include specification header first, to ensure its
25593         selfcontainedness.
25594         * lib/full-write.c: Likewise.
25595
25596 2003-01-07  Jim Meyering  <jim@meyering.net>
25597
25598         * lib/full-write.c: Rework so that it may serve to define full_read,
25599         too.
25600         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
25601
25602 2003-01-07  Bruno Haible  <bruno@clisp.org>
25603
25604         * lib/strtoimax.c: Include <stdint.h> as an alternative to
25605         <inttypes.h>.
25606         * lib/xstrtol.h: Likewise.
25607         * lib/xstrtoimax.c: Likewise.
25608         * lib/xstrtoumax.c: Likewise.
25609         * lib/human.h: Likewise.
25610
25611         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
25612         on systems that have <inttypes.h> but not <stdint.h>.
25613
25614 2003-01-07  Bruno Haible  <bruno@clisp.org>
25615
25616         * MODULES.html.sh: Add copyright notice.
25617         (missed_files): Omit CVS directory entries.
25618         (func_module): Make it work with sed-3.02.
25619         * MODULES.txt: Remove file.
25620
25621 2003-01-06  Jim Meyering  <jim@meyering.net>
25622
25623         * lib/version-etc.c: Update year in translatable copyright string.
25624
25625 2003-01-03  Karl Berry  <karl@gnu.org>
25626
25627         * config/config.{guess,sub}: update from prep.
25628
25629 2003-01-02  Karl Berry  <karl@gnu.org>
25630
25631         * doc/COPYING.DOC: belatedly updated to 1.2.
25632
25633 2003-01-01  Karl Berry  <karl@gnu.org>
25634
25635         * gnulib-tool (func_verify_module): report module name $module in
25636         error message, not $1.
25637         * gnulib-tool (create-testdir): don't complain if destdir couldn't
25638         be created, only if it doesn't exist.
25639         * gnulib-tool (last_checkin_date): don't expand the $Date here.
25640
25641 2002-12-31  Paul Eggert  <eggert@twinsun.com>
25642
25643         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
25644
25645 2002-12-31  Paul Eggert  <eggert@twinsun.com>
25646
25647         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
25648         memcmp if strcoll doesn't work.
25649
25650 2002-12-31  Bruno Haible  <bruno@clisp.org>
25651
25652         * lib/utime.c (utime_null): No need to call ftruncate if the file was
25653         nonempty.
25654
25655 2002-12-31  Bruno Haible  <bruno@clisp.org>
25656
25657         * lib/memcoll.c (STRCOLL): New macro.
25658         (memcoll): Use it.
25659
25660 2002-12-31  Bruno Haible  <bruno@clisp.org>
25661
25662         * lib/localcharset.h: New file.
25663         * lib/localcharset.c: Include it.
25664         * lib/unicodeio.c: Likewise.
25665
25666 2002-12-31  Bruno Haible  <bruno@clisp.org>
25667
25668         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
25669         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
25670
25671 2002-12-31  Bruno Haible  <bruno@clisp.org>
25672
25673         * lib/getline.h: Include <stddef.h>, for size_t.
25674
25675         * lib/unicodeio.h: Include <stddef.h>, for size_t.
25676         * lib/unicodeio.c: Don't include <stddef.h>.
25677
25678 2002-12-31  Bruno Haible  <bruno@clisp.org>
25679
25680         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
25681         HAVE_TM_ZONE.
25682
25683 2002-12-24  Karl Berry  <karl@gnu.org>
25684
25685         * config/config.guess: update from prep.
25686
25687 2002-12-24  Bruno Haible  <bruno@clisp.org>
25688
25689         General infrasructure.
25690         * m4/README: Rewritten.
25691         * m4/onceonly.m4: New file.
25692         * m4/onceonly_2_57.m4: New file.
25693
25694         Module atexit.
25695         * m4/atexit.m4: New file.
25696
25697         Module strtod.
25698         * m4/strtod.m4: New file.
25699
25700         Module strtol.
25701         * m4/strtol.m4: New file.
25702
25703         Module strtoul.
25704         * m4/strtoul.m4: New file.
25705
25706         Module memchr.
25707         * m4/memchr.m4: New file.
25708
25709         Module memcmp.
25710         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
25711         (jm_FUNC_MEMCMP): Invoke it.
25712
25713         Module memcpy.
25714         * m4/memcpy.m4: New file.
25715
25716         Module memmove.
25717         * m4/memmove.m4: New file.
25718
25719         Module memset.
25720         * m4/memset.m4: New file.
25721
25722         Module strcspn.
25723         * m4/strcspn.m4: New file.
25724
25725         Module strpbrk.
25726         * m4/strpbrk.m4: New file.
25727
25728         Module strstr.
25729         * m4/strstr.m4: New file.
25730
25731         Module strerror.
25732         * m4/strerror.m4: New file.
25733
25734         Module mktime.
25735         * m4/mktime.m4: Renamed from jm-mktime.m4.
25736         (gl_PREREQ_MKTIME): New macro.
25737         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
25738
25739         Module malloc.
25740         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
25741         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
25742         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
25743
25744         Module realloc.
25745         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
25746         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
25747         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
25748
25749         Module strftime.
25750         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
25751         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
25752         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
25753         gl_TM_GMTOFF.
25754         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
25755
25756         Module xalloc.
25757         * m4/xalloc.m4: New file.
25758
25759         Module alloca.
25760         * m4/alloca.m4: New file.
25761
25762         Module putenv.
25763         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
25764         (jm_FUNC_PUTENV): Invoke it.
25765
25766         Module setenv.
25767         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
25768         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
25769         when invoked twice.
25770         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
25771         gt_FUNC_SETENV.
25772
25773         Module memrchr.
25774         * m4/memrchr.m4: New file.
25775
25776         Module stpcpy.
25777         * m4/stpcpy.m4: New file.
25778
25779         Module strcase.
25780         * m4/strcase.m4: New file.
25781
25782         Module strdup.
25783         * m4/strdup.m4: New file.
25784
25785         Module strnlen.
25786         * m4/strnlen.m4: New file.
25787
25788         Module strndup.
25789         * m4/strndup.m4: New file.
25790
25791         Module xstrtod.
25792         * m4/xstrtod.m4: New file.
25793
25794         Module xstrtol.
25795         * m4/xstrtol.m4: New file.
25796
25797         Module getdate.
25798         * m4/getdate.m4: New file.
25799
25800         Module unlocked-io.
25801         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
25802         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
25803         * m4/jm-glibc-io.m4n: Remove file.
25804
25805         Module long-options.
25806         * m4/long-options.m4: New file.
25807
25808         Module md5.
25809         * m4/md5.m4: New file.
25810
25811         Module sha.
25812         * m4/sha.m4: New file.
25813
25814         Module getstr.
25815         * m4/getstr.m4: New file.
25816
25817         Module getline.
25818         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
25819         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
25820         <sys/types.h>, for size_t. Use the function name gnu_getline, not
25821         simply getline. Infoke gl_PREREQ_GETLINE.
25822
25823         Module obstack.
25824         * m4/obstack.m4: New file.
25825
25826         Module hash.
25827         * m4/hash.m4: New file.
25828
25829         Module readtokens.
25830         * m4/readtokens.m4: New file.
25831
25832         Module strverscmp.
25833         * m4/strverscmp.m4: New file.
25834
25835         Module stdbool.
25836         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
25837         OSF/1.
25838
25839         Module strtoll.
25840         * m4/strtoll.m4: New file.
25841
25842         Module strtoull.
25843         * m4/strtoull.m4: New file.
25844
25845         Module strtoimax.
25846         * m4/strtoimax.m4: New file.
25847
25848         Module strtoumax.
25849         * m4/strtoumax.m4: New file.
25850
25851         Module xstrtoimax.
25852         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
25853         jm_AC_PREREQ_XSTRTOIMAX.
25854         Moved the strtol prerequisites to strtol.m4.
25855         Moved the strtoll prerequisites to strtoll.m4.
25856         Moved the strtoimax prerequisites to strtoimax.m4.
25857
25858         Module xstrtoumax.
25859         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
25860         jm_AC_PREREQ_XSTRTOUMAX.
25861         Moved the strtoul prerequisites to strtoul.m4.
25862         Moved the strtoull prerequisites to strtoull.m4.
25863         Moved the strtoumax prerequisites to strtoumax.m4.
25864
25865         Module chown.
25866         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
25867         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
25868
25869         Module dup2.
25870         * m4/dup2.m4: New file.
25871
25872         Module ftruncate.
25873         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
25874         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
25875
25876         Module getgroups.
25877         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
25878         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
25879
25880         Module gettimeofday.
25881         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
25882         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
25883         gl_PREREQ_GETTIMEOFDAY.
25884
25885         Module mkdir.
25886         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
25887         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
25888
25889         Module mkstemp.
25890         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
25891         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
25892         jm_AC_TYPE_UINTMAX_T.
25893         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
25894
25895         Module stat.
25896         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
25897         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
25898
25899         Module lstat.
25900         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
25901         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
25902
25903         Module timespec.
25904         * m4/timespec.m4 (gl_TIMESPEC): New macro.
25905         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
25906         * m4/st_mtim.m4: Indentation.
25907
25908         Module nanosleep.
25909         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
25910         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
25911         gl_PREREQ_NANOSLEEP.
25912
25913         Module regex.
25914         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
25915         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
25916         (gl_REGEX): New macro.
25917
25918         Module rename.
25919         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
25920         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
25921
25922         Module rmdir.
25923         * m4/rmdir.m4: New file.
25924
25925         Module utime.
25926         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
25927         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
25928         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
25929
25930         Module dirname.
25931         * m4/dirname.m4: New file.
25932
25933         Module getopt.
25934         * m4/getopt.m4: New file.
25935
25936         Module unistd-safer.
25937         * m4/unistd-safer.m4: New file.
25938
25939         Module fnmatch.
25940         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
25941         declaration.
25942         (gl_PREREQ_FNMATCH_EXTRA): New macro.
25943         (gl_FUNC_FNMATCH_POSIX): New macro.
25944         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
25945         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
25946         simply fnmatch.
25947
25948         Module exclude.
25949         * m4/exclude.m4: New file.
25950
25951         Module human.
25952         * m4/human.m4: New file.
25953
25954         Module acl.
25955         * m4/acl.m4: Nop.
25956
25957         Module backupfile.
25958         * m4/backupfile.m4: New file.
25959         * m4/d-ino.m4: Indentation.
25960
25961         Module fsusage.
25962         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
25963         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
25964         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
25965
25966         Module dirfd.
25967         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
25968         requirements.
25969
25970         Module euidaccess.
25971         * m4/euidaccess.m4: New file.
25972
25973         Module file-type.
25974         * m4/file-type.m4: New file.
25975
25976         Module fileblocks.
25977         * m4/fileblocks.m4: New file.
25978
25979         Module filemode.
25980         * m4/filemode.m4: New file.
25981
25982         Module isdir.
25983         * m4/isdir.m4: New file.
25984
25985         Module lchown.
25986         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
25987         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
25988
25989         Module makepath.
25990         * m4/makepath.m4: New file.
25991
25992         Module modechange.
25993         * m4/modechange.m4: New file.
25994
25995         Module mountlist.
25996         * m4/mountlist.m4: New file.
25997         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
25998         Indentation.
25999
26000         Module path-concat.
26001         * m4/path-concat.m4: New file.
26002
26003         Module pathmax.
26004         * m4/pathmax.m4: New file.
26005
26006         Module same.
26007         * m4/same.m4: New file.
26008
26009         Module save-cwd.
26010         * m4/save-cwd.m4: New file.
26011
26012         Module savedir.
26013         * m4/savedir.m4: New file.
26014
26015         Module xgetcwd.
26016         * m4/xgetcwd.m4: New file.
26017         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
26018
26019         Module xreadlink.
26020         * m4/xreadlink.m4: New file.
26021
26022         Module safe-read.
26023         * m4/safe-read.m4: New file.
26024
26025         Module safe-write.
26026         * m4/safe-write.m4: New file.
26027
26028         Module closeout.
26029         * m4/closeout.m4: New file.
26030
26031         Module stdio-safer.
26032         * m4/stdio-safer.m4: New file.
26033
26034         Module getpass.
26035         * m4/getpass.m4: New file.
26036
26037         Module getugroups.
26038         * m4/getugroups.m4: New file.
26039
26040         Module group-member.
26041         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
26042         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
26043
26044         Module idcache.
26045         * m4/idcache.m4: New file.
26046
26047         Module userspec.
26048         * m4/userspec.m4: New file.
26049
26050         Module gettime.
26051         * m4/clock_time.m4: New file.
26052         * m4/gettime.m4: New file.
26053
26054         Module settime.
26055         * m4/settime.m4: New file.
26056
26057         Module posixtm.
26058         * m4/posixtm.m4: New file.
26059
26060         Module gethostname.
26061         * m4/gethostname.m4: New file.
26062
26063         Module canon-host.
26064         * m4/canon-host.m4: New file.
26065
26066         Module gettext.
26067         * m4/codeset.m4: New file, from gettext-0.11.5.
26068         * m4/gettext.m4: New file, from gettext-0.11.5.
26069         * m4/glibc21.m4: New file, from gettext-0.11.5.
26070         * m4/iconv.m4: New file, from gettext-0.11.5.
26071         * m4/intdiv0.m4: New file, from gettext-0.11.5.
26072         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
26073         * m4/inttypes.m4: New file, from gettext-0.11.5.
26074         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
26075         * m4/isc-posix.m4: New file, from gettext-0.11.5.
26076         * m4/lcmessage.m4: New file, from gettext-0.11.5.
26077         * m4/lib-ld.m4: New file, from gettext-0.11.5.
26078         * m4/lib-link.m4: New file, from gettext-0.11.5.
26079         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
26080         * m4/progtest.m4: New file, from gettext-0.11.5.
26081         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
26082         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
26083         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
26084
26085         Module localcharset.
26086         * m4/localcharset.m4: New file.
26087
26088         Module hard-locale.
26089         * m4/hard-locale.m4: New file.
26090
26091         Module mbswidth.
26092         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
26093         onceonly macros.
26094         * m4/mbrtowc.m4: Add comment.
26095
26096         Module memcasecmp.
26097         * m4/memcasecmp.m4: New file.
26098
26099         Module memcoll.
26100         * m4/memcoll.m4: New file.
26101
26102         Module unicodeio.
26103         * m4/unicodeio.m4: New file.
26104
26105         Module rpmatch.
26106         * m4/rpmatch.m4: New file.
26107
26108         Module yesno.
26109         * m4/yesno.m4: New file.
26110
26111         Module exitfail.
26112         * m4/exitfail.m4: New file.
26113
26114         Module c-stack.
26115         * m4/c-stack.m4 (gl_C_STACK): New macro.
26116         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
26117
26118         Module error.
26119         * m4/error.m4 (gl_ERROR): New macro.
26120         (jm_PREREQ_ERROR): Use onceonly macros.
26121
26122         Module fatal.
26123         * m4/fatal.m4: New file.
26124
26125         Module getloadavg.
26126         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
26127         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
26128
26129         Module getpagesize.
26130         * m4/getpagesize.m4: New file.
26131
26132         Module getusershell.
26133         * m4/getusershell.m4: New file.
26134
26135         Module physmem.
26136         * m4/physmem.m4: New file.
26137
26138         Module posixver.
26139         * m4/posixver.m4: New file.
26140
26141         Module quotearg.
26142         * m4/quotearg.m4: New file.
26143
26144         Module quote.
26145         * m4/quote.m4: New file.
26146
26147         Module readutmp.
26148         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
26149
26150         Module sig2str.
26151         * m4/sig2str.m4: New file.
26152
26153         Other.
26154         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
26155         ulonglong.m4.
26156         * m4/intmax_t.m4: New file.
26157         * m4/d-type.m4: Indentation.
26158         * m4/jm-macros.m4: Update.
26159         * m4/prereq.m4 (jm_PREREQ): Update.
26160         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
26161         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
26162         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
26163         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
26164         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
26165         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
26166         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
26167         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
26168         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
26169         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
26170         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
26171         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
26172         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
26173         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
26174         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
26175         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
26176         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
26177         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
26178         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
26179
26180 2002-12-24  Bruno Haible  <bruno@clisp.org>
26181
26182         * MODULES.txt: Update according to m4/ changes.
26183
26184         Module gettext.
26185         * config.rpath: New file, from gettext-0.11.5.
26186
26187         * modules/*: New module descriptions.
26188         * gnulib-tool: New file.
26189         * MODULES.html.sh: New file.
26190
26191 2002-12-21  Karl Berry  <karl@gnu.org>
26192
26193         * doc/fdl.texi: update to version 1.2.
26194
26195 2002-12-19  Karl Berry  <karl@gnu.org>
26196
26197         * config/config.guess: update from prep.
26198
26199 2002-12-18  Bruno Haible  <bruno@clisp.org>
26200
26201         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
26202         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
26203
26204 2002-12-17  Bruno Haible  <bruno@clisp.org>
26205
26206         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
26207         stdlib.h, string.h.
26208
26209 2002-12-17  Bruno Haible  <bruno@clisp.org>
26210
26211         * lib/canon-host.c (strdup): Remove unused declaration.
26212
26213         * lib/fsusage.c: Include full_read.h.
26214         (get_fs_usage): Use full_read instead of safe_read.
26215
26216         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
26217
26218 2002-12-12  Karl Berry  <karl@gnu.org>
26219
26220         * config/config.guess: update from prep.
26221
26222 2002-12-11  Bruno Haible  <bruno@clisp.org>
26223
26224         * m4/setenv.m4: New file, from gettext-0.11.5.
26225
26226 2002-12-11  Bruno Haible  <bruno@clisp.org>
26227
26228         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
26229         not unsetenv().
26230         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
26231         modifications:
26232
26233         2002-12-11  Bruno Haible  <bruno@clisp.org>
26234
26235                 * setenv.c (alloca): Fall back to malloc.
26236                 (freea): New macro.
26237                 (setenv): Use freea() to free memory allocated with alloca().
26238
26239         2002-11-13  Bruno Haible  <bruno@clisp.org>
26240
26241                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
26242                 function declarations.
26243                 * unsetenv.c (unsetenv): Likewise.
26244
26245         2002-03-04  Bruno Haible  <bruno@clisp.org>
26246
26247                 Portability to AIX 4.3.3.
26248                 * unsetenv.c: New file, extracted from setenv.c.
26249                 * setenv.c: Move the unsetenv() function to unsetenv.c.
26250
26251         2001-12-20  Bruno Haible  <bruno@clisp.org>
26252
26253                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
26254                 use malloc instead. For SunOS 4.
26255
26256         2001-12-11  Bruno Haible  <bruno@clisp.org>
26257
26258                 * setenv.c: Declare alloca.
26259                 (compar_fn_t): New typedef.
26260                 (KNOWN_VALUE, STORE_VALUE): Use it.
26261
26262         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
26263         setenv.h.
26264
26265 2002-12-10  Paul Eggert  <eggert@twinsun.com>
26266
26267         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
26268         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
26269         Choose values that are less likely to collide with system fnmatch
26270         options.
26271         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
26272         defined (e.g., a pure POSIX system).
26273         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
26274         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
26275
26276 2002-12-06  Paul Eggert  <eggert@twinsun.com>
26277
26278         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
26279         a pain in practice to deal with generated m4 files.  This change
26280         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
26281
26282         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
26283         and jm-glibc-io.m4, as they are no longer a special case.
26284         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
26285         kludge and the auto-generation stuff.  Check only whether the
26286         functions are declared, not whether they exist, since older hosts
26287         that don't declare the functions can't use the optimization anyway.
26288
26289 2002-12-06  Jim Meyering  <jim@meyering.net>
26290
26291         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
26292
26293         Merge in changes from libc's misc/error.c, in preparation
26294         for the merge of gnulib's changes back into libc.
26295
26296         * lib/error.c (_): Define only if not already defined.
26297         Move definition to follow all #include directives.
26298         Include unlocked-io.h only if !_LIBC.
26299         [_LIBC]: Include <libio/libioP.h>.
26300         [USE_IN_LIBIO]: Include <libio/iolibio.h>
26301         (fflush): Tweak definition to use INTUSE.
26302         (putc): Define.
26303
26304 2002-12-05  Paul Eggert  <eggert@twinsun.com>
26305
26306         * lib/alloca.c [defined emacs]: Include "lisp.h".
26307         (xalloc_die) [defined emacs]: New macro.
26308         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
26309         [! defined emacs]: Include <xalloc.h>.
26310         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
26311         (pointer): Typedef to POINTER_TYPE *.
26312         (malloc): Remove decl; we now always use xmalloc.
26313         (alloca): Use old-style definition, since Emacs needs this.
26314         Check for arithmetic overflow when computing combined size.
26315
26316 2002-12-04  Paul Eggert  <eggert@twinsun.com>
26317
26318         Do not generate unlocked-io.h automatically, since it's easier to
26319         maintain it by hand.
26320
26321         * lib/unlocked-io.h: New file, from GNU diffutils,
26322         but with proper copyright notice and attribution.
26323         * lib/gen-uio: Remove.
26324         * lib/Makefile.am: Add copyright notice.
26325         (libfetish_a_SOURCES): Add unlocked-io.h.
26326         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
26327         (DISTCLEANFILES, io_functions): Remove macros.
26328         (EXTRA_DIST): Remove gen_uio.
26329         (unlocked-io.h): Remove rule.
26330
26331 2002-12-04  Jim Meyering  <jim@meyering.net>
26332
26333         Reflect the fact that stat.c and lstat.c are no longer generated.
26334         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
26335         (DISTCLEANFILES): Likewise.
26336         (EXTRA_DIST): Likewise.
26337         (all_local): Don't depend on stat.c or lstat.c.
26338         (stat.c, lstat.c): Remove rules.
26339         (EXTRA_DIST): Remove xstat.in.
26340
26341         * lib/xstat.in: Remove file.  Contents moved into stat.c.
26342         * lib/stat.c: New file.  Contents mostly from xstat.in.
26343         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
26344         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
26345
26346         * lib/safe-read.c: Rework so that it may serve to define safe_write,
26347         too.
26348         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
26349
26350 2002-12-03  Jim Meyering  <jim@meyering.net>
26351
26352         * lib/safe-read.c, safe-write.c: Change variable names and comments,
26353         but not semantics, to minimize the differences between these two files.
26354         (safe_read): Change comment to mention SAFE_READ_ERROR.
26355
26356         * lib/safe-read.c (IS_EINTR): Define.
26357         (safe_read): Use IS_EINTR in place of in-function cpp directives.
26358
26359 2002-12-02  Jim Meyering  <jim@meyering.net>
26360
26361         * lib/safe-read.c (EINTR): Define.
26362         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
26363         (INT_MAX): Provide fallback.
26364         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
26365
26366         * lib/safe-read.h (SAFE_READ_ERROR): Define.
26367
26368 2002-12-02  Bruno Haible  <bruno@clisp.org>
26369
26370         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
26371         Define, taken from safe-read.c.
26372         (INT_MAX): Provide fallback.
26373         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
26374         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
26375
26376         * lib/safe-read.c (EINTR): Remove definition.
26377         (safe_read): Don't use EINTR if it is absent.
26378
26379 2002-12-01  Jim Meyering  <jim@meyering.net>
26380
26381         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
26382         zero.
26383         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
26384
26385 2002-11-27  Paul Eggert  <eggert@twinsun.com>
26386
26387         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
26388         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
26389         with `if (! (value < limit)) abort ();', for readability.
26390
26391 2002-11-26  Karl Berry  <karl@gnu.org>
26392
26393         * lib/strdup.c: copy from libc again, with jim's ok.
26394         * lib/.cppi-disable: re-add strdup.c
26395
26396 2002-11-25  Karl Berry  <karl@gnu.org>
26397
26398         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
26399         instead of "strtol.c".
26400
26401 2002-11-25  Karl Berry  <karl@gnu.org>
26402
26403         * config/install-sh: update from automake for variable quoting, $0 in
26404         error msgs, etc.
26405
26406         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
26407         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
26408         entry.
26409
26410 2002-11-25  Jim Meyering  <jim@meyering.net>
26411
26412         * lib/mktime.c: Sync from libc, now that it has the latest fix.
26413
26414 2002-11-24  Karl Berry  <karl@gnu.org>
26415
26416         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
26417         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
26418
26419 2002-11-24  Jim Meyering  <jim@meyering.net>
26420
26421         Update from coreutils:
26422
26423         * lib/mktime.c: Merge in changes from libc.
26424
26425         Avoid a link-time failure on some Linux systems.
26426         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
26427         (otherwise).
26428         (__mon_yday): Declare with the STATIC attribute.
26429         (__mktime_internal): Likewise.
26430         Based on a report from Greg Schafer.
26431
26432 2002-11-23  Jim Meyering  <jim@meyering.net>
26433
26434         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
26435         Use `unsigned', not `int', as type of index.
26436
26437         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
26438
26439         * lib/fsusage.c: Remove unneeded parentheses around operands of
26440         `defined'.
26441
26442 2002-11-22  Paul Eggert  <eggert@twinsun.com>
26443
26444         * lib/quotearg.h: Allow multiple inclusion by surrounding with
26445         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
26446         so that we can be included first.
26447         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
26448         * lib/quotearg.c: Include quotearg.h immediately after config.h.
26449         No need to include stddef.h or sys/types.h any more.
26450         Surround local include files with "", not "<>".
26451         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
26452         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
26453         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
26454         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
26455         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
26456         (ISPRINT): Remove; no longer needed now that we assume C89.
26457
26458         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
26459         Preserve errno.
26460
26461         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
26462         quotearg_char): Use SIZE_MAX rather than
26463         (size_t) -1 when we are talking about "infinity".
26464
26465         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
26466
26467 2002-11-22  Paul Eggert  <eggert@twinsun.com>
26468
26469         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
26470         hint that one should use `if (! x) abort ();' rather than `assert
26471         (x);', and anyway it's one less thing to worry about configuring.
26472         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
26473         hash_rehash, hash_insert): Use abort rather than assert.
26474
26475 2002-11-22  Bruno Haible  <bruno@clisp.org>
26476
26477         * lib/safe-read.h: Assume C89. Add comments.
26478         (safe_read): Change return type to size_t.
26479         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
26480         byte counts > SSIZE_MAX correctly.
26481         * lib/safe-write.h: New file.
26482         * lib/safe-write.c: New file.
26483         * lib/full-read.h: New file.
26484         * lib/full-read.c: New file.
26485         * lib/full-write.h: Assume C89. Add comments.
26486         * lib/full-write.c: Include safe-write.h.
26487         (full_write): Rewritten to use safe_write.
26488         Suggested by Jim Meyering and Paul Eggert.
26489
26490 2002-11-21  Jim Meyering  <jim@meyering.net>
26491
26492         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
26493
26494         Merge in changes from the coreutils.
26495
26496         2002-09-25  Paul Eggert  <eggert@twinsun.com>
26497         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
26498         <stdint.h>.
26499         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
26500         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
26501         int.  Work more efficiently if X is the same width as uintmax_t.
26502         Do not compare X to -1, to avoid bogus compiler warning.
26503         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
26504         Don't assume that f_frsize and f_bsize are the same type.
26505
26506         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
26507         warning on FreeBSD.
26508
26509         * lib/makepath.c (make_path): Restore umask *before* creating the final
26510         component.
26511         (make_path): Minor reformatting.
26512
26513         * lib/xmalloc.c: Adjust to work with new autoconf macros,
26514         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
26515         HAVE_MALLOC/HAVE_REALLOC.
26516
26517         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
26518         dummy ones.  At least on GNU/Linux systems, `auto' means something
26519         else.
26520         From Michael Stone.
26521
26522 2002-11-21  Bruno Haible  <bruno@clisp.org>
26523
26524         Remove case insensitive option matching.
26525         * lib/argmatch.h (argcasematch): Remove declaration.
26526         (ARGCASEMATCH): Remove macro.
26527         (__xargmatch_internal): Remove case_sensitive argument.
26528         (XARGMATCH): Update.
26529         (XARGCASEMATCH): Remove macro.
26530         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
26531         case_sensitive argument.
26532         (argcasematch): Remove function.
26533         (__xargmatch_internal): Remove case_sensitive argument.
26534         (main): Use XARGMATCH instead of XARGCASEMATCH.
26535
26536         * lib/xmalloc.c: Change compile-time error message. Add comment about
26537         required autoconf version.
26538
26539 2002-11-20  Paul Eggert  <eggert@twinsun.com>
26540
26541         Merge argmatch cleanups from Bison.  Assume C89.
26542
26543         * lib/argmatch.c: Include config.h here, not in argmatch.h.
26544         Include stdlib.h, for EXIT_FAILURE.
26545         Always include <string.h>, since we assume C89.
26546         (EXIT_FAILURE): Remove pre-C89 bug workaround.
26547         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
26548         Include <stddef.h> instead, since it's all we need for size_t.
26549         (PARAMS): Remove.  All uses removed.
26550         (ARRAY_CARDINALITY): Do not bother to #undef.
26551         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
26552         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
26553         Remove unnecessary parentheses.
26554         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
26555         Insert necessary parentheses.
26556         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
26557         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
26558
26559 2002-11-19  Bruno Haible  <bruno@clisp.org>
26560
26561         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
26562         * lib/mbswidth.h: Include <stddef.h>, for size_t.
26563
26564         * lib/mbswidth.h (PARAMS): Remove macro.
26565         (mbswidth, mbsnwidth): Use ANSI C function declarations.
26566         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
26567
26568         * lib/gcd.h (PARAMS): Remove macro.
26569         (gcd): Use ANSI C function declarations.
26570         * lib/gcd.c (gcd): Likewise.
26571
26572 2002-11-15  Bruno Haible  <bruno@clisp.org>
26573
26574         * lib/strcspn.c: Include <stddef.h>.
26575         (strcspn): Use ANSI C function declaration. Change return type to
26576         size_t. Use NULL.
26577         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
26578         (strpbrk): Use NULL.
26579         * lib/strpbrk.h (PARAMS): Remove macro.
26580         (strpbrk): Use ANSI C function declaration.
26581         * lib/strstr.c: Don't include <sys/types.h>.
26582         * lib/strstr.h (PARAMS): Remove macro.
26583         (strstr): Use ANSI C function declarations.
26584
26585 2002-11-14  Karl Berry  <karl@gnu.org>
26586
26587         * config/mkinstalldirs: `do' on separate line, instead of
26588         `for var; do'.
26589
26590 2002-11-06  Bruno Haible  <bruno@clisp.org>
26591
26592         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
26593         * lib/gcd.c (gcd): Likewise.
26594
26595 2002-11-05  Bruno Haible  <bruno@clisp.org>
26596
26597         * lib/gcd.h: New file, from gettext-0.11.5.
26598         * lib/gcd.c: New file, from gettext-0.11.5.
26599
26600 2002-11-05  Bruno Haible  <bruno@clisp.org>
26601
26602         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
26603         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
26604         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
26605         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
26606
26607         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
26608         <libintl.h>.
26609         * lib/makepath.c: Include gettext.h instead of <locale.h> and
26610         <libintl.h>.
26611
26612         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
26613         * lib/human.c: Include gettext.h instead of <libintl.h>.
26614         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
26615         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
26616         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
26617         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
26618         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
26619         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
26620         (textdomain): Remove definition.
26621         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
26622
26623         * lib/long-options.c: Remove include of <libintl.h> and definition of
26624         _.
26625         * lib/same.c: Remove include of <libintl.h> and definition of _.
26626
26627 2002-11-04  Owen Taylor  <otaylor@redhat.com>
26628
26629         * lib/config.charset: A few additions for Solaris.
26630
26631 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
26632
26633         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
26634         * lib/localcharset.c (locale_charset): Declare as extern "C".
26635
26636 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
26637
26638         * lib/config.charset: msdos in uk_UA uses CP1125.
26639
26640 2002-11-04  Bruno Haible  <bruno@clisp.org>
26641
26642         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
26643         * lib/strcase.h: New file, from GNU gettext-0.11.5.
26644         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
26645         * lib/strstr.h: New file, from GNU gettext-0.11.5.
26646         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
26647
26648 2002-11-04  Bruno Haible  <bruno@clisp.org>
26649
26650         * lib/localcharset.c (locale_charset): Don't return an empty string.
26651
26652 2002-11-04  Bruno Haible  <bruno@clisp.org>
26653
26654         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
26655         aliases.
26656
26657 2002-11-04  Bruno Haible  <bruno@clisp.org>
26658
26659         * lib/config.charset: Update for newest glibc. Add canonical names
26660         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
26661
26662 2002-11-04  Bruno Haible  <bruno@clisp.org>
26663
26664         * lib/config.charset: Add support for NetBSD.
26665
26666 2002-11-04  Bruno Haible  <bruno@clisp.org>
26667
26668         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
26669
26670 2002-11-01  Bruno Haible  <bruno@clisp.org>
26671
26672         * configure.in: Add AC_CONFIG_AUX_DIR call.
26673         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
26674         test/Makefile.
26675         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
26676
26677 2002-09-28  Karl Berry  <karl@gnu.org>
26678
26679         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
26680         installed automake until the next release, since changes have been
26681         made.
26682
26683 2002-09-25  Karl Berry  <karl@gnu.org>
26684
26685         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
26686         * lib/getopt*: copy from libc/posix.
26687         * lib/gettext.h: copy from gettext.
26688         * lib/.cppi-disable: add strdup.c, gettext.h.
26689
26690 2002-09-25  Karl Berry  <karl@gnu.org>
26691
26692         * config/srclist.txt: enable gettext.h check.
26693         * config/config.{guess,sub}: update from prep.
26694         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
26695                 from automake 1.6.3.
26696         See srclist*.
26697
26698 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
26699
26700         * regex.c (PATFETCH): Remove the translating fetch.
26701         (PATFETCH_RAW): Rename to PATFETCH.
26702         (set_image_of_range): New fun.
26703         (SET_RANGE_TABLE_WORK_AREA): Use it.
26704         (regex_compile): Don't translate the pattern chars so eagerly.
26705         Only do it when inserting an `exactn' bytecode or when handling
26706         a char-range.
26707         (mutually_exclusive_p): Avoid empty statement.
26708
26709 2002-07-06  Jim Meyering  <meyering@lucent.com>
26710
26711         * m4/README: Don't mention Makefile.am.in.
26712         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
26713
26714 2002-07-01  Jim Meyering  <meyering@lucent.com>
26715
26716         * lib/c-stack.c: Include sys/time.h.
26717         From Volker Borchert.
26718
26719 2002-06-26  Paul Eggert  <eggert@twinsun.com>
26720
26721         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
26722
26723 2002-06-26  Paul Eggert  <eggert@twinsun.com>
26724
26725         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
26726         New macro.  Use it uniformly instead of
26727         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
26728         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
26729         reported by Vin Shelton.
26730
26731 2002-06-22  Paul Eggert  <eggert@twinsun.com>
26732
26733         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
26734         Do not assume SA_SIGINFO behavior.
26735         Bug reported by Jim Meyering on NetBSD 1.5.2.
26736
26737 2002-06-22  Jim Meyering  <meyering@lucent.com>
26738
26739         * m4/c-stack.m4: New file, from diffutils-2.8.2.
26740         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
26741
26742         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
26743         now that configure.ac uses AC_GNU_SOURCE.
26744         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
26745         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
26746
26747         Update to latest tools.  Suggestions from Paul Eggert.
26748         * m4/stdbool.m4: New file, from diffutils-2.8.2.
26749         * m4/gnu-source.m4: Update from diffutils-2.8.2.
26750         * m4/fnmatch.m4: Likewise.
26751         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
26752         to AC_HEADER_STDBOOL
26753
26754 2002-06-22  Jim Meyering  <meyering@lucent.com>
26755
26756         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
26757         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
26758
26759 2002-06-22  Jim Meyering  <meyering@lucent.com>
26760
26761         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
26762
26763         * lib/exitfail.c, exitfail.h: Likewise.
26764         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
26765
26766         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
26767         of fnmatch.h.
26768         (EXTRA_DIST): Add fnmatch_loop.c.
26769         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
26770
26771         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
26772         * lib/fnmatch.c: Update from diffutils-2.8.2.
26773         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
26774         * lib/fnmatch.h: Remove file.
26775
26776 2002-06-21  Jim Meyering  <meyering@lucent.com>
26777
26778         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
26779         * m4/mbrtowc.m4: Likewise.
26780
26781         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
26782         * m4/mbswidth.m4: Reflect name change:
26783         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
26784         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
26785
26786         * m4/lib-link.m4: Update from gettext-0.11.2.
26787         * m4/gettext.m4: Likewise.
26788
26789         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
26790         From Alfred M. Szmidt.
26791
26792 2002-06-18  Paul Eggert  <eggert@twinsun.com>
26793
26794         * lib/file-type.h: Report an error if neither S_ISREG nor
26795         S_IFREG is defined, instead of using a test specific to glibc
26796         2.2.  This should be safe, since POSIX requires S_ISREG and
26797         Unix Version 7 had S_IFREG.  We don't need to check for
26798         <sys/types.h> since we don't use any symbols that it defines.
26799
26800 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
26801
26802         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
26803         $@-t, so that each temporary file name is unique and valid in the first
26804         8 characters, for operation under DOS.
26805
26806 2002-06-15  Paul Eggert  <eggert@twinsun.com>
26807
26808         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
26809
26810 2002-06-15  Jim Meyering  <meyering@lucent.com>
26811
26812         Work even with DJGPP 2.03, which lacks support for symlinks.
26813         From Richard Dawe.
26814         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
26815         is defined.
26816         * lib/lchown.c (S_ISLNK): Likewise.
26817
26818 2002-06-15  Jim Meyering  <meyering@lucent.com>
26819
26820         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
26821         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
26822         have been included before this file.
26823
26824 2002-06-14  Jim Meyering  <meyering@lucent.com>
26825
26826         * lib/file-type.h: Use the version from diffutils-2.8.2.
26827         * lib/file-type.c: Likewise.
26828
26829 2002-06-07  Jim Meyering  <meyering@lucent.com>
26830
26831         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
26832         They're needed at least for NetBSD 1.5.2.
26833         ($statxfs_includes): Include those same headers.
26834         ($statxfs_includes): Include sys/vfs.h if available.
26835         ($statxfs_includes): Likewise for sys/statvfs.h.
26836         Check for the following members in both structs statfs and statvfs:
26837         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
26838
26839 2002-06-01  Jim Meyering  <meyering@lucent.com>
26840
26841         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
26842         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
26843
26844 2002-05-28  Jim Meyering  <meyering@lucent.com>
26845
26846         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
26847         Reported by Volker Borchert.
26848
26849 2002-05-27  Jim Meyering  <meyering@lucent.com>
26850
26851         Fix a problem seen only on nonconforming systems whereby ls.c's
26852         use of localtime, and then of gettimeofday would cause trouble:
26853         the localtime call used to initialize rpl_gettimeofday's save
26854         mechanism would clobber ls's current local time information so
26855         that in any long listing the first file would always be listed
26856         with date 1970-01-01.  Analysis by Volker Borchert.
26857
26858         * lib/gettimeofday.c (localtime): Undefine.
26859         (rpl_localtime): New function.
26860
26861 2002-05-27  Jim Meyering  <meyering@lucent.com>
26862
26863         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
26864         localtime.
26865
26866         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
26867         use the replacement function; it wouldn't resolve at link time.
26868         Reported by Volker Borchert.
26869
26870 2002-05-22  Jim Meyering  <meyering@lucent.com>
26871
26872         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
26873         file-type.h.
26874         * lib/file-type.h: New file.
26875         * lib/file-type.c (file_type): New file/function.  Extracted from
26876         diffutils.
26877
26878 2002-04-30  Jim Meyering  <meyering@lucent.com>
26879
26880         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
26881
26882 2002-04-29  Paul Eggert  <eggert@twinsun.com>
26883
26884         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
26885
26886 2002-04-29  Paul Eggert  <eggert@twinsun.com>
26887
26888         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
26889         Do not check for alloca.h (no longer used) or stdbool.h (was never
26890         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
26891
26892 2002-04-29  Paul Eggert  <eggert@twinsun.com>
26893
26894         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
26895
26896 2002-04-29  Jim Meyering  <meyering@lucent.com>
26897
26898         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
26899         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
26900         Use AC_FUNC_STRNLEN here instead.
26901
26902         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
26903         With autoconf-2.53a, it's part of AC_PROG_CC.
26904
26905 2002-04-28  Paul Eggert  <eggert@twinsun.com>
26906
26907         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
26908         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
26909
26910 2002-04-28  Paul Eggert  <eggert@twinsun.com>
26911
26912         * lib/sig2str.h, lib/sig2str.c: New files.
26913         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
26914
26915 2002-04-28  Paul Eggert  <eggert@twinsun.com>
26916
26917         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
26918         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
26919         of 127, since 64 is the largest conceivable number for ancient
26920         nonstandard hosts.
26921         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
26922
26923 2002-04-28  Jim Meyering  <meyering@lucent.com>
26924
26925         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
26926
26927 2002-04-24  Jim Meyering  <meyering@lucent.com>
26928
26929         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
26930         (jm_PREREQ): Use it.
26931
26932         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
26933         mach/mach.h fcntl.h.
26934         Check for this function: setlocale.
26935
26936 2002-04-24  Jim Meyering  <meyering@lucent.com>
26937
26938         * lib/gettext.h: New file, from Gettext.
26939         * lib/Makefile.am (INCLUDES): Remove -I../intl.
26940         (libfetish_a_SOURCES): Add gettext.h.
26941
26942 2002-04-16  Jim Meyering  <meyering@lucent.com>
26943
26944         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
26945         ut_pid, ut_id, ut_exit.
26946
26947 2002-04-16  Jim Meyering  <meyering@lucent.com>
26948
26949         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
26950         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
26951         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
26952
26953 2002-04-12  Jim Meyering  <meyering@lucent.com>
26954
26955         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
26956         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
26957         existence of the getmntinfo function.  Needed for Darwin 5.3.
26958
26959         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
26960         This is necessary at least on Darwin 5.3.
26961
26962         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
26963         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
26964         strnlen.o in the library, and that makes some versions of ranlib
26965         object.
26966
26967 2002-04-12  Jim Meyering  <meyering@lucent.com>
26968
26969         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
26970
26971 2002-04-09  Jim Meyering  <meyering@lucent.com>
26972
26973         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
26974         to be more precise.  Rather than saying we're checking whether the
26975         function `works', say what we're testing.
26976         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
26977         Reported by Bruno Haible.
26978
26979 2002-03-10  Jim Meyering  <meyering@lucent.com>
26980
26981         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
26982         Suggestion from Santiago Vila.
26983
26984 2002-03-08  Jim Meyering  <meyering@lucent.com>
26985
26986         * lib/rename.c: Mention that this wrapper is needed also on
26987         mips-dec-ultrix4.4 systems.
26988
26989 2002-03-02  Jim Meyering  <meyering@lucent.com>
26990
26991         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
26992         not HAVE_CLOCK_SETTIME.
26993
26994 2002-02-27  Paul Eggert  <eggert@twinsun.com>
26995
26996         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
26997         Check for clock_settime.
26998
26999 2002-02-27  Paul Eggert  <eggert@twinsun.com>
27000
27001         * lib/nanosleep.h: Rename to....
27002         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
27003
27004         * lib/gettime.c: New file.
27005         * lib/settime.c: New file.
27006         * lib/stime.c: Remove.
27007
27008         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
27009         timespec.h.  Remove nanosleep.h.
27010
27011 2002-02-25  Paul Eggert  <eggert@twinsun.com>
27012
27013         * m4/acl.m4: New file.
27014         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
27015         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
27016
27017 2002-02-25  Paul Eggert  <eggert@twinsun.com>
27018
27019         * lib/acl.c, lib/acl.h: New files.
27020         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
27021
27022 2002-02-24  Jim Meyering  <meyering@lucent.com>
27023
27024         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
27025         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
27026         cause trouble.  Reported by Nelson Beebe.
27027
27028 2002-02-23  Paul Eggert  <eggert@twinsun.com>
27029
27030         * lib/path-concat.c (xpath_concat): Reorder code to pacify
27031         compilers that don't know that xalloc_die never returns.
27032
27033 2002-02-20  Jim Meyering  <meyering@lucent.com>
27034
27035         * lib/getdate.c: Regenerate using bison-1.33.
27036
27037 2002-02-17  Jim Meyering  <meyering@lucent.com>
27038
27039         * config/config.guess (main): Don't use `head -1'; it's no longer
27040         portable. Use `sed 1q' instead.
27041
27042 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
27043
27044         * m4/codeset.m4: Upgrade to gettext-0.11.
27045         * m4/gettext.m4: Upgrade to gettext-0.11.
27046         * m4/glibc21.m4: Upgrade to gettext-0.11.
27047         * m4/iconv.m4: Upgrade to gettext-0.11.
27048         * m4/isc-posix.m4: Upgrade to gettext-0.11.
27049         * m4/lcmessage.m4: Upgrade to gettext-0.11.
27050         * m4/lib-ld.m4: New file, from gettext-0.11.
27051         * m4/lib-link.m4: New file, from gettext-0.11.
27052         * m4/lib-prefix.m4: New file, from gettext-0.11.
27053         * m4/progtest.m4: Upgrade to gettext-0.11.
27054
27055 2002-02-15  Paul Eggert  <eggert@twinsun.com>
27056
27057         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
27058         (jm_PREREQ): Use it.
27059
27060 2002-02-15  Paul Eggert  <eggert@twinsun.com>
27061
27062         * lib/posixver.c, lib/posixver.h: New files.
27063         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
27064
27065 2002-02-02  Paul Eggert  <eggert@twinsun.com>
27066             Bruno Haible  <bruno@clisp.org>
27067
27068         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
27069         (fwrite_success_callback): New declaration.
27070         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
27071         print_unicode_char. Call failure callback instead of error.
27072         (fwrite_success_callback): New function.
27073         (exit_failure_callback): New function.
27074         (fallback_failure_callback): New function.
27075         (print_unicode_char): Call unicode_to_mb.
27076
27077 2002-01-26  Jim Meyering  <meyering@lucent.com>
27078
27079         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
27080         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
27081
27082 2002-01-26  Jim Meyering  <meyering@lucent.com>
27083
27084         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
27085
27086 2002-01-22  Paul Eggert  <eggert@twinsun.com>
27087
27088         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
27089
27090 2002-01-22  Jim Meyering  <meyering@lucent.com>
27091
27092         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
27093         Otherwise, some versions of automake would omit the rule that makes
27094         Makefile from Makefile.in.
27095
27096 2002-01-21  Paul Eggert  <eggert@twinsun.com>
27097
27098         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
27099         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
27100         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
27101         (memcoll): Set errno to zero if there is no error.
27102
27103         * lib/quotearg.c (quotearg_buffer_restyled):
27104         Fix bug with quoting buffers containing NUL when backslashing escapes.
27105         This bug was exposed by the other changes in this patch.
27106         (quotearg_n_options): New arg ARGSIZE.
27107         All callers changed.
27108         (quoting_options_from_style): New function.
27109         (quotearg_n_style): Use it.
27110         (quotearg_n_style_mem): New function.
27111
27112         * lib/quotearg.h (quotearg_n_style_mem): New function.
27113
27114 2002-01-19  Jim Meyering  <meyering@lucent.com>
27115
27116         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
27117         Remove useless quotes: DF_PROG="df".
27118         * m4/strnlen.m4: New file.
27119
27120 2002-01-16  Paul Eggert  <eggert@twinsun.com>
27121
27122         * lib/backupfile.c (ISDIGIT): Comment fix.
27123         * lib/getdate.y (ISDIGIT): Likewise.
27124         * lib/posixtm.c (ISDIGIT, year): Likewise.
27125         * lib/strverscmp.c (ISDIGIT): Likewise.
27126         * lib/userspec.c (ISDIGIT): Likewise.
27127
27128 2002-01-16  Jim Meyering  <meyering@lucent.com>
27129
27130         * lib/getdate.y: Add three semicolons, each just before a closing
27131         brace. Bison (as of version 1.31) no longer papers over that mistake.
27132
27133 2002-01-05  Jim Meyering  <meyering@lucent.com>
27134
27135         * lib/version-etc.c (version_etc_copyright): Update copyright year.
27136
27137 2001-12-19  Paul Eggert  <eggert@twinsun.com>
27138
27139         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
27140         not silently exit merely because the output buffer happens to
27141         have nothing pending.
27142
27143 2001-12-18  Paul Eggert  <eggert@twinsun.com>
27144
27145         See the big note in ../ChangeLog.
27146         * lib/human.c (suffixes): Prefer K to k for 1024.
27147         (generate_suffix_backwards): New function.
27148         (human_readable_inexact): Use it.
27149         * lib/xstrtol.c (__xstrtol): If there is no number but there
27150         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
27151         Accept 'K' as well as 'k'.
27152
27153 2001-12-15  Jim Meyering  <meyering@lucent.com>
27154
27155         * lib/regex.h (__restrict_arr): Update from libc.
27156
27157         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
27158         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
27159         (STREQ): Define.
27160
27161 2001-12-14  Jim Meyering  <meyering@lucent.com>
27162
27163         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
27164         Suggestion from Bruno Haible.
27165
27166 2001-12-10  Jim Meyering  <meyering@lucent.com>
27167
27168         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
27169         xrealloc, Instead, include "xalloc.h".
27170         (initbuffer): Don't cast xmalloc return value to char*.
27171         (readline): Reword comment.
27172         Don't cast xrealloc return value to char*
27173         Return NULL, not 0.
27174
27175 2001-12-09  Jim Meyering  <meyering@lucent.com>
27176
27177         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
27178         about `signed and unsigned type in conditional expression'.
27179         * lib/posixtm.c (posix_time_parse): Likewise.
27180
27181         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
27182
27183         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
27184         to avoid a pedantic warning.
27185
27186         * lib/getstr.c: Don't include assert.h.
27187         (getstr): Remove warning-evoking assertions.
27188         Return -1 if offset parameter is out of bounds.
27189         Change the type of a local from int to size_t.
27190
27191         * lib/strftime.c (my_strftime_localtime_r): Include this function
27192         definition in the `#if ! HAVE_TM_GMTOFF' block.
27193
27194         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
27195         Include xalloc.h instead.
27196
27197 2001-12-02  Jim Meyering  <meyering@lucent.com>
27198
27199         * lib/tempname.c: Don't declare getenv, thus reverting the change of
27200         2001-11-18.  It's no longer necessary, now that stdlib.h is always
27201         included.
27202
27203         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
27204         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
27205
27206 2001-11-30  Akim Demaille  <akim@epita.fr>
27207
27208         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
27209         before being defined.
27210
27211 2001-11-27  Paul Eggert  <eggert@twinsun.com>
27212
27213         * lib/quotearg.h (quotearg_n, quotearg_n_style):
27214         First arg is int, not unsigned.
27215         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
27216         (SIZE_MAX, UINT_MAX): New macros.
27217         (quotearg_n_options): Abort if N is negative.
27218         Avoid overflow check on hosts where size_t is 64 bits and int
27219         is 32 bits, as overflow is impossible there.
27220         Fix off-by-one typo that caused unnecessary reallocation.
27221
27222 2001-11-27  Jim Meyering  <meyering@lucent.com>
27223
27224         * lib/tempname.c: Merge with version from libc.
27225         * lib/regex.c: Likewise.
27226
27227         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
27228         systems for which STDC_HEADERS is 0, it was not included, resulting in
27229         a warning about an integer-to-pointer conversion problem with getenv.
27230         Reported by Volker Borchert.
27231
27232 2001-11-26  Jim Meyering  <meyering@lucent.com>
27233
27234         * lib/gtod.h: Remove file.
27235         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
27236         * lib/gettimeofday.c: Don't include gtod.h.
27237         (GTOD_init): Remove function.
27238         (rpl_gettimeofday): Do its job here instead, rather than aborting.
27239         Suggestion from Volker Borchert.
27240
27241 2001-11-23  Jim Meyering  <meyering@lucent.com>
27242
27243         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
27244         it.
27245         * lib/hash.c (struct hash_table): Define it here instead.
27246
27247 2001-11-22  Jim Meyering  <meyering@lucent.com>
27248
27249         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
27250
27251 2001-11-20  Jim Meyering  <meyering@lucent.com>
27252
27253         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
27254         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
27255
27256 2001-11-19  Jim Meyering  <meyering@lucent.com>
27257
27258         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
27259         directory.  Use "conftestXXXXXX" as the template.
27260         Suggestion from Paul Eggert.
27261
27262         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
27263         immediately, so the test doesn't mistakenly hit the max-open-files
27264         limit.
27265
27266 2001-11-18  Paul Eggert  <eggert@twinsun.com>
27267
27268         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
27269         (TEMPORARIES): New macro.
27270         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
27271         removes an artificial limitation (e.g. HP-UX 10.20, where
27272         TMP_MAX is 17576).
27273
27274 2001-11-18  Jim Meyering  <meyering@lucent.com>
27275
27276         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
27277
27278 2001-11-18  Jim Meyering  <meyering@lucent.com>
27279
27280         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
27281         on SunOS 4.
27282
27283         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
27284         files will be created before anything else.
27285
27286 2001-11-17  Paul Eggert  <eggert@twinsun.com>
27287
27288         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
27289         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
27290
27291 2001-11-17  Jim Meyering  <meyering@lucent.com>
27292
27293         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
27294         Prompted by a report from Bob Proulx.
27295
27296         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
27297         Instead, require UTILS_FUNC_MKSTEMP.
27298
27299 2001-11-17  Jim Meyering  <meyering@lucent.com>
27300
27301         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
27302         Now, that's done as part of AC_FUNC_STRTOD.
27303
27304 2001-11-17  Jim Meyering  <meyering@lucent.com>
27305
27306         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
27307         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
27308         rather than group writable.  Patch by Juan F. Codagnone.
27309
27310         * lib/readtokens.c: Remove explicit declarations of xmalloc and
27311         xrealloc, Instead, include "xalloc.h".
27312
27313         * lib/mountlist.c: Include unlocked-io.h after all system headers.
27314         Remove explicit declarations of xmalloc, xrealloc,
27315         and xstrdup.  Instead, include "xalloc.h".
27316
27317         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
27318         unlocked-io.h.
27319         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
27320         Likewise.
27321         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
27322
27323         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
27324         Reported by Padraig Brady.
27325
27326         * lib/mkstemp.c: #undef mkstemp.
27327         Include config.h.
27328         (rpl_mkstemp): Rename from mkstemp.
27329         Protoize.
27330
27331 2001-11-16  Jim Meyering  <meyering@lucent.com>
27332
27333         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
27334         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
27335         determine the amount of total physical memory, use pstat_getstatic.
27336         HPUX-11 doesn't define _SC_PHYS_PAGES.
27337         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
27338         If sysconf couldn't be used to determine the amount of available
27339         physical memory, use both pstat_getstatic and pstat_getdynamic.
27340         Based on a patch from Bob Proulx.
27341
27342 2001-11-10  Jim Meyering  <meyering@lucent.com>
27343
27344         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
27345         (jm_PREREQ): Use it.
27346
27347 2001-11-09  Jim Meyering  <meyering@lucent.com>
27348
27349         * m4/jm-macros.m4: Require autoconf-2.52f.
27350         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
27351         Use these AC_-prefixed names, not the AM_-prefixed ones.
27352
27353         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
27354
27355 2001-11-05  Jim Meyering  <meyering@lucent.com>
27356
27357         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
27358
27359 2001-11-04  Jim Meyering  <meyering@lucent.com>
27360
27361         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
27362         $DEFS.
27363
27364 2001-11-03  Jim Meyering  <meyering@lucent.com>
27365
27366         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
27367         of AC_DEFUN.
27368
27369         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
27370         know the name of the variable in the macro definition.
27371
27372 2001-11-03  Jim Meyering  <meyering@lucent.com>
27373
27374         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
27375         in argmatch_to_argument call.
27376
27377         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
27378         argument.
27379
27380         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
27381         e.g., a fault due to an attempt to free a NULL pointer.
27382
27383 2001-11-01  Jim Meyering  <meyering@lucent.com>
27384
27385         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
27386         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
27387
27388 2001-11-01  Jim Meyering  <meyering@lucent.com>
27389
27390         * lib/dirfd.c, lib/dirfd.h: New files.
27391         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
27392
27393         * lib/hash.c (hash_print) [TESTING]: Clean up.
27394
27395 2001-10-22  Paul Eggert  <eggert@twinsun.com>
27396
27397         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
27398         to avoid a warning if -Wall.
27399
27400 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
27401
27402         * README: New file
27403         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
27404         (per RMS's instructions, this is now the canonical source)
27405         * lgpl/, gpl/: New directories.
27406
27407 2001-10-21  Paul Eggert  <eggert@twinsun.com>
27408
27409         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
27410
27411 2001-10-21  Jim Meyering  <meyering@lucent.com>
27412
27413         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
27414         this code would end up calling gettext even in packages built
27415         with --disable-nls.
27416         * lib/getopt.c (_): Likewise.
27417         * lib/regex.c (_): Likewise.
27418
27419 2001-10-20  Paul Eggert  <eggert@twinsun.com>
27420
27421         * m4/error.m4 (jm_PREREQ_ERROR):
27422         Do not invoke AC_CHECK_FUNCS with strerror_r, as
27423         AC_FUNC_STRERROR_R does that.
27424         Check for strerror declaration.
27425
27426         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
27427         are supposed to have them these days.
27428         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
27429         Merge changes from latest Autoconf CVS.
27430         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
27431         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
27432         POSIX decided to standardize on the int flavor of strerror_r.
27433
27434 2001-10-20  Paul Eggert  <eggert@twinsun.com>
27435
27436         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
27437         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
27438         Use strerror_r that is only a macro, even if it is not a function.
27439         (strerror): Check for HAVE_DECL_STRERROR before declaring.
27440         (private_strerror): Use prototypes, not old-style function definition.
27441         (print_errno_message): New function.
27442         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
27443         char*-flavored one.
27444         (error_tail, error, error_at_line): Use it.
27445
27446 2001-10-11  Jim Meyering  <meyering@lucent.com>
27447
27448         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
27449         and quote_n (1, ... to avoid clobbering a buffer.
27450
27451 2001-10-05  Jim Meyering  <meyering@lucent.com>
27452
27453         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
27454         hash-pjw.h.
27455         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
27456         * lib/hash-pjw.h: New file.
27457
27458 2001-09-30  Jim Meyering  <meyering@lucent.com>
27459
27460         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
27461         `struct fsstat' has the `f_fstypename' member.
27462         Use that to define FS_TYPE, which is now used to make
27463         the getfsstat link test tighter.
27464
27465 2001-09-30  Jim Meyering  <meyering@lucent.com>
27466
27467         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
27468         Include <sys/ucred.h>, for Apple Darwin.
27469         Include sys/mount.h and sys/fs_types.h only if available.
27470         (FS_TYPE): Define.
27471         (read_filesystem_list): Use FS_TYPE.
27472
27473 2001-09-29  Paul Eggert  <eggert@twinsun.com>
27474
27475         * lib/exclude.c (excluded_filename): 0 -> false, since it's
27476         a boolean context.
27477
27478 2001-09-29  Jim Meyering  <meyering@lucent.com>
27479
27480         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
27481         [one-argument getmntent function]): Include stdio.h before mntent.h.
27482         SunOS 4.1.x needs it for the declaration of `FILE'.
27483         Patch by Volker Borchert.
27484
27485         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
27486         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
27487         sys/fs_types.h, and make the link-test for getfsstat guard #include
27488         directives with appropriate #if HAVE_*_H tests so that we can
27489         detect getfsstat on Apple Darwin1.3.7 systems.
27490         Reported by Nelson Beebe.
27491         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
27492
27493 2001-09-28  Paul Eggert  <eggert@twinsun.com>
27494
27495         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
27496         #defines strtoimax.  Also treat the other strto* functions
27497         like strtoimax.
27498
27499         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
27500         Check for strtoul and strtoumax,
27501         as those declarations are made even in the signed case.
27502         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
27503         Likewise, for strtol and strtoimax.
27504
27505 2001-09-28  Paul Eggert  <eggert@twinsun.com>
27506
27507         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
27508         #defines strtoimax.  Also treat the other strto* functions
27509         like strtoimax.
27510
27511         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
27512         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
27513         (strtoimax, strtoumax): Do not declare if already defined as a macro.
27514
27515 2001-09-26  Jim Meyering  <meyering@lucent.com>
27516
27517         Most macros in unlocked-io.h had the wrong number of arguments.
27518         * lib/gen-uio: New script.
27519         (USE_UNLOCKED_IO): Define to 1 if not already defined.
27520         * lib/unlocked-io.hin: Remove file.
27521         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
27522         rather than trying to embed it here.
27523         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
27524         Reported by Padraig Brady.
27525
27526 2001-09-25  Volker Borchert  <bt@teknon.de>
27527
27528         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
27529         `result'.
27530
27531 2001-09-24  Jim Meyering  <meyering@lucent.com>
27532
27533         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
27534
27535 2001-09-23  Jim Meyering  <meyering@lucent.com>
27536
27537         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
27538         instead of the mere test for existence of mntent.h.  The latter
27539         would get a false-positive on AIX 3.4 systems.
27540         In the outer getmntent if-block, don't die if neither of the getmntent
27541         tests succeeds.  Instead, just fall through and continue with the
27542         remaining tests.
27543
27544 2001-09-23  Jim Meyering  <meyering@lucent.com>
27545
27546         * lib/mountlist.c: Remove useless parentheses in #if directives.
27547         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
27548         the deprecated MOUNTED symbol is no longer defined in mntent.h.
27549
27550 2001-09-22  Jim Meyering  <meyering@lucent.com>
27551
27552         * m4/gettext.m4: New file.  From gettext.
27553         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
27554         * m4/progtest.m4: Likewise
27555         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
27556         * m4/glibc21.m4: Likewise.
27557
27558         * m4/libintl.m4: Remove.  No longer used.
27559
27560 2001-09-22  Jim Meyering  <meyering@lucent.com>
27561
27562         * lib/localcharset.c: Update from latest gettext.
27563         * lib/config.charset: Likewise.
27564
27565 2001-09-20  Jim Meyering  <meyering@lucent.com>
27566
27567         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
27568         strtoimax.
27569         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
27570         strtoumax.
27571
27572 2001-09-20  Jim Meyering  <meyering@lucent.com>
27573
27574         * lib/xstrtol.c (strtoimax): Guard declaration with
27575         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
27576         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
27577         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
27578         (strtoumax): Likewise, for completeness (it wasn't necessary).
27579
27580 2001-09-17  Paul Eggert  <eggert@twinsun.com>
27581
27582         * lib/strtoimax.c (HAVE_LONG_LONG):
27583         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
27584         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
27585         to work around bug in IBM C compiler.
27586
27587 2001-09-17  Jim Meyering  <meyering@lucent.com>
27588
27589         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
27590         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
27591         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
27592         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
27593         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
27594         whenever the right hand side need not be expanded by the shell.
27595
27596 2001-09-16  Paul Eggert  <eggert@twinsun.com>
27597
27598         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
27599         library.  It's not correct, as some older glibcs are buggy.
27600         fnmatch wasn't fixed until glibc 2.2.
27601
27602         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
27603         special shell magic here.
27604
27605 2001-09-16  Jim Meyering  <meyering@lucent.com>
27606
27607         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
27608         * m4/jm-macros.m4: Require it.
27609
27610 2001-09-16  Jim Meyering  <meyering@lucent.com>
27611
27612         * lib/mkdir.c: New file.
27613
27614 2001-09-15  Jim Meyering  <meyering@lucent.com>
27615
27616         * m4/jm-macros.m4: Check for help2man.
27617
27618 2001-09-11  Jim Meyering  <meyering@lucent.com>
27619
27620         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
27621         The body, by Paul Eggert, was moved here from configure.in.
27622         * m4/jm-macros.m4: Require UTILS_HOST_OS.
27623
27624 2001-09-04  Paul Eggert  <eggert@twinsun.com>
27625
27626         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
27627         (jm_PREREQ): Use it.
27628
27629 2001-09-04  Paul Eggert  <eggert@twinsun.com>
27630
27631         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
27632         Use ssize_t, not int, to store result of readlink.
27633         Check for ssize_t overflow as well as size_t overflow,
27634         as POSIX says the result of readlink is implementation-defined
27635         when ssize_t overflows.
27636         Remove unnecessary cast to char*.
27637         Use free+malloc instead of realloc, as the storage doesn't need
27638         to be preserved and it's clearer and can be more efficient that way.
27639         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
27640         * lib/xreadlink.h (xreadlink): Update prototype.
27641
27642 2001-09-04  Paul Eggert  <eggert@twinsun.com>
27643
27644         * lib/xgetcwd.c: Revert some of the previous change; intead,
27645         fix the HAVE_GETCWD_NULL code to behave more like the
27646         !HAVE_GETCWD_NULL code used to.
27647
27648         Include "xalloc.h".
27649         (xgetcwd): Do not return NULL when memory is exhausted; instead,
27650         invoke xalloc_die.
27651
27652 2001-09-03  Paul Eggert  <eggert@twinsun.com>
27653
27654         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
27655         sys/param.h, as pathmax.h includes them.
27656
27657 2001-09-03  Paul Eggert  <eggert@twinsun.com>
27658
27659         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
27660         (jm_PREREQ_XGETCWD): New macro.
27661
27662         * m4/getcwd.m4: New file.
27663
27664 2001-09-03  Paul Eggert  <eggert@twinsun.com>
27665
27666         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
27667         like the HAVE_GETCWD_NULL code.
27668         Include pathmax.h if not HAVE_GETCWD.
27669         Do not include xalloc.h.
27670         (INITIAL_BUFFER_SIZE): New symbol.
27671         Do not use xmalloc / xrealloc, since the caller is responsible for
27672         handling errors.  Preserve errno around `free' during failure.
27673         Do not overrun buffer when using getwd.
27674
27675 2001-09-03  Paul Eggert  <eggert@twinsun.com>
27676
27677         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
27678         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
27679         getcwd (NULL, 0).
27680
27681 2001-09-03  Paul Eggert  <eggert@twinsun.com>
27682
27683         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
27684         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
27685         spotted by Jim Meyering.
27686
27687 2001-09-03  Jim Meyering  <meyering@lucent.com>
27688
27689         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
27690         failure.
27691
27692 2001-09-02  Jim Meyering  <meyering@lucent.com>
27693
27694         * lib/error.c: Update from GNU libc.
27695
27696 2001-09-01  Jim Meyering  <meyering@lucent.com>
27697
27698         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
27699         Used by df.
27700
27701 2001-09-01  Jim Meyering  <meyering@lucent.com>
27702
27703         * lib/xreadlink.c: New file.
27704         * lib/xreadlink.h: New file.
27705         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
27706         xreadlink.h.
27707
27708         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
27709         doesn't conflict with sparc Solaris 7's definition in
27710         /usr/include/sys/int_types.h.
27711
27712         * lib/exclude.c: Use `""', not `<>' to #include non-system header
27713         files.
27714         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
27715         and strncasecmp as r-values.  Unixware didn't have declarations.
27716
27717 2001-08-31  Paul Eggert  <eggert@twinsun.com>
27718
27719         * lib/xstrtol.h: Add copyright notice.
27720         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
27721         LONGINT_INVALID_SUFFIX_CHAR.
27722
27723 2001-08-31  Paul Eggert  <eggert@twinsun.com>
27724
27725         * lib/xstrtol.c (strtoimax): New decl.
27726
27727 2001-08-31  Paul Eggert  <eggert@twinsun.com>
27728
27729         * lib/xgetcwd.c: Don't include pathmax.h.
27730         Include stdlib.h and unistd.h if available.
27731         Include xalloc.h.
27732         (xmalloc, xstrdup, free): Remove decls.
27733         (xgetcwd): Don't assume sizes fit in unsigned.
27734         Check for overflow when computing sizes.
27735         Simplify reallocation code.
27736
27737 2001-08-31  Paul Eggert  <eggert@twinsun.com>
27738
27739         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
27740         a directory's st_size can have an arbitrary value, so the old
27741         usage could waste an arbitrary amount of memory.  All uses
27742         changed.
27743         * lib/savedir.h: Update prototype.
27744
27745 2001-08-31  Paul Eggert  <eggert@twinsun.com>
27746
27747         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
27748
27749         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
27750         old strtoimax.c.
27751
27752         Also, make the following further changes to make this file's
27753         configuration more similar to that of strtol.c:
27754         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
27755         (strtoumax, uintmax_t, strtoull, strtol): Remove.
27756         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
27757         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
27758         changed to signed values.
27759
27760         And make the following changes as well:
27761         Fix copyright notice, as 1999 was missing.
27762         (verify): New macro.
27763         (strtoimax): Check sizes at compile-time, not run-time.
27764         Prefer strtol to strtoll if both work.
27765         (main): Remove; it was not that useful and was a pain to maintain.
27766
27767         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
27768
27769 2001-08-31  Jim Meyering  <meyering@lucent.com>
27770
27771         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
27772         Use an initial, malloc'd, buffer of length 128 rather than
27773         a statically allocated one of length 1024.
27774
27775 2001-08-30  Paul Eggert  <eggert@twinsun.com>
27776
27777         Simplify code, partly by assuming autoconf 2.52 semantics.
27778
27779         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
27780
27781         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
27782         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
27783         All uses removed.
27784         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
27785         Move AC_REQUIRE to next-to-top level, to avoid confusion.
27786         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
27787         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
27788         jm_AC_HEADER_INTTYPES_H.
27789         * m4/jm-macros.m4 (jm_MACROS): Likewise.
27790
27791         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
27792
27793         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
27794         Quote first arg of AC_DEFUN.
27795         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
27796         since they are needed to parse the include file even if we need
27797         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
27798         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
27799         but with opposite signedness.
27800
27801 2001-08-30  Paul Eggert  <eggert@twinsun.com>
27802
27803         Merge 'exclude' changes from tar 1.13.22.
27804         This fixes one or two unlikely storage allocation overflow bugs,
27805         but doesn't change user-visible behavior otherwise.
27806
27807 2001-08-30  Paul Eggert  <eggert@twinsun.com>
27808
27809         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
27810         (jm_PREREQ_EXCLUDE): New macro.
27811
27812 2001-08-30  Paul Eggert  <eggert@twinsun.com>
27813
27814         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
27815         tm to be declared.
27816
27817 2001-08-30  Paul Eggert  <eggert@twinsun.com>
27818
27819         * lib/hash.c: Remove '2001' from copyright notice.
27820
27821 2001-08-30  Paul Eggert  <eggert@twinsun.com>
27822
27823         * lib/full-write.h: New file.
27824         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
27825         * lib/full-write.c: Correct credits, as cccp.c no longer
27826         exists and anyway it was so heavily changed from the old cccp
27827         code as to be unrecognizable.  Include full-write.h.
27828         (full_write) Return size_t, with short writes meaning failure.
27829         All callers changed.  This fixes a bug with large buffers
27830         on 64-bit hosts.
27831         * lib/utime.c: Include full-write.h.
27832
27833 2001-08-30  Paul Eggert  <eggert@twinsun.com>
27834
27835         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
27836         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
27837         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
27838         Include if available.
27839         (<xalloc.h>): Include
27840         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
27841         (verify): New macro.  Use it to verify that EXCLUDE macros do not
27842         collide with FNM macros.
27843         (struct patopts): New struct.
27844         (struct exclude): Use it, as exclude patterns now come with options.
27845         (new_exclude): Support above changes.
27846         (new_exclude, add_exclude_file):
27847         Initial size must now be a power of two to simplify overflow checking.
27848         (free_exclude, fnmatch_no_wildcards): New function.
27849         (excluded_filename): No longer requires options arg, as the options
27850         are determined by add_exclude.  Now returns bool, not int.
27851         (excluded_filename, add_exclude):
27852         Add support for the fancy new exclusion options.
27853         (add_exclude, add_exclude_file): Now takes int options arg.
27854         Check for arithmetic overflow when computing sizes.
27855         (add_exclude_file): xrealloc might modify errno, so don't
27856         realloc until after errno might be used.
27857
27858         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
27859         New macros.
27860         (free_exclude): New decl.
27861         (add_exclude, add_exclude_file): Now takes int options arg.
27862         (excluded_filename): No longer requires options arg, as the options
27863         are determined by add_exclude.  Now returns bool, not int.
27864
27865 2001-08-30  Paul Eggert  <eggert@twinsun.com>
27866
27867         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
27868
27869 2001-08-27  Jim Meyering  <meyering@lucent.com>
27870
27871         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
27872
27873         * lib/version-etc.c (N_): Remove definition.
27874         Revert most of last change.
27875         Instead, simply don't mark the `Copyright...' string for translation.
27876         Based on advice from Paul Eggert.
27877
27878         * lib/strtoxmax.c: Tweak comment.
27879
27880 2001-08-26  Jim Meyering  <meyering@lucent.com>
27881
27882         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
27883
27884         * m4/xstrtoimax.m4: New file.
27885         * m4/xstrtoumax.m4: Add comments explaining why we
27886         AC_REPLACE_FUNCS(strtol).
27887
27888 2001-08-26  Jim Meyering  <meyering@lucent.com>
27889
27890         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
27891         of copyright with `%s' so translators don't get an untranslated
27892         message in 2002.
27893         (COPYRIGHT_YEAR): Define.
27894         (version_etc): Use fprintf rather than fputs.
27895         Suggestion from Ulrich Drepper.
27896
27897         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
27898
27899         * lib/strtoll.c: New file, from GNU libc.
27900         * lib/xstrtoimax.c: New file.
27901
27902         * lib/xstrtol.h: Add xstrtoimax.
27903         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
27904         * lib/strtoimax.c: New file.  Likewise, but first define
27905         STRTOUXMAX_SIGNED.
27906
27907         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
27908         ...
27909         * lib/strtoxmax.c: ... then renamed to this.
27910
27911 2001-08-18  Paul Eggert  <eggert@twinsun.com>
27912
27913         * m4/inttypes.m4: Add AC_PREREQ(2.13).
27914         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
27915         (jm_AC_TYPE_INTMAX_T): New macro.
27916         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
27917
27918         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
27919
27920         * m4/longlong.m4: Renamed from ulonglong.m4.
27921         * m4/inttypes.m4: Renamed from inttypes_h.m4.
27922         * m4/uintmax_t.m4: Removed.
27923
27924 2001-08-13  Paul Eggert  <eggert@twinsun.com>
27925
27926         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
27927         Port to Solaris 8, where 'sed' requires a space after the 'r'
27928         command, and where sh dislikes "$/".  Clean up the spacing a bit.
27929         Redirect output to $tmp just once.
27930
27931 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
27932
27933         * lib/addext.c (<errno.h>): Include.
27934         (errno): Declare if not defined.
27935         (addext): Work correctly when pathconf returns -1 and leaves
27936         errno alone because there is no limit.  Also, work even if
27937         pathconf returns a value greater than SIZE_MAX.
27938
27939 2001-08-12  Jim Meyering  <meyering@lucent.com>
27940
27941         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
27942         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
27943         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
27944         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
27945         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
27946         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
27947         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
27948         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
27949         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
27950         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
27951         utime.m4, utimes.m4, xstrtoumax.m4:
27952         Quote the first argument in each use of AC_DEFUN.
27953
27954 2001-08-12  Jim Meyering  <meyering@lucent.com>
27955
27956         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
27957         Simply `return getcwd (NULL, 0);'.
27958         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
27959         Use 1300 as initial value for length, not PATH_MAX.
27960
27961         * lib/pathmax.h: Clean up cpp syntax.
27962
27963 2001-08-12  Jim Meyering  <meyering@lucent.com>
27964
27965         * lib/gettimeofday.c: New file.
27966         * lib/gtod.h: New file.
27967         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
27968
27969 2001-08-05  Jim Meyering  <meyering@lucent.com>
27970
27971         * m4/jm-macros.m4: Require autoconf-2.52.
27972
27973 2001-08-04  Jim Meyering  <meyering@lucent.com>
27974
27975         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
27976         stmt, to get in sync with glibc.
27977
27978 2001-08-03  Paul Eggert  <eggert@twinsun.com>
27979
27980         The following changes are from gettext 0.10.39 as maintained by
27981         Bruno Haible.
27982
27983         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
27984         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
27985         with inverted sense.  All uses changed.
27986
27987         * lib/mbswidth.c: Don't include <limits.h>.
27988         Include <stdlib.h> and <string.h> unconditionally.
27989         (iswcntrl, mbsinit, ISCNTRL): New macros.
27990         (mbsnwidth): Use K&R style function declarations.
27991         Don't bother checking for MB_LEN_MAX == 1, since the compiler
27992         can optimize it when MB_CUR_MAX == 1.
27993         The width of control characters is zero, not 1.
27994
27995 2001-08-03  Paul Eggert  <eggert@twinsun.com>
27996
27997         The following changes are from gettext 0.10.39 as maintained by
27998         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
27999
28000         * m4/codeset.m4: Upgrade to serial AM1.
28001         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
28002         all uses changed.  Quote first arg of AC_DEFUN.
28003         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
28004
28005         * m4/iconv.m4: Upgrade to serial AM2.
28006         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
28007         Add --with-libconv-prefix.
28008         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
28009         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
28010         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
28011         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
28012         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
28013
28014         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
28015         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
28016         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
28017         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
28018         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
28019         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
28020         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
28021         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
28022         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
28023
28024         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
28025         string.h any more.
28026
28027         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
28028         not the default value.
28029
28030         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
28031         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
28032         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
28033         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
28034         Also check for iswcntrl, used for wcwidth fallback.
28035         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
28036         to Autoconf 2.13.
28037
28038 2001-08-03  Jim Meyering  <meyering@lucent.com>
28039
28040         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
28041         as it was in the original.  Reported by Paul Eggert.
28042
28043 2001-07-16  Jim Meyering  <meyering@lucent.com>
28044
28045         * m4/gettimeofday.m4: New file.
28046         Prompted by a report from Bernhard Baehr.
28047
28048 2001-07-15  Jim Meyering  <meyering@lucent.com>
28049
28050         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
28051         stuff. Now it's in ../Makefile.cfg.
28052
28053 2001-07-15  Jim Meyering  <meyering@lucent.com>
28054
28055         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
28056         (BUILT_SOURCES): Add unlocked-io.h.
28057         (io_functions): Define.
28058         (unlocked-io.h): New rule.
28059         (DISTCLEANFILES): Add unlocked-io.h.
28060         (all-local): Depend on unlocked-io.h, to ensure it is created.
28061
28062         * lib/unlocked-io.hin: New file
28063
28064         * lib/regex.c: Update from glibc.
28065
28066 2001-07-05  Jim Meyering  <meyering@lucent.com>
28067
28068         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
28069         recommendation.
28070         (libfetish_a_SOURCES): Put all .h files here instead.
28071         Remove a thus-exposed (better checks in automake) duplicate and
28072         two unnecessary .h files.
28073
28074 2001-07-04  Jim Meyering  <meyering@lucent.com>
28075
28076         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
28077         that generates jm-glibc-io.m4 so that it doesn't trigger any make
28078         distcheck failure.
28079
28080 2001-07-02  Jim Meyering  <meyering@lucent.com>
28081
28082         The following changes were prompted by suggestions from Bruno Haible.
28083
28084         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
28085         is now generated.
28086         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
28087         definition of EXTRA_DIST.
28088         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
28089         ensure that the generated file is created/updated whenever the list
28090         of $(unlocked_functions) is changed.
28091         (jm-glibc-io.m4): New rule.
28092         (unlocked-io.h): New rule -- currently unused.
28093
28094 2001-06-24  Jim Meyering  <meyering@lucent.com>
28095
28096         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
28097         unmatched right bracket, rather than kludging it with an extra,
28098         falsely-matching quote in a comment.  Patch by Akim Demaille.
28099
28100 2001-06-11  Jim Meyering  <meyering@lucent.com>
28101
28102         * lib/regex.c: Update from GNU libc.
28103
28104 2001-05-27  Jim Meyering  <meyering@lucent.com>
28105
28106         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
28107         Check for ut_type in struct utmp.
28108
28109 2001-05-27  Jim Meyering  <meyering@lucent.com>
28110
28111         * lib/readutmp.h (UT_TYPE): Define.
28112
28113 2001-05-24  Jim Meyering  <meyering@lucent.com>
28114
28115         * lib/argmatch.c: Include "quote.h".
28116         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
28117         quote function.  Reported by Göran Uddeborg.
28118
28119 2001-05-22  Jim Meyering  <meyering@lucent.com>
28120
28121         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
28122         now that we use the package-supplied version unconditionally.
28123         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
28124
28125 2001-05-21  Jim Meyering  <meyering@lucent.com>
28126
28127         * m4/regex.m4: Change a couple backticks to single quotes to avoid
28128         shell syntax errors.
28129
28130 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
28131
28132         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
28133
28134 2001-05-20  Paul Eggert  <eggert@twinsun.com>
28135
28136         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
28137         Don't bother to check library strftime, since
28138         we'll be using our own my_strftime function anyway.
28139         Define my_strftime instead of strftime.
28140
28141 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
28142
28143         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
28144         which is not yet declared.
28145
28146 2001-05-15  Jim Meyering  <meyering@lucent.com>
28147
28148         * m4/regex.m4: Use proper quoting so brackets appear in the test
28149         program.
28150         Reported by, and with help from, Bruno Haible.
28151
28152 2001-05-13  Jim Meyering  <meyering@lucent.com>
28153
28154         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
28155         undefined.
28156
28157 2001-05-11  Paul Eggert  <eggert@twinsun.com>
28158
28159         dirname code cleanup.  base_name now behaves more compatibly
28160         with POSIX basename when given file names that have trailing
28161         slashes, and similarly for dir_name.  Add new primitives
28162         base_len and dir_len.  Put the directory-name-related decls
28163         into dirname.h.
28164
28165         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
28166         * lib/backupfile.c (base_name): Likewise.
28167         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
28168         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
28169         * lib/makepath.c (strip_trailing_slashes): Likewise.
28170         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
28171         ISSLASH): Likewise.
28172         * lib/rename.c (strip_trailing_slashes): Likewise.
28173         * lib/same.c (base_name): Likewise.
28174         * lib/stripslash.c (ISSLASH): Likewise.
28175
28176         * lib/addext.c: Include <dirname.h> after size_t is defined.
28177         * lib/backupfile.c: Likewise.
28178
28179         * lib/addext.c (addext): Use base_len to trim redundant
28180         trailing slashes instead of doing it ourselves.
28181         But do not trim the last slash if it is not redundant.
28182
28183         * lib/backupfile.c (find_backup_file_name,
28184         max_backup_version): Use base_len instead of rolling it ourselves.
28185         Handle the case of "" and (on DOS) "C:" correctly.
28186
28187         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
28188         needed. Include <string.h>, <dirname.h>.
28189         (base_name): Allow file names ending in slashes, other than names
28190         that are all slashes.  In this case, return the basename followed
28191         by the slashes.  This is more general, and can be used in places
28192         where the original base_name purposely had an assertion failure.
28193         (base_len): New function.
28194
28195         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
28196         Do not include <assert.h>; no longer needed.
28197         Include xalloc.h.
28198         (memrchr): Remove decl.
28199         (dir_name_r): Remove.
28200         (dir_len): Renamed from dirlen.  All callers changed.
28201         Rewrite in terms of base_name, for simplicity and consistency.
28202         (dir_name): Never return NULL.  All callers changed.
28203         Do not include <stdlib.h> in test program; no longer needed.
28204         return 0; is fine for test program.
28205
28206         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
28207         New macros.
28208         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
28209
28210         * lib/path-concat.c (path_concat): Use base_len to compute
28211         base length, not strlen; this means we cannot rely on memcpy
28212         to null-terminate.
28213
28214         * lib/same.c (STREQ): Remove.
28215         (same_name): Handle the case where the basename ends in trailing '/'.
28216
28217         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
28218         a slash was stripped.  Do not strip the last slash after a
28219         file system prefix.
28220
28221 2001-05-11  Paul Eggert  <eggert@twinsun.com>
28222
28223         * lib/Makefile.am (libfetish_a_SOURCES):
28224         Add strftime.c, since we now compile it on all hosts.
28225
28226         * lib/strftime.c (my_strftime):
28227         Define to nstrftime if emacs, but only if my_strftime is not defined.
28228         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
28229         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
28230         Add one more extra argument: a nanoseconds value.
28231         All uses changed.
28232         (ns): New macro.
28233         (my_strftime function): Add %N format.
28234         (emacs_strftimeu): Renamed from emacs_strftime,
28235         with extra ut argument.
28236
28237 2001-05-09  Paul Eggert  <eggert@twinsun.com>
28238
28239         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
28240
28241 2001-04-21  Jim Meyering  <meyering@lucent.com>
28242
28243         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
28244         doesn't interfere.
28245
28246 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
28247
28248         * m4/ftruncate.m4: Check for chsize.
28249         Link with ftruncate.o unconditionally if ftruncate is missing.
28250         This was required when cross-compiling to i586-mingw32msvc.
28251
28252 2001-04-08  Jim Meyering  <meyering@lucent.com>
28253
28254         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
28255         recomputed; that's necessary when the offset spans a DST transition.
28256         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
28257
28258 2001-04-02  Jim Meyering  <meyering@lucent.com>
28259
28260         * lib/regex.h, regex.c: Update from GNU libc.
28261
28262 2001-03-24  Jim Meyering  <meyering@lucent.com>
28263
28264         * m4/jm-macros.m4: Require autoconf-2.49d.
28265
28266 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
28267
28268         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
28269
28270 2001-03-19  Paul Eggert  <eggert@twinsun.com>
28271
28272         * lib/version-etc.c (version_etc_copyright): Update to 2001.
28273
28274 2001-03-17  Jim Meyering  <meyering@lucent.com>
28275
28276         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
28277         now that the version in autoconf is equivalent.
28278         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
28279
28280         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
28281         Suggestion from Akim Demaille.
28282
28283         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
28284         (jm_PREREQ_TEMPNAME): New function.
28285
28286 2001-03-16  Paul Eggert  <eggert@twinsun.com>
28287
28288         * lib/tempname.c (uint64_t): Define to uintmax_t if
28289         not defined, and if UINT64_MAX is not defined.
28290         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
28291         Reported by John David Anglin.
28292
28293 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
28294
28295         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
28296         resolve alias if codeset is empty.
28297         * lib/config.charset (BeOS): Use wildcard syntax.
28298
28299 2001-03-13  Jim Meyering  <meyering@lucent.com>
28300
28301         * lib/path-concat.c (path_concat)
28302         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
28303         concatenating e.g., `C:' and `foo'.
28304         From Bruno Haible.
28305
28306 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
28307
28308         * lib/localcharset.c (locale_charset): Don't use
28309         setlocale(LC_CTYPE,NULL). Don't return NULL.
28310         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
28311
28312 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
28313
28314         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
28315         support for DOS/DJGPP.
28316
28317 2001-03-01  Paul Eggert  <eggert@twinsun.com>
28318
28319         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
28320         lacks mkstemp.  Compile our own tempname.c if we compile our own
28321         mkstemp.c, as mkstemp relies on tempname.
28322
28323 2001-03-01  Jim Meyering  <meyering@lucent.com>
28324
28325         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
28326         AH_VERBATIM really does output its argument verbatim.
28327
28328 2001-02-28  Paul Eggert  <eggert@twinsun.com>
28329
28330         * lib/Makefile.am (libfetish_a_SOURCES):
28331         Add dup-safer.c, fopen-safer.c.
28332         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
28333
28334         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
28335         * lib/unistd-safer.h: New files.
28336
28337 2001-02-25  Paul Eggert  <eggert@twinsun.com>
28338
28339         The mkstemp replacement is taken from glibc 2.2.2, with some
28340         portability fixes for use outside glibc, as follows:
28341
28342         * lib/tempname.c (struct_stat64): New macro.
28343         (direxists, __gen_tempname): Use it.
28344         This avoids a portability problem with Solaris 8.
28345
28346         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
28347         (<stddef.h>, <stdint.h>, <string.h>):
28348         Include only if STDC_HEADERS || _LIBC.
28349         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
28350         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
28351         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
28352         (__set_errno): Define this macro if <errno.h> doesn't.
28353         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
28354         Define these macros if <stdio.h> doesn't.
28355         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
28356         Define these macros if <sys/stat.h>
28357         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
28358         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
28359         __xstat64): Define if not _LIBC.
28360         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
28361         (__gen_tempname): Invoke gettimeofday only if
28362         HAVE_GETTIMEOFDAY || _LIBC;
28363         otherwise, fall back on plain "time".
28364         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
28365
28366         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
28367
28368         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
28369
28370 2001-02-18  Paul Eggert  <eggert@twinsun.com>
28371
28372         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
28373
28374 2001-02-17  Paul Eggert  <eggert@twinsun.com>
28375
28376         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
28377         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
28378         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
28379         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
28380
28381 2001-02-17  Paul Eggert  <eggert@twinsun.com>
28382
28383         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
28384         Remove workaround macros for hosts that have mbrtowc but not
28385         mbstate_t, as we now insist on proper declarations for both
28386         before using mbrtowc.
28387
28388 2001-02-17  Jim Meyering  <meyering@lucent.com>
28389
28390         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
28391         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
28392         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
28393         UnixWare 7.1.1.
28394
28395         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
28396         rather than AC_CACHE_VAL.
28397
28398 2001-02-17  Jim Meyering  <meyering@lucent.com>
28399
28400         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
28401         around included file name.
28402
28403         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
28404
28405         * lib/strftime.c: Update from GNU libc (the only changes were to
28406         comments).
28407
28408 2001-02-17  Jim Meyering  <meyering@lucent.com>
28409
28410         * lib/regex.c: Update from libc.
28411
28412 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
28413
28414         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
28415         clash.
28416
28417 2001-02-16  Paul Eggert  <eggert@twinsun.com>
28418
28419         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
28420         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
28421         Reported by Mark Hounschell via Paul Eggert.
28422
28423 2001-02-07  Jim Meyering  <meyering@lucent.com>
28424
28425         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
28426
28427 2001-02-05  Jim Meyering  <meyering@lucent.com>
28428
28429         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
28430         it includes the patch required for `large file' support with at least
28431         HP-UX's 10.20 /bin/cc.
28432
28433 2001-02-03  Jim Meyering  <meyering@lucent.com>
28434
28435         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
28436         AS_IF, now that it works once again (mysteriously).
28437         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
28438
28439 2001-01-30  Jim Meyering  <meyering@lucent.com>
28440
28441         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
28442         * m4/chown.m4: Rename conftestchown to conftest.chown.
28443         * m4/rename.m4: s/conftestdir/conftest.d1/ and
28444         s/conftestdir2/conftest.d2/.
28445         * m4/utimes.m4: s/conftestdata/conftest.data/
28446         Inspired by Pavel Roskin's change in autoconf.
28447
28448 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
28449
28450         * lib/config.charset: Update for FreeBSD 4.2.
28451
28452 2001-01-27  Jim Meyering  <meyering@lucent.com>
28453
28454         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
28455         a use of AS_IF.
28456         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
28457
28458 2001-01-26  Jim Meyering  <meyering@lucent.com>
28459
28460         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
28461         quotearg.c includes it.
28462
28463 2001-01-26  Jim Meyering  <meyering@lucent.com>
28464
28465         * lib/quotearg.c: Include stddef.h.
28466         * lib/quote.c: Include stddef.h.
28467         Reported by Axel Kittenberger.
28468
28469         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
28470         line in double quotes so that it evokes a better diagnostic.
28471         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
28472         Reported by Axel Kittenberger.
28473
28474 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
28475
28476         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
28477         as if it was a `charset'.
28478
28479 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
28480
28481         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
28482         has const.
28483
28484 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
28485
28486         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
28487         to avoid a warning.  Add back 'const' to inptr.
28488
28489 2001-01-20  Jim Meyering  <meyering@lucent.com>
28490
28491         Be sure that headers are checked before used in code compiled
28492         for the type checks.
28493         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
28494         In place of that, invoke jm_CHECK_ALL_TYPES.
28495         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
28496         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
28497         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
28498         The check for ssize_t was mistakenly run before the test for unistd.h.
28499
28500         The configure-time check for stdbool.h was missing.
28501         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
28502         (jm_PREREQ_HASH): New function.
28503
28504 2001-01-17  Jim Meyering  <meyering@lucent.com>
28505
28506         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
28507         for autoconf-2.49c.
28508         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
28509
28510 2001-01-16  Jim Meyering  <meyering@lucent.com>
28511
28512         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
28513         From Bruno Haible.
28514
28515 2001-01-14  Jim Meyering  <meyering@lucent.com>
28516
28517         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
28518         foo and bar.  Create conftestdir/ in the script, not in the C code.
28519         Remove directories in the script, not in the C code.
28520         Remove conftestdir{,2} before trying to create the directory.
28521         Make the entire configure script fail if the mkdir fails.
28522
28523 2001-01-14  Jim Meyering  <meyering@lucent.com>
28524
28525         * lib/rename.c: New file.  From Volker Borchert.
28526         Include stdlib.h, string.h or strings.h, and xalloc.h.
28527         Use strip_trailing_slashes rather than open-coding it.
28528
28529 2001-01-03  Paul Eggert  <eggert@twinsun.com>
28530
28531         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
28532
28533 2001-01-03  Jim Meyering  <meyering@lucent.com>
28534
28535         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
28536         of local `inptr' to avoid warning with some system declarations of
28537         iconv.
28538
28539 2001-01-02  Volker Borchert  <bt@teknon.de>
28540
28541         * m4/rename.m4: New file.
28542         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
28543
28544 2001-01-01  Jim Meyering  <meyering@lucent.com>
28545
28546         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
28547         even on systems with utmpx.h.  It's necessary for the declaration of
28548         utmp's ut_user member.  Reported by Andreas Jaeger.
28549
28550         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
28551         available. They are required for the declarations of getgrgid and
28552         getpwuid resp.
28553         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
28554         Reported by Andreas Jaeger.
28555
28556 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
28557
28558         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
28559         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
28560         so `make install' also works in VPATH builds.
28561
28562 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
28563
28564         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
28565         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
28566         can be used in subdirectories.
28567
28568 2000-12-29  Paul Eggert  <eggert@twinsun.com>
28569
28570         * lib/modechange.c: Do not assume that mode_t uses the
28571         traditional octal encoding.  E.g. "chmod 1 FOO" should set
28572         the other-execute bit of FOO even if S_IXOTH != 1.
28573
28574         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
28575         WOTH, XOTH, ALLM): New macros.
28576         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
28577          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
28578         Use them.
28579         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
28580         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
28581         (mode_compile):
28582         No need to use uintmax_t; unsigned long is long enough.
28583         Don't bother to get suffix since we don't use it.
28584
28585 2000-12-26  Jim Meyering  <meyering@lucent.com>
28586
28587         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
28588         better with autoheader.
28589
28590 2000-12-24  Jim Meyering  <meyering@lucent.com>
28591
28592         * lib/hash.c (is_prime): Return explicit boolean values.
28593         (hash_get_first): Return NULL to appease Irix5.6's 89.
28594         Reported by Nelson Beebe.
28595
28596 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
28597
28598         * lib/localcharset.c (locale_charset): Add support for Win32.
28599
28600 2000-12-18  Paul Eggert  <eggert@twinsun.com>
28601
28602         * lib/physmem.h, lib/physmem.c: New files.
28603
28604         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
28605         (noinst_HEADERS): Add physmem.h.
28606
28607         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
28608         't' for compatibility with Solaris 8 sort.
28609
28610 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
28611
28612         * lib/config.charset: Add support for BeOS.
28613
28614 2000-12-17  Jim Meyering  <meyering@lucent.com>
28615
28616         * m4/dos.m4 (jm_AC_DOS): New file and macro.
28617         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
28618
28619 2000-12-16  Jim Meyering  <meyering@lucent.com>
28620
28621         This bug had a serious impact on chown: `chown N:M FILE' (for integer
28622         N and M) would have treated it like `chown N:N FILE'.
28623
28624         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
28625
28626 2000-12-16  Jim Meyering  <meyering@lucent.com>
28627
28628         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
28629         SHELLS_FILE to a file name that's useful on djgpp systems.
28630         Include stdlib.h.
28631         (ADDITIONAL_DEFAULT_SHELLS): Define.
28632         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
28633         Based mostly on a patch from Prashant TR.
28634
28635 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
28636
28637         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
28638         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
28639         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
28640
28641 2000-12-08  Andreas Schwab  <schwab@suse.de>
28642
28643         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
28644         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
28645
28646 2000-12-07  Jim Meyering  <meyering@lucent.com>
28647
28648         * lib/stripslash.c (ISSLASH): Define.
28649         (strip_trailing_slashes): Use ISSLASH rather than comparing against
28650         `/'.
28651         From Prashant TR.
28652
28653         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
28654         (dir_name_r): Declare this function as static.
28655         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
28656         manifest itself on a name containing a mix of slashes and
28657         backslashes.
28658         Make this function work with names starting with a DOS-style
28659         drive letter and colon prefix.
28660         (dir_name): Append `.' if necessary.
28661         Based mostly on patches from Prashant TR and Eli Zaretskii.
28662
28663         * lib/dirname.h (dir_name_r): Remove prototype.
28664
28665 2000-12-06  Paul Eggert  <eggert@twinsun.com>
28666
28667         * m4/off_t-format.m4: Remove this file.
28668         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
28669
28670 2000-12-06  Jim Meyering  <meyering@lucent.com>
28671
28672         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
28673         replacement strtoull, we may well need the replacement strtoul, too.
28674         Check for declarations of strtoul and strtoull.
28675         Check for strtol.  Mainly as a cue to cause automake to include
28676         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
28677         Check for limits.h -- strtol.c needs it.
28678
28679 2000-12-05  Jim Meyering  <meyering@lucent.com>
28680
28681         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
28682
28683 2000-12-04  Jim Meyering  <meyering@lucent.com>
28684
28685         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
28686         Also include memory.h, stdlib.h, unistd.h if appropriate.
28687         Reported by Andreas Jaeger (conflicting declaration of malloc).
28688
28689 2000-12-02  Jim Meyering  <meyering@lucent.com>
28690
28691         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
28692         * m4/jm-macros.m4 (jm_MACROS): require it.
28693
28694 2000-12-02  Jim Meyering  <meyering@lucent.com>
28695
28696         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
28697
28698 2000-12-01  Paul Eggert  <eggert@twinsun.com>
28699
28700         * lib/memrchr.c: Include <config.h> before any system include file.
28701
28702 2000-11-30  Jim Meyering  <meyering@lucent.com>
28703
28704         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
28705
28706 2000-11-30  Jim Meyering  <meyering@lucent.com>
28707
28708         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
28709
28710 2000-11-29  Paul Eggert  <eggert@twinsun.com>
28711
28712         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
28713
28714 2000-11-26  Jim Meyering  <meyering@lucent.com>
28715
28716         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
28717
28718 2000-11-22  Paul Eggert  <eggert@twinsun.com>
28719
28720         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
28721         size of (size_t) -1; it's not portable.
28722
28723 2000-11-17  Jim Meyering  <meyering@lucent.com>
28724
28725         * lib/strstr.c: Update from GNU libc.
28726
28727 2000-11-17  Akim Demaille  <akim@epita.fr>
28728
28729         * lib/obstack.h: Formatting changes.
28730         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
28731         prevent type checking.
28732         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
28733         cast the value to (void *): assigning a `foo *' to a `void *'
28734         variable is valid.
28735         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
28736
28737 2000-11-16  Jim Meyering  <meyering@lucent.com>
28738
28739         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
28740
28741 2000-11-11  Jim Meyering  <meyering@lucent.com>
28742
28743         * lib/error.c: Add a couple #includes, merging from GNU libc version.
28744
28745 2000-11-10  Jim Meyering  <meyering@lucent.com>
28746
28747         * lib/obstack.h: Update from GNU libc.
28748         * lib/obstack.c: Likewise.
28749
28750 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
28751
28752         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
28753
28754 2000-11-06  Paul Eggert  <eggert@twinsun.com>
28755
28756         * lib/getusershell.c (setusershell): Use rewind rather than
28757         fseek/fseeko, to avoid configuration hassles with fseeko.
28758         Don't bother opening SHELLS_FILE if shellstream is NULL;
28759         it's not necessary.
28760
28761 2000-11-05  Jim Meyering  <meyering@lucent.com>
28762
28763         * lib/makepath.h (make_dir): Declare.
28764         * lib/makepath.c (make_dir): Remove `static' attribute.
28765         Tweak a comment.
28766
28767 2000-11-04  Jim Meyering  <meyering@lucent.com>
28768
28769         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
28770
28771 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
28772
28773         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
28774         last one in a bucket, advance to the next bucket.
28775
28776 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
28777
28778         * lib/fnmatch.c: Do not comment out all the code if we are using
28779         the GNU C library, because in some cases we are replacing buggy
28780         code in the GNU C library itself.
28781
28782 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
28783
28784         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
28785         (regex_compile): Catch bogus \(\1\).
28786
28787 2000-10-30  Paul Eggert  <eggert@twinsun.com>
28788
28789         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
28790         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
28791         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
28792
28793 2000-10-30  Paul Eggert  <eggert@twinsun.com>
28794
28795         * lib/error.h, getline.h, modechange.h:
28796         Remove "2000" from Copyright line, as the file hasn't been
28797         changed this year other than in the copyright notice.
28798
28799         * lib/xalloc.h: Add "2000" to Copyright line, as this file
28800         was changed this year.
28801
28802 2000-10-29  Jim Meyering  <meyering@lucent.com>
28803
28804         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
28805         renaming.
28806         * m4/ls-mntd-fs.m4: Likewise
28807
28808 2000-10-29  Jim Meyering  <meyering@lucent.com>
28809
28810         * lib/xstat.in: Fix grammar in comment.
28811
28812 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
28813
28814         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
28815         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
28816         doesn't define __restrict_arr.
28817
28818 2000-10-28  Jim Meyering  <meyering@lucent.com>
28819
28820         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
28821         (jm_PREREQ_MEMCHR): New function.
28822
28823 2000-10-28  Jim Meyering  <meyering@lucent.com>
28824
28825         * lib/memchr.c: Update from libc.
28826         Adjust for portability:
28827         [HAVE_STDLIB_H]: Include stdlib.h.
28828         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
28829         Undef __memchr, too.
28830         [!weak_alias]: Define __memchr to memchr.
28831
28832         * lib/regex.c: Update from libc.
28833         * lib/regex.h: Likewise.
28834         * lib/getopt1.c: Likewise.
28835         * lib/memcmp.c: Likewise.
28836
28837         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
28838         Avoid using fseek, when possible -- it's broken by design.
28839         Patch by Ulrich Drepper.
28840
28841 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
28842
28843         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
28844         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
28845         Giving in to popular pressure to shut up the compiler with casts.
28846
28847 2000-10-26  Jim Meyering  <meyering@lucent.com>
28848
28849         * lib/strftime.c: Update from libc.
28850
28851 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
28852
28853         * regex.c: More `unsigned char' -> `re_char' changes.
28854         Also change several `int' into `re_wchar_t'.
28855         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
28856         (PUSH_FAILURE_POINTER): Don't cast any more.
28857         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
28858         We want GCC to complain, since this piece of code makes
28859         re_match non-reentrant, which *should* be fixed.
28860         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
28861         (EXTEND_BUFFER): Use RETALLOC.
28862         (SET_LIST_BIT): Don't cast.
28863         (re_wchar_t): New type.
28864         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
28865         that those two functions will always properly return.
28866         (IMMEDIATE_QUIT_CHECK): Cast to void.
28867         (analyse_first): Use recursion rather than an explicit stack.
28868         (re_compile_fastmap): Can't fail anymore.
28869         (re_search_2): Don't check re_compile_fastmap for failure.
28870         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
28871         Now also sets the new value (passed in a new argument).
28872         (re_match_2_internal): Use it.
28873         Also, use a new var `reg' of type size_t when looping through regs
28874         rather than reuse the inappropriate `mcnt'.
28875
28876 2000-10-25  Jim Meyering  <meyering@lucent.com>
28877
28878         * lib/obstack.c: Update from libc.
28879
28880 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
28881
28882         * regex.c (regex_compile): Change the way of handling a range from
28883         a char less than 256 to a char not less than 256.
28884
28885 2000-10-24  Andrew Innes  <andrewi@gnu.org>
28886
28887         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
28888         NT-Emacs only.
28889         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
28890         so that re_search functions only quit when callers expect them to.
28891
28892 2000-10-23  Jim Meyering  <meyering@lucent.com>
28893
28894         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
28895         wrong.  That set_locale call must not have any side effects.
28896         From Paul Eggert.
28897
28898 2000-10-22  Jim Meyering  <meyering@lucent.com>
28899
28900         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
28901         [CYCLIC]: Remove now-unused definition.
28902
28903         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
28904         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
28905         Suggestion from Ulrich Drepper.
28906
28907 2000-10-21  Jim Meyering  <meyering@lucent.com>
28908
28909         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
28910         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
28911         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
28912
28913 2000-10-21  Jim Meyering  <meyering@lucent.com>
28914
28915         * lib/dirname.c (memrchr): Declare if necessary.
28916         (dir_name): Remove the restriction that there be no
28917         trailing slashes.  Now, this code skips past them, effectively
28918         ignoring them.
28919         [TEST_DIRNAME] (main): New unit tests.
28920
28921         * lib/memrchr.c: New file from GNU libc.
28922         Undef __memrchr, too.
28923         [!weak_alias]: Define __memrchr to memrchr.
28924         Guard weak_alias use with `#ifdef weak_alias'.
28925
28926 2000-10-21  Jim Meyering  <meyering@lucent.com>
28927
28928         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
28929         (dir_name): Use dir_name_r.
28930         * lib/dirname.h (dir_name_r): Declare it.
28931
28932 2000-10-17  Jim Meyering  <meyering@lucent.com>
28933
28934         * lib/quote.h (PARAMS): Define and use.
28935         Reported by Akim Demaille.
28936
28937         * lib/getopt.c: Update from libc.
28938
28939 2000-10-16  Jim Meyering  <meyering@lucent.com>
28940
28941         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
28942         setlocale.
28943         From Jan Fedak.
28944
28945 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
28946
28947         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
28948
28949 2000-09-25  Jim Meyering  <meyering@lucent.com>
28950
28951         * lib/md5.h (rol): Define (from GnuPG).
28952
28953         * lib/sha.c: Give credit (GnuPG) where due.
28954         (M): Use rol rather than open-coding it.
28955         Add a FIXME comment.
28956
28957 2000-09-21  Jim Meyering  <meyering@lucent.com>
28958
28959         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
28960         Reported by Michael Stone.
28961
28962 2000-09-20  Jim Meyering  <meyering@lucent.com>
28963
28964         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
28965         (noinst_HEADERS): Add sha.h.
28966         Based on code from Scott G. Miller and from GnuPG.
28967
28968 2000-09-18  Jim Meyering  <meyering@lucent.com>
28969
28970         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
28971         LIBS. Otherwise, everyone ends up linking with -lelf for some
28972         configurations.
28973         Reported by Mike Stone.
28974
28975 2000-09-15  Jim Meyering  <meyering@lucent.com>
28976
28977         * lib/regex.c: Update from libc.
28978
28979 2000-09-10  Jim Meyering  <meyering@lucent.com>
28980
28981         * lib/getopt.c (_getopt_internal): Update from glibc.
28982
28983 2000-09-09  Jim Meyering  <meyering@lucent.com>
28984
28985         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
28986         think it should be used as a general replacement for isascii.
28987         * lib/fnmatch.c: Likewise.
28988         * lib/mbswidth.c: Likewise
28989         * lib/regex.c: Likewise.
28990
28991         Don't use atoi.
28992         * lib/userspec.c: Include sys/param.h and limits.h.
28993         Include xstrtol.h.
28994         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
28995         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
28996         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
28997         UID, GID.  Check range.
28998
28999 2000-09-06  Jim Meyering  <meyering@lucent.com>
29000
29001         * lib/getopt.c (_getopt_internal): Update from glibc.
29002
29003 2000-08-30  Jim Meyering  <meyering@lucent.com>
29004
29005         * lib/strftime.c: Merge in changes from GNU libc.
29006
29007 2000-08-26  Jim Meyering  <meyering@lucent.com>
29008
29009         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
29010         * m4/fpending.m4: New file.
29011
29012 2000-08-26  Jim Meyering  <meyering@lucent.com>
29013
29014         * lib/closeout.c: Include "__fpending.h".
29015         (close_stdout_status): Return right away if there's nothing to flush.
29016
29017         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
29018         * lib/__fpending.c: New file.
29019         * lib/__fpending.h: New file.
29020
29021 2000-08-20  Jim Meyering  <meyering@lucent.com>
29022
29023         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
29024         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
29025         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
29026
29027 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
29028
29029         Improve fileutils installation on systems where running
29030         programs (like install) can't be unlinked.
29031         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
29032         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
29033
29034 2000-08-07  Paul Eggert  <eggert@twinsun.com>
29035
29036         Standardize on "memory exhausted" instead of "Memory exhausted"
29037         or "virtual memory exhausted".
29038         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
29039         "virtual memory exhausted".
29040         * lib/same.c (same_name): Invoke xalloc_die instead of printing
29041         our own message.
29042         * lib/userspec.c (parse_user_spec): Likewise.
29043         * lib/bumpalloc.h: comment fix
29044         * lib/same.c, userspec.c: Include xalloc.h.
29045
29046         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
29047         not char *const and pointing to a constant array.
29048         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
29049         (xrealloc): Comment fix.
29050
29051         * lib/userspec.c (parse_user_spec):
29052         Don't translate a message until just before returning,
29053         to avoid unnecessary translation.
29054
29055 2000-08-07  Jim Meyering  <meyering@lucent.com>
29056
29057         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
29058         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
29059         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
29060         getgroups.c, gethostname.c, getopt.h, group-member.c,
29061         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
29062         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
29063         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
29064         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
29065         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
29066         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
29067         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
29068         yesno.c: Back out Copyright date changes for each file with no change
29069         this year.  This eases coordination with other programs using the same
29070         source code modules.  From Paul Eggert.
29071
29072 2000-08-06  Paul Eggert  <eggert@twinsun.com>
29073
29074         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
29075         not char, for compatibility with glibc 2.1.3 strftime.c.
29076
29077 2000-08-03  Greg McGary  <greg@mcgary.org>
29078
29079         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
29080         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
29081         (EXTEND_BUFFER): Use them.
29082
29083 2000-08-01  Jim Meyering  <meyering@lucent.com>
29084
29085         * lib/dirname.c (ISSLASH): Define.
29086         (BACKSLASH_IS_PATH_SEPARATOR): Define.
29087         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
29088         both `\' and `/' may be use as path separators.
29089         Based on a patch from Prashant TR.
29090
29091 2000-07-31  Paul Eggert  <eggert@twinsun.com>
29092
29093         * lib/quotearg.c (quotearg_n_options): Don't make the initial
29094         slot vector a constant, since it might get modified.
29095
29096 2000-07-31  Jim Meyering  <meyering@lucent.com>
29097
29098         * lib/xmalloc.c: Use `virtual memory exhausted', not
29099         `Memory exhausted'.
29100         * lib/obstack.c (print_and_abort): Likewise.
29101
29102 2000-07-30  Paul Eggert  <eggert@twinsun.com>
29103
29104         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
29105         buffer, so that the caller can always quote one small
29106         component of a "memory exhausted" message in slot 0.
29107         From a suggestion by Jim Meyering.
29108
29109 2000-07-30  Jim Meyering  <meyering@lucent.com>
29110
29111         * lib/makepath.c (make_path): Quote the other instance, too.
29112
29113         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
29114         (STATIC_BUF_SIZE): Define.
29115         (quotearg_n_options): Use only statically allocated storage when
29116         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
29117         than STATIC_BUF_SIZE.
29118
29119 2000-07-29  Jim Meyering  <meyering@lucent.com>
29120
29121         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
29122         * lib/dirname.c (dir_name): Likewise.
29123
29124         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
29125         `/'.
29126
29127         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
29128         (dir_name): Assert that there are no trailing slashes.
29129
29130 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
29131
29132         * lib/mbswidth.h (mbswidth): Add a flags argument.
29133         (mbswidth): New declaration.
29134         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
29135         * lib/mbswidth.c (mbswidth): Add a flags argument.
29136         (mbsnwidth): New function.
29137
29138 2000-07-24  Jim Meyering  <meyering@lucent.com>
29139
29140         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
29141
29142 2000-07-23  Paul Eggert  <eggert@twinsun.com>
29143
29144         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
29145
29146 2000-07-23  Paul Eggert  <eggert@twinsun.com>
29147
29148         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
29149         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
29150         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
29151         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
29152         invoke multibyte primitives.
29153
29154 2000-07-23  Paul Eggert  <eggert@twinsun.com>
29155
29156         * lib/quotearg.c:
29157         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
29158         so that mbstate_t is always defined.
29159
29160         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
29161         be 1 in at least one GCC installation, and this configuration
29162         error is likely to be common.  Ignoring MB_LEN_MAX hurts
29163         performance on hosts that have mbrtowc but have only unibyte
29164         locales, but I assume these hosts are rare.
29165
29166 2000-07-23  Paul Eggert  <eggert@twinsun.com>
29167
29168         * lib/mbswidth.c (_XOPEN_SOURCE):
29169         Don't define; this causes problems on Solaris 7.
29170         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
29171
29172 2000-07-23  Jim Meyering  <meyering@lucent.com>
29173
29174         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
29175         too: getgrgid, getpwuid, getuid.
29176
29177 2000-07-23  Jim Meyering  <meyering@lucent.com>
29178
29179         * lib/basename.c (base_name): Add an assertion.
29180
29181 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
29182
29183         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
29184         shadow its mbsinit function.
29185
29186 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
29187
29188         * lib/mbswidth.h: New file.
29189         * lib/mbswidth.c: New file.
29190         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
29191         (noinst_HEADERS): Add mbswidth.h.
29192
29193 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
29194
29195         * lib/config.charset: Add support for FreeBSD. Improve support for
29196         HP-UX and IRIX 6.
29197
29198 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
29199
29200         * m4/mbswidth.m4: New file.
29201         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
29202
29203 2000-07-15  Jim Meyering  <meyering@lucent.com>
29204
29205         * lib/makepath.c: Include quote.h.
29206         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
29207         corresponding argument in a `quote (...)' call.
29208         Give better diagnostics.
29209
29210         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
29211         (noinst_HEADERS): Add quote.h.
29212
29213         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
29214         from tar's src/misc.c.
29215         * lib/quote.h: New file.  Prototypes for same.
29216
29217 2000-07-14  Paul Eggert  <eggert@twinsun.com>
29218
29219         From a suggestion by Bruno Haible.
29220         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
29221         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
29222         to decide whether to define the BeOS workaround macro;
29223         this adjusts to the change to AC_MBSTATE_T.
29224
29225 2000-07-14  Jim Meyering  <meyering@lucent.com>
29226
29227         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
29228         jm_AC_TYPE_UINTMAX_T.
29229
29230 2000-07-13  Paul Eggert  <eggert@twinsun.com>
29231
29232         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
29233
29234         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
29235         quotearg_buffer_restyled): Add support for
29236         clocale_quoting_style.  Undo previous change to
29237         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
29238         and "{RIGHT QUOTATION MARK}" msgids.
29239
29240 2000-07-10  Paul Eggert  <eggert@twinsun.com>
29241
29242         From a suggestion by Bruno Haible.
29243         * m4/mbstate_t.m4 (AC_MBSTATE_T):
29244         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
29245         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
29246         and mbstate_t, to a single-part test that simply defines mbstate_t.
29247         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
29248         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
29249
29250 2000-07-10  Jim Meyering  <meyering@lucent.com>
29251
29252         * m4/strerror_r.m4: Mirror the correction made in autoconf.
29253
29254         * m4/gnu-source.m4: Output to confdefs.h directly.
29255         Suggestion from Akim Demaille.
29256
29257 2000-07-09  Paul Eggert  <eggert@twinsun.com>
29258
29259         The old behavior of quoting `like this' doesn't look good with
29260         newer, ISO-style fonts.  See:
29261         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
29262
29263         Instead, quote "like this" by default.  Let the translator
29264         tailor the locale-specific quoting behavior by providing
29265         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
29266
29267         * lib/quotearg.c (N_): New macro.
29268         (gettext_default): New function.
29269         (quotearg_buffer_restyled): Use
29270         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
29271         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
29272
29273 2000-07-09  Jim Meyering  <meyering@lucent.com>
29274
29275         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
29276         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
29277
29278         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
29279         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
29280
29281 2000-07-09  Jim Meyering  <meyering@lucent.com>
29282
29283         * lib/Most files: Update copyright dates to include 2000.
29284
29285 2000-07-08  Jim Meyering  <meyering@lucent.com>
29286
29287         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
29288         if not defined.
29289         (xgethostname): Remove now-unnecessary #ifdef.
29290         Move declaration of `err' into loop where it's used.
29291
29292 2000-07-05  Paul Eggert  <eggert@twinsun.com>
29293         and Bruno Haible  <haible@clisp.cons.org>
29294
29295         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
29296         only if the test for an object-type mbstate_t fails.  This
29297         prevents us from mistakenly reporting that mbstate_t is a
29298         system object type after we "#define mbstate_t int" to work
29299         around its lack.
29300
29301 2000-07-05  Paul Eggert  <eggert@twinsun.com>
29302         and Bruno Haible  <haible@clisp.cons.org>
29303
29304         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
29305
29306 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
29307
29308         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
29309         to strerror_r.
29310         Include <ctype.h> for use of isalpha.
29311
29312 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
29313
29314         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
29315         by allocating a larger buffer. Test the gethostname return value for
29316         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
29317         returns an error and ENAMETOOLONG isn't defined.
29318
29319 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
29320
29321         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
29322         dimension.
29323
29324 2000-07-04  Jim Meyering  <meyering@lucent.com>
29325
29326         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
29327         of the deprecated AC_CHECKING.
29328
29329 2000-07-04  Jim Meyering  <meyering@lucent.com>
29330
29331         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
29332         Reported by Bruno Haible.
29333
29334 2000-07-04  Jim Meyering  <meyering@lucent.com>
29335
29336         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
29337         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
29338         lacks mbrtowc.
29339
29340 2000-07-03  Paul Eggert  <eggert@twinsun.com>
29341
29342         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
29343         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
29344
29345 2000-07-03  Paul Eggert  <eggert@twinsun.com>
29346         and Bruno Haible  <haible@clisp.cons.org>
29347
29348         * lib/quotearg.c (mbrtowc):
29349         Assign to *pwc, and return 1 only if result is nonzero.
29350         (iswprint): Use ISPRINT when substituting our own mbrtowc.
29351
29352 2000-07-03  Jim Meyering  <meyering@lucent.com>
29353
29354         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
29355
29356 2000-07-03  Jim Meyering  <meyering@lucent.com>
29357
29358         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
29359         This is necessary to get a definition of e.g., UTMP_FILE on
29360         HP-UX 10.20.
29361         From Bob Proulx.
29362
29363 2000-07-02  Jim Meyering  <meyering@lucent.com>
29364
29365         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
29366
29367         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
29368         AC_LIBOBJ(function_name).
29369         * m4/chown.m4: Likewise.
29370         * m4/fnmatch.m4: Likewise.
29371         * m4/ftruncate.m4: Likewise.
29372         * m4/getgroups.m4: Likewise.
29373         * m4/getline.m4: Likewise.
29374         * m4/group-member.m4: Likewise.
29375         * m4/jm-macros.m4: Likewise.
29376         * m4/lstat.m4: Likewise.
29377         * m4/malloc.m4: Likewise.
29378         * m4/memcmp.m4: Likewise.
29379         * m4/nanosleep.m4: Likewise.
29380         * m4/putenv.m4: Likewise.
29381         * m4/realloc.m4: Likewise.
29382         * m4/regex.m4: Likewise.
29383         * m4/stat.m4: Likewise.
29384         * m4/strftime.m4: Likewise.
29385
29386 2000-07-02  Jim Meyering  <meyering@lucent.com>
29387
29388         * lib/quotearg.c (mbstate_t): Don't define here.
29389
29390 2000-07-02  Jim Meyering  <meyering@lucent.com>
29391
29392         * lib/nanosleep.c (SIGCONT): Define if not already defined.
29393
29394 2000-07-01  Jim Meyering  <meyering@lucent.com>
29395
29396         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
29397
29398 2000-07-01  Jim Meyering  <meyering@lucent.com>
29399
29400         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
29401         problem.
29402
29403 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
29404
29405         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
29406         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
29407
29408 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
29409
29410         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
29411         per change in ../m4/ls-mntd-fs.m4.
29412         (read_filesystem_list): Ignore symbolic links.
29413
29414 2000-06-29  Jim Meyering  <meyering@lucent.com>
29415
29416         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
29417         for declaration of strcmp.
29418
29419         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
29420
29421         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
29422         Avoid warning by casting result to `char *' to remove `const'.
29423
29424 2000-06-28  Jim Meyering  <meyering@lucent.com>
29425
29426         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
29427         included by quotearg.c, for which we perform this test.  From
29428         Bruno Haible.
29429
29430 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
29431
29432         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
29433         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
29434         <utmpx.h> exists, put readutmp.o into LIBOBJS.
29435
29436 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
29437
29438         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
29439
29440 2000-06-26  Paul Eggert  <eggert@twinsun.com>
29441
29442         savedir now sets errno on failure and invokes xmalloc to get memory.
29443         Fix a couple of other minor bugs while we're at it.
29444
29445         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
29446         (NAMLEN): Remove macro.
29447         (malloc, realloc): Remove decls.
29448         (stpcpy): Likewise.
29449         ("xalloc.h"): Include.
29450         (NAME_SIZE_DEFAULT): New macro.
29451         (savedir): Use xmalloc / xrealloc to allocate memory.
29452         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
29453         Skip "" directory entries.
29454         Use strlen to calculate directory entry length, since the old method
29455         is rarely used these days and isn't worth supporting.
29456         Don't use a pointer after freeing it.
29457         Check for integer overflow when calculating allocation size.
29458         Use memcpy to copy entries, instead of stpcpy.
29459         Set errno properly when returning NULL.
29460         Check for readdir error.
29461
29462 2000-06-26  Jim Meyering  <meyering@lucent.com>
29463
29464         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
29465
29466 2000-06-25  Jim Meyering  <meyering@lucent.com>
29467
29468         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
29469         Linux header bug when _XOPEN_SOURCE is defined to 500.
29470
29471 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
29472
29473         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
29474         deficiency.
29475
29476 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
29477
29478         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
29479         Include xalloc.h.
29480         Don't include <stdlib.h>.  Don't declare malloc, realloc.
29481
29482 2000-06-24  Jim Meyering  <meyering@lucent.com>
29483
29484         * m4/strerror_r.m4: Revive this file -- to try out an experimental
29485         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
29486         for which strerror does return char*, but which lacks a conveniently
29487         accessible declaration of the function.  If the compile-test says
29488         strerror_r doesn't work, then resort to a `run'-test that works on
29489         BeOS and segfaults on DEC Unix.
29490
29491 2000-06-24  Jim Meyering  <meyering@lucent.com>
29492
29493         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
29494
29495 2000-06-23  Paul Eggert  <eggert@twinsun.com>
29496
29497         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
29498         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
29499
29500 2000-06-23  Paul Eggert  <eggert@twinsun.com>
29501
29502         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
29503         (mbrtowc, mbstate_t): Define substitutes if
29504         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
29505         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
29506         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
29507
29508 2000-06-23  Jim Meyering  <meyering@lucent.com>
29509
29510         * m4/afs.m4: Add missing AC_MSG_RESULT.
29511         Reported by Bruno Haible.
29512
29513         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
29514         Suggestion from Bruno Haible.
29515
29516 2000-06-23  Jim Meyering  <meyering@lucent.com>
29517
29518         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
29519
29520 2000-06-21  Jim Meyering  <meyering@lucent.com>
29521
29522         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
29523
29524 2000-06-21  Jim Meyering  <meyering@lucent.com>
29525
29526         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
29527         (noinst_HEADERS): Add getstr.h.
29528
29529         * lib/getline.c (getstr): Move into a separate file.
29530         * lib/getstr.c (getstr): New file, extracted from getline.c, with
29531         the following changes: new parameter, delim2; both delim[12]
29532         parameters have type `int', not `char'.  The latter would lose
29533         with 8-bit delimiters.
29534         * lib/getstr.h: New file.
29535
29536 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
29537
29538         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
29539         than 1024, return a memory chunk of least possible size, instead
29540         of size PATH_MAX + 2. In the loop, increment the size proportionally.
29541         Use free/xmalloc instead of xrealloc to avoid copying for very long
29542         paths.
29543
29544 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
29545
29546         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
29547         the empty string.
29548
29549 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
29550
29551         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
29552         address, not strdup.  Include <stdlib.h> and don't declare free().
29553
29554 2000-06-19  Jim Meyering  <meyering@lucent.com>
29555
29556         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
29557
29558 2000-06-18  Jim Meyering  <meyering@lucent.com>
29559
29560         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
29561
29562         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
29563         `checking whether...' message to be consistent with that of the
29564         lstat test.
29565
29566 2000-06-18  Jim Meyering  <meyering@lucent.com>
29567
29568         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
29569         Besides, these days every porting target provides a mkdir function.
29570
29571         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
29572         needed. (this snippet comes from src/system.h).
29573
29574 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
29575
29576         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
29577
29578 2000-06-15  Paul Eggert  <eggert@twinsun.com>
29579
29580         * lib/human.c (adjust_value): New function.
29581         (human_readable_inexact): Apply rounding style even when
29582         printing approximate values.
29583
29584 2000-06-14  Paul Eggert  <eggert@twinsun.com>
29585
29586         * lib/human.c (human_readable_inexact): Allow an input block
29587         size that is not a multiple of the output block size, and vice versa.
29588         Reported by Piergiorgio Sartor.
29589
29590 2000-06-14  Paul Eggert  <eggert@twinsun.com>
29591
29592         * lib/getdate.y (get_date): Apply relative times after time
29593         zone indicator, not before.  Reported by Todd A. Jacobs.
29594
29595 2000-06-13  Jim Meyering  <meyering@lucent.com>
29596
29597         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
29598
29599         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
29600
29601 2000-06-12  Paul Eggert  <eggert@twinsun.com>
29602
29603         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
29604
29605 2000-06-12  Jim Meyering  <meyering@lucent.com>
29606
29607         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
29608         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
29609         optional argument.
29610         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
29611         the optional argument, `lib'.
29612
29613 2000-06-08  Jim Meyering  <meyering@lucent.com>
29614
29615         * m4/largefile.m4: Remove file (now that it's part of autoconf).
29616
29617 2000-06-04  Paul Eggert  <eggert@twinsun.com>
29618
29619         Rewrite largefile configuration so that we don't need to run
29620         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
29621         AC_CANONICAL_HOST in configure.in -- jmm]
29622
29623         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
29624         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
29625         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
29626         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
29627         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
29628         All uses changed.
29629         Instead of inspecting the output of getconf, try to compile the
29630         test program without and with the macro definition.
29631         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
29632         for getconf.  Instead, check for the needed flags by compiling
29633         test programs.
29634
29635 2000-06-04  Paul Eggert  <eggert@twinsun.com>
29636
29637         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
29638
29639 2000-06-04  Jim Meyering  <meyering@lucent.com>
29640
29641         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
29642         SunOS 4.1.4 for which gid_t is an unsigned type.
29643
29644 2000-06-03  Jim Meyering  <meyering@lucent.com>
29645
29646         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
29647         now that autoconf requires that.
29648
29649         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
29650         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
29651         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
29652
29653 2000-06-03  Jim Meyering  <meyering@lucent.com>
29654
29655         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
29656
29657 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
29658
29659         * m4/glibc21.m4: New file.
29660         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
29661
29662 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
29663
29664         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
29665         newer, don't install charset.alias.
29666         * lib/config.charset: Change the Linux/glibc rules so they become empty
29667         on glibc-2.1 or newer.
29668
29669 2000-06-02  Jim Meyering  <meyering@lucent.com>
29670
29671         * lib/mountlist.c: Back out last change.  Instead, do this...
29672         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
29673         me_dummy member using the same `ignore'-testing code.
29674         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
29675         fs_type strings.
29676         From Mark D. Roth.
29677
29678 2000-05-29  Jim Meyering  <meyering@lucent.com>
29679
29680         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
29681         mounts with the `ignore' attribute.  Based on a patch from
29682         Mark D. Roth.
29683
29684 2000-05-28  Jim Meyering  <meyering@lucent.com>
29685
29686         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
29687         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
29688         * m4/stat.m4: Likewise.
29689         * m4/lstat.m4: Likewise.
29690         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
29691
29692         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
29693         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
29694
29695 2000-05-26  Jim Meyering  <meyering@lucent.com>
29696
29697         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
29698
29699 2000-05-24  Jim Meyering  <meyering@lucent.com>
29700
29701         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
29702         autoconf requires that.
29703         * m4/lib-check.m4: Likewise.
29704         * m4/jm-macros.m4: Likewise.
29705         * m4/strftime.m4: Likewise.
29706
29707         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
29708         AC_CHECK_DECLS, now that autoconf requires that.
29709
29710 2000-05-22  Jim Meyering  <meyering@lucent.com>
29711
29712         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
29713         * m4/lstat.m4: Likewise.
29714
29715 2000-05-22  Jim Meyering  <meyering@lucent.com>
29716
29717         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
29718
29719 2000-05-20  Jim Meyering  <meyering@lucent.com>
29720
29721         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
29722         (jm_PREREQ): Use it.
29723
29724 2000-05-18  Jim Meyering  <meyering@lucent.com>
29725
29726         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
29727         back, too, since it may have been modified by allocate_entry.
29728         (hash_delete): Rewrite to use neither the assignment operator
29729         nor the comma operator in an if-expression.
29730
29731 2000-05-15  Paul Eggert  <eggert@twinsun.com>
29732
29733         * lib/closeout.c:
29734         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
29735         Remove; no longer needed.
29736         "quotearg.h": Add include.
29737         (file_name): Do not bother to explicitly initialize to NULL; it's less
29738         efficient on some hosts.
29739         (close_stdout_status): Remove test as to whether stdout was already
29740         closed; it breaks for the case "echo x | sort >&-".
29741         Quote file name colons.
29742         Do not assume that _("write error") lacks format strings.
29743
29744 2000-05-15  Jim Meyering  <meyering@lucent.com>
29745
29746         * lib/version-etc.c (version_etc_copyright): Update the copyright
29747         string used in all --version output.
29748
29749 2000-05-14  Jim Meyering  <meyering@lucent.com>
29750
29751         * lib/closeout.c (close_stdout_set_file_name): New function.
29752         (close_stdout_status): Use new file-scoped global.
29753         Return right away if fstat says the stdout file descriptor is invalid.
29754         * lib/closeout.h (close_stdout_set_file_name): Declare.
29755
29756 2000-05-10  Jim Meyering  <meyering@lucent.com>
29757
29758         * lib/closeout.c [default_exit_status]: New file-scoped variable.
29759         (close_stdout_set_status): New function.
29760         * lib/closeout.h (close_stdout_set_status): Declare.
29761
29762 2000-05-09  Jim Meyering  <meyering@lucent.com>
29763
29764         * m4/gettext.m4: Rename this...
29765         * m4/libintl.m4: ...to this.
29766
29767 2000-05-08  Jim Meyering  <meyering@lucent.com>
29768
29769         * lib/long-options.c: Don't include closeout.h.
29770         (parse_long_options): Don't call close_stdout for --version.
29771
29772 2000-05-06  Paul Eggert  <eggert@twinsun.com>
29773
29774         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
29775         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
29776         2.1.3 bug.  This avoids a clash when files like regex.c define
29777         _GNU_SOURCE.
29778
29779 2000-05-06  Jim Meyering  <meyering@lucent.com>
29780
29781         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
29782         (AC_REPLACE_FUNCS): Add strnlen.
29783
29784         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
29785         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
29786
29787         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
29788         AC_SEARCH_LIBS call for nanosleep.
29789         (LIB_NANOSLEEP): Set and AC_SUBST.
29790
29791 2000-05-06  Jim Meyering  <meyering@lucent.com>
29792
29793         * lib/strnlen.c: Undefine __strnlen and strnlen.
29794         [!weak_alias]: Define __strnlen to strnlen.
29795
29796         * lib/atexit.c: New file, from libiberty.
29797
29798 2000-05-06  Jim Meyering  <meyering@lucent.com>
29799
29800         * lib/closeout.c (close_stdout_status): Also check for errors on the
29801         stderr stream.
29802
29803 2000-05-05  Jim Meyering  <meyering@lucent.com>
29804
29805         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
29806         AC_SEARCH_LIBS call for clock_gettime.
29807         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
29808
29809         * m4/search-libs.m4: Update from autoconf.
29810
29811         su doesn't work on Solaris 2.6.
29812         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
29813         <shadow.h>.  Reported by Dragos Harabor.
29814
29815 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
29816
29817         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
29818         memcpy instead of xmalloc, xrealloc, path_concat.
29819         (locale_charset): Treat empty environment variables as absent.
29820         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
29821
29822 2000-05-04  Jim Meyering  <meyering@lucent.com>
29823
29824         * lib/getopt.c: Update from glibc.
29825         * lib/obstack.c: Likewise.
29826         * lib/obstack.h: Likewise.
29827         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
29828         file
29829
29830         * lib/regex.h: Likewise.
29831         * lib/strndup.c: Likewise.
29832         * lib/strnlen.c: New file, from glibc.
29833
29834 2000-05-03  Jim Meyering  <meyering@lucent.com>
29835
29836         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
29837
29838 2000-05-02  Paul Eggert  <eggert@twinsun.com>
29839
29840         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
29841         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
29842         compile-time test, rather than inspecting host and OS, to
29843         decide whether to define _LARGEFILE_SOURCE.
29844
29845 2000-05-01  Jim Meyering  <meyering@lucent.com>
29846
29847         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
29848
29849         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
29850         Based on a patch from Bruno Haible.
29851
29852 2000-05-01  Jim Meyering  <meyering@lucent.com>
29853
29854         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
29855
29856 2000-04-29  Jim Meyering  <meyering@lucent.com>
29857
29858         * lib/path-concat.c: Declare strdup only if it's not defined.
29859         * lib/canon-host.c: Likewise.
29860
29861 2000-04-28  Jim Meyering  <meyering@lucent.com>
29862
29863         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
29864         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
29865         is included first, then limits.h is included by locale.h by libintl.h.
29866         From John David Anglin.
29867
29868 2000-04-25  Jim Meyering  <meyering@lucent.com>
29869
29870         * lib/makepath.c (S_IRWXUGO): Define.
29871         (make_path): Always perform explicit chmod if MODE specifies any
29872         of the `special' permission bits.  Prompted by a bug report against
29873         install from Mate Wierdl and Joost van Baal.
29874
29875 2000-04-18  Jim Meyering  <meyering@lucent.com>
29876
29877         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
29878         (jm_PREREQ): Use it.
29879
29880 2000-04-18  Jim Meyering  <meyering@lucent.com>
29881
29882         * lib/README: New file.
29883
29884         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
29885         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
29886
29887 2000-04-17  Jim Meyering  <meyering@lucent.com>
29888
29889         Get it right :-)
29890         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
29891         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
29892         Suggestion from Akim Demaille.
29893
29894 2000-04-17  Jim Meyering  <meyering@lucent.com>
29895
29896         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
29897         the definition of it to rpl_strftime also defined-away the system's
29898         declaration.
29899
29900 2000-04-15  Jim Meyering  <meyering@lucent.com>
29901
29902         Use `C' to denote so-called `contiguous' files, the same way
29903         that tar does.
29904         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
29905         (ftypelet): Use S_ISCTG.
29906         From Michael Deutschmann.
29907
29908 2000-04-14  Jim Meyering  <meyering@lucent.com>
29909
29910         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
29911         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
29912         clobbered.
29913
29914 2000-04-14  Jim Meyering  <meyering@lucent.com>
29915
29916         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
29917
29918 2000-04-13  Jim Meyering  <meyering@lucent.com>
29919
29920         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
29921         AH_VERBATIM to insert required #ifndef into config.h.in.
29922         Suggestion from Akim Demaille.
29923
29924 2000-04-12  Jim Meyering  <meyering@lucent.com>
29925
29926         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
29927         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
29928         Christian Krackowizer.
29929
29930         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
29931         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
29932         (AC_SYS_LARGEFILE): Require.
29933         (AM_C_PROTOTYPES): Require.
29934
29935 2000-04-08  Jim Meyering  <meyering@lucent.com>
29936
29937         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
29938         names don't conflict.  Reported by Eli Zaretskii.
29939
29940 2000-04-07  Jim Meyering  <meyering@lucent.com>
29941
29942         * lib/putenv.c: Move inclusion of errno.h so it follows that of
29943         sys/types.h, to work around system header problems on AIX 3.2.5.
29944         From Bruno Haible.
29945
29946 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
29947
29948         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
29949         bug.  Deal with the different error behavior of Irix iconv.
29950
29951 2000-04-05  Paul Eggert  <eggert@twinsun.com>
29952
29953         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
29954         IRIX if the installer said otherwise.
29955
29956 2000-04-05  Jim Meyering  <meyering@lucent.com>
29957
29958         Portability tweaks required for ultrix4.3.
29959         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
29960         (jm_CHECK_DECLS): Add getutent to the list of functions.
29961         (_jm_DECL_HEADERS): Add utmpx.h.
29962         From John David Anglin.
29963
29964         * m4/strftime.m4: Back out the 2000-04-02 change.
29965         Instead of that change, simply undefine putenv in the test program.
29966
29967 2000-04-05  Jim Meyering  <meyering@lucent.com>
29968
29969         Portability tweaks required for ultrix4.3.
29970         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
29971         getutent.
29972         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
29973         * lib/canon-host.c: Declare strdup.
29974         * lib/path-concat.c: Likewise.
29975         From John David Anglin.
29976
29977 2000-04-04  Jim Meyering  <meyering@lucent.com>
29978
29979         Be more DOS 8.3-friendly.
29980         * lib/ref-add.sin: Renamed from ref-add.sed.in.
29981         * lib/ref-del.sin: Renamed from ref-del.sed.in.
29982         * lib/Makefile.am: Reflect renaming.
29983         Reported by Eli Zaretskii.
29984
29985         Use a temporary file name that won't clash with `charset.alias'
29986         in the DOS 8.3 name space.
29987         * lib/Makefile.am (charset_tmp): Define.
29988         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
29989         (uninstall-local): Likewise.
29990         Reported by Eli Zaretskii.
29991
29992 2000-04-03  Jim Meyering  <meyering@lucent.com>
29993
29994         * m4/gettext.m4: Fix typo in comment.
29995
29996         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
29997         textutils/configure.in).  Suggestion from Paul Eggert.
29998         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
29999
30000 2000-04-02  Paul Eggert  <eggert@twinsun.com>
30001
30002         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
30003         variable in the shell rather than using putenv, which isn't
30004         portable.  This avoids the configure-time inter-test dependency
30005         on the potentially-renamed putenv function.
30006
30007 2000-03-30  Paul Eggert  <eggert@twinsun.com>
30008
30009         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
30010         before checking struct stat.st_blksize, so that
30011         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
30012
30013 2000-03-29  Paul Eggert  <eggert@twinsun.com>
30014
30015         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
30016         since strftime.c uses HAVE_STRFTIME to decide whether to use
30017         the underlying strftime.
30018
30019 2000-03-29  Paul Eggert  <eggert@twinsun.com>
30020
30021         * lib/time/strftime.c (my_strftime): Make sure we call the system
30022         strftime, not ourselves, when invoking the underlying strftime.
30023
30024 2000-03-24  Jim Meyering  <meyering@lucent.com>
30025
30026         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
30027         (charset_alias): Define.
30028         (install-exec-local): Factor out common code.
30029         (uninstall-local): Split lines longer than 80.
30030         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
30031         (SUFFIXES): Define.
30032         (.sed.in.sed): New rule.  Don't redirect directly to $@.
30033         (CLEANFILES): Add ref-add.sed and ref-del.sed.
30034
30035 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
30036
30037         * lib/config.charset: Output a line containing "Packages using this
30038         file".
30039         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
30040         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
30041         ref-del.sed): New rules.
30042
30043 2000-03-17  Jim Meyering  <meyering@lucent.com>
30044
30045         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
30046         Otherwise, include <strings.h>
30047
30048 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
30049
30050         * lib/unicodeio.c (utf8_wctomb): New function.
30051         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
30052         format instead of in UCS-4 with platform dependent endianness.
30053
30054 2000-03-10  Jim Meyering  <meyering@lucent.com>
30055
30056         * m4/lib-check.m4: Look for getspnam in -lgen, too.
30057         From Marco Franzen.
30058
30059 2000-03-07  Paul Eggert  <eggert@twinsun.com>
30060
30061         * lib/savedir.c (savedir): Work even if directory size is
30062         negative; this can happen with some screwy NFS configurations.
30063
30064 2000-03-06  Jim Meyering  <meyering@lucent.com>
30065
30066         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
30067         if it's NULL (because we ran out of memory).  From Bruno Haible.
30068
30069 2000-03-05  Jim Meyering  <meyering@lucent.com>
30070
30071         * lib/localcharset.c ("path-concat.h"): Include.
30072         (get_charset_aliases): Use path_concat instead of ANSI string
30073         concatenation.
30074
30075         * lib/unicodeio.h (PARAMS): Define.
30076         Use it to guard prototype.
30077
30078 2000-03-04  Jim Meyering  <meyering@lucent.com>
30079
30080         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
30081         for lib/localcharset.c.
30082
30083 2000-03-04  Jim Meyering  <meyering@lucent.com>
30084
30085         * lib/Makefile.am (install-exec-local): Create $(libdir) before
30086         installing into it.
30087         (uninstall-local): Uncomment this rule so `make distcheck' works
30088         once again.
30089
30090         * lib/unicodeio.c (<errno.h>): Include it.
30091         (errno): Declare if not defined.
30092
30093         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
30094
30095         * lib/config.charset: New version, incorporating remarks from a linux
30096         i18n mailing list.  From Bruno Haible.
30097
30098 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
30099
30100         * m4/codeset.m4: New file.
30101         * m4/iconv.m4: New file.
30102         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
30103
30104 2000-03-03  Jim Meyering  <meyering@lucent.com>
30105
30106         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
30107
30108 2000-03-02  Jim Meyering  <meyering@lucent.com>
30109
30110         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
30111         the messages come out on separate lines.
30112
30113         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
30114         rather than jm_CHECK_DECLARATIONS.
30115         * m4/decl.m4: Remove now-unused file.
30116
30117         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
30118         geteuid.
30119
30120 2000-03-02  Jim Meyering  <meyering@lucent.com>
30121
30122         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
30123
30124 2000-03-01  Jim Meyering  <meyering@lucent.com>
30125
30126         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
30127         * lib/unicodeio.c: Likewise.
30128
30129 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
30130
30131         * lib/config.charset: New file.
30132         * lib/localcharset.c: New file.
30133         * lib/unicodeio.h, lib/unicodeio.c: New files.
30134         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
30135         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
30136         (noinst_HEADERS): Add unicodeio.h.
30137         (all-local, install-exec-local, charset.alias): New targets.
30138
30139 2000-02-28  Paul Eggert  <eggert@twinsun.com>
30140
30141         * lib/quotearg.c (ALERT_CHAR): New macro.
30142         (quotearg_buffer_restyled): Use it.
30143
30144 2000-02-27  Jim Meyering  <meyering@lucent.com>
30145
30146         * m4/check-decl.m4: Add getenv to the list.
30147
30148 2000-02-27  Jim Meyering  <meyering@lucent.com>
30149
30150         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
30151         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
30152
30153         * lib/backupfile.c: Guard inclusion of stdlib.h with
30154         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
30155         Declare malloc if needed.
30156
30157         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
30158         `#ifndef HAVE_DECL..'
30159         now that autoconf always defines the HAVE_DECL_ symbols.
30160         * lib/human.c: Likewise.
30161         * lib/same.c: Likewise.
30162         * lib/strtoumax.c: Likewise.
30163
30164         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
30165         declaration check was not run.
30166         * lib/hash.c: Likewise.
30167         * lib/human.c: Likewise.
30168         * lib/same.c: Likewise.
30169         * lib/strtoumax.c: Likewise.
30170
30171         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
30172         `.', then first look up the entire `.'-containing string as a login
30173         name.
30174
30175 2000-02-23  Jim Meyering  <meyering@lucent.com>
30176
30177         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
30178         in place of my hack.
30179
30180 2000-02-18  Paul Eggert  <eggert@twinsun.com>
30181
30182         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
30183         (textint): New typedef.
30184         (parser_control): Member year changed from int to textint.
30185         All uses changed.
30186         (YYSTYPE): Removed; replaced by %union with int and textint members.
30187         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
30188         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
30189         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
30190         (tSNUMBER, tUNUMBER): Now of type <textintval>.
30191         (date, number, to_year): Use width of number in digits, not its value,
30192         to determine whether it's a 2-digit year, or a 2-digit time.
30193         (yylex): Store number of digits of numeric tokens.
30194         Reported by John Kendall.
30195
30196         (parser_control): Changed from struct parser_control to typedef (for
30197         consistency).  All uses changed.
30198
30199         (tID): Removed; not used.
30200         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
30201
30202 2000-02-14  Paul Eggert  <eggert@twinsun.com>
30203
30204         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
30205         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
30206
30207 2000-02-12  Jim Meyering  <meyering@lucent.com>
30208
30209         * lib/userspec.c (ISDIGIT): Define it.
30210         (isdigit): Remove definition.
30211         (is_number): Use ISDIGIT, not isdigit.
30212         <libintl.h>: Include.
30213         (_ and N_): Define.
30214         (parse_user_spec): Mark translatable strings.
30215
30216 2000-02-10  Jim Meyering  <meyering@lucent.com>
30217
30218         With these changes, nanosleep.[ch] are finally enough like the other
30219         lib/* replacement files to compile on a few more losing systems.
30220
30221         * lib/nanosleep.h: Don't include config.h.
30222         Remove prototype from declaration of nanosleep.
30223         (PARAMS): Remove now-unneeded definition.
30224         * lib/nanosleep.c: #undef nanosleep.
30225         (rpl_nanosleep): Rename from nanosleep.
30226
30227 2000-02-10  Jim Meyering  <meyering@lucent.com>
30228
30229         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
30230         gnu_nanosleep to rpl_nanosleep.
30231
30232 2000-02-09  Jim Meyering  <meyering@lucent.com>
30233
30234         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
30235         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
30236
30237 2000-02-08  Akim Demaille  <akim@epita.fr>
30238
30239         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
30240         `[' and `]' and remove uses of `changequote'.
30241         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
30242         (AC_SYS_LARGEFILE): Likewise.
30243         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
30244         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
30245         of changequote.
30246         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
30247         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
30248         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
30249         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
30250
30251 2000-02-05  Jim Meyering  <meyering@lucent.com>
30252
30253         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
30254         Remove explicit use of AC_HEADER_TIME.  It is required by
30255         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
30256         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
30257         in autoconf whereby the expansion of the latter ended up preceding
30258         the expansion of its prerequisite, AC_HEADER_TIME.
30259         Reported by Volker Borchert.
30260
30261 2000-02-03  Jim Meyering  <meyering@lucent.com>
30262
30263         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
30264
30265 2000-02-03  Jim Meyering  <meyering@lucent.com>
30266
30267         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
30268         rather than with `#if HAVE_UTMPNAME'.
30269
30270 2000-02-02  Jim Meyering  <meyering@lucent.com>
30271
30272         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
30273         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
30274         Reported by Eli Zaretskii.
30275
30276 2000-02-01  Jim Meyering  <meyering@lucent.com>
30277
30278         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
30279
30280 2000-01-31  Jim Meyering  <meyering@lucent.com>
30281
30282         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
30283         functions.  Add the time.h and sys/time.h headers along with the
30284         AC_REQUIRE'ment of AC_HEADER_TIME.
30285
30286 2000-01-31  Jim Meyering  <meyering@lucent.com>
30287
30288         * lib/nanosleep.h (nanosleep): Guard declaration with
30289         `#if ! HAVE_DECL_NANOSLEEP'.
30290         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
30291         the declaration in that vendor's sys/timers.h.
30292         Reported by Christian Krackowizer.
30293
30294         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
30295         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
30296         (ISPRINT): Likewise.
30297         Reported by Tom Tromey.
30298
30299 2000-01-30  Jim Meyering  <meyering@lucent.com>
30300
30301         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
30302
30303         * m4/prereq.m4 (utmp_includes): Define.
30304         Check for ut_user and ut_name members in both struct utmpx
30305         and struct utmp.
30306
30307 2000-01-30  Jim Meyering  <meyering@lucent.com>
30308
30309         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
30310         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
30311         header files where only utmpx.ut_user is declared.
30312
30313         * lib/readutmp.h (UT_USER): Define.
30314
30315 2000-01-29  Jim Meyering  <meyering@lucent.com>
30316
30317         * m4/lib-check.m4: New file containing library-related checks from
30318         fileutils and sh-utils (textutils had none).
30319
30320 2000-01-28  Jim Meyering  <meyering@lucent.com>
30321
30322         * m4/perl.m4: Change format of warning message to look more like that
30323         from the missing script.  Suggestion from François Pinard.
30324
30325 2000-01-25  Jim Meyering  <meyering@lucent.com>
30326
30327         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
30328         well as time.h in the compile check.
30329         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
30330         Fix typo in cross-compiling case: s/yes/no/.
30331
30332 2000-01-23  Jim Meyering  <meyering@lucent.com>
30333
30334         * m4/jm-macros.m4: Move df-related tests here from
30335         fileutils/configure.in
30336
30337         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
30338         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
30339
30340         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
30341         s/space/ac_fsusage_space/.
30342         (jm_FILE_SYSTEM_USAGE): Take two parameters.
30343
30344         * m4/ftruncate.m4: New file (derived from part of
30345         fileutils/configure.in).
30346         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
30347         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
30348
30349         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
30350         AC_SUBST these here, rather than just in sh-util/configure.in, so
30351         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
30352         all the same.
30353         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
30354         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
30355         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
30356         (AC_SUBST(POW_LIBM)): Likewise.
30357         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
30358
30359 2000-01-23  Jim Meyering  <meyering@lucent.com>
30360
30361         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
30362         obstack.c.
30363
30364 2000-01-22  Jim Meyering  <meyering@lucent.com>
30365
30366         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
30367
30368         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
30369
30370         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
30371         configure.in
30372         (AC_CHECK_HEADERS): Likewise for sh-utils.
30373         (AC_CHECK_HEADERS): Likewise for textutils.
30374         Merge the three lists of headers.
30375
30376         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
30377         from fileutils' configure.in.
30378
30379         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
30380         code. Moved tests into their own function (_jm_DECL_HEADERS) in
30381         check-decl.m4.
30382
30383         * m4/check-decl.m4: Use #if rather than #ifdef.
30384         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
30385         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
30386         (_jm_DECL_HEADERS): Define new function.
30387         (jm_CHECK_DECLARATIONS): Require it.
30388
30389 2000-01-22  Jim Meyering  <meyering@lucent.com>
30390
30391         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
30392         [! HAVE_DECL_STRTOULL]: Declare strtoull.
30393         Required for some AIX systems.  Reported by Christian Krackowizer.
30394         [TESTING] (main): New function.
30395
30396         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
30397         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
30398         letters.
30399
30400         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
30401         iswprint.
30402
30403         * lib/strverscmp.c (ISDIGIT): Define.
30404         (strverscmp): Use ISDIGIT, not isdigit.
30405
30406 2000-01-19  Jim Meyering  <meyering@lucent.com>
30407
30408         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
30409         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
30410         defines `struct timespec' in <sys/time.h>
30411
30412         * m4/c-bs-a.m4: Remove uses of changequote altogether.
30413         Thanks to Akim for explaining.
30414
30415 2000-01-17  Paul Eggert  <eggert@twinsun.com>
30416
30417         * lib/nanosleep.c (nanosleep):
30418         Don't use SA_INTERRUPT to decide whether to call sigaction, as
30419         POSIX.1 doesn't require SA_INTERRUPT and some systems
30420         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
30421         it's been part of POSIX.1 since day 1 (in 1988).
30422
30423 2000-01-17  Jim Meyering  <meyering@lucent.com>
30424
30425         * lib/interlock: Remove unused file.  Reported by François Pinard.
30426
30427 2000-01-16  Paul Eggert  <eggert@twinsun.com>
30428
30429         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
30430         alert, backslash, formfeed, and vertical tab unnecessarily in
30431         shell quoting style.
30432
30433 2000-01-16  Jim Meyering  <meyering@lucent.com>
30434
30435         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
30436         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
30437         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
30438         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
30439
30440 2000-01-16  Jim Meyering  <meyering@lucent.com>
30441
30442         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
30443         because the latter didn't work.
30444
30445 2000-01-15  Jim Meyering  <meyering@lucent.com>
30446
30447         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
30448         (AC_REPLACE_FUNCS): Add memcpy and memset.
30449         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
30450         Add strpbrk.
30451         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
30452
30453 2000-01-12  Jim Meyering  <meyering@lucent.com>
30454
30455         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
30456         (jm_PREREQ): Use it.
30457         (jm_PREREQ_READUTMP): New macro.
30458         (jm_PREREQ): Use it.
30459
30460 2000-01-11  Paul Eggert  <eggert@twinsun.com>
30461
30462         Quote multibyte characters correctly.
30463         * m4/c-bs-a.m4: New file.
30464         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
30465         (jm_PREREQ): Use it.
30466
30467 2000-01-11  Paul Eggert  <eggert@twinsun.com>
30468
30469         * m4/uintmax_t.m4: Port to autoconf 2.13.
30470
30471 2000-01-08  Jim Meyering  <meyering@ascend.com>
30472
30473         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
30474         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
30475
30476 2000-01-04  Jim Meyering  <meyering@ascend.com>
30477
30478         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
30479         jm_STRUCT_DIRENT_D_TYPE.
30480         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
30481         jm_STRUCT_DIRENT_D_INO.
30482         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
30483         jm_STRUCT_UTIMBUF.
30484         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
30485         renamings.
30486         * m4/utime.m4: Likewise.
30487
30488         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
30489         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
30490
30491 2000-01-03  Paul Eggert  <eggert@twinsun.com>
30492
30493         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
30494         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
30495
30496 2000-01-02  Jim Meyering  <meyering@ascend.com>
30497
30498         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
30499         remember if this is necessary.
30500
30501 1999-12-26  Jim Meyering  <meyering@ascend.com>
30502
30503         * m4/jm-macros.m4: Use it here.
30504         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
30505
30506 1999-12-23  Jim Meyering  <meyering@ascend.com>
30507
30508         * m4/jm-macros.m4: Check for clock_gettime (moved from
30509         fileutils/configure.in)
30510         Check for gettimeofday.
30511
30512 1999-12-20  Jim Meyering  <meyering@ascend.com>
30513
30514         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
30515         autoconf-2.14a-1999-12-20.
30516
30517 1999-12-19  Jim Meyering  <meyering@ascend.com>
30518
30519         * m4/lstat-slash.m4: New file.
30520         * m4/jm-macros.m4: Use the new macro:
30521         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
30522
30523 1999-12-07  Jim Meyering  <meyering@ascend.com>
30524
30525         * m4/perl.m4: Require that File::Compare be available, too.
30526         Too many systems seem to lack it.
30527
30528         * m4/strftime.m4: Add checks for most of the cpp macros tested in
30529         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
30530
30531 1999-11-18  Paul Eggert  <eggert@twinsun.com>
30532
30533         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
30534         problem with the QNX 4.25 shell, which doesn't propagate exit
30535         status of failed commands inside shell assignments.
30536
30537 1999-11-17  Jim Meyering  <meyering@ascend.com>
30538
30539         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
30540
30541 1999-11-07  Jim Meyering  <meyering@ascend.com>
30542
30543         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
30544
30545 1999-11-06  Jim Meyering  <meyering@ascend.com>
30546
30547         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
30548         * m4/jm-macros.m4 (jm_MACROS): Use it here.
30549
30550 1999-11-05  Jim Meyering  <meyering@ascend.com>
30551
30552         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
30553         configure.in of textutils, fileutils, and sh-utils into this one
30554         (shared between those packages) file.
30555         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
30556         AC_STRUCT_ST_BLKSIZE.
30557
30558 1999-11-03  Jim Meyering  <meyering@ascend.com>
30559
30560         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
30561         of AC_CHECK_TYPE checks includes unistd.h.
30562         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
30563         Suggestion from Akim Demaille.
30564
30565 1999-10-30  Jim Meyering  <meyering@ascend.com>
30566
30567         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
30568         m4-quoted string.
30569         * m4/ls-mntd-fs.m4: Likewise.
30570         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
30571         * m4/jm-winsz1.m4: Likewise.
30572
30573         * m4/const.m4: Remove file, since the fix made it into the experimental
30574         version of autoconf.
30575         * m4/mktime.m4: Likewise.
30576
30577         * m4/check-type.m4: Remove file, now that the latest version of
30578         AC_CHECK_TYPE takes a third arg to specify additional #includes.
30579
30580         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
30581         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
30582         AC_CHECK_TYPE.
30583
30584 1999-10-04  Jim Meyering  <meyering@ascend.com>
30585
30586         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
30587
30588 1999-09-22  Paul Eggert  <eggert@twinsun.com>
30589
30590         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
30591         2.95.1 bug with HP-UX 10.20.
30592
30593 1999-09-17  Jim Meyering  <meyering@ascend.com>
30594
30595         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
30596         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
30597         due to missing strdup (against sh-utils-2.0).
30598
30599 1999-08-29  Jim Meyering  <meyering@ascend.com>
30600
30601         * m4/jm-macros.m4: Require jm_BISON.
30602         * m4/bison.m4: New file.
30603
30604 1999-08-17  Paul Eggert  <eggert@twinsun.com>
30605
30606         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
30607         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
30608
30609 1999-08-05  Jim Meyering  <meyering@ascend.com>
30610
30611         * m4/getline.m4: Rename test file from conftestdata to conftest.data
30612         to avoid conflicts with `conftest' on 8+3 filesystems.
30613         Suggestion from Eli Zaretskii.
30614
30615 1999-08-04  Jim Meyering  <meyering@ascend.com>
30616
30617         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
30618         fileutils and sh-utils (textutils's getline test was inadequate).
30619         (AM_FUNC_GETLINE): Run this test.
30620         (AC_CHECK_FUNCS): Check for getdelim.
30621         Reported by Bob Proulx.
30622
30623 1999-08-02  Jim Meyering  <meyering@ascend.com>
30624
30625         * m4/jm-macros.m4: Add a comment.
30626
30627 1999-08-01  Paul Eggert  <eggert@twinsun.com>
30628
30629         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
30630         <inttypes.h> defines strtoumax as a macro (and not as a
30631         function).
30632
30633 1999-08-01  Paul Eggert  <eggert@twinsun.com>
30634
30635         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
30636         that we can shift, multiply and divide unsigned long long
30637         values; Ultrix cc can't do it.
30638
30639 1999-08-01  Paul Eggert  <eggert@twinsun.com>
30640
30641         * m4/mktime.m4: New file, which is a preview of what should appear
30642         in the next public autoconf release.
30643
30644 1999-08-01  Paul Eggert  <eggert@twinsun.com>
30645
30646         * m4/lfs.m4: Remove this file.
30647         * m4/largefile.m4: New file.  It contains the old contents of
30648         lfs.m4, except that all names with prefix AC_LFS have been
30649         changed to use the prefix AC_SYS_LARGEFILE instead, to be
30650         compatible with future autoconf versions.  Also, some minor m4
30651         quoting problems have been fixed.
30652
30653 1999-08-01  Paul Eggert  <eggert@twinsun.com>
30654
30655         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
30656         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
30657         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
30658         and simplify the shell code.
30659
30660 1999-08-01  Jim Meyering  <meyering@ascend.com>
30661
30662         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
30663         m4.
30664
30665 1999-07-20  Jim Meyering  <meyering@ascend.com>
30666
30667         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
30668
30669 1999-07-15  Jim Meyering  <meyering@ascend.com>
30670
30671         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
30672
30673 1999-05-22  Jim Meyering  <meyering@ascend.com>
30674
30675         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
30676
30677 1999-05-20  Jim Meyering  <meyering@ascend.com>
30678
30679         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
30680         Add a colon after each `then' in case $4 is empty.
30681
30682 1999-05-16  Jim Meyering  <meyering@ascend.com>
30683
30684         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
30685
30686 1999-05-10  Jim Meyering  <meyering@ascend.com>
30687
30688         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
30689
30690         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
30691         AC_FUNC_MKTIME.
30692
30693 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
30694
30695         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
30696
30697 1999-05-04  Paul Eggert  <eggert@twinsun.com>
30698
30699         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
30700         not CPPFLAGS, so that linking works correctly in IRIX.
30701
30702 1999-04-30  Paul Eggert  <eggert@twinsun.com>
30703
30704         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
30705
30706 1999-04-20  Paul Eggert  <eggert@twinsun.com>
30707
30708         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
30709         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
30710         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
30711         jm_AC_TYPE_UNSIGNED_LONG_LONG.
30712         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
30713
30714         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
30715
30716 1999-04-20  Jim Meyering  <meyering@ascend.com>
30717
30718         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
30719         AC_REPLACE xstroull if necessary.  From Paul Eggert.
30720         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
30721
30722 1999-04-18  Jim Meyering  <meyering@ascend.com>
30723
30724         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
30725         * m4/jm-macros.m4: Use it.
30726
30727 1999-04-06  Jim Meyering  <meyering@ascend.com>
30728
30729         * m4/strftime.m4: Remove test for %f.
30730
30731 1999-03-29  Jim Meyering  <meyering@ascend.com>
30732
30733         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
30734         superset of the AC_TYPE_* checks in the textutils, fileutils,
30735         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
30736         AC_TYPE_PID_T.
30737
30738 1999-03-28  Jim Meyering  <meyering@ascend.com>
30739
30740         * m4/jm-macros.m4: Define GNU_PACKAGE here.
30741         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
30742         replaced e.g., in the *.sh files of the sh-utils.
30743
30744 1999-03-20  Jim Meyering  <meyering@ascend.com>
30745
30746         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
30747         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
30748         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
30749
30750 1999-03-19  Jim Meyering  <meyering@ascend.com>
30751
30752         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
30753
30754 1999-03-12  Jim Meyering  <meyering@ascend.com>
30755
30756         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
30757
30758 1999-03-07  Jim Meyering  <meyering@ascend.com>
30759
30760         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
30761         declared.
30762
30763 1999-02-17  Jim Meyering  <meyering@ascend.com>
30764
30765         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
30766         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
30767
30768 1999-02-07  Jim Meyering  <meyering@ascend.com>
30769
30770         * m4/group-member.m4: New file -- extracted from sh-utils'
30771         configure.in.
30772
30773         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
30774         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
30775
30776 1999-02-06  Jim Meyering  <meyering@ascend.com>
30777
30778         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
30779         * m4/fnmatch.m4: Likewise.
30780         * m4/getgroups.m4: Likewise.
30781         * m4/lstat.m4: Likewise.
30782         * m4/malloc.m4: Likewise.
30783         * m4/putenv.m4: Likewise.
30784         * m4/realloc.m4: Likewise.
30785         * m4/regex.m4: Likewise.
30786         * m4/stat.m4: Likewise.
30787         * m4/strftime.m4: Likewise.
30788         Suggestion from Alain Magloire.
30789
30790         * m4/chown.m4: Use `.$ac_objext', not `.o'.
30791         * m4/fnmatch.m4: Likewise.
30792         * m4/getgroups.m4: Likewise.
30793         * m4/getline.m4: Likewise.
30794         * m4/lstat.m4: Likewise.
30795         * m4/malloc.m4: Likewise.
30796         * m4/memcmp.m4: Likewise.
30797         * m4/putenv.m4: Likewise.
30798         * m4/realloc.m4: Likewise.
30799         * m4/regex.m4: Likewise.
30800         * m4/stat.m4: Likewise.
30801         * m4/strftime.m4: Likewise.
30802         Suggestion from Alain Magloire.
30803
30804         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
30805         an argument.
30806
30807         * m4/regex.m4: Add a run-time Test for proper operation of
30808         re_compile_pattern.
30809
30810 1999-01-31  Jim Meyering  <meyering@ascend.com>
30811
30812         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
30813
30814 1999-01-30  Jim Meyering  <meyering@ascend.com>
30815
30816         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
30817
30818         * m4/jm-mktime.m4: Make this a wrapper around the official
30819         AM_FUNC_MKTIME rather than my private copy, now that the official one
30820         is up to date.
30821         * m4/mktime.m4: Remove file.
30822
30823         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
30824         * m4/uptime.m4: Likewise.
30825         * m4/uintmax_t.m4: Likewise.
30826
30827 1999-01-28  Jim Meyering  <meyering@ascend.com>
30828
30829         * m4/jm-macros.m4: Use jm_AFS.
30830         * m4/afs.m4: New file (from fileutils' configure.in).
30831
30832         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
30833         * m4/chown.m4: Likewise.
30834         * m4/d-ino.m4: Likewise.
30835         * m4/d-type.m4: Likewise.
30836         * m4/fnmatch.m4: Likewise.
30837         * m4/getgroups.m4: Likewise.
30838         * m4/gettext.m4: Likewise.
30839         * m4/jm-mktime.m4: Likewise.
30840         * m4/jm-winsz2.m4: Likewise.
30841         * m4/lcmessage.m4: Likewise.
30842         * m4/ls-mntd-fs.m4: Likewise.
30843         * m4/malloc.m4: Likewise.
30844         * m4/memcmp.m4: Likewise.
30845         * m4/putenv.m4: Likewise.
30846         * m4/realloc.m4: Likewise.
30847         * m4/st_mtim.m4: Likewise.
30848         * m4/strftime.m4: Likewise.
30849
30850 1999-01-16  Jim Meyering  <meyering@ascend.com>
30851
30852         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
30853         (ARGMATCH_DIE_DECL): Define.
30854
30855 1999-01-12  Jim Meyering  <meyering@ascend.com>
30856
30857         * m4/Makefile.am.in: Rewrite to avoid using fmt.
30858         Reported by Lars Hecking.
30859
30860 1999-01-10  Jim Meyering  <meyering@ascend.com>
30861
30862         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
30863         gross kludge.
30864         * m4/inttypes_h.m4: Likewise.
30865         * m4/lstat.m4: Likewise.
30866         * m4/malloc.m4: Likewise.
30867         * m4/readdir.m4: Likewise.
30868         * m4/realloc.m4: Likewise.
30869         * m4/st_dm_mode.m4: Likewise.
30870         * m4/stat.m4: Likewise.
30871         * m4/utimbuf.m4: Likewise.
30872         * m4/utimes.m4: Likewise.
30873
30874         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
30875         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
30876         comments in config.h.in are meaningful.
30877
30878         * m4/jm-macros.m4: Require autoconf-2.13 here.
30879
30880         * m4/regex.m4: By default, don't use the included regex.c on systems
30881         with glibc 2.  Suggestion from Uli Drepper.
30882
30883 1999-01-02  Jim Meyering  <meyering@ascend.com>
30884
30885         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
30886
30887 1998-12-18  Jim Meyering  <meyering@ascend.com>
30888
30889         * m4/Makefile.am.in (Makefile.am): Simplify rule.
30890         Based on a suggestion from Lars Hecking.
30891
30892 1998-11-16  Paul Eggert  <eggert@twinsun.com>
30893
30894         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
30895
30896 1998-11-16  Jim Meyering  <meyering@ascend.com>
30897
30898         * m4/lfs.m4: Double-quote the `uname...` expression.
30899
30900 1998-11-14  Jim Meyering  <meyering@ascend.com>
30901
30902         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
30903         * m4/stat.m4: Likewise.
30904
30905 1998-11-03  Jim Meyering  <meyering@ascend.com>
30906
30907         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
30908         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
30909
30910 1998-10-18  Jim Meyering  <meyering@ascend.com>
30911
30912         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
30913
30914 1998-10-17  Jim Meyering  <meyering@ascend.com>
30915
30916         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
30917         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
30918         calls for those previously hard-coded headers.  Instead, take a new
30919         parameter.
30920         (jm_CHECK_DECLARATIONS): Reflect interface change.
30921         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
30922         (jm_CHECK_DECL_LOCALTIME_R): New macro.
30923
30924         * m4/mktime.m4: Test for spring-forward gap before long-running test.
30925
30926 1998-10-14  Jim Meyering  <meyering@ascend.com>
30927
30928         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
30929         instead of "TZ=America/Vancouver".  From Paul Eggert.
30930
30931 1998-10-11  Jim Meyering  <meyering@ascend.com>
30932
30933         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
30934         This adds a test for a recently added compatibility fix for mktime.c.
30935         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
30936
30937 1998-09-27  Jim Meyering  <meyering@ascend.com>
30938
30939         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
30940
30941         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
30942         ../configure.in, including a change from Gordon Matzigkeit to allow
30943         cross-compiling for the Hurd.
30944
30945         * m4/glibc.m4: New file/macro to test for the GNU C Library
30946         versions 1 and 2.  From Gordon Matzigkeit.
30947         Indent.
30948
30949 1998-09-21  Jim Meyering  <meyering@ascend.com>
30950
30951         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
30952
30953 1998-08-18  Paul Eggert  <eggert@twinsun.com>
30954
30955         Port nanosecond-resolution times to UnixWare 2.1.2 and
30956         pedantic Solaris 2.6.
30957
30958         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
30959         AC_STRUCT_ST_MTIM.
30960         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
30961         Generate name of ns member, instead of just 1 or undef.
30962         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
30963
30964 1998-08-15  Jim Meyering  <meyering@ascend.com>
30965
30966         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
30967         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
30968         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
30969         instead of jm_TYPE_SSIZE_T.
30970
30971 1998-08-12  Jim Meyering  <meyering@ascend.com>
30972
30973         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
30974
30975 1998-08-02  Jim Meyering  <meyering@ascend.com>
30976
30977         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
30978         in acconfig.h manually.
30979
30980 1998-07-31  Paul Eggert  <eggert@twinsun.com>
30981
30982         * m4/st_mtim.m4: New file.
30983
30984 1998-07-28  Jim Meyering  <meyering@ascend.com>
30985
30986         * m4/utimes.m4: Undef stat.
30987
30988 1998-07-25  Jim Meyering  <meyering@ascend.com>
30989
30990         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
30991         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
30992
30993 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
30994
30995         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
30996         uid and gid actually remain unchanged.
30997
30998 1998-07-07  Jim Meyering  <meyering@ascend.com>
30999
31000         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
31001
31002 1998-07-04  Jim Meyering  <meyering@ascend.com>
31003
31004         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
31005         to prove that this macro can be used in packages without regex.c.
31006
31007 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
31008
31009         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
31010         is to be used.
31011
31012 1998-07-03  Jim Meyering  <meyering@ascend.com>
31013
31014         * m4/gettext.m4: Add -lintl if it's found to be necessary.
31015
31016         * m4/gettext.m4: New file -- from gettext-0.10.35.
31017         * m4/lcmessage.m4: Likewise.
31018         * m4/progtest.m4: Likewise.
31019
31020         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
31021         * m4/jm-macros.m4: Require the new macro.
31022
31023 1998-06-29  Jim Meyering  <meyering@ascend.com>
31024
31025         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
31026         for the definition of NGROUPS (used in a system header included
31027         by sys/mount.h).
31028
31029 1998-06-28  Jim Meyering  <meyering@ascend.com>
31030
31031         * m4/ls-mntd-fs.m4: New file.
31032         * m4/fstypename.m4: New file.
31033
31034         * m4/jm-macros.m4: Require the new macro.
31035         * m4/jm-glibc-io.m4: New file.
31036
31037 1998-05-19  Jim Meyering  <meyering@ascend.com>
31038
31039         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
31040         * m4/lchown.m4: New file.
31041
31042         * m4/Makefile.am.in: New file.
31043         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
31044
31045 1998-05-14  Jim Meyering  <meyering@ascend.com>
31046
31047         * m4/Makefile.am (EXTRA_DIST): Add them.
31048         * m4/jm-macros.m4: New file.
31049         * m4/utimbuf.m4: New file.
31050
31051 1998-05-12  Jim Meyering  <meyering@ascend.com>
31052
31053         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
31054
31055 1998-05-11  Jim Meyering  <meyering@ascend.com>
31056
31057         * m4/isc-posix.m4: New file.
31058
31059 1998-05-10  Jim Meyering  <meyering@ascend.com>